Thread: Need Help in Playing Music..!!

  1. #1
    Registered User
    Join Date
    Jan 2012
    Location
    Chennai, Tamil nadu, India
    Posts
    30

    Need Help in Playing Music..!!

    Hello Friends..! In my program, i'm trying to play a music file in background...

    For that I used, this command:
    Code:
      system("start /min wmplayer.exe \"C:\\Downloads\\123\\You are like brother.mp3\"");
    So when it is executed, windows media player will be opened in minimized form and it plays the music..

    But Actually, it's not working..! I'm using Windows 7 only..

    If i use
    Code:
      system("start wmplayer.exe \"C:\\Downloads\\You are like brother.mp3\"");
    It works, but not minimized... So please tell me, how can i make it work in minimized form..????

    Or.., is there any other better way to play a music in background in between a program..???

    Thanks in advance..!!

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Using the same filename in both tests would be more convincing.

    > But Actually, it's not working..! I'm using Windows 7 only..
    Which isn't working
    - the playing part
    - the minimising part
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Jan 2012
    Location
    Chennai, Tamil nadu, India
    Posts
    30
    Quote Originally Posted by Salem View Post
    Using the same filename in both tests would be more convincing.

    > But Actually, it's not working..! I'm using Windows 7 only..
    Which isn't working
    - the playing part
    - the minimising part

    The minimizing part... It plays music... But not minimized when i use the second code..

    I want to play it minimized..

  4. #4
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    Use third party code, even something simple like SDL would work.

  5. #5
    Registered User
    Join Date
    Jan 2012
    Location
    Chennai, Tamil nadu, India
    Posts
    30
    Quote Originally Posted by whiteflags View Post
    Use third party code, even something simple like SDL would work.
    Well, thanks for that..., But can you please explain wat is that SDL...., third party code..??? I don't understand.. Please help me..

  6. #6
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Simple DirectMedia Layer
    If you had used google
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Playing Music
    By patrink in forum C Programming
    Replies: 5
    Last Post: 11-26-2010, 04:00 PM
  2. Playing music
    By adr in forum Windows Programming
    Replies: 13
    Last Post: 12-31-2005, 03:23 PM
  3. playing music in C++
    By dutch's finest in forum C++ Programming
    Replies: 3
    Last Post: 02-21-2005, 05:57 PM
  4. Playing music
    By PJYelton in forum Windows Programming
    Replies: 5
    Last Post: 06-25-2003, 09:09 AM
  5. Playing Music in C#
    By Smoose777 in forum C# Programming
    Replies: 9
    Last Post: 06-06-2002, 04:11 PM