Author Topic: Jesus, i'm going mad! HELP!  (Read 3938 times)

ultramax

  • Posts: 55
Jesus, i'm going mad! HELP!
« on: 1 Apr '03 - 23:23 »
Hi
I've got a serious problem with mod files, the problem it's when a mod file reach the end i can't play the next one in the playlist (mod or mp3) but if it's a mp3 file playing and the next one it's a mod file or a mp3 file then here i can play it, what's wrong, i use the following code (Delphi) in the timer1timer procedure: (i think the problem it's here)

if vrtrackbar1.position = vrtrackbar1.maxvalue then
begin
  if listbox1.items.count <> 0 then
  playlpos := playlpos + 1;
  playfile(playlpos);
  end;

NOTE: PlayLPos = ListBox1.ItemIndex.

Can anyone help me please?
Sorry for my bad English :(

Thanks,
UltraMAX.

Atilla

  • Posts: 26
Re: Jesus, i'm going mad! HELP!
« Reply #1 on: 2 Apr '03 - 07:58 »
Okay i had the same kind of trouble only playing mp3 files.

Check two places - where you set the trackbar1.maxvalue and
where you increase the trackbar1.value. I guess the problem could be somwhere there.

I had a mistake in the code wich set such values for the maxvalue that .value coud never reach it. Try checking those.

Ian @ un4seen

  • Administrator
  • Posts: 26083
Re: Jesus, i'm going mad! HELP!
« Reply #2 on: 2 Apr '03 - 10:45 »
You should not really do things like this...
Quote
if vrtrackbar1.position = vrtrackbar1.maxvalue then

...to check if a channel has ended. It's better to use BASS_ChannelIsActive to do that. You could also use a sync callback (BASS_SYNC_END) instead, and put the code to change tracks in there.

Regarding MODs... some never actually end, so sometimes the only option may be to press the "next" button :)

ultramax

  • Posts: 55
Re: Jesus, i'm going mad! HELP!
« Reply #3 on: 3 Apr '03 - 23:31 »
Thanks Guys!

I make a revision in the code and now (i think) the problem was solved, just another question, remember i'm a beginner and don't have any practice in Delphi, but can you guys help me, or someone else, work with "sync callback (BASS_SYNC_END)" ? Please!

Thanks a lot!
UltraMAX