Windows Multimedia DDK (mddkqh.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
MODM_SETVOLUME
                                                 Contents Index Back
────────────────────────────────────────────────────────────────────────────
MODM_SETVOLUME
 
        This message is sent to a MIDI output device driver to set the
        volume for a device.
 
Parameters
        DWORD dwParam1
            Specifies the new volume level. The high-order word contains
            the right channel setting and the low-order word contains the
            left channel setting. A value of 0 is silence, and a value
            of 0xFFFF is full volume. If the driver does not support
            both left and right channel volume changes, it uses the
            volume specified in the low-order word. The driver will
            probably not support the full 16 bits of volume control and
            should truncate the lower bits if necessary. However, the
            original value requested with MODM_SETVOLUME should be
            returned with MODM_GETVOLUME.
 
        DWORD dwParam2
            Unused.
 
Return value
        The return value is an error code, or zero (MMSYSERR_NOERROR) if
        the operation is successful. Possible error codes are:
 
        MMSYSERR_NOTENABLED
            The driver failed to load or initialize.
 
        MMSYSERR_NOTSUPPORTED
            The driver does not support changes to volume level.
 
Comments
        This volume message is not the same as the MIDI volume controller
        message which will be used by sequencers and the mapper. This
        volume is the final output volume on the card; therefore, only
        drivers for internal synthesizer devices can support volume
        level changes. Drivers for MIDI output ports should return a
        MMSYSERR_NOTSUPPORTED error for this message. Support for
        volume level changes is optional for internal synthesizer
        devices. When a driver receives a MODM_GETDEVCAPS message, it
        should indicate support for volume level changes by setting or
        clearing the MIDICAPS_VOLUME and MIDICAPS_LRVOLUME bits in the
        dwSupport field of the MIDIOUTCAPS data structure. If a driver
        supports the MODM_SETVOLUME message, then it must also support
        MODM_GETVOLUME.
 
See also
        MODM_GETVOLUME
 
                                       -♦-