The following code illustrates setting the volume level for a device.
USHORT usDeviceID; MCI_SET_PARMS msp; msp.ulLevel = 50; /* 50% of volume */ msp.ulAudio = MCI_SET_AUDIO_ALL; mciSendCommand(usDeviceID, MCI_SET, MCI_WAIT | MCI_SET_AUDIO | MCI_SET_VOLUME (PVOID) &msp, 0);
The following example illustrates how an application can set a particular connector's volume setting.
MCI_AMP_SET_PARMS mSet; /* Set the volume of a particular connector. */ mSet.ulValue = MCI_AMP_STREAM_CONNECTOR; mSet.ulLevel = 100; mSet.ulItem = MCI_AMP_SET_AUDIO; mSet.ulAudio = MCI_AMP_SET_BASS; ulError = mciSendCommand((USHORT)hMixer, MCI_SET, MCI_WAIT | MCI_SET_ITEM (PVOID)&mSet, 0); if(ULONG_LOWD(ulError) != MCIERR_SUCCESS) { }