test public

Dependencies:   HttpServer_snapshot_mbed-os

Embed: (wiki syntax)

« Back to documentation index

NullSpeaker Class Reference

NullSpeaker Class Reference

NullSpeaker class. More...

#include <NullSpeaker.h>

Inherits AUDIO_RBSP.

Public Member Functions

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

Detailed Description

NullSpeaker class.

Definition at line 26 of file NullSpeaker.h.


Constructor & Destructor Documentation

NullSpeaker (  )

Create a NullSpeaker.

Definition at line 31 of file NullSpeaker.h.


Member Function Documentation

virtual bool format ( char  length ) [virtual]

Set I2S interface bit length and mode.

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

Implements AUDIO_RBSP.

Definition at line 37 of file NullSpeaker.h.

virtual bool frequency ( int  hz ) [virtual]

Set sample frequency.

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

supports frequencies: 44.1kHz Default is 44.1kHz

Implements AUDIO_RBSP.

Definition at line 41 of file NullSpeaker.h.

virtual bool micVolume ( float  VolumeIn ) [virtual]

Microphone volume.

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

Implements AUDIO_RBSP.

Definition at line 63 of file NullSpeaker.h.

virtual bool outputVolume ( float  leftVolumeOut,
float  rightVolumeOut 
) [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

Implements AUDIO_RBSP.

Definition at line 59 of file NullSpeaker.h.

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

Overloaded power()

Parameters:
typetrue=power up, false=power down

Implements AUDIO_RBSP.

Definition at line 35 of file NullSpeaker.h.

virtual int read ( void *const   p_data,
uint32_t  data_size,
const rbsp_data_conf_t *const   p_data_conf = NULL 
) [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.

Implements AUDIO_RBSP.

Definition at line 55 of file NullSpeaker.h.

virtual int write ( void *const   p_data,
uint32_t  data_size,
const rbsp_data_conf_t *const   p_data_conf = NULL 
) [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.

Implements AUDIO_RBSP.

Definition at line 45 of file NullSpeaker.h.