mIRC Home    About    Download    Register    News    Help

Print Thread
#50346 20/09/03 09:05 AM
Joined: Dec 2002
Posts: 16
A
amr Offline OP
Pikka bird
OP Offline
Pikka bird
A
Joined: Dec 2002
Posts: 16
Hey,

Just made an mp3 player and it plays the selected song, but im wondering how i would go about playing the next song in the list. This can be a random artist or in order.

the playlist is stored in this format
C:\LOCATION § Artist - Title

Thanks =)

#50347 20/09/03 09:34 AM
Joined: Jan 2003
Posts: 148
K
Vogon poet
Offline
Vogon poet
K
Joined: Jan 2003
Posts: 148
you can do like have.. make a %var that contains the line nr you are playing and when the song is finished playing use on mp3end event and add

%var = %var + 1
.splay -p $read(filename, %var)

then it will play the next song in the list..

#50348 20/09/03 09:46 AM
Joined: Dec 2002
Posts: 16
A
amr Offline OP
Pikka bird
OP Offline
Pikka bird
A
Joined: Dec 2002
Posts: 16
hmm...thanks, never thought of that..

will see if it works

Thanks again =)

#50349 20/09/03 10:06 AM
Joined: Jan 2003
Posts: 148
K
Vogon poet
Offline
Vogon poet
K
Joined: Jan 2003
Posts: 148
np cool

#50350 20/09/03 10:10 AM
Joined: Dec 2002
Posts: 16
A
amr Offline OP
Pikka bird
OP Offline
Pikka bird
A
Joined: Dec 2002
Posts: 16
something i quickly came up with...
seems to suit what i will need, i quite proud of this heh

Code:
 
alias playlist {
  set %mp3 $$sdir(1,mp3 dir,1)
  var %loop = 1
  var %num = 1
  remini mp3.ini MP3
  while (%loop < $findfile(%mp3,*.mp3,0)) {
    writeini mp3.ini MP3 %num $sound($findfile(%mp3,*.mp3,%loop)).artist - $sound($findfile(%mp3,*.mp3,%loop)).title $chr(167) " $+ $findfile(%mp3,*.mp3,%loop) $+ "
    inc %loop 1
    inc %num 1
  }
}
 


It seems to work well, any advice on it? tweaks?

#50351 20/09/03 10:23 AM
Joined: Dec 2002
Posts: 16
A
amr Offline OP
Pikka bird
OP Offline
Pikka bird
A
Joined: Dec 2002
Posts: 16
maybe i should of added this bit...

I list it like this

alias listmp3 {
var %loop = 1
while (%loop < $lines(mp3ini)) {
did -a $dialog(mp3) 10 $gettok($read(mp3.ini,%loop),1,167)
inc %loop 1
}
}

a simple $gettok gets the file dir, and name.

SPLAY the $gettok, im thinking of just making this a command line player


Link Copied to Clipboard