improve process of closing sound devices
This commit is contained in:
parent
414b9708f4
commit
0e47f53f88
|
|
@ -50,23 +50,23 @@ int setupsound()
|
||||||
|
|
||||||
int freesound()
|
int freesound()
|
||||||
{
|
{
|
||||||
|
if (mainloop) {
|
||||||
|
pa_threaded_mainloop_lock(mainloop);
|
||||||
|
}
|
||||||
if (context)
|
if (context)
|
||||||
pa_context_unref(context);
|
pa_context_unref(context);
|
||||||
|
|
||||||
if (mainloop) {
|
if (mainloop) {
|
||||||
pa_signal_done();
|
pa_signal_done();
|
||||||
|
pa_threaded_mainloop_unlock(mainloop);
|
||||||
pa_threaded_mainloop_free(mainloop);
|
pa_threaded_mainloop_free(mainloop);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
int setupsound()
|
int setupsound()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
slogi("connecting portaudio...");
|
slogi("connecting portaudio...");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue