forked from mia/Aegisub
Correctly write float header when saving WAV audio clip
Fix wangqr/Aegisub#56
This commit is contained in:
parent
65ba6af0f0
commit
5f326cc873
1 changed files with 1 additions and 1 deletions
|
@ -241,7 +241,7 @@ void SaveAudioClip(AudioProvider const& provider, fs::path const& path, int star
|
|||
|
||||
out.write("WAVEfmt ");
|
||||
out.write<int32_t>(16); // Size of chunk
|
||||
out.write<int16_t>(1); // compression format (PCM)
|
||||
out.write<int16_t>(provider.AreSamplesFloat() ? 3 : 1); // compression format (1: WAVE_FORMAT_PCM, 3: WAVE_FORMAT_IEEE_FLOAT)
|
||||
out.write<int16_t>(provider.GetChannels());
|
||||
out.write<int32_t>(provider.GetSampleRate());
|
||||
out.write<int32_t>(provider.GetSampleRate() * provider.GetChannels() * provider.GetBytesPerSample());
|
||||
|
|
Loading…
Reference in a new issue