Results 1 to 8 of 8

Thread: How to: Servers play music, Client controls this and gets up to date information

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2006
    Posts
    2

    How to: Servers play music, Client controls this and gets up to date information

    I plan to write the following application

    Servers
    Several computers (servers) in a network play music (from an application which I will design). These computers will be somewhere hidden in a cabinet without a user

    Client(s):
    From one (or maybe more then one computer) (the administrator console) it should be possible to control the servers which play the music. I guess just to send commands like START or STOP from the client to one server is relative simple, but I also want that the client receives information about the current state like: Which title is currently played, time left and maybe some kind of VU-Meter to show the current output signal. If possible I want this information pushed from the servers to client. So if the title changes the servers send this information just one time to all clients (instead of the clients asking every second what is currently played).

    I have experience in VB6 and APIs and I am able to write the application locally. But I have no idea which technology I can/should use to do this over the network.
    I will use this in a local area network only. I plan to use Windows XP as servers and as clients.
    Maybe I should run IIS on each server and a web interface on the client to see what’s happening. This is just an idea. The last time I works with a web interface was with ASP 1.0.

    If it would be a lot easier to do the described with .net this is also acceptable. But till now I tried to avoid spending lots of time learning .net

    Please let me know which technical possibilities exist to so something like this.

    Thank you very much for your help

    Edgar

  2. #2
    Fanatic Member
    Join Date
    Oct 2004
    Posts
    751

    Re: How to: Servers play music, Client controls this and gets up to date information

    This is a very easy concept lemme lay it out for you:
    (Using TCP, with the VB6 winsock control).
    Setup a server, have it listen on a random port you specify (I picked 555 for mine, I'll upload later and you can see what I am talking about). Make it so its just password auth, in other words theres no username just a password that is sent to verify the user. Have it listen for 'play' 'stop' 'next' (You can use APIs to find out volume level and so on so you can send it to the client) ect...

    When the client connects it will send the password, and the server will know who this user is and 'log' them in so to speak. And the client will work simply, if the user presses the Play button, itll send a TCP packet of 'play' to the server and the server will start to play music. Same thing for stop or next.

    I think you somewhat get the idea right now, I'm very tired right now so it may not make that much sense, but I'm sure its enough for you to figure out.
    My Projects: [ Instant Messagener Client/Server ] [ VBPictochat ]

    My Sites:
    [ Datanethost ]
    [ Helpdesk ]

    Remember if my post was helpful then Rate This Post.

  3. #3
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,692

    Re: How to: Servers play music, Client controls this and gets up to date information

    You can save a lot of network traffic by making the VU mater local. Just monitor the output level of the sound card.

  4. #4

    Thread Starter
    New Member
    Join Date
    Apr 2006
    Posts
    2

    Re: How to: Servers play music, Client controls this and gets up to date information

    Thank you for the help.

    The winsock control looks promising top me. I just checked the example here:

    http://msdn.microsoft.com/library/de...ockcontrol.asp

    I plan to use TCP to send the commands like PLAY and STOP and acknowledge that they are send and executed.
    For the status information like "which title is playing" and maybe the "VU Meter" I plan to use UDP.

    If you have further advise please let me know

    AL42: About your advise with the local VU meter. The idea is that the music is played on the server and that the information about the current output level is shown on the client. So the VU meter has to be on the client. I understand that it will create some traffic. But if the VU meter shows only 10% steps (or in this range) and if I update it only maybe every second this is hopefully acceptable. I will try and look how much traffic it really creates.

    Edgar

  5. #5
    Fanatic Member
    Join Date
    Oct 2004
    Posts
    751

    Re: How to: Servers play music, Client controls this and gets up to date information

    Honestly, it wont generate THAT much traffic to where you should be worried about saving some bytes.

    @Al42
    Acctually, you only need to worry about that if you have a hub. If you have a switch then it knows where to send it and theres pretty much no worries.
    My Projects: [ Instant Messagener Client/Server ] [ VBPictochat ]

    My Sites:
    [ Datanethost ]
    [ Helpdesk ]

    Remember if my post was helpful then Rate This Post.

  6. #6
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,692

    Re: How to: Servers play music, Client controls this and gets up to date information

    Quote Originally Posted by k1ll3rdr4g0n
    Acctually, you only need to worry about that if you have a hub. If you have a switch then it knows where to send it and theres pretty much no worries.
    That depends entirely on the topography of the network. If you keep any common pipe filled you've effectively crashed the network.

  7. #7
    Fanatic Member
    Join Date
    Oct 2004
    Posts
    751

    Re: How to: Servers play music, Client controls this and gets up to date information

    Quote Originally Posted by Al42
    That depends entirely on the topography of the network. If you keep any common pipe filled you've effectively crashed the network.
    Intresting, seeing as I stream music from my main computer to my laptop wirelessly plus use my pocket pc wirelessly (for hours on end) (which uses mbs not kbs), and I have no problems.
    No notice of slow down whatsoever. Seeing as this is a home network he doesn't have to worry about saving that extra kilobyte. There is no need to. Like I said if your using a switch then everything is sent to the right place automatically, if you have a hub then the data is sent to every port instead of the port its supposed to goto, which will cause a slow down if you do a lot of network related traffic.
    My Projects: [ Instant Messagener Client/Server ] [ VBPictochat ]

    My Sites:
    [ Datanethost ]
    [ Helpdesk ]

    Remember if my post was helpful then Rate This Post.

  8. #8
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    Re: How to: Servers play music, Client controls this and gets up to date information

    ive done a similar thing in C# and WMP10 - using PC a server and a smartphone/PPC as a client

    MVP 2007-2010 any chance of a regain?
    Professional Software Developer and Infrastructure Engineer.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width