⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wmaudio.h

📁 pxa270平台 windows mobile 5.2 wm9713 触摸屏+音频驱动
💻 H
📖 第 1 页 / 共 5 页
字号:
/*-----------------------------------------------------------------------------
 * Function:    WMAudioDisableStream
 *
 * Called to disable the given stream.
 *
 * 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:    WMAudioIsSignalPanned
 *
 * Check to see if the given signal's left and right channels are set to the
 * same gain.
 *
 * Parameters:
 *      hDevice         The handle to the device (from WMOpenDevice).
 *      signal          The signal to check.
 *
 * Returns:     WM_BOOL
 *      TRUE             - Left and Right gains are the different
 *      FALSE            - Left and Right gains are the same
 *---------------------------------------------------------------------------*/
WM_BOOL WMAudioIsSignalPanned( 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,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -