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

📄 wmaudio.h

📁 pxa270平台 windows mobile 5.2 wm9713 触摸屏+音频驱动
💻 H
📖 第 1 页 / 共 5 页
字号:
								   )

/*-----------------------------------------------------------------------------
 * Function:    WMAudioSetOutputVolumes
 *
 * This function is deprecated and may be removed in a future release.
 * Use WMAudioSetSignalVolumes instead.
 *---------------------------------------------------------------------------*/
WMSTATUS WMAudioSetOutputVolumes( WM_DEVICE_HANDLE  hDevice,
								  WM_AUDIO_SIGNAL   output, 
								  unsigned int      volPercentL,
								  unsigned int      volPercentR,
								  WM_AUDIO_CHANNELS channels
								);

/*-----------------------------------------------------------------------------
 * Macro:       WMAudioSetOutputAttenuationAC97
 *
 * This function is deprecated and may be removed in a future release.
 * Use WMAudioSetSignalVolumeDb or WMAudioSetSignalVolumeAdv instead.
 *---------------------------------------------------------------------------*/
#define WMAudioSetOutputAttenuationAC97( _hDevice, _output, _rawVal )       \
			WMAudioSetOutputAttenuationsAC97( _hDevice,                     \
											  _output,                      \
											  _output,                      \
											  _rawVal,                      \
											  _rawVal                       \
											)

/*-----------------------------------------------------------------------------
 * Function:    WMAudioSetOutputAttenuationsAC97
 *
 * This function is deprecated and may be removed in a future release.
 * Use WMAudioSetSignalVolumeDb or WMAudioSetSignalVolumeAdv instead.
 *---------------------------------------------------------------------------*/
WMSTATUS WMAudioSetOutputAttenuationsAC97( WM_DEVICE_HANDLE  hDevice,
										   WM_AUDIO_SIGNAL   outputL, 
										   WM_AUDIO_SIGNAL   outputR, 
										   int               rawValL,
										   int               rawValR
										 );

/*-----------------------------------------------------------------------------
 * Function:    WMAudioGetOutputAttenuationsAC97
 *
 * This function is deprecated and may be removed in a future release.
 * Use WMAudioSetSignalVolumeDb or WMAudioSetSignalVolumeAdv instead.
 *---------------------------------------------------------------------------*/
WMSTATUS WMAudioGetOutputAttenuationsAC97( WM_DEVICE_HANDLE  hDevice,
										   WM_AUDIO_SIGNAL   output, 
										   int               *rawValL,
										   int               *rawValR,
										   WM_AUDIO_CHANNELS channels
										 );

/*-----------------------------------------------------------------------------
 * Macro:       WMAudioSetInputGain
 *
 * This function is deprecated and may be removed in a future release.
 * Use WMAudioSetSignalVolumeDb or WMAudioSetSignalVolumeAdv instead.
 *---------------------------------------------------------------------------*/
#define WMAudioSetInputGain( _hDevice,                                      \
							 _input,                                        \
							 _gain_dB                                       \
						   )                                                \
			WMAudioSetInputGains( _hDevice,                             	\
								  _input,                               	\
								  _input,                               	\
								  _gain_dB,                             	\
								  _gain_dB                              	\
								)

/*-----------------------------------------------------------------------------
 * Function:    WMAudioSetInputGains
 *
 * This function is deprecated and may be removed in a future release.
 * Use WMAudioSetSignalVolumeDb or WMAudioSetSignalVolumeAdv instead.
 *---------------------------------------------------------------------------*/
WMSTATUS WMAudioSetInputGains( WM_DEVICE_HANDLE  hDevice,
							   WM_AUDIO_SIGNAL   inputL, 
							   WM_AUDIO_SIGNAL   inputR, 
							   int               gain_dBL,
							   int               gain_dBR
							 );
/*-----------------------------------------------------------------------------
 * Macro:       WMAudioSetInputGainAC97
 *
 * This function is deprecated and may be removed in a future release.
 * Use WMAudioSetSignalVolumeDb or WMAudioSetSignalVolumeAdv instead.
 *---------------------------------------------------------------------------*/
#define WMAudioSetInputGainAC97( _hDevice, _input, _rawVal )                \
			WMAudioSetInputGainsAC97( _hDevice,                         	\
									  _input,								\
									  _input,								\
									  _rawVal,								\
									  _rawVal								\
									)

/*-----------------------------------------------------------------------------
 * Function:    WMAudioSetInputGainsAC97
 *
 * This function is deprecated and may be removed in a future release.
 * Use WMAudioSetSignalVolumeDb or WMAudioSetSignalVolumeAdv instead.
 *---------------------------------------------------------------------------*/
WMSTATUS WMAudioSetInputGainsAC97( WM_DEVICE_HANDLE  hDevice,
								   WM_AUDIO_SIGNAL   inputL, 
								   WM_AUDIO_SIGNAL   inputR, 
								   WM_REGVAL         rawValL,
								   WM_REGVAL         rawValR
								  );

/*-----------------------------------------------------------------------------
 * Macro:       WMAudioSetADCGainAC97
 *
 * This function is deprecated and may be removed in a future release.
 * Use WMAudioSetSignalVolumeDb or WMAudioSetSignalVolumeAdv instead.
 *---------------------------------------------------------------------------*/
#define WMAudioSetADCGainAC97( _hDevice, _rawVal, _extended )               \
						WMAudioSetADCGainsAC97( _hDevice,                   \
												_rawVal,                    \
												_rawVal,                    \
												WM_CHANNEL_STEREO,          \
												_extended                   \
											  );

/*-----------------------------------------------------------------------------
 * Function:    WMAudioSetADCGainsAC97
 *
 * This function is deprecated and may be removed in a future release.
 * Use WMAudioSetSignalVolumeDb or WMAudioSetSignalVolumeAdv instead.
 *---------------------------------------------------------------------------*/
WMSTATUS WMAudioSetADCGainsAC97( WM_DEVICE_HANDLE  hDevice,
								 WM_REGVAL         rawValL,
								 WM_REGVAL         rawValR,
								 WM_AUDIO_CHANNELS channels,
								 WM_BOOL           extended
							   );

/*-----------------------------------------------------------------------------
 * Macro:       WMAudioSetRecordSource
 *
 * Called to select the stereo signal which will be input to the record ADCs.
 *
 * Parameters:
 *      _hDevice         The handle to the device (from WMOpenDevice).
 *      _signal          The signal to record.
 *
 * Returns:     WMSTATUS
 *       See WMStatus.h.
 *---------------------------------------------------------------------------*/
#define WMAudioSetRecordSource( _hDevice,_signal)                           \
						WMAudioSetRecordSources( _hDevice,                  \
												 _signal,                   \
												 _signal                    \
											   )

/*-----------------------------------------------------------------------------
 * Function:    WMAudioGetRecordSources
 *
 * Called to query the signals which are being input to the record ADCs.
 * Note: this may not be the same value as passed in to SetRecordSources
 * - it may be another value which is a synonym for the value set.
 *
 * Parameters:
 *      hDevice         The handle to the device (from WMOpenDevice).
 *      pLeft           The signal being recorded as the left channel.
 *      pRight          The signal being recorded as the right channel.
 *
 * Returns:     WMSTATUS
 *       See WMStatus.h.
 *---------------------------------------------------------------------------*/
WMSTATUS WMAudioGetRecordSources( WM_DEVICE_HANDLE hDevice,
								  WM_AUDIO_SIGNAL  *pLeft,
								  WM_AUDIO_SIGNAL  *pRight
								);

/*-----------------------------------------------------------------------------
 * Function:    WMAudioSetRecordSources
 *
 * Called to select the signals which will be input to the record ADCs.
 *
 * Parameters:
 *      hDevice         The handle to the device (from WMOpenDevice).
 *      left            The signal to record as the left channel.
 *      right           The signal to record as the right channel.
 *
 * Note: A value of WM_AUDIO_IGNORE received for either channel 
 *       is taken as a "don't change that channel" indicator.
 *
 * Returns:     WMSTATUS
 *       See WMStatus.h.
 *---------------------------------------------------------------------------*/
WMSTATUS WMAudioSetRecordSources( WM_DEVICE_HANDLE hDevice,
								  WM_AUDIO_SIGNAL  left,
								  WM_AUDIO_SIGNAL  right
								);

/*-----------------------------------------------------------------------------
 * Function:    WMAudioClearRecordSources
 *
 * Called to clear the signals PGA's for the input to the record ADCs.
 *
 * Parameters:
 *      hDevice         The handle to the device (from WMOpenDevice).
 *      left            The the left channel record signal to clear.
 *      right           The the right channel record signal to clear.
 *
 * Note: A value of WM_AUDIO_IGNORE received for either channel 
 *       is taken as a "don't change that channel" indicator.
 *
 * Returns:     WMSTATUS
 *       See WMStatus.h.
 *---------------------------------------------------------------------------*/
WMSTATUS WMAudioClearRecordSources( WM_DEVICE_HANDLE hDevice,
									WM_AUDIO_SIGNAL  left,
									WM_AUDIO_SIGNAL  right
								  );

/*-----------------------------------------------------------------------------
 * Macro:       WMAudioSelectMic
 *
 * Called to select Microphone input.
 *
 * Parameters:
 *      hDevice         The handle to the device (from WMOpenDevice).
 *      _mic             The mic input signal to select for the left channel.
 *
 * Returns:     WMSTATUS
 *       See WMStatus.h.
 *---------------------------------------------------------------------------*/
#define WMAudioSelectMic( _hDevice, _mic )                                  \
				WMAudioSelectMics( _hDevice, _mic, _mic )


/*-----------------------------------------------------------------------------
 * Function:    WMAudioSelectMics
 *
 * Called to select Microphone inputs.
 * NOTE : This function only supports 2 single ended mono input microphones.
 *
 * Parameters:
 *      hDevice         The handle to the device (from WMOpenDevice).
 *      micL            The mic input signal to select for the left channel.
 *      micR            The mic input signal to select for the left channel.
 *
 * Returns:     WMSTATUS
 *       See WMStatus.h.
 *---------------------------------------------------------------------------*/
WMSTATUS WMAudioSelectMics( WM_DEVICE_HANDLE  hDevice,
							WM_AUDIO_SIGNAL   micL,
							WM_AUDIO_SIGNAL   micR
						  );


/*-----------------------------------------------------------------------------
 * Function:    WMAudioMicRecNormalise
 *
 * Called to amplify Mic Record level to be as close to a line level input 
 * as the codec will allow.
 * NOTE: This procedure may not use the sams PGAs for every device as it 
 * will only use available PGAs are on the record path.
 *
 * Parameters:
 *      hDevice         The handle to the device (from WMOpenDevice).
 *      lMic            The left channel mic input signal to select.
 *      rMic            The left channel mic input signal to select.
 *      normalise       Amplifes mic record if TRUE, 0dB if FALSE.
 *
 * Returns:     WMSTATUS
 *       See WMStatus.h.
 *---------------------------------------------------------------------------*/
WMSTATUS WMAudioMicRecNormalise( WM_DEVICE_HANDLE hDevice,
									 WM_AUDIO_SIGNAL  lMic,
									 WM_AUDIO_SIGNAL  rMic,
									 WM_BOOL          normalise
									);

/*-----------------------------------------------------------------------------
 * Streaming functions.
 *---------------------------------------------------------------------------*/
#if WM_AUDIO_STREAM

/*-----------------------------------------------------------------------------
 * Function:    WMAudioOpenStream
 *
 * Prepares an audio stream for communicating and streaming.
 *
 * Parameters:
 *      hDevice         handle to the device (from WMOpenDevice)
 *      stream          the stream to prepare.
 *      phStream        variable to receive stream handle.
 *      sampleRate      the sample rate for the stream (in Hz, e.g. 44100)
 *      bitsPerSample   the number of bits per sample (8 or 16)
 *      isStereo        the number of channels (FALSE = mono TRUE = stereo)
 *
 * Returns:     WMSTATUS
 *      See WMStatus.h.
 *---------------------------------------------------------------------------*/
WMSTATUS WMAudioOpenStream( WM_DEVICE_HANDLE hDevice,
							WM_STREAM_ID     stream,
							WM_STREAM_HANDLE *phStream,
							int              sampleRate,
							int              bitsPerSample,
							WM_BOOL          isStere

⌨️ 快捷键说明

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