Need some clarification about closing files when reading them for audio streams #1895
-
Hello. I was looking at this example and noticed that the comment there says: // In this example, embedded resource "Jab_wav" is used.
//
// If you want to use a wav file, open this and pass the file stream to wav.Decode.
// Note that file's Close() should not be closed here
// since audio.Player manages stream state. Does this mean that it's not meant to be closed inside the // A Player doesn't close src even if src implements io.Closer.
// Closing the source is src owner's responsibility. So, am I right to assume that if I use |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Right. Ebiten doesn't care the audio source's closing state, so it's your responsibility to close the source. |
Beta Was this translation helpful? Give feedback.
Right. Ebiten doesn't care the audio source's closing state, so it's your responsibility to close the source.