From b189f37aa43eba74f7b7258f94b284cfd09033e6 Mon Sep 17 00:00:00 2001
From: Yun Liu <yun@yun.(none)>
Date: Thu, 2 Oct 2008 11:33:02 -0400
Subject: [PATCH] Fix the daemon crush problem

---
 src/audio/audiolayer.h    | 4 ++--
 src/audio/audiostream.cpp | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/audio/audiolayer.h b/src/audio/audiolayer.h
index b0b765e446..44a4d4d15f 100644
--- a/src/audio/audiolayer.h
+++ b/src/audio/audiolayer.h
@@ -73,7 +73,7 @@ class AudioLayer {
         , _inChannel( 1 )
         , _outChannel ( 1 )
         , _errorMessage ( 0 )
-        , _mutex (NULL)
+        , _mutex ()
     {
 
     }
@@ -82,7 +82,7 @@ class AudioLayer {
     /**
      * Destructor
      */
-    virtual ~AudioLayer(void){}
+    ~AudioLayer(void){}
 
     virtual void closeLayer( void ) = 0;
 
diff --git a/src/audio/audiostream.cpp b/src/audio/audiostream.cpp
index 9c8638e4a8..89c6b29b02 100644
--- a/src/audio/audiostream.cpp
+++ b/src/audio/audiostream.cpp
@@ -22,7 +22,7 @@
 static pa_channel_map channel_map ;
 
 AudioStream::AudioStream( pa_context* context, int type, std::string desc, double vol )
-		: _audiostream (createStream( context )), _streamType(type), _streamDescription(desc), flag(PA_STREAM_AUTO_TIMING_UPDATE), sample_spec(), _volume()
+		: _audiostream(NULL), _streamType(type), _streamDescription(desc), flag(PA_STREAM_AUTO_TIMING_UPDATE), sample_spec(), _volume()
 { 
   sample_spec.format = PA_SAMPLE_S16LE; 
   sample_spec.rate = 44100; 
@@ -30,7 +30,7 @@ AudioStream::AudioStream( pa_context* context, int type, std::string desc, doubl
   channel_map.channels = 1; 
   pa_cvolume_set( &_volume , 1 , PA_VOLUME_MUTED ) ; // * vol / 100 ;
   
-  //_audiostream =  createStream( context );
+  _audiostream =  createStream( context );
 } 
 
 AudioStream::~AudioStream()
-- 
GitLab