To Play ".wave" file with C++(Background music)

Discussion in 'C++' started by andrew.smith.cpp@gmail.com, May 7, 2008.

  1. Guest

    Hello :)
    how can i play a ".wav" file in C++.means with the help of the C++
    code i just want to play a "a.wav" file more then 10 times. i just
    want to play background music.
    Can i do it in C++ ?
    if yes then how ?

    Thanks
    , May 7, 2008
    #1
    1. Advertising

  2. red floyd Guest

    wrote:
    > Hello :)
    > how can i play a ".wav" file in C++.means with the help of the C++
    > code i just want to play a "a.wav" file more then 10 times. i just
    > want to play background music.
    > Can i do it in C++ ?
    > if yes then how ?
    >


    ISO/IEC 14882:2003 does not discuss "WAV" files. Please ask in a
    newsgroup dedicated to your platform. My guess is you're on Windows, so
    try a group with either "windows" or "microsoft" in its name.

    See FAQ 5.9, http://www.parashift.com/c -faq-lite/how-to-post.html#faq-5.9
    red floyd, May 7, 2008
    #2
    1. Advertising

  3. Guest

    On May 7, 8:44 pm, red floyd <> wrote:
    > wrote:
    > > Hello :)
    > > how can i play a ".wav" file in C++.means with the help of the C++
    > > code i just want to play a "a.wav" file more then 10 times. i just
    > > want to play background music.
    > > Can i do it in C++ ?
    > > if yes then how ?

    >
    > ISO/IEC 14882:2003 does not discuss "WAV" files. Please ask in a
    > newsgroup dedicated to your platform. My guess is you're on Windows, so

    i am using "arch Linux" and "g++" complier
    , May 8, 2008
    #3
  4. red floyd Guest

    wrote:
    > On May 7, 8:44 pm, red floyd <> wrote:
    >> wrote:
    >>> Hello :)
    >>> how can i play a ".wav" file in C++.means with the help of the C++
    >>> code i just want to play a "a.wav" file more then 10 times. i just
    >>> want to play background music.
    >>> Can i do it in C++ ?
    >>> if yes then how ?

    >> ISO/IEC 14882:2003 does not discuss "WAV" files. Please ask in a
    >> newsgroup dedicated to your platform. My guess is you're on Windows, so

    > i am using "arch Linux" and "g++" complier


    Then look in comp.unix.programmer.
    In any case, FAQ 5.9 (see my previous post) still applies.
    red floyd, May 8, 2008
    #4
  5. James Kanze Guest

    On May 7, 5:44 pm, red floyd <> wrote:
    > wrote:


    > > how can i play a ".wav" file in C++.means with the help of the C++
    > > code i just want to play a "a.wav" file more then 10 times. i just
    > > want to play background music.
    > > Can i do it in C++ ?
    > > if yes then how ?


    > ISO/IEC 14882:2003 does not discuss "WAV" files. Please ask
    > in a newsgroup dedicated to your platform. My guess is you're
    > on Windows, so try a group with either "windows" or
    > "microsoft" in its name.


    Alternatively, he should try to find a more or less portable
    library. At some point, the code will have to access some
    platform specific API in order to generate sound. And of
    course, how this works, along with details of how to interpret a
    wave file, aren't really on topic here. But unless he's a real
    expert (in which case, he wouldn't have asked the question),
    it's better to find some third party library which has already
    addressed both of those questions.

    --
    James Kanze (GABI Software) email:
    Conseils en informatique orientée objet/
    Beratung in objektorientierter Datenverarbeitung
    9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
    James Kanze, May 9, 2008
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?TW9ycmlzIE5ldW1hbg==?=

    Datagrid Hyperlink field to play file system wave file help.

    =?Utf-8?B?TW9ycmlzIE5ldW1hbg==?=, Aug 24, 2006, in forum: ASP .Net
    Replies:
    9
    Views:
    5,308
    Guido Helmers
    Sep 11, 2006
  2. red floyd
    Replies:
    5
    Views:
    1,038
    Nathan Wijnia
    Jun 21, 2007
  3. Karthik
    Replies:
    0
    Views:
    792
    Karthik
    Sep 5, 2007
  4. Replies:
    7
    Views:
    1,157
    James Kanze
    May 9, 2008
  5. rara10
    Replies:
    0
    Views:
    932
    rara10
    Jan 30, 2009
Loading...

Share This Page