Fix compilation error on portaudio codepath

This commit is contained in:
Paul Dino Jones 2024-05-30 17:25:07 +00:00
parent 580e6752ce
commit b01e0f461c
3 changed files with 8 additions and 23 deletions

View File

@ -24,27 +24,6 @@ int devupdate(SimDevice* this, SimData* simdata)
return 0;
}
int devfree(SimDevice* simdevices, int numdevices)
{
slogi("freeing %i simdevices...", numdevices);
int devices = 0;
int freed = 0;
for (int j = 0; j < 1; j++)
{
SimDevice simdev = simdevices[j];
if (simdev.initialized == true)
{
simdev.free(&simdev);
}
}
//free(simdevices);
return 0;
}
int devinit(SimDevice* simdevices, int numdevices, DeviceSettings* ds)
{
slogi("initializing simdevices...");

View File

@ -116,7 +116,7 @@ int usb_generic_shaker_init(SoundDevice* sounddevice)
sounddevice->outputParameters.suggestedLatency = Pa_GetDeviceInfo( sounddevice->outputParameters.device )->defaultLowOutputLatency;
sounddevice->outputParameters.hostApiSpecificStreamInfo = NULL;
if (sounddevice->effecttype == SOUNDEFFECT_GEARSHIFT)
if (sounddevice->effecttype == EFFECT_GEARSHIFT)
{
err = Pa_OpenStream( &sounddevice->stream,
NULL, /* No input. */

View File

@ -231,7 +231,13 @@ int main(int argc, char** argv)
}
devfree(devices, initdevices);
for (int x = 0; x < numdevices; x++)
{
if (devices[x].initialized == true)
{
devices[x].free(&devices[x]);
}
}
i = 0;
// improve the api around the config helper