Fix some issues with pulseaudio not stopping properly.
This commit is contained in:
@@ -101,7 +101,8 @@ int sounddev_free(SimDevice* this)
|
||||
{
|
||||
SoundDevice* sounddevice = (void *) this->derived;
|
||||
|
||||
usb_generic_shaker_free(sounddevice);
|
||||
//figure out why this is causing problems
|
||||
//usb_generic_shaker_free(sounddevice);
|
||||
|
||||
free(sounddevice);
|
||||
|
||||
|
||||
@@ -212,6 +212,7 @@ int main(int argc, char** argv)
|
||||
setupsound();
|
||||
SimDevice* devices = malloc(numdevices * sizeof(SimDevice));
|
||||
int initdevices = devinit(devices, configureddevices, ds, ms);
|
||||
bool pulseaudio = false;
|
||||
|
||||
if (p->program_action == A_PLAY)
|
||||
{
|
||||
@@ -223,6 +224,7 @@ int main(int argc, char** argv)
|
||||
//}
|
||||
#ifdef USE_PULSEAUDIO
|
||||
pa_threaded_mainloop_unlock(mainloop);
|
||||
pulseaudio = true;
|
||||
#endif
|
||||
|
||||
error = looper(devices, initdevices, p);
|
||||
@@ -241,6 +243,7 @@ int main(int argc, char** argv)
|
||||
|
||||
#ifdef USE_PULSEAUDIO
|
||||
pa_threaded_mainloop_unlock(mainloop);
|
||||
pulseaudio = true;
|
||||
#endif
|
||||
|
||||
error = tester(devices, initdevices);
|
||||
@@ -262,6 +265,10 @@ int main(int argc, char** argv)
|
||||
devices[x].free(&devices[x]);
|
||||
}
|
||||
}
|
||||
if(pulseaudio == true)
|
||||
{
|
||||
freesound();
|
||||
}
|
||||
|
||||
i = 0;
|
||||
// improve the api around the config helper
|
||||
|
||||
Reference in New Issue
Block a user