mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
CoreAudioIODevice: Fix handling channel configurations with disabled lower bits
Prior to this commit it was not possible to deactivate the first few channels of an audio device. If say channel 5 was active in the requested configuration then all channels up to 5 would be active as well regardless of the provided activation pattern.
This commit is contained in:
parent
b33dde8134
commit
5162793245
1 changed files with 6 additions and 1 deletions
|
|
@ -836,7 +836,12 @@ public:
|
|||
latency (getLatencyFromDevice (isInput, parent)),
|
||||
bitDepth (getBitDepthFromDevice (isInput, parent)),
|
||||
chanNames (getChannelNames (isInput, parent)),
|
||||
activeChans (BigInteger().setRange (0, jmin (activeRequested.getHighestBit() + 1, chanNames.size()), true)),
|
||||
activeChans ([&activeRequested, clearFrom = chanNames.size()]
|
||||
{
|
||||
auto result = activeRequested;
|
||||
result.setRange (clearFrom, result.getHighestBit() + 1 - clearFrom, false);
|
||||
return result;
|
||||
}()),
|
||||
channelInfo (getChannelInfos (isInput, parent, activeChans)),
|
||||
channels (static_cast<int> (channelInfo.size()))
|
||||
{}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue