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)
997
997
if (audioFormat == WavAudioFormat::IEEEFloat)
998
998
{
999
999
if constexpr (std::is_same_v<T, float >)
1000
+ {
1000
1001
sampleAsInt = (int32_t ) reinterpret_cast <int32_t &> (samples[channel][i]);
1002
+ }
1001
1003
else if constexpr (std::is_same_v<T, double >)
1002
1004
{
1003
1005
auto sampleAsFloat = (float ) samples[channel][i];
@@ -1006,7 +1008,9 @@ bool AudioFile<T>::encodeWaveFile (std::vector<uint8_t>& fileData)
1006
1008
}
1007
1009
}
1008
1010
else // assume PCM
1011
+ {
1009
1012
sampleAsInt = AudioSampleConverter<T>::sampleToThirtyTwoBitInt (samples[channel][i]);
1013
+ }
1010
1014
1011
1015
addInt32ToFileData (fileData, sampleAsInt, Endianness::LittleEndian);
1012
1016
}
You can’t perform that action at this time.
0 commit comments