test public
Dependencies: HttpServer_snapshot_mbed-os
SoundlessSpeaker Class Reference
SoundlessSpeaker class. More...
#include <SoundlessSpeaker.h>
Inherits AUDIO_RBSP.
Public Member Functions | |
SoundlessSpeaker () | |
Create a SoundlessSpeaker. | |
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
SoundlessSpeaker class.
Definition at line 26 of file SoundlessSpeaker.h.
Constructor & Destructor Documentation
SoundlessSpeaker | ( | ) |
Create a SoundlessSpeaker.
Definition at line 19 of file SoundlessSpeaker.cpp.
Member Function Documentation
bool format | ( | char | length ) | [virtual] |
Set I2S interface bit length and mode.
- Parameters:
-
length Set bit length to 8 or 16 bits
- Returns:
- true = success, false = failure
Implements AUDIO_RBSP.
Definition at line 27 of file SoundlessSpeaker.cpp.
bool frequency | ( | int | hz ) | [virtual] |
Set sample frequency.
- Parameters:
-
frequency Sample frequency of data in Hz
- Returns:
- true = success, false = failure
Supports the following frequencies: 8kHz, 8.021kHz, 32kHz, 44.1kHz, 48kHz Default is 44.1kHz
Implements AUDIO_RBSP.
Definition at line 40 of file SoundlessSpeaker.cpp.
virtual bool micVolume | ( | float | VolumeIn ) | [virtual] |
Microphone volume.
- Parameters:
-
VolumeIn Microphone volume
- Returns:
- Returns "true" for success, "false" if parameters are out of range
Implements AUDIO_RBSP.
Definition at line 72 of file SoundlessSpeaker.h.
virtual bool outputVolume | ( | float | leftVolumeOut, |
float | rightVolumeOut | ||
) | [virtual] |
Headphone out volume control.
- Parameters:
-
leftVolumeOut Left headphone-out volume rightVolumeOut Right headphone-out volume
- Returns:
- Returns "true" for success, "false" if parameters are out of range
Implements AUDIO_RBSP.
Definition at line 68 of file SoundlessSpeaker.h.
virtual void power | ( | bool | type = true ) |
[virtual] |
Overloaded power()
- Parameters:
-
type true=power up, false=power down
Implements AUDIO_RBSP.
Definition at line 35 of file SoundlessSpeaker.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_data Location of the data data_size Number of bytes to read p_data_conf Asynchronous control block structure
- Returns:
- Number of bytes read on success. negative number on error.
Implements AUDIO_RBSP.
Definition at line 64 of file SoundlessSpeaker.h.
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_data Location of the data data_size Number of bytes to write
- Returns:
- Number of bytes written on success. negative number on error.
Implements AUDIO_RBSP.
Definition at line 56 of file SoundlessSpeaker.cpp.
Generated on Wed Jul 13 2022 05:33:38 by 1.7.2