Re: Fast Loading of Large Mp3's (100.000 KB)

new topic     » goto parent     » topic index » view thread      » older message » newer message

>My code is like this:
>
>
>--- INITIALIZE BASS LIBRARY:
>
>procedure initialize_bass_library ()
>--// Check that BASS 1.5 was loaded
>  if BASS_GetVersion() != MakeLong(1, 5) then
>   error ("BASS Version 1.5 was not Loaded, Incorrect BASS.DLL")
>  end if
>--// Initialize digital sound - default device, 44100hz, stereo, 16 bits, 
>no
>syncs used
>  if not(BASS_Init(-1, 44100, or_all ({BASS_DEVICE_LEAVEVOL}),
>      getHandle(Main_window))) then
>   error("Can't Initialize Digital Sound System")
>  end if
>  setScrollPos (Loudness_slider, BASS_GetVolume ())
>end procedure
>
>
>--- PLAY FILE:
>
>Cur_stream = BASS_StreamCreateFile(0, entry [ENTRY_FILENAME], 0, 0,
>BASS_MP3_SETPOS)
>if Cur_stream = 0 then
>     error ("Couldn't play file " & entry [ENTRY_FILENAME])
>     return
>end if
>if not(BASS_StreamPlay(Cur_stream, 0, BASS_SAMPLE_LOOP)) then
>     error ("Can't play file " & entry [ENTRY_FILENAME])
>     return
>end if
>
>I'm making some sort of winamp clone, so I need to be able to seek to
>position in song.

I can see that you're using BASS_MP3_SETPOS. This greatly slows down loading 
time as every frame must be read. Tone Skoda posted a message on the BASS 
forum, i see. Ian showed a little trick to make it loook like it's loading 
faster. You can view it over here:

http://www.un4seen.com/music/YaBB.cgi?board=bass&action=display&num=1029391221

This will probably wrap over, so make sure you get the whole thing.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu