Commit be6c72d1 authored by Emmanuel Milou's avatar Emmanuel Milou
Browse files

FIx the switching layer bug

parent 9e24b986
......@@ -44,7 +44,12 @@ static void audioCallback ( pa_stream* s, size_t bytes, void* userdata )
// Destructor
PulseLayer::~PulseLayer (void)
{
closeLayer();
/* Delete the pointer streams */
delete playback;
delete record;
pa_context_disconnect( context );
pa_context_unref( context );
}
void
......@@ -58,15 +63,6 @@ PulseLayer::closeLayer( void )
while(PulseLayer::streamState != 2)
;
PulseLayer::streamState = 0;
delete playback;
delete record;
pa_context_disconnect( context );
pa_context_unref( context );
//TODO Remove this ugly hack
sleep(2);
}
void
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment