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:
parent
0cf8728242
commit
98a6974cc9
@ -158,7 +158,8 @@ int main(int argc, char *argv[])
|
|||||||
/* init BASS */
|
/* init BASS */
|
||||||
if (!BASS_Init(-1, 44100, 0, 0, 0))
|
if (!BASS_Init(-1, 44100, 0, 0, 0))
|
||||||
die("failed to init bass");
|
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)
|
if (!stream)
|
||||||
die("failed to open tune");
|
die("failed to open tune");
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user