1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-27 02:20:05 +00:00

Minor code clean-ups.

This commit is contained in:
Julian Storer 2010-06-10 10:09:24 +01:00
parent cc45ec88f5
commit 6bcc8febca
25 changed files with 246 additions and 380 deletions

View file

@ -71,7 +71,6 @@ public:
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
audioProcID (0),
#endif
inputDevice (0),
isSlaveDevice (false),
deviceID (id),
started (false),
@ -105,7 +104,6 @@ public:
AudioObjectRemovePropertyListener (deviceID, &pa, deviceListenerProc, this);
stop (false);
delete inputDevice;
}
void allocateTempBuffers()
@ -770,7 +768,7 @@ public:
AudioDeviceIOProcID audioProcID;
#endif
CoreAudioInternal* inputDevice;
ScopedPointer<CoreAudioInternal> inputDevice;
bool isSlaveDevice;
private:
@ -874,7 +872,6 @@ public:
isOpen_ (false),
isStarted (false)
{
internal = 0;
CoreAudioInternal* device = 0;
if (outputDeviceId == 0 || outputDeviceId == inputDeviceId)
@ -914,8 +911,6 @@ public:
pa.mElement = kAudioObjectPropertyElementWildcard;
AudioObjectRemovePropertyListener (kAudioObjectSystemObject, &pa, hardwareListenerProc, internal);
delete internal;
}
const StringArray getOutputChannelNames()
@ -1084,7 +1079,7 @@ public:
juce_UseDebuggingNewOperator
private:
CoreAudioInternal* internal;
ScopedPointer<CoreAudioInternal> internal;
bool isOpen_, isStarted;
String lastError;

View file

@ -1503,7 +1503,7 @@ const String DSoundAudioIODevice::openDevice (const BigInteger& inputChannels,
enabledInputs.getHighestBit() + 1 - inChannels.size(),
false);
inputBuffers.setSize (enabledInputs.countNumberOfSetBits(), bufferSizeSamples);
inputBuffers.setSize (jmax (1, enabledInputs.countNumberOfSetBits()), bufferSizeSamples);
int i, numIns = 0;
for (i = 0; i <= enabledInputs.getHighestBit(); i += 2)
@ -1528,7 +1528,7 @@ const String DSoundAudioIODevice::openDevice (const BigInteger& inputChannels,
enabledOutputs.getHighestBit() + 1 - outChannels.size(),
false);
outputBuffers.setSize (enabledOutputs.countNumberOfSetBits(), bufferSizeSamples);
outputBuffers.setSize (jmax (1, enabledOutputs.countNumberOfSetBits()), bufferSizeSamples);
int numOuts = 0;
for (i = 0; i <= enabledOutputs.getHighestBit(); i += 2)