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