adding sound to my pong game

Posted on 2012-09-15
Last Modified: 2012-10-14
i'm new at programming and have a question about adding sound to my pong game.

This is what i have done for the sound so far but it doesn't work.

(This was added to the GameStart)

m_AudioMusicPtr= new Audio("c:/documenten/bitmaps/Kalimba.mp3");

(this was added to the gameCycle)



I hope you guys could tell me what i am doing wrong or what i forgot.
Question by:marioway
    1 Comment
    LVL 16

    Accepted Solution

    You can use DirectSound and DirectSoundBuffer.
    There is an implementation from me at:
    It is for C++ Builder but can converted for visual studio.
    You have to convert from mp3 to wav format though.
    Control using:
    SoundBuf->Play(bool loop);
    No tick needed...

    George Tokas.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
    Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
    The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
    The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now