You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I'm using soloud-rs to mix some ambience tracks together. However, I've noticed that even though I use set_looping to enable looping on all tracks, they don't seem to loop though. Moreover, when I use an mp3 file for it, it causes a Segmentationfault at the end of the loop.
It's very peculiar that my mp3 files cause segfaults and my flac files don't. I've tested multiple mp3 and flac files, multiple times each, and it seems to be pretty consistent.
To Reproduce
So here is how I load the files and play them:
fn play_soundscape(runtime: &Runtime, sl: &mut Soloud, track: &mut Track, filename: &str, volume: f64) -> Result<(), SoloudError> {
// Fade out old sound if still playing
Self::clear_track(runtime, sl, track);
eprintln!("Playing: {} ({}%)", filename, (volume*100.0) as u32);
// Load and fade in new sound
let mut filepath = PathBuf::new();
filepath.push(SOUNDSCAPES_DIR);
filepath.push(filename);
let mut wav = Box::pin(WavStream::default());
wav.load(filepath)?;
wav.set_volume(0.0);
let new_handle = sl.play(&*wav);
sl.fade_volume(new_handle, volume as f32, 30.0);
sl.set_loop_point(new_handle, 0.0);
sl.set_looping(new_handle, true);
track.handle = Some(new_handle);
track.stream = Some(UnsafeSend::new(wav));
Ok(())
}
Expected behavior
I expect the files that I'm playing to restart from the beginning when they are done
Desktop (please complete the following information):
OS: Debian w/ 5.10.0 kernel
The text was updated successfully, but these errors were encountered:
Describe the bug
I'm using soloud-rs to mix some ambience tracks together. However, I've noticed that even though I use
set_looping
to enable looping on all tracks, they don't seem to loop though. Moreover, when I use an mp3 file for it, it causes a Segmentationfault at the end of the loop.It's very peculiar that my mp3 files cause segfaults and my flac files don't. I've tested multiple mp3 and flac files, multiple times each, and it seems to be pretty consistent.
To Reproduce
So here is how I load the files and play them:
Expected behavior
I expect the files that I'm playing to restart from the beginning when they are done
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: