test public

Dependencies:   HttpServer_snapshot_mbed-os

Embed: (wiki syntax)

« Back to documentation index

AUDIO_RBSP Class Reference

AUDIO_RBSP Class Reference

AUDIO_RBSP class. More...

#include <AUDIO_RBSP.h>

Inherited by AUDIO_GRBoard, MAX9867_RBSP, NullSpeaker, PwmOutSpeaker, SoundlessSpeaker, SPDIF_RBSP, TLV320_RBSP, and WM8978_RBSP.

Public Member Functions

virtual void power (bool type=true)=0
 Overloaded power()
virtual bool format (char length)=0
 Set I2S interface bit length and mode.
virtual bool frequency (int hz)=0
 Set sample frequency.
virtual int write (void *const p_data, uint32_t data_size, const rbsp_data_conf_t *const p_data_conf=NULL)=0
 Enqueue asynchronous write request.
virtual int read (void *const p_data, uint32_t data_size, const rbsp_data_conf_t *const p_data_conf=NULL)=0
 Enqueue asynchronous read request.
virtual bool outputVolume (float leftVolumeOut, float rightVolumeOut)=0
 Headphone out volume control.
virtual bool micVolume (float VolumeIn)=0
 Microphone volume.

Detailed Description

AUDIO_RBSP class.

Definition at line 33 of file AUDIO_RBSP.h.


Member Function Documentation

virtual bool format ( char  length ) [pure virtual]

Set I2S interface bit length and mode.

Parameters:
lengthSet bit length to 16 bits
Returns:
true = success, false = failure

Implemented in AUDIO_GRBoard, MAX9867_RBSP, NullSpeaker, PwmOutSpeaker, SoundlessSpeaker, SPDIF_RBSP, TLV320_RBSP, and WM8978_RBSP.

virtual bool frequency ( int  hz ) [pure virtual]

Set sample frequency.

Parameters:
frequencySample frequency of data in Hz
Returns:
true = success, false = failure

supports frequencies: 44.1kHz Default is 44.1kHz

Implemented in AUDIO_GRBoard, MAX9867_RBSP, NullSpeaker, PwmOutSpeaker, SoundlessSpeaker, SPDIF_RBSP, TLV320_RBSP, and WM8978_RBSP.

virtual bool micVolume ( float  VolumeIn ) [pure virtual]

Microphone volume.

Parameters:
VolumeInMicrophone volume
Returns:
Returns "true" for success, "false" if parameters are out of range

Implemented in AUDIO_GRBoard, MAX9867_RBSP, NullSpeaker, PwmOutSpeaker, SoundlessSpeaker, SPDIF_RBSP, TLV320_RBSP, and WM8978_RBSP.

virtual bool outputVolume ( float  leftVolumeOut,
float  rightVolumeOut 
) [pure virtual]

Headphone out volume control.

Parameters:
leftVolumeOutLeft headphone-out volume
rightVolumeOutRight headphone-out volume
Returns:
Returns "true" for success, "false" if parameters are out of range

Implemented in AUDIO_GRBoard, MAX9867_RBSP, NullSpeaker, PwmOutSpeaker, SoundlessSpeaker, SPDIF_RBSP, TLV320_RBSP, and WM8978_RBSP.

virtual void power ( bool  type = true ) [pure virtual]

Overloaded power()

Parameters:
typetrue=power up, false=power down

Implemented in AUDIO_GRBoard, MAX9867_RBSP, NullSpeaker, PwmOutSpeaker, SoundlessSpeaker, SPDIF_RBSP, TLV320_RBSP, and WM8978_RBSP.

virtual int read ( void *const   p_data,
uint32_t  data_size,
const rbsp_data_conf_t *const   p_data_conf = NULL 
) [pure virtual]

Enqueue asynchronous read request.

Parameters:
p_dataLocation of the data
data_sizeNumber of bytes to read
p_data_confAsynchronous control block structure
Returns:
Number of bytes read on success. negative number on error.

Implemented in AUDIO_GRBoard, MAX9867_RBSP, NullSpeaker, PwmOutSpeaker, SoundlessSpeaker, SPDIF_RBSP, TLV320_RBSP, and WM8978_RBSP.

virtual int write ( void *const   p_data,
uint32_t  data_size,
const rbsp_data_conf_t *const   p_data_conf = NULL 
) [pure virtual]

Enqueue asynchronous write request.

Parameters:
p_dataLocation of the data
data_sizeNumber of bytes to write
p_data_confAsynchronous control block structure
Returns:
Number of bytes written on success. negative number on error.

Implemented in AUDIO_GRBoard, MAX9867_RBSP, NullSpeaker, PwmOutSpeaker, SoundlessSpeaker, SPDIF_RBSP, TLV320_RBSP, and WM8978_RBSP.