Skip to content
Snippets Groups Projects
Commit be6c72d1 authored by Emmanuel Milou's avatar Emmanuel Milou
Browse files

FIx the switching layer bug

parent 9e24b986
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment