Originally posted by **bjorn-nesby** June 26, 2023
I'm working on a wrapper around the OS-provided decoder in macOS (Audio Toolbox framework), and have a quick question with regard to this:
Our implementation is using the miniaudio resource manager to handle loading files. When supplying a custom decoder, I'm wondering if it would be possible to somehow instruct the resource manager to invoke the init_file or init_file_w methods when it's initializing the decoder?
The reason I'm asking is that the audio toolbox framework has some very handy (high level) methods for decoding compressed files, but these methods only accept file path.
And yes, I guess I'm basically sidestepping the resource manager by doing this. But someone told me that lazyness is a virtue when programming, and the alternative here seems to be to re-implement a lot of the audiotoolbox functionality using its (callback-based) lower level API :-)
Discussed in https://github.com/mackron/miniaudio/discussions/695