Fix showing engine device settings
Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
7d0d88d71e
commit
96db6d8ef5
|
@ -169,9 +169,9 @@ const EngineDriverDeviceInfo* carla_get_engine_driver_device_info(uint index, co
|
|||
|
||||
if (const EngineDriverDeviceInfo* const devInfo = CarlaEngine::getDriverDeviceInfo(index, name))
|
||||
{
|
||||
retDevInfo.hints = devInfo->hints;
|
||||
retDevInfo.bufferSizes = (devInfo->bufferSizes != nullptr) ? devInfo->bufferSizes : nullBufferSizes;
|
||||
retDevInfo.sampleRates = (devInfo->sampleRates != nullptr) ? devInfo->sampleRates : nullSampleRates;
|
||||
retDevInfo.hints = devInfo->hints;
|
||||
retDevInfo.bufferSizes = devInfo->bufferSizes != nullptr ? devInfo->bufferSizes : nullBufferSizes;
|
||||
retDevInfo.sampleRates = devInfo->sampleRates != nullptr ? devInfo->sampleRates : nullSampleRates;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -224,8 +224,8 @@ const EngineDriverDeviceInfo* CarlaEngine::getDriverDeviceInfo(const uint index,
|
|||
devInfo.sampleRates = nullptr;
|
||||
return &devInfo;
|
||||
}
|
||||
--index2;
|
||||
}
|
||||
--index2;
|
||||
#endif
|
||||
|
||||
#ifdef USING_JUCE_AUDIO_DEVICES
|
||||
|
@ -260,7 +260,7 @@ const EngineDriverDeviceInfo* CarlaEngine::getDriverDeviceInfo(const uint index,
|
|||
--index2;
|
||||
#endif
|
||||
|
||||
carla_stderr("CarlaEngine::getDriverDeviceInfo(%u, \"%s\") - invalid index %u", index, index2, deviceName);
|
||||
carla_stderr("CarlaEngine::getDriverDeviceInfo(%u, \"%s\") - invalid index %u", index, deviceName, index2);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -304,7 +304,7 @@ bool CarlaEngine::showDriverDeviceControlPanel(const uint index, const char* con
|
|||
--index2;
|
||||
#endif
|
||||
|
||||
carla_stderr("CarlaEngine::showDriverDeviceControlPanel(%u, \"%s\") - invalid index %u", index, index2, deviceName);
|
||||
carla_stderr("CarlaEngine::showDriverDeviceControlPanel(%u, \"%s\") - invalid index %u", index, deviceName, index2);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -1007,8 +1007,7 @@ const char* getJuceApiName(const uint uindex)
|
|||
{
|
||||
initJuceDevicesIfNeeded();
|
||||
|
||||
const int index(static_cast<int>(uindex));
|
||||
|
||||
const int index = static_cast<int>(uindex);
|
||||
CARLA_SAFE_ASSERT_RETURN(index < gDeviceTypes.size(), nullptr);
|
||||
|
||||
juce::AudioIODeviceType* const deviceType(gDeviceTypes[index]);
|
||||
|
@ -1021,8 +1020,7 @@ const char* const* getJuceApiDeviceNames(const uint uindex)
|
|||
{
|
||||
initJuceDevicesIfNeeded();
|
||||
|
||||
const int index(static_cast<int>(uindex));
|
||||
|
||||
const int index = static_cast<int>(uindex);
|
||||
CARLA_SAFE_ASSERT_RETURN(index < gDeviceTypes.size(), nullptr);
|
||||
|
||||
juce::AudioIODeviceType* const deviceType(gDeviceTypes[index]);
|
||||
|
@ -1050,8 +1048,7 @@ const EngineDriverDeviceInfo* getJuceDeviceInfo(const uint uindex, const char* c
|
|||
{
|
||||
initJuceDevicesIfNeeded();
|
||||
|
||||
const int index(static_cast<int>(uindex));
|
||||
|
||||
const int index = static_cast<int>(uindex);
|
||||
CARLA_SAFE_ASSERT_RETURN(index < gDeviceTypes.size(), nullptr);
|
||||
|
||||
juce::AudioIODeviceType* const deviceType(gDeviceTypes[index]);
|
||||
|
@ -1088,7 +1085,7 @@ const EngineDriverDeviceInfo* getJuceDeviceInfo(const uint uindex, const char* c
|
|||
devInfo.hints |= ENGINE_DRIVER_DEVICE_HAS_CONTROL_PANEL;
|
||||
|
||||
juce::Array<int> juceBufferSizes = device->getAvailableBufferSizes();
|
||||
if (int bufferSizesCount = juceBufferSizes.size())
|
||||
if (const int bufferSizesCount = juceBufferSizes.size())
|
||||
{
|
||||
uint32_t* const bufferSizes(new uint32_t[bufferSizesCount+1]);
|
||||
|
||||
|
@ -1104,7 +1101,7 @@ const EngineDriverDeviceInfo* getJuceDeviceInfo(const uint uindex, const char* c
|
|||
}
|
||||
|
||||
juce::Array<double> juceSampleRates = device->getAvailableSampleRates();
|
||||
if (int sampleRatesCount = juceSampleRates.size())
|
||||
if (const int sampleRatesCount = juceSampleRates.size())
|
||||
{
|
||||
double* const sampleRates(new double[sampleRatesCount+1]);
|
||||
|
||||
|
@ -1124,8 +1121,7 @@ const EngineDriverDeviceInfo* getJuceDeviceInfo(const uint uindex, const char* c
|
|||
|
||||
bool showJuceDeviceControlPanel(const uint uindex, const char* const deviceName)
|
||||
{
|
||||
const int index(static_cast<int>(uindex));
|
||||
|
||||
const int index = static_cast<int>(uindex);
|
||||
CARLA_SAFE_ASSERT_RETURN(index < gDeviceTypes.size(), false);
|
||||
|
||||
juce::AudioIODeviceType* const deviceType(gDeviceTypes[index]);
|
||||
|
|
Loading…
Reference in New Issue