Skip to content

Commit ee36289

Browse files
committed
style: add brackets for consistency
1 parent 7c07038 commit ee36289

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

AudioFile.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)