This is not possible with the reference decoder. You can use one of the many other FLAC decoders available. For example, dr_flac can be used as you describe. See https://github.com/mackron/dr_libs
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is not possible with the reference decoder. You can use one of the many other FLAC decoders available. For example, dr_flac can be used as you describe. See https://github.com/mackron/dr_libs