diff --git a/src/monocoque/devices/sounddevice.c b/src/monocoque/devices/sounddevice.c index 607623a..a00c39b 100644 --- a/src/monocoque/devices/sounddevice.c +++ b/src/monocoque/devices/sounddevice.c @@ -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); diff --git a/src/monocoque/monocoque.c b/src/monocoque/monocoque.c index 087ae5a..6735cb0 100644 --- a/src/monocoque/monocoque.c +++ b/src/monocoque/monocoque.c @@ -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