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