Server Help

Non-Subspace Related Coding - .dll to relate my c# program with winamp possible?

tcsoccerman - Sun Aug 31, 2008 12:46 pm
Post subject: .dll to relate my c# program with winamp possible?
I was wondering if it was possible to create a winamp plugin that transfers data so to speak between a c# program and winamp. The purpose of this is that when my c# game recording program game timer stops, i would like winamp to select a random song and play it during that stoppage of play, and then stop playing when play resumes. I have already created a basic winamp plugin and the c# program. Is this possible? What is it called. I would google but i have no leads or words to use.

Thank you.

-tcsoccerman
Samapico - Mon Sep 01, 2008 4:35 pm
Post subject:
You need to send a Window Message to the winamp application, that will make it do a command (like 'next')

check for SendMessage or PostMessage APIs... you should find something for that, especially for winamp, these things are pretty common.
tcsoccerman - Mon Sep 01, 2008 5:58 pm
Post subject:
Yes winamp has an sdk, but it's in c...
tcsoccerman - Mon Sep 01, 2008 8:27 pm
Post subject:
ok i got it to work

i had to use System.Diagnostic.Process.GetProcessByName("winamp")

some other const and stuff and extern static SendMessage()

the only minor problem is that if you start and stop the timer to quick, the messages don't get sent. it is on winamp's side, because i have a messagebox show whenever i call the SendMessages, and it shows always. That's ok, i'm still happy, but any ideas?
Samapico - Mon Sep 01, 2008 11:17 pm
Post subject:
check PostMessage... either SendMessage or PostMessage will wait for the message to have been processed before continuing execution... Not sure which one it is

But what would 'too quick' be? every second? You surely can't throw 100 messages per second at winamp and expect it to treat them all tongue.gif But other than that, it should work.
tcsoccerman - Tue Sep 02, 2008 12:08 pm
Post subject:
no no no, somewhere around every 2 seconds. basically, you click stop, it will play(music plays when timer is stopped(stoppage of play)), then two seconds later you click play(music stops) and the message sent to stop the music will not be recgonized.

I'm using SendMessage().
JoWie - Wed Sep 03, 2008 5:35 pm
Post subject:
http://sourceforge.net/projects/cswinampsdk

If i googled correctly, this sdk allows you to write plugins and/or send messages to winamp.
tcsoccerman - Wed Sep 03, 2008 7:32 pm
Post subject:
Hey, that's cool. I did in fact solve my problem but thank you anyways.
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group