|
|
@@ -622,12 +622,9 @@ public: |
|
|
|
|
|
|
|
|
stop (false);
|
|
|
stop (false);
|
|
|
|
|
|
|
|
|
const auto activeIns = BigInteger().setRange (0, jmin (ins .getHighestBit() + 1, getNumChannelNames (inStream)), true);
|
|
|
|
|
|
const auto activeOuts = BigInteger().setRange (0, jmin (outs.getHighestBit() + 1, getNumChannelNames (outStream)), true);
|
|
|
|
|
|
|
|
|
|
|
|
if (! setNominalSampleRate (newSampleRate))
|
|
|
if (! setNominalSampleRate (newSampleRate))
|
|
|
{
|
|
|
{
|
|
|
updateDetailsFromDevice (activeIns, activeOuts);
|
|
|
|
|
|
|
|
|
updateDetailsFromDevice (ins, outs);
|
|
|
error = "Couldn't change sample rate";
|
|
|
error = "Couldn't change sample rate";
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
else
|
|
|
@@ -637,7 +634,7 @@ public: |
|
|
juceAudioObjectPropertyElementMain },
|
|
|
juceAudioObjectPropertyElementMain },
|
|
|
static_cast<UInt32> (bufferSizeSamples), err2log()))
|
|
|
static_cast<UInt32> (bufferSizeSamples), err2log()))
|
|
|
{
|
|
|
{
|
|
|
updateDetailsFromDevice (activeIns, activeOuts);
|
|
|
|
|
|
|
|
|
updateDetailsFromDevice (ins, outs);
|
|
|
error = "Couldn't change buffer size";
|
|
|
error = "Couldn't change buffer size";
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
else
|
|
|
@@ -646,7 +643,7 @@ public: |
|
|
// correctly report their new settings until some random time in the future, so
|
|
|
// correctly report their new settings until some random time in the future, so
|
|
|
// after calling updateDetailsFromDevice, we need to manually bodge these values
|
|
|
// after calling updateDetailsFromDevice, we need to manually bodge these values
|
|
|
// to make sure we're using the correct numbers..
|
|
|
// to make sure we're using the correct numbers..
|
|
|
updateDetailsFromDevice (activeIns, activeOuts);
|
|
|
|
|
|
|
|
|
updateDetailsFromDevice (ins, outs);
|
|
|
sampleRate = newSampleRate;
|
|
|
sampleRate = newSampleRate;
|
|
|
bufferSize = bufferSizeSamples;
|
|
|
bufferSize = bufferSizeSamples;
|
|
|
|
|
|
|
|
|
@@ -837,13 +834,13 @@ public: |
|
|
//==============================================================================
|
|
|
//==============================================================================
|
|
|
struct Stream
|
|
|
struct Stream
|
|
|
{
|
|
|
{
|
|
|
Stream (bool isInput, CoreAudioInternal& parent, const BigInteger& active)
|
|
|
|
|
|
|
|
|
Stream (bool isInput, CoreAudioInternal& parent, const BigInteger& activeRequested)
|
|
|
: input (isInput),
|
|
|
: input (isInput),
|
|
|
latency (getLatencyFromDevice (isInput, parent)),
|
|
|
latency (getLatencyFromDevice (isInput, parent)),
|
|
|
bitDepth (getBitDepthFromDevice (isInput, parent)),
|
|
|
bitDepth (getBitDepthFromDevice (isInput, parent)),
|
|
|
activeChans (active),
|
|
|
|
|
|
chanNames (getChannelNames (isInput, parent)),
|
|
|
chanNames (getChannelNames (isInput, parent)),
|
|
|
channelInfo (getChannelInfos (isInput, parent, active)),
|
|
|
|
|
|
|
|
|
activeChans (BigInteger().setRange (0, jmin (activeRequested.getHighestBit() + 1, chanNames.size()), true)),
|
|
|
|
|
|
channelInfo (getChannelInfos (isInput, parent, activeChans)),
|
|
|
channels (static_cast<int> (channelInfo.size()))
|
|
|
channels (static_cast<int> (channelInfo.size()))
|
|
|
{}
|
|
|
{}
|
|
|
|
|
|
|
|
|
@@ -984,8 +981,8 @@ public: |
|
|
const bool input;
|
|
|
const bool input;
|
|
|
const int latency;
|
|
|
const int latency;
|
|
|
const int bitDepth;
|
|
|
const int bitDepth;
|
|
|
const BigInteger activeChans;
|
|
|
|
|
|
const StringArray chanNames;
|
|
|
const StringArray chanNames;
|
|
|
|
|
|
const BigInteger activeChans;
|
|
|
const Array<CallbackDetailsForChannel> channelInfo;
|
|
|
const Array<CallbackDetailsForChannel> channelInfo;
|
|
|
const int channels = 0;
|
|
|
const int channels = 0;
|
|
|
Float64 previousSampleTime;
|
|
|
Float64 previousSampleTime;
|
|
|
|