Open robtfm opened 3 months ago
i now see i can stop the handle, sorry.
would it make sense for this to be automatic if the decoder returns an error? or have another mechanism for the decoder to report that the stream is finished?
Indeed, that is an oversight. I'm not sure if there's any realistic scenarios where a decoder returns an error, but it can still continue decoding. So it might be best to just stop the sound on the first error.
sorry if i'm missing something obvious.
i have a struct that implements
Decoder
which i wrap into aStreamingSoundData
and send toAudioManager::play
.when the stream ends i return an error from
decode
, but kira continues to busy-wait poll the stream, burning cpu pretty hard.i can't see a way to tell the audio manager to stop the handle, or to reply from the decoder that the stream has ended.
what should i do?
thanks