example_bass: use BASS_STREAM_PRESCAN

When seeking in MP3s, BASS needs the BASS_STREAM_PRESCAN-flag to enable
accurate seeking.

While our example uses OGG Vorbis instead of MP3, it doesn't hurt to set
the flag, and leaves one less bug-source for people who base their code
of the example.
This commit is contained in:
Erik Faye-Lund 2010-09-04 23:53:11 +02:00
parent 0cf8728242
commit 98a6974cc9

View File

@ -158,7 +158,8 @@ int main(int argc, char *argv[])
/* init BASS */
if (!BASS_Init(-1, 44100, 0, 0, 0))
die("failed to init bass");
stream = BASS_StreamCreateFile(false, "tune.ogg", 0, 0, 0);
stream = BASS_StreamCreateFile(false, "tune.ogg", 0, 0,
BASS_STREAM_PRESCAN);
if (!stream)
die("failed to open tune");