how can i play .MP3 tracks using windows.h?

This is a discussion on how can i play .MP3 tracks using windows.h? within the Windows Programming forums, part of the Platform Specific Boards category; i have been told that i can play .MP3 tracks using: <windows.h> and system("...\file.mp3"); but this does not work, it ...

  1. #1
    Registered User
    Join Date
    Mar 2007
    Posts
    6

    how can i play .MP3 tracks using windows.h?

    i have been told that i can play .MP3 tracks using:

    <windows.h>

    and

    system("...\file.mp3");


    but this does not work, it tells me that there is a problem with the batch file or something..

    can anyone please help me?

    OS: Windows XP SP2
    Compiler: Dev-C++

    cheers

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,333
    > You can use the PlaySound() function in windows.h
    That was the first reply in your other thread
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Mar 2007
    Posts
    6
    yes, but how do i use that PlaySound() function... like in the code?

  4. #4
    Registered Abuser
    Join Date
    Jun 2006
    Location
    Toronto
    Posts
    591

  5. #5
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,333
    > yes, but how do i use that PlaySound() function... like in the code?
    The same way you figured out how to use every other function, by reading the manual page for it and having a go at the examples.
    Or searching the board for prior examples.
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  6. #6
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342
    PlaySound() is very pop, look it up in google and you will have more than you know what to do with.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how do i use windows.h to play .MP3 tracks?
    By machineman9 in forum C++ Programming
    Replies: 7
    Last Post: 04-04-2007, 11:13 AM
  2. how to play play and stop wav files
    By cnu_sree in forum Linux Programming
    Replies: 4
    Last Post: 08-14-2006, 11:11 PM
  3. pls post here tricks that you know of in C/C++, thanks
    By mickey in forum C++ Programming
    Replies: 55
    Last Post: 06-12-2003, 04:28 PM
  4. Gui Class With Tic Tac Toe
    By xxYukoxx in forum C++ Programming
    Replies: 1
    Last Post: 06-01-2003, 04:28 PM
  5. Cribbage Game
    By PJYelton in forum Game Programming
    Replies: 14
    Last Post: 04-07-2003, 10:00 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21