File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -997,7 +997,9 @@ bool AudioFile<T>::encodeWaveFile (std::vector<uint8_t>& fileData)
997997 if (audioFormat == WavAudioFormat::IEEEFloat)
998998 {
999999 if constexpr (std::is_same_v<T, float >)
1000+ {
10001001 sampleAsInt = (int32_t ) reinterpret_cast <int32_t &> (samples[channel][i]);
1002+ }
10011003 else if constexpr (std::is_same_v<T, double >)
10021004 {
10031005 auto sampleAsFloat = (float ) samples[channel][i];
@@ -1006,7 +1008,9 @@ bool AudioFile<T>::encodeWaveFile (std::vector<uint8_t>& fileData)
10061008 }
10071009 }
10081010 else // assume PCM
1011+ {
10091012 sampleAsInt = AudioSampleConverter<T>::sampleToThirtyTwoBitInt (samples[channel][i]);
1013+ }
10101014
10111015 addInt32ToFileData (fileData, sampleAsInt, Endianness::LittleEndian);
10121016 }
You can’t perform that action at this time.
0 commit comments