Need an Audio Expert. - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3) +---- Forum: Help Me! (https://qb64phoenix.com/forum/forumdisplay.php?fid=10) +---- Thread: Need an Audio Expert. (/showthread.php?tid=3044) |
Need an Audio Expert. - ahenry3068 - 09-18-2024 I've got the following code. The purpose is to create a Medium byterate Wave file WITHOUT METADATA. I'm writing an Audio Book app for the Commander X16 and I don't have the processor power to parse and ignore Meta Data in the Wave. Ignoring it creates clicks when the METADATA is treated as Audio. I can create the proper files in Audacity but ffmpeg refuses to leave out the encoder MetaData even with the -metadata -1 directive. My solution for semi-automating the conversion is the following program which uses ffmpeg first to convert to raw_audio (no metadata) then use my code to tack on the WAV Header. My program kind of works, the files even play properly on the X16 where I'm ignoring a bunch of the WAV Header. But I'm missing something important as none of the big boy programs on Linux or Windows recognize my output as a Valid WAV. There are a couple fields in the RIFF/WAV Header I'm not filling in which I'm sure are the problem but I don't know what to put there. My code is attached and any help is appreciated. Code is meant for Linux and hasn't been ported for Windows yet, ffmpeg must be installed. Identified one problem. Header.FmtSpecific has to be set equal to 16. But that still doesn't solve all the problems. PROBLEM FIXED. UPDATED CODE ATTACHED. THIS WORKS TO STRIP METADATA FROM ANY AUDIO FILE AND OUTPUT IT AS A MONO WAV (Easily modified to do Stereo if you desire) |