mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2004
Posts: 526
HorseC Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Mar 2004
Posts: 526
I am playing mp3 files from a queue (after doing several /splay -q commands)
and I am trying to pause, then restart, the song from where it was paused.

I have captured the relevant information at the time I do the
pause with $insong (saved to global variables for tracking).

Here are those variables, just before the pause, and then again
after the /splay pause was done:

Before the pause:

%HorseC_Player_pause.pos 34653
%HorseC_Player_pause.fname E:\My Music\- Walk On The Wild Side.mp3
%HorseC_Player_pause.pause $false

--> /splay pause done here <-----

%HorseC_Player_pause.pos.after 34653
%HorseC_Player_pause.fname.after E:\My Music\- Walk On The Wild Side.mp3
%HorseC_Player_pause.pause.after $true

Now, in reading the help file, as it relates to /splay,
(actually the 'Playing Sounds' section cross referenced
at /splay in the help system)

I see that you can RESUME a mp3 file.

If i am reading it right:
/splay -cwmpq [filename | stop | pause | resume | seek | skip] [pos]


/splay -p filename RESUME pos

Is what I think i should be using (with of course
the saved filename and the saved pos .

I think I should be able to resume from the pos that i saved,
as yet I have not been able to do this.
Here are my questions.

1. given: 'E:\My Music\- Walk On The Wild Side.mp3'
Do I need to save this as a short filename because of the blanks?

2. Am I reading this whole section wrong with reference to resume?

3. IF not, what would be the correct format for the command to play this song from the position I have saved.

Thanks in advance for any reply.



Help others! It makes the world a better place, Makes you feel good, and makes you Healthy!
Joined: Oct 2012
Posts: 164
D
Vogon poet
Offline
Vogon poet
D
Joined: Oct 2012
Posts: 164
Just use "/splay resume" (without the filename etc.)
You don't need to save the pos, mIRC will simply resume from where it paused.

Joined: Mar 2004
Posts: 526
HorseC Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Mar 2004
Posts: 526
Originally Posted By: Deega
Just use "/splay resume" (without the filename etc.)
You don't need to save the pos, mIRC will simply resume from where it paused.

That is the First thing I tried, it restarted the file in question from the beginning. I wonder if this has anything to do with the fact that i had 'queued' other files (songs) behind the one I paused. It must be a valid .mp3 file if I was able to save its .pos when it was paused.


Help others! It makes the world a better place, Makes you feel good, and makes you Healthy!
Joined: Mar 2004
Posts: 526
HorseC Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Mar 2004
Posts: 526
some further information.. so you know exactly what I am doing...

Code running now.. Resume starts at beginning of file,
not at pause point.

(commented out lines i was using for
tracking as shown in prior post.

on *:dialog:hcplayer:sclick:3: {
; /set %HorseC_Player_pause.pos $insong.pos
; /set %HorseC_Player_pause.fname $insong.fname
; /set %HorseC_Player_pause.pause $insong.pause
/splay pause
; /set %HorseC_Player_pause.pos.after $insong.pos
; /set %HorseC_Player_pause.fname.after $insong.fname
; /set %HorseC_Player_pause.pause.after $insong.pause
noop $tip($ctime,HorseC's Music Player,7Player Paused per request. $crlf Use 4Resume7 to restart song just paused.,10,,,,)
}


on *:dialog:hcplayer:sclick:4: {
/splay resume
noop $tip($ctime,HorseC's Music Player,7Resuming Paused song.,10,,,,)
}


Note: I downloaded (today) a fresh copy of mIRC and installed it in a seperate directory (as an upgrade so as not to mess up anything in my current version)

I then checked and verified NO scripts were loaded, and i had the standard stuff that comes with a new install only.

I then loaded my player script. tested, and it still does NOT resume back to a position in the mp3 file.

The code above will (i hope) show that im doing what was suggested, and I still have the problem.




Help others! It makes the world a better place, Makes you feel good, and makes you Healthy!
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Resume should work fine. I just tested it.

/splay "path\song.mp3"

Waited about 15 seconds...

/splay pause

Song stopped...

/splay resume

Song resumed from where it was stopped. Can you start by verifying that this works without using your script or queuing songs? Once we verify that it works manually without a queue, you can test it manually by queuing one extra song and manually pause/resume and see if works. That should give you a good idea of whether or not it has anything to do with your queue. Once we have that information, we can more easily look at what might be the problem. If necessary, you can always queue files without using /splay's queue.

If you're planning on using a queue, it may also be worthwhile to make your queue compatible with commonly used playlist formats so a user can insert a playlist created for something else (e.g. Winamp) and play it from your script. I did that a long time ago with 2 or 3 (I forget) different playlist formats as well as my own custom format and it worked really well. Just a thought.


Invision Support
#Invision on irc.irchighway.net
Joined: Mar 2004
Posts: 526
HorseC Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Mar 2004
Posts: 526
per your request:

doing: /splay E:\My Music\Billy Joel - You're Only Human (Second Wind).mp3
<@HC_test> will now run check.
songcheck start
songcheck - song: $true song.pos: 19554 song.fname: E:\My Music\Billy Joel - You're Only Human (Second Wind).mp3 song.pause: $false song.length: 288732
songcheck pause
songcheck - song: $true song.pos: 19565 song.fname: E:\My Music\Billy Joel - You're Only Human (Second Wind).mp3 song.pause: $true song.length: 288732
songcheck resume
songcheck - song: $true song.pos: 19555 song.fname: E:\My Music\Billy Joel - You're Only Human (Second Wind).mp3 song.pause: $false song.length: 288732
songcheck done
<@HC_test> started over from start of song.
<@HC_test> repeating test.
songcheck start
songcheck - song: $true song.pos: 66531 song.fname: E:\My Music\Billy Joel - You're Only Human (Second Wind).mp3 song.pause: $false song.length: 288732
songcheck pause
songcheck - song: $true song.pos: 66552 song.fname: E:\My Music\Billy Joel - You're Only Human (Second Wind).mp3 song.pause: $true song.length: 288732
songcheck resume
songcheck - song: $true song.pos: 66542 song.fname: E:\My Music\Billy Joel - You're Only Human (Second Wind).mp3 song.pause: $false song.length: 288732
songcheck done
<@HC_test> again started over from start of same song.. did NOT resume
<@HC_test> will wait, see if song stops 'early'
<@HC_test> which is what i was experiencing when queued..
<@HC_test> at this point this is the only song in the queue.
<@HC_test> I am running 1 scripts.
<@HC_test> that was: //say I am running $script(0) scripts.
<@HC_test> I am on windows xp sp3 totally up to date.
<@HC_test> I downloaed and am on a clean copy of mirc 7.29 (to be on clean system)
<@HC_test> Song just ended. it was cut off, and did NOT play to the end of the song.
<@HC_test> i will now post in here the songcheck alias i used with semi in front to show what was used to test.
<@HC_test> ------
<@HC_test> ;/chksong {
<@HC_test> ; /echo -a songcheck start
<@HC_test> ; /echo -a songcheck - song: $insong song.pos: $insong.pos song.fname: $insong.fname song.pause: $insong.pause song.length: $insong.length
<@HC_test> ; /echo -a songcheck pause
<@HC_test> ; /splay pause
<@HC_test> ; echo -a songcheck - song: $insong song.pos: $insong.pos song.fname: $insong.fname song.pause: $insong.pause song.length: $insong.length
<@HC_test> ; /echo -a songcheck resume
<@HC_test> ; /splay resume
<@HC_test> ; /echo -a songcheck - song: $insong song.pos: $insong.pos song.fname: $insong.fname song.pause: $insong.pause song.length: $insong.length
<@HC_test> ; /echo -a songcheck done
<@HC_test> ;}
<@HC_test> ------

If there is ANY other information I can give you, I will be happy to provide it.

Re: Your comments on song formats. If you come across the information you had on song format of other
players, I would LOVE to have it (would save a LOT of research).

Thanks for the very good idea.

Jim
(aka HorseC)

ps. to say again. this on a fresh copy of mirc downloaded from the master site for the test, with no other scripts running.


Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Hm. Although it probably doesn't matter, the immediate resume by using a script instead of manually typing it may be a problem. What I'm thinking now is that you may have a codec or audio software installed that is causing the problem. If it's software, try disabling it. If it's a codec, I'm not sure that you can disable it without uninstalling it. I don't know for sure, though. But if the song is cutting off, then it's a good indication that mIRC thinks it's doing the right thing, but that something is interfering and codecs or audio software sounds like a likely suspect.

As far as the formats for playlists, I probably have the information somewhere. But all I did was grab a playlist from each of the programs I wanted and opened them in notepad. The playlists are usually plain text. They may include XML formatting or no formatting, but they should be possible to read from notepad. After that, I just parsed the information. I also provided an option to convert it to the format my script used natively. All that did was parse out the playlist and re-save it using my format.


Invision Support
#Invision on irc.irchighway.net
Joined: Mar 2004
Posts: 526
HorseC Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Mar 2004
Posts: 526
' it's a good indication that mIRC thinks it's doing the right thing, but that something is interfering and codecs or audio software sounds like a likely suspect.'

Very good point that i did NOT think about. I will investigate this and with ref to the playlists, i have three standard players here and will do as you suggested. As always thanks for the great advice.



Help others! It makes the world a better place, Makes you feel good, and makes you Healthy!

Link Copied to Clipboard