playing music in C++

This is a discussion on playing music in C++ within the C++ Programming forums, part of the General Programming Boards category; Howdy, another random question, me and my friends in uni were wondering if it is possible to play an .mp3 ...

  1. #1
    Registered User
    Join Date
    Nov 2003
    Posts
    9

    Talking playing music in C++

    Howdy, another random question, me and my friends in uni were wondering if it is possible to play an .mp3 or .wav continously through a simple program.

    A simple example would be ideal but not essential, a point in the right direction would be great even.

    Thanks for your time

  2. #2
    Slave MadCow257's Avatar
    Join Date
    Jan 2005
    Posts
    735
    A .wav could be played with something called DirectSound, although I don't think it can play .mp3s.

  3. #3
    Registered User
    Join Date
    Jul 2004
    Posts
    53
    Even simpler. PlaySound() can play .wav s... really tricky heh ?

  4. #4
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    Look into fmod, it's a free(?) library that deals with music 'n stuff. If you just want to play .wav's, then PlaySound() (in <windows.h> should work fine. Otherwise, you can look into the mp3 file format at wotsit.org, then write your own decoder and stream the data manually (probably using DirectSound).

    I don't believe there's any such thing as a 'simple' example of playing .mp3, although times may have changed.
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Is AOL music crazy?
    By joeprogrammer in forum A Brief History of Cprogramming.com
    Replies: 9
    Last Post: 03-24-2006, 06:24 PM
  2. Playing music
    By adr in forum Windows Programming
    Replies: 13
    Last Post: 12-31-2005, 02:23 PM
  3. Playing music
    By PJYelton in forum Windows Programming
    Replies: 5
    Last Post: 06-25-2003, 09:09 AM
  4. Playing Music in C#
    By Smoose777 in forum C# Programming
    Replies: 9
    Last Post: 06-06-2002, 04:11 PM
  5. Playing Music
    By Quantrizi in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 05-11-2002, 07:47 PM

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