Old 10th February 2005, 04:04   #1
easander
Junior Member
 
Join Date: Feb 2005
Posts: 2
Send a message via AIM to easander
Changing output

Is there anyway to change the output plugin with SendMessage(). I see how to do it for visualizations but I don't see anything for input and output. Any help would be great.

Thanks
easander is offline   Reply With Quote
Old 10th February 2005, 09:47   #2
DrO
 
Join Date: Sep 2003
Posts: 27,873
don't think there is anyway to do it since being able to switch the output yourself could cause some nasty issues

-daz
DrO is offline   Reply With Quote
Old 10th February 2005, 16:24   #3
easander
Junior Member
 
Join Date: Feb 2005
Posts: 2
Send a message via AIM to easander
I didn't think so. Thanks. Also, I was reading through the SDK and I can't find anyway to send a file to the playlist. Maybe I overlooked it, but I didn't see anything.

Also, I'm doing this with C#, so when I pass the 'data' through SendMessage(...) it is set to be an int. How do I pass a string, i.e. file path, through there. I tried casting it, but it won't allow it.

Thanks.
easander is offline   Reply With Quote
Old 17th November 2006, 01:12   #4
Iceman_jkh
Junior Member
 
Join Date: Sep 2006
Posts: 24
Any updates on this?

I need to switch output plugins on the fly via code. I know that it works fine in winamp if done manually (Options/Prefs/output/etc). I want to switch between out_ds.dll and out_ds2.dll

Same plugin, but setup slightly differently.

I'm using winamp 2.95 and VB6. Can anyone give me some info into how to do this or where to look.

The switching will be controlled by the user, but from another program (written in VB6). So I was thinking of using something like 'SendMessage'.

Thanks
Ice
Iceman_jkh is offline   Reply With Quote
Old 17th November 2006, 06:56   #5
Tardymo
Member
 
Join Date: Sep 2006
Posts: 89
Not sure if SDK gives a way to switch output plugins, but even if it did, it would be quite tricky.
First of all, you only pass pointers using SendMessage. Sending some numeric values works fine, because the pointer is not actually pointing to a memory location but the address itself is a value to be used. If you want to pass a string from external application, some additional Windows API programming must be done.
First you must create a local buffer which contains the string. Then you must use WriteProcessMemory to copy the buffer to the remote process memory space and get a pointer of this buffer. Only then you can use SendMessage with this pointer. Winamp Magic uses this technique, but it is written in C. As for .NET - I am currently developing a class which will contain most of the functionality of SDK to control WinAmp. Passing strings between processes will also be there.
Tardymo is offline   Reply With Quote
Old 17th November 2006, 07:03   #6
Iceman_jkh
Junior Member
 
Join Date: Sep 2006
Posts: 24
Thanks for the info mate.

Is there a better way to do this perhaps?
All I really care about is switching output plugins on the fly. Am I making it extra difficult for no reason? Is there a way to simulate how its done via (Options/prefs/outputplugins/etc)?
Iceman_jkh is offline   Reply With Quote
Old 17th November 2006, 11:49   #7
TazDevil
Senior Member
 
TazDevil's Avatar
 
Join Date: Nov 2003
Location: Cyprus
Posts: 359
try out Multiple Output Plugin.

You can use winamp popup menu or assign hotkeys to enable disable output plugins on the spot (soon a skinned window will be implemented as well, when i find time to release it )

NEW Multiple Output Plugin v1.5 | Download | outputs data to one or more audio/file output devices
Crystal Classic Skins v1.1 | Download | transparency effects for classic skins
TazDevil is offline   Reply With Quote
Old 17th November 2006, 11:57   #8
Iceman_jkh
Junior Member
 
Join Date: Sep 2006
Posts: 24
Thanks Taz...

I actually tried ur software .. great work, it was so close to what I needed.
Only problem I had was that I could not select output A OR output B. It would only let me turn on a plugin IN-ADDITION to the default plugin. I want to have EITHER A or B, but never both at once. I dont even want to be able to accidentally switch off both plugins, just have it toggle between A or B.

Cheers
Iceman_jkh is offline   Reply With Quote
Old 28th November 2006, 04:25   #9
Iceman_jkh
Junior Member
 
Join Date: Sep 2006
Posts: 24
Taz,

Any update on your plugin?
Is there any chance of having a feature to toggle between two different output plugins by using a global key-press.
Cheers
Ice
Iceman_jkh is offline   Reply With Quote
Old 28th November 2006, 17:16   #10
TazDevil
Senior Member
 
TazDevil's Avatar
 
Join Date: Nov 2003
Location: Cyprus
Posts: 359
yeah, probably i could make a customized version to set a hotkey for each item to enable the selected and disable all the rest plug-ins.

I am kinda busy these couple of weeks thou, so you'll have to wait for some time

NEW Multiple Output Plugin v1.5 | Download | outputs data to one or more audio/file output devices
Crystal Classic Skins v1.1 | Download | transparency effects for classic skins
TazDevil is offline   Reply With Quote
Old 28th November 2006, 20:19   #11
Iceman_jkh
Junior Member
 
Join Date: Sep 2006
Posts: 24
Taz,

I can always be patient when someone giving me assistance
Do you plan to have your plugin work with Winamp 2.x (2.95 more specifically?), as that is what I use for performance reasons.

Cheers
Ice
Iceman_jkh is offline   Reply With Quote
Old 28th November 2006, 21:12   #12
TazDevil
Senior Member
 
TazDevil's Avatar
 
Join Date: Nov 2003
Location: Cyprus
Posts: 359
Quote:
Originally posted by Iceman_jkh
Taz,

I can always be patient when someone giving me assistance
Do you plan to have your plugin work with Winamp 2.x (2.95 more specifically?), as that is what I use for performance reasons.

Cheers
Ice
Well i don't generally support older versions, as Winamp keeps changing , but provided that the Global Hotkeys plugin exists the plugin should run normally
(only issue that might arise is with the menu updating, and that would be Winamps fault as it might not implement some menu init messages...)

I would urge you to use the latest version and install only the plugins you want to be installed, loading less plugins should improve your performance.

NEW Multiple Output Plugin v1.5 | Download | outputs data to one or more audio/file output devices
Crystal Classic Skins v1.1 | Download | transparency effects for classic skins
TazDevil is offline   Reply With Quote
Reply
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