📄 wmaudio.h
字号:
*
* Parameters:
* hDevice handle to the device (from WMOpenDevice)
* stream The stream to enable
*
* Returns: WMSTATUS
* See WMStatus.h.
*---------------------------------------------------------------------------*/
WMSTATUS WMAudioDisableStream( WM_DEVICE_HANDLE hDevice,
WM_STREAM_ID ifStream
);
/*-----------------------------------------------------------------------------
* Function: WMAudioIsStreamEnabled
*
* Queries whether the given stream has been enabled.
* Note: this requires global data. If there is no global data, this
* function will return WMS_UNSUPPORTED.
*
* Parameters:
* hDevice handle to the device (from WMOpenDevice)
* stream The stream to enable
*
* Returns: WMSTATUS
* WMS_RETURN_TRUE - stream is enabled
* WMS_RETURN_FALSE - stream is disabled
* WMS_UNSUPPORTED - no global data
*---------------------------------------------------------------------------*/
WMSTATUS WMAudioIsStreamEnabled( WM_DEVICE_HANDLE hDevice,
WM_STREAM_ID stream
);
/*-----------------------------------------------------------------------------
* Function: WMAudioSetSampleRate
*
* Called to set the sample rate in the audio-specific sections of the chip.
*
* Parameters:
* hDevice handle to the device (from WMOpenDevice)
* stream The stream for which to set the sample rate
* sampleRate The new sample rate.
*
* Returns: WMSTATUS
* See WMStatus.h.
*---------------------------------------------------------------------------*/
WMSTATUS WMAudioSetSampleRate( WM_DEVICE_HANDLE hDevice,
WM_STREAM_ID stream,
WM_SAMPLE_RATE sampleRate
);
/*-----------------------------------------------------------------------------
* Function: WMAudioGetSampleRate
*
* Returns the sample rate in the audio-specific sections of the chip.
*
* Parameters:
* hDevice handle to the device (from WMOpenDevice)
* stream The stream for which to get the sample rate
* pSampleRate Variable to receive the sample rate
*
* Returns: WMSTATUS
* See WMStatus.h.
*---------------------------------------------------------------------------*/
WMSTATUS WMAudioGetSampleRate( WM_DEVICE_HANDLE hDevice,
WM_STREAM_ID stream,
WM_SAMPLE_RATE *pSampleRate
);
/*-----------------------------------------------------------------------------
* Function: WMAudioIsSampleRateSupported
*
* Returns whether the sample rate is supported by the given stream.
*
* Parameters:
* hDevice handle to the device (from WMOpenDevice)
* stream The stream for which to check the sample rate
* sampleRate The sample rate to check.
*
* Returns: WMSTATUS
* WMS_RETURN_TRUE - sample rate is supported.
* WMS_RETURN_FALSE - sample rate is not supported.
* WMS_UNSUPPORTED - stream is not supported on this device.
*---------------------------------------------------------------------------*/
WMSTATUS WMAudioIsSampleRateSupported( WM_DEVICE_HANDLE hDevice,
WM_STREAM_ID ifStream,
WM_SAMPLE_RATE sampleRate
);
/*-----------------------------------------------------------------------------
* Function: WMAudioIsSignalSupported
*
* Check to see if the signal is supported on this device.
*
* Parameters:
* hDevice The handle to the device (from WMOpenDevice).
* signal The signal to check.
*
* Returns: WM_BOOL
* TRUE - signal is supported
* FALSE - signal is not supported
*---------------------------------------------------------------------------*/
WM_BOOL WMAudioIsSignalSupported( WM_DEVICE_HANDLE hDevice,
WM_AUDIO_SIGNAL signal
);
/*-----------------------------------------------------------------------------
* Function: WMAudioSignalHasVolume
*
* Check to see if the signal is supported and has volume control on this device.
*
* Parameters:
* hDevice The handle to the device (from WMOpenDevice).
* signal The signal to check.
*
* Returns: WM_BOOL
* TRUE - signal volume control is supported
* FALSE - signal volume control is not supported
*---------------------------------------------------------------------------*/
WM_BOOL WMAudioSignalHasVolume( WM_DEVICE_HANDLE hDevice,
WM_AUDIO_SIGNAL signal
);
/*-----------------------------------------------------------------------------
* Function: WMAudioSignalHasMute
*
* Check to see if the signal is supported and has a mute on this device.
*
* Parameters:
* hDevice The handle to the device (from WMOpenDevice).
* signal The signal to check.
*
* Returns: WM_BOOL
* TRUE - signal mute is supported
* FALSE - signal mute is not supported
*---------------------------------------------------------------------------*/
WM_BOOL WMAudioSignalHasMute( WM_DEVICE_HANDLE hDevice,
WM_AUDIO_SIGNAL signal
);
/*-----------------------------------------------------------------------------
* Function: WMAudioSignalHasNoSeparateMute
*
* Check to see if the signal is supported and is muted with a special volume
* on this device (as opposed to using a bitfield).
*
* If this is the case, the only way to unmute is to set the volume to a new
* value, since there is no previous volume information held in the register.
*
* Parameters:
* hDevice The handle to the device (from WMOpenDevice).
* signal The signal to check.
*
* Returns: WM_BOOL
* TRUE - signal mute is via a special volume value
* FALSE - signal is not supported or mute uses a separate bitfield
*---------------------------------------------------------------------------*/
WM_BOOL WMAudioSignalHasNoSeparateMute( WM_DEVICE_HANDLE hDevice,
WM_AUDIO_SIGNAL signal
);
/*-----------------------------------------------------------------------------
* Function: WMAudioIsSignalStereo
*
* Check to see if the signal is supported and is a stereo signal.
* Note this does not tell you that the signal is mono - it might not be
* supported.
*
* Parameters:
* hDevice The handle to the device (from WMOpenDevice).
* signal The signal to check.
*
* Returns: WM_BOOL
* TRUE - signal is stereo
* FALSE - signal is mono or not supported
*---------------------------------------------------------------------------*/
WM_BOOL WMAudioIsSignalStereo( WM_DEVICE_HANDLE hDevice,
WM_AUDIO_SIGNAL signal
);
/*-----------------------------------------------------------------------------
* Function: WMAudioIsSignalMono
*
* Check to see if the signal is supported and is a mono signal.
* Note this does not tell you that the signal is stereo - it might not be
* supported.
*
* Parameters:
* hDevice The handle to the device (from WMOpenDevice).
* signal The signal to check.
*
* Returns: WM_BOOL
* TRUE - signal is mono
* FALSE - signal is stereo or not supported
*---------------------------------------------------------------------------*/
WM_BOOL WMAudioIsSignalMono( WM_DEVICE_HANDLE hDevice,
WM_AUDIO_SIGNAL signal
);
/*-----------------------------------------------------------------------------
* Function: WMAudioGetSignalChannels
*
* Returns the channels which this signal supports.
*
* Parameters:
* hDevice The handle to the device (from WMOpenDevice).
* signal The signal to check.
* pChannels Receives the channels.
*
* Returns: WMSTATUS
* WMS_SUCCESS - Succeeded.
* WMS_UNSUPPORTED - Signal not supported on this device.
* WMS_NO_SUPPORTED_DEVICE - Device support not present
*---------------------------------------------------------------------------*/
WMSTATUS WMAudioGetSignalChannels( WM_DEVICE_HANDLE hDevice,
WM_AUDIO_SIGNAL signal,
WM_AUDIO_CHANNELS *pChannels
);
/*-----------------------------------------------------------------------------
* Function: WMAudioMuteSignal
*
* Called to mute the signal.
*
* Parameters:
* hDevice The handle to the device (from WMOpenDevice).
* signal The signal to mute.
* mute Mute if TRUE, unmute if FALSE.
*
* Note: This function will set and clear all the mute bits for the signal.
*
* Returns: WMSTATUS
* See WMStatus.h.
*---------------------------------------------------------------------------*/
WMSTATUS WMAudioMuteSignal( WM_DEVICE_HANDLE hDevice,
WM_AUDIO_SIGNAL signal,
WM_BOOL mute
);
/*-----------------------------------------------------------------------------
* Function: WMAudioIsSignalMuted
*
* Check to see if the signal is muted.
*
* Parameters:
* hDevice The handle to the device (from WMOpenDevice).
* signal The signal to check.
*
* Returns: WMSTATUS
* WMS_RETURN_TRUE if the signal is muted.
* WMS_RETURN_FALSE if the signal not muted.
* WMS_UNSUPPORTED if the signal is not available on this device.
* WMS_NO_SUPPORTED_DEVICE if device support is not present.
* See WMStatus.h for all other values and meanings.
*---------------------------------------------------------------------------*/
WMSTATUS WMAudioIsSignalMuted( WM_DEVICE_HANDLE hDevice,
WM_AUDIO_SIGNAL signal
);
/*-----------------------------------------------------------------------------
* Function: WMSignalName
*
* This function returns a textual representation of the signal - useful
* for reporting errors.
*
* Parameters:
* signal signal
*
* Returns: const char *
* Textual representation of signal.
----------------------------------------------------------------------------*/
const char *WMSignalName( WM_AUDIO_SIGNAL signal );
/*-----------------------------------------------------------------------------
* Function: WMAudioSetSignalVolumeDb
*
* Set the signal level relative to full-scale.
*
* Note: the underlying device may not use dB steps. In this case, the applied
* level will be rounded to the nearest available step. For example, if the device
* has a 1.5dB step size (typical of AC'97 devices), a level of 4 or 5 would both
* result in a 4.5dBFS signal.
*
* Parameters:
* hDevice The handle to the device (from WMOpenDevice).
* signal The signal to set.
* dbVol The relative amplification or attenuation to apply,
* in decibels.
* channels One or more of the WM_CHANNEL_XXX constants.
*
*
* Returns: WMSTATUS
* WMS_SUCCESS - success
* WMS_UNSUPPORTED - signal is not supported, or doesn't
* support volume control
* WMS_NO_SUPPORTED_DEVICE - device support not present
* See WMStatus.h for all other values and meanings.
*---------------------------------------------------------------------------*/
WMSTATUS WMAudioSetSignalVolumeDb( WM_DEVICE_HANDLE hDevice,
WM_AUDIO_SIGNAL signal,
int dbVol,
WM_AUDIO_CHANNELS channels
);
/*-----------------------------------------------------------------------------
* Function: WMAudioSetSignalVolumesDb
*
* Set the signal level relative to full-scale.
*
* Note: the underlying device may not use dB steps. In this case, the applied
* level will be rounded to the nearest available step. For example, if the device
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -