Thread: Modulating sound volumes

  1. #1
    Registered User
    Join Date
    Jan 2005
    Posts
    3

    Modulating sound volumes

    I posted this in the C++ forum, but am moving it here due to the nature of the question.

    I am making a game, although that is fairly irrelevant. The goal is to create a slider to modulate the volume of a played wav file. I want to read in the wav to a buffer I believe, somehow make it louder or softer, and send it on its way; and I need to do all this without affecting system volumes or other volumes, because other applications will also be utilizing the system volume.

    I've been using Dx for image and sounds thus far.

    If anyone requires more information, please ask.

    Azrei

  2. #2
    Registered User
    Join Date
    Apr 2002
    Posts
    1,571
    are you playing the wav's right now? Are you using standard Win32 calls? DirectSound?
    "...the results are undefined, and we all know what "undefined" means: it means it works during development, it works during testing, and it blows up in your most important customers' faces." --Scott Meyers

  3. #3
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    You need to get the default audio path and use GetObjectInPath() to change the volume. Note that since you are using one audio path this will affect all sounds played on that audio path.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Sound lags in multi-thread version
    By VirtualAce in forum Game Programming
    Replies: 23
    Last Post: 08-27-2008, 11:54 AM
  2. Low latency sound effects
    By VirtualAce in forum Game Programming
    Replies: 0
    Last Post: 12-21-2004, 01:58 AM
  3. Updated sound engine code
    By VirtualAce in forum Game Programming
    Replies: 8
    Last Post: 11-18-2004, 12:38 PM
  4. DirectSound - multiple sounds
    By Magos in forum Game Programming
    Replies: 9
    Last Post: 03-03-2004, 04:33 PM
  5. sounds?
    By BODYBUILDNERD in forum C++ Programming
    Replies: 6
    Last Post: 12-06-2002, 03:34 PM