Is it possible to use init_file/init_file_w with resource manager? #695
-
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. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Does |
Beta Was this translation helpful? Give feedback.
I had a look at the code and you're absolutely correct. Those
onInitFile/W
callbacks are not being used at all (neither isonInitMemory
). I'll have to have a look at that, because certainly the whole point of those callbacks even existing inma_decoding_backend_vtable
was to give custom decoders an opportunity to do an optimized implementation for those scenarios. I think this was an oversight on my part.I'll convert this to an issue so I don't forget about it.