CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: C++ sounds

  1. #1
    Join Date
    Mar 1999
    Posts
    3

    C++ sounds



    Does anyone know how I can create sound using the internal speaker in a computer using MSVC 5.0? I've seen how to use .wav files, but I want to use the internal speaker. Like those annoying beeps from old Atari games. I need more of a variety than what MessageBeep will provide. Thanks!!

  2. #2
    Join Date
    Apr 1999
    Posts
    20

    Re: C++ sounds



    use the API function Beep(), and pass in a frequency and a duration:


    BOOL bResult;

    bResult = Beep(100, 100);

  3. #3
    Join Date
    Apr 1999
    Posts
    20

    Re: C++ sounds



    Forgot...the function wont work properly on 95, but will work on NT. Not sure if it works on 98.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured