mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
fix return value on AU error in e070701
This commit is contained in:
parent
9359a157fa
commit
b75a826b9a
1 changed files with 4 additions and 5 deletions
|
|
@ -357,8 +357,8 @@ int CAAudioUnit::GetChannelInfo (AUChannelInfo** chaninfo, UInt32& cnt)
|
||||||
|
|
||||||
UInt32 elCountIn, elCountOut, elCount;
|
UInt32 elCountIn, elCountOut, elCount;
|
||||||
|
|
||||||
if (GetElementCount (kAudioUnitScope_Input, elCountIn)) return 1;
|
if (GetElementCount (kAudioUnitScope_Input, elCountIn)) return -1;
|
||||||
if (GetElementCount (kAudioUnitScope_Output, elCountOut)) return 1;
|
if (GetElementCount (kAudioUnitScope_Output, elCountOut)) return -1;
|
||||||
|
|
||||||
elCount = std::max(elCountIn, elCountOut);
|
elCount = std::max(elCountIn, elCountOut);
|
||||||
|
|
||||||
|
|
@ -366,17 +366,16 @@ int CAAudioUnit::GetChannelInfo (AUChannelInfo** chaninfo, UInt32& cnt)
|
||||||
|
|
||||||
for (unsigned int i = 0; i < elCountIn; ++i) {
|
for (unsigned int i = 0; i < elCountIn; ++i) {
|
||||||
UInt32 numChans;
|
UInt32 numChans;
|
||||||
if (NumberChannels (kAudioUnitScope_Input, i, numChans)) return 1;
|
if (NumberChannels (kAudioUnitScope_Input, i, numChans)) return -1;
|
||||||
(*chaninfo)[i].inChannels = numChans;
|
(*chaninfo)[i].inChannels = numChans;
|
||||||
}
|
}
|
||||||
for (unsigned int i = elCountIn; i < elCount; ++i) {
|
for (unsigned int i = elCountIn; i < elCount; ++i) {
|
||||||
(*chaninfo)[i].inChannels = 0;
|
(*chaninfo)[i].inChannels = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
for (unsigned int i = 0; i < elCountOut; ++i) {
|
for (unsigned int i = 0; i < elCountOut; ++i) {
|
||||||
UInt32 numChans;
|
UInt32 numChans;
|
||||||
if (NumberChannels (kAudioUnitScope_Output, i, numChans)) return 1;
|
if (NumberChannels (kAudioUnitScope_Output, i, numChans)) return -1;
|
||||||
(*chaninfo)[i].outChannels = numChans;
|
(*chaninfo)[i].outChannels = numChans;
|
||||||
}
|
}
|
||||||
for (unsigned int i = elCountOut; i < elCount; ++i) {
|
for (unsigned int i = elCountOut; i < elCount; ++i) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue