Go Back   Winamp & Shoutcast Forums > Developer Center > Winamp Development

View Poll Results: Is this something I should continue work on?
Yes 14 93.33%
No 0 0%
Who cares? 1 6.67%
Voters: 15. You may not vote on this poll

Closed Thread
Thread Tools Search this Thread Display Modes
Old 21st November 2004, 09:24   #1
Joonas
Forum King
 
Join Date: Mar 2004
Location: Sweden
Posts: 2,263
Enqueue and play

Hello,

I just played around with some messages and came up with a Enqueue and play plugin. So you can double-click in Explorer and get it to just add the file without wiping the playlist...

It's just experimental as of yet, you can't turn it off any other way than removing the file. Also there are an issue when you double-click a playlist file...Winamp displays a little hour-glass by the mouse. While that hour-glass is there it will enqueue but not play...dunno why?

Also, if you have activated Enqueue instead of play in Winamp...this plugin doesn't work.

I also suspect this plugin could cause some problem with other plugins...only tried it with DL

If you think all of this seems stupid, just ignore me

/Joonas
Attached Files
File Type: zip gen_enqplay.zip (14.2 KB, 1358 views)
Joonas is offline  
Old 21st November 2004, 13:58   #2
d3x7r0
Senior Member
 
d3x7r0's Avatar
 
Join Date: Jun 2004
Location: Lisbon, Portugal
Posts: 380
Send a message via Skype™ to d3x7r0
if taken the right direction it could turn out another great and indispensable plugin for winamp (much like DrO's ones ).

Go ahead and develop it further

NOTE: I am Dextro!
d3x7r0 is offline  
Old 21st November 2004, 18:43   #3
DrO
 
Join Date: Sep 2003
Posts: 27,873
for a whilst running option it works fine from the quick test i did. also you may want to change the name shown in the plugin list

-daz
DrO is offline  
Old 8th December 2004, 07:24   #4
jyeee
Junior Member
 
Join Date: Dec 2004
Location: US
Posts: 9
Send a message via ICQ to jyeee Send a message via AIM to jyeee
Please keep going!

Awesome!
This is close to what I'm looking for/working on!!!

I'm trying to create a plugin that will (upon playing a song from Explorer) play a song immediately and insert that song into the playlist one above (or below) the currently playing song. For now, however, your idea of enqueue+playenqueued is dynamite and you ought to finish what you started

The only "bug" I've experienced with this plugin is that playing a playlist causes the last song in the list to be played first; but this is expected and is a correct implementation of enqueue+playenqueued.

What I think would fix this bug (though I have no experience writing plugins yet :{) is to use IPC_GETLISTPOS ipc to remember where to insert the file(s), enqueue the file(s), and then play the specific track that IPC_GETLISTPOS remembered.

I'd *REALLY* like to see the source for this plugin/dll but I understand if you want to keep it private.

Good luck, joonas
jyeee is offline  
Old 8th December 2004, 08:06   #5
Joonas
Forum King
 
Join Date: Mar 2004
Location: Sweden
Posts: 2,263
The problem with this is really that Winamp does some strange things when you double-click playlist-files...you can prevent Winamp from clearing the playlist when you double-click a mp3-file in Explorer but not when you double-click a playlist...

But I will continue and see if I can make it work when I get around to it. If this doesn't seem likely or I get stuck I'll post the source and see if anyone else can make use of it

/Joonas
Joonas is offline  
Old 10th December 2004, 02:48   #6
killswitch1968
Senior Member
 
killswitch1968's Avatar
 
Join Date: Sep 2002
Location: Sverige
Posts: 434
Wow. I've been waiting for this simple feature for about 3 years now. You sir are a man of the gods. Tack som fan!

They say if you play a Microsoft CD backwards you hear satanic messages. That's nothing, if you play it forwards it installs Windows.
killswitch1968 is offline  
Old 10th December 2004, 14:47   #7
jyeee
Junior Member
 
Join Date: Dec 2004
Location: US
Posts: 9
Send a message via ICQ to jyeee Send a message via AIM to jyeee
I've just whipped up a temporary workaround for this
It's an external program that is NOT a plugin
It doesn't work when Winamp isn't running.
It doesn't support playlist files.
And the stupid console window flashes.
But it gits 'er dun and I'll never destroy another playlist again .

#####
http://eyee.net/files/Enqueueee.zip

Usage: Enqueueee [-abe | --help ] file
-a Enqueue song immediately after currently playing song
-b Enqueue song before currently playing song
-e Enqueue song at the end of playlist

NOTE: WINAMP MUST BE ON
#####

To get this to "work" as default, I went into Folder Options->File Types and changed the default program that handles mp3s to be Enqueueee. I then set the application used to perform action to "C:\Program Files\Winamp\Enqueueee.exe" -b "%1".

This would be a sweet feature for Winamp 5.0.next
Thanks to torsius' and WinampMagic for helping out a n00b!!!
If anyone wants to use this code to turn it into a plugin/make it better, just make sure to send it to me
jyeee is offline  
Old 13th December 2004, 18:03   #8
jyeee
Junior Member
 
Join Date: Dec 2004
Location: US
Posts: 9
Send a message via ICQ to jyeee Send a message via AIM to jyeee
UPDATE
- Playlist file support (always had it )
- Console window never flashes
- If Winamp is closed, file is played in Winamp with no queuing
- Still not a plugin
- File (with source) is attached

Sample usage
c:\>Enqueueee -e "full\path\song.mp3"
does the same thing that Joonas's does

c:\>Enqueueee -b "full\path\song.mp3"
code:
BEFORE AFTER
trk1 trk1
trk2 trk2
> trk3 > song.mp3
trk4 trk3
trk4



c:\>Enqueueee -a "full\path\song.mp3"
code:
BEFORE AFTER
trk1 trk1
trk2 trk2
> trk3 trk3
trk4 > song.mp3
trk4



Playlists are fun too:
Assume that songs.m3u is {song1.mp3, song2.mp3}
c:\>Enqueueee -e "full\path\songs.m3u"
code:
BEFORE AFTER
trk1 trk1
trk2 trk2
> trk3 trk3
trk4 trk4
> song1.mp3
song2.mp3



####################################
If someone can turn this into a plugin, awesome
If someone can tell me why I can't find the winamp window, double awesome Help?
code:

hwndWinamp = FindWindow("Winamp v1.x",NULL);
if(hwndWinamp == NULL)
{
// run winamp
ShellExecute(
NULL,
"open",
"C:\\Program Files\\Winamp\\winamp.exe",
NULL,
NULL,
SW_SHOWNORMAL);

hwndWinamp = FindWindow("Winamp v1.x",NULL);
// but I'm still not finding winamp huh?
}

Attached Files
File Type: zip enqueueee.zip (59.8 KB, 751 views)

Last edited by jyeee; 13th December 2004 at 20:36.
jyeee is offline  
Old 14th December 2004, 06:49   #9
Joonas
Forum King
 
Join Date: Mar 2004
Location: Sweden
Posts: 2,263
Quote:
Originally posted by jyeee

If someone can tell me why I can't find the winamp window, double awesome Help?
code:

hwndWinamp = FindWindow("Winamp v1.x",NULL);
if(hwndWinamp == NULL)
{
// run winamp
ShellExecute(
NULL,
"open",
"C:\\Program Files\\Winamp\\winamp.exe",
NULL,
NULL,
SW_SHOWNORMAL);

hwndWinamp = FindWindow("Winamp v1.x",NULL);
// but I'm still not finding winamp huh?
}

[/B]
Well if this is the setup I'd guess that Winamp doesn't have time to load before you call FindWindow and thus it finds nothing...

/Joonas
Joonas is offline  
Old 14th December 2004, 13:14   #10
jyeee
Junior Member
 
Join Date: Dec 2004
Location: US
Posts: 9
Send a message via ICQ to jyeee Send a message via AIM to jyeee
Yeup, that was it! Thanks Joonas!
The fixed version attached, with all features implemented except that it's not a plugin. It takes a second or so to copy and paste the entire playlist (with thousands of songs), but I haven't seen anything in the API to enqueue a song at a certain location in the playlist.

Here's some good info for the other n00bs out there.

Hide the console window:
code:
#pragma comment(linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"")


Wait for winamp to be idle before continuing:
code:
hwndWinamp = FindWindow("Winamp v1.x",NULL);
if(hwndWinamp == NULL)
{
// run winamp
STARTUPINFO si;
PROCESS_INFORMATION pi;

ZeroMemory( &si, sizeof(si) );
si.cb = sizeof(si);
ZeroMemory( &pi, sizeof(pi) );

// start winamp
if( !CreateProcess( NULL, // No module name (use command line).
TEXT("C:\\Program Files\\Winamp\\winamp.exe"), // Command line.
NULL, // Process handle not inheritable.
NULL, // Thread handle not inheritable.
FALSE, // Set handle inheritance to FALSE.
0, // No creation flags.
NULL, // Use parent's environment block.
NULL, // Use parent's starting directory.
&si, // Pointer to STARTUPINFO structure.
&pi ) // Pointer to PROCESS_INFORMATION structure.
)
{
printf( "CreateProcess failed (%d).\n", GetLastError() );
return 1;
}
// Wait until winamp is idle.
WaitForInputIdle( pi.hProcess, INFINITE );
hwndWinamp = FindWindow("Winamp v1.x",NULL);

Attached Files
File Type: zip enqueueee.zip (59.4 KB, 766 views)
jyeee is offline  
Old 17th December 2004, 15:15   #11
Joonas
Forum King
 
Join Date: Mar 2004
Location: Sweden
Posts: 2,263
I don't seem to be getting anywhere with this...one would think the major problem would be that the plugin might be loaded late or something but apparently the main problem is that playlist-files aren't loaded the same way that mp3-files are...

anyway, I attach the code. Just subclass Winamp main window procedure to test it.

/Joonas
Attached Files
File Type: txt winampproc.txt (1.5 KB, 789 views)
Joonas is offline  
Old 24th December 2004, 02:09   #12
{_carnificina_}
Junior Member
 
Join Date: Dec 2004
Posts: 1
Very Obliged Jyeee.
The Enqueueee helped me very, it made time that looked some program that made this saw command line. Congratulations for the excellent program.
I wait that it continues its development
{_carnificina_} is offline  
Old 9th May 2005, 07:43   #13
jakoby
Member
 
Join Date: Oct 2004
Posts: 71
God, I've been waiting for this!

Now I can play my tracks from Windows Explorer exactly like I used to in Musicmatch, the ONLY thing I miss about that POS.

Is there any way to get this to work the same for the Winamp Media Library, to be able to Enqueue & Play files by double-click?
jakoby is offline  
Old 10th June 2005, 21:59   #14
fearpi
Junior Member
 
Join Date: Jun 2005
Location: Charleston, SC, USA
Posts: 3
Send a message via ICQ to fearpi Send a message via AIM to fearpi Send a message via Yahoo to fearpi
It would be nice if this simple feature were ever actually implemented into Winamp itself...
fearpi is offline  
Old 10th June 2005, 22:04   #15
DrO
 
Join Date: Sep 2003
Posts: 27,873
have a look at the recent dev builds of the JTFE plugin (related thread) which implements enq+play (and will be in one of the next Winamp versions since the plugin is shipped with Winamp).

you'd need to look at the 'shell options' tab in the plugin's prefs

-daz
DrO is offline  
Closed Thread
Go Back   Winamp & Shoutcast Forums > Developer Center > Winamp Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump