Hello, I had a little more time to devote to this and have something that compiles but has not yet been run - thus version -0.1. http://ax.to/mpg123 Iām intending to write some tests for this, so I sent a message to the mpg123 people asking if they had a library of exotic mp3 files that I could use.
Hereās my AudioFormat question.
An AudioFormat typically lets the source file determines the sample rate, bit depth, float vs integer etc. . And thatās what Iām doing here - Iām finding that information from the mp3 and passing it right through as well as I can.
But in practice, I suspect thatās not what Iāll actually want much of the time. In fact, what Iāll want will be āopen this mp3 file and give me 16-bit integer samples, no matter what was in the fileā.
So hereās my plan. There will be a ādefaultā mpg123 AudioFormat which Iāll register as the official mp3 audio format which passes through the input format. But there will also be a factory that lets you create your own AudioFormat where you override the input format and request your own.
BTW, Iām realizing that mpg123 doesnāt seem to write mp3s, which is fine for my purposes but disappointing for people who want a complete solution.