HDecoderStream
An iterator that decodes audio in streams.
Methods
stream
stream() -> HArray source
Gets the next wave of frames as an HArray.
Returns an error if it’s end of stream or if an error ocurred in the decoding process.
Returns
The decoded audio as a float HArray.
The number of frames streamed is the one used as input in the creation of HDecoderStream.
Examples
library(harmonium)
fpath = "../../../testfiles/gs-16b-2c-44100hz.flac"
dtype = HDataType$Float32
frames = 1000L
hdecoder_stream = HFile$decode_stream(fpath, frames, dtype)
hdecoder_stream$stream()