Open
Description
Issue description
Playing a music stream with looping
set to false will stop just before the end.
Environment
OS: macOS 15.5
Processor: Apple M4 Pro (arm64)
Issue Screenshot
Tested with resources/sound.wav
Code Example
In examples/audio/audio_music_stream.c
// change
Music music = LoadMusicStream("resources/country.mp3");
// to
Music music = LoadMusicStream("resources/sound.wav"); // just so we don't have to wait as long
music.looping = false;
I believe the issue lies here at the end of UpdateMusicStream
in raudio.c
:
if (framesLeft <= subBufferSizeInFrames)
{
if (!music.looping) /*== this is being executed too early ==*/
{
ma_mutex_unlock(&AUDIO.System.lock);
// Streaming is ending, we filled latest frames from input
StopMusicStream(music);
return;
}
}
Metadata
Metadata
Assignees
Labels
No labels