teragonaudio / MrsWatson

A command-line VST plugin host
http://teragonaudio.com/MrsWatson.html
Other
486 stars 102 forks source link

WAV header writing: Sample rate is invalid (zero) #209

Closed juanvenado84 closed 9 years ago

juanvenado84 commented 9 years ago

extraData->sampleRate is double, but we have to write a uint instead.

Suggested fix is to change this: fwrite(&(extraData->sampleRate), sizeof(unsigned int), 1, extraData->fileHandle)

Into that: unsigned int sampleRateAsUint = (unsigned int)extraData->sampleRate; fwrite(&(sampleRateAsUint), sizeof(unsigned int), 1, extraData->fileHandle)

juanvenado84 commented 9 years ago

I submitted a pull request with a fix

juanvenado84 commented 9 years ago

Fixed with pull request 210