Add WAV header to audio output file and name it according to the output file name
Created originally on Bitbucket by jpaana (Jarno Paananen)
Was already merged in Bitbucket before import, marked as merged by the import user
Source changeset not longer availableat the time of import. Commit listwill look empty
To avoid an extra step with the audio output file, this small patch adds RIFF WAV header to it. Also includes some warning fixes for printf format strings using sizeof(x) which gives size_t type and should be printed with %zd instead of just %d according to Clang.