Can I Load A Sound or Music Into My Win32 Application ?

This is a discussion on Can I Load A Sound or Music Into My Win32 Application ? within the Windows Programming forums, part of the Platform Specific Boards category; Good day ! I wish to have background music playing while my Win32 application is running. Can it be done ...

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    13

    Wink Can I Load A Sound or Music Into My Win32 Application ?

    Good day !

    I wish to have background music playing while my Win32 application is running. Can it be done using VC++ ?

    Then I wish under centrain condition a sound will be played also ?
    How can it be done, again ?

    For your info, I am totally a newbie in Win programming and I need to pass up my project within very short time. So i need to tricks or easier ways

    Thanks a lot !

  2. #2
    Registered User Ward's Avatar
    Join Date
    Sep 2001
    Location
    Belgium
    Posts
    39
    Have a look at the functions PlaySound and sndPlaySound in yout MSDN.
    Greetings.

  3. #3
    Normal vector Carlos's Avatar
    Join Date
    Sep 2001
    Location
    Budapest
    Posts
    463
    ...or use Borland! Both CBuilder and Delphi have visual component(s) for this purpose (TMediaPlayer).

    Simply drag&drop it on your form, and you're done!

    Or use Directx, which has functions allowing you to play mp3-s as well.

  4. #4
    Registered User
    Join Date
    Sep 2001
    Posts
    164
    Mp3's in DirectX? Microsoft is against Mp3's! That's why they want you to use WMA or any other format. Mp3's aren't supported nativly by DirectX.
    // Gliptic

  5. #5
    Normal vector Carlos's Avatar
    Join Date
    Sep 2001
    Location
    Budapest
    Posts
    463
    "Microsoft is against Mp3's! "
    Just take a look at "Age of the Kings" CD. Full of MP3-s. And who made this game, guess?

    Microsoft® DirectShow® is an architecture for streaming media on the Microsoft Windows® platform. DirectShow provides for high-quality capture and playback of multimedia streams. It supports a wide variety of formats, including Advanced Streaming Format (ASF), Motion Picture Experts Group (MPEG), Audio-Video Interleaved (AVI), MPEG Audio Layer-3 (MP3), and WAV files.
    Click here to check out yourself.

  6. #6
    Registered User
    Join Date
    Sep 2001
    Posts
    164
    Okay, I guess you're right. Someone told me that MP3's wasn't supported by DirectShow.
    // Gliptic

  7. #7
    Registered User Esss's Avatar
    Join Date
    Aug 2001
    Posts
    133
    > Someone told me that MP3's wasn't supported by DirectShow.

    http://www.sunlightd.com/Windows/DirectX/MP3.html
    Ess
    Like a rat in a maze who says,
    "Watch me choose my own direction"
    Are you under the illusion
    The path is winding your way?
    - Rush

  8. #8
    Registered User
    Join Date
    Sep 2001
    Posts
    164
    Thanks! That link led me to a page about Fourier transform! That's what I have been looking for a really long time now!
    // Gliptic

  9. #9
    Normal vector Carlos's Avatar
    Join Date
    Sep 2001
    Location
    Budapest
    Posts
    463
    It's sunlight's site, it's a pitty he left us...
    He's got a DirectX tutorial there, and lots of good stuff.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Low latency sound effects
    By VirtualAce in forum Game Programming
    Replies: 0
    Last Post: 12-21-2004, 12:58 AM
  2. Updated sound engine code
    By VirtualAce in forum Game Programming
    Replies: 8
    Last Post: 11-18-2004, 11:38 AM
  3. Alpha of my first game
    By Shakti in forum Game Programming
    Replies: 28
    Last Post: 06-09-2004, 12:24 AM
  4. ALSA sound problem in Linux
    By MathFan in forum Tech Board
    Replies: 0
    Last Post: 04-24-2003, 10:05 AM
  5. Music and sound
    By Shadow12345 in forum Game Programming
    Replies: 7
    Last Post: 04-16-2003, 07:41 PM

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