How to control CD Audio's Volume?
#1 Anonymous Poster_Anonymous Poster_* Guests - Reputation:
Posted 24 September 1999 - 04:00 PM
Volume?MCI?I think it's not easy.
#2 Members - Reputation: 134
Posted 23 September 1999 - 11:00 PM
// 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 Members - Reputation: 440
Posted 24 September 1999 - 04:00 PM
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






