Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
.dll to relate my c# program with winamp possible?

 
Post new topic   Reply to topic Printable version
 View previous topic  c# timers Post :: Post win32/winsock fun  View next topic  
Author Message
tcsoccerman
Server Help Squatter


Age:25
Gender:Gender:Male
Joined: Jan 15 2007
Posts: 694
Location: Atlantis
Offline

PostPosted: Sun Aug 31, 2008 12:46 pm    Post subject: .dll to relate my c# program with winamp possible? Reply to topic Reply with quote

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
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
Samapico
No, these DO NOT look like penises, ok?


Age:31
Gender:Gender:Male
Joined: May 08 2003
Posts: 1252
Location: Montreal, Canada
Offline

PostPosted: Mon Sep 01, 2008 4:35 pm    Post subject: Reply to topic Reply with quote

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.
_________________
DCME co-developer
17th Parallel Head Sysop
Subspace: The Future
Back to top
View users profile Send private message Add User to Ignore List
tcsoccerman
Server Help Squatter


Age:25
Gender:Gender:Male
Joined: Jan 15 2007
Posts: 694
Location: Atlantis
Offline

PostPosted: Mon Sep 01, 2008 5:58 pm    Post subject: Reply to topic Reply with quote

Yes winamp has an sdk, but it's in c...
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
tcsoccerman
Server Help Squatter


Age:25
Gender:Gender:Male
Joined: Jan 15 2007
Posts: 694
Location: Atlantis
Offline

PostPosted: Mon Sep 01, 2008 8:27 pm    Post subject: Reply to topic Reply with quote

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?
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
Samapico
No, these DO NOT look like penises, ok?


Age:31
Gender:Gender:Male
Joined: May 08 2003
Posts: 1252
Location: Montreal, Canada
Offline

PostPosted: Mon Sep 01, 2008 11:17 pm    Post subject: Reply to topic Reply with quote

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.
Back to top
View users profile Send private message Add User to Ignore List
tcsoccerman
Server Help Squatter


Age:25
Gender:Gender:Male
Joined: Jan 15 2007
Posts: 694
Location: Atlantis
Offline

PostPosted: Tue Sep 02, 2008 12:08 pm    Post subject: Reply to topic Reply with quote

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().
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
JoWie
Server Help Squatter


Gender:Gender:Male
Joined: Feb 25 2004
Posts: 215
Offline

PostPosted: Wed Sep 03, 2008 5:35 pm    Post subject: Reply to topic Reply with quote

http://sourceforge.net/projects/cswinampsdk

If i googled correctly, this sdk allows you to write plugins and/or send messages to winamp.
Back to top
View users profile Send private message Add User to Ignore List
tcsoccerman
Server Help Squatter


Age:25
Gender:Gender:Male
Joined: Jan 15 2007
Posts: 694
Location: Atlantis
Offline

PostPosted: Wed Sep 03, 2008 7:32 pm    Post subject: Reply to topic Reply with quote

Hey, that's cool. I did in fact solve my problem but thank you anyways.
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Non-Subspace Related Coding All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 81 page(s) served in previous 5 minutes.

phpBB Created this page in 0.060783 seconds : 33 queries executed (46.3%): GZIP compression disabled