diff --git a/include/audacity/Types.h b/include/audacity/Types.h index 1614cc7dd..63f028964 100644 --- a/include/audacity/Types.h +++ b/include/audacity/Types.h @@ -70,7 +70,9 @@ public: sampleCount ( int v ) : value { v } {} sampleCount ( unsigned v ) : value { v } {} sampleCount ( long v ) : value { v } {} - sampleCount ( unsigned long v ) : value { v } {} + + // unsigned long is 64 bit on some platforms. Let it narrow. + sampleCount ( unsigned long v ) : value ( v ) {} // Beware implicit conversions from floating point values! // Otherwise the meaning of binary operators with sampleCount change diff --git a/src/Mix.cpp b/src/Mix.cpp index a16ca05e2..27993a8dd 100644 --- a/src/Mix.cpp +++ b/src/Mix.cpp @@ -255,7 +255,7 @@ Mixer::Mixer(const WaveTrackConstArray &inputTracks, , mQueueMaxLen{ 65536 } , mSampleQueue{ mNumInputTracks, mQueueMaxLen } - , mNumChannels{ static_cast(numOutChannels) } + , mNumChannels{ numOutChannels } , mGains{ mNumChannels } , mMayThrow{ mayThrow }