mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-08 22:23:59 +01:00
Fix warning about missing field initializers
This commit is contained in:
@@ -1948,17 +1948,35 @@ bool AudioUnitEffect::SetRateAndChannels()
|
|||||||
mUnitInitialized = false;
|
mUnitInitialized = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
AudioStreamBasicDescription streamFormat = {0};
|
AudioStreamBasicDescription streamFormat {
|
||||||
|
// Float64 mSampleRate;
|
||||||
|
mSampleRate,
|
||||||
|
|
||||||
streamFormat.mSampleRate = mSampleRate;
|
// UInt32 mFormatID;
|
||||||
streamFormat.mFormatID = kAudioFormatLinearPCM;
|
kAudioFormatLinearPCM,
|
||||||
streamFormat.mFormatFlags = kAudioFormatFlagsNativeFloatPacked |
|
|
||||||
kAudioFormatFlagIsNonInterleaved;
|
// UInt32 mFormatFlags;
|
||||||
streamFormat.mBitsPerChannel = sizeof(float) * 8;
|
(kAudioFormatFlagsNativeFloatPacked |
|
||||||
streamFormat.mChannelsPerFrame = mAudioIns;
|
kAudioFormatFlagIsNonInterleaved),
|
||||||
streamFormat.mFramesPerPacket = 1;
|
|
||||||
streamFormat.mBytesPerFrame = sizeof(float);
|
// UInt32 mBytesPerPacket;
|
||||||
streamFormat.mBytesPerPacket = sizeof(float);
|
sizeof(float),
|
||||||
|
|
||||||
|
// UInt32 mFramesPerPacket;
|
||||||
|
1,
|
||||||
|
|
||||||
|
// UInt32 mBytesPerFrame;
|
||||||
|
sizeof(float),
|
||||||
|
|
||||||
|
// UInt32 mChannelsPerFrame;
|
||||||
|
mAudioIns,
|
||||||
|
|
||||||
|
// UInt32 mBitsPerChannel;
|
||||||
|
sizeof(float) * 8,
|
||||||
|
|
||||||
|
// UInt32 mReserved;
|
||||||
|
0
|
||||||
|
};
|
||||||
|
|
||||||
result = AudioUnitSetProperty(mUnit,
|
result = AudioUnitSetProperty(mUnit,
|
||||||
kAudioUnitProperty_SampleRate,
|
kAudioUnitProperty_SampleRate,
|
||||||
|
|||||||
Reference in New Issue
Block a user