Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

How to control CD Audio's Volume?

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
2 replies to this topic

#1 Anonymous Poster_Anonymous Poster_*   Guests   

Posted 24 September 1999 - 04:00 PM

Does any one knows how to control CD Audio's
Volume?MCI?I think it's not easy.

#2 ghowland   Members   

134

Posted 23 September 1999 - 11:00 PM

With something like this:

// Get the number of auxilary audio devs //
int numdevs = auxGetNumDevs();
int devid = 0;
AUXCAPS auxCaps;

// Find the CDAudio device //
for (int i = 0 ; i < numdevs ; i ++)
{
auxGetDevCaps(i, &auxCaps, sizeof(auxCaps));

devid = i;
i = numdevs;
}

// Change the volume & check against limits//
if (vol > 100) vol = 100;
if (vol < 0) vol = 0;
auxSetVolume(devid, vol*655);

-Geoff


#3 Jim Adams   Members   

440

Posted 24 September 1999 - 04:00 PM

Wouldn't this alter the midi volume as well? I suggest if you are trying to alter just the one volume, get the device id for the cdrom when you open it for use:

char buffer[16], command[64];

strcpy(command, "open cdaudio wait");
mciSendString(command, buffer, 16, NULL);
buffer[15] = 0;
device_id = atoi(buffer);

Then proceed with the rest as Geoff suggested. This works for all devices
that need an id.

------------------
Jim Adams
Co-Designer 'The Light Befallen'
tcm@pobox.com
http://www.lightbefallen.com





Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.