Looping a mp3 file

Started by Nikse,

Nikse

Howdy!

I want to loop a mp3 file (made for looping).

I have tried the BASS_SAMPLE_LOOP flag when calling BASS_StreamPlay. Nothing loops, the playing just stops.

I have also tried to start over using BASS_ChannelSetPosition(Music_Stream, 0). This worked - but with a delay.

Am I missing something?

Ian @ un4seen

Does the MP3 file loop in the precompiled CONTEST.EXE example? If not, please upload it - ftp://ftp.un4seen.com/incoming

Btw, I'd suggest using OGG if you intend to loop a sound. MP3 encoding introduces silence at both the start and end, so there's not really such a thing as an MP3 "made for looping" :)

Nikse

Hi Ian!

Thx a lot for the info!

BASS_SAMPLE_LOOP does work fine. It was a bug in my code  ::)

The delay is still there - but it is very tiny now...
I will try with an Ogg Vorbis file.