|
pianod2
multisource multiuser scriptable networked music player
|
#include <tonegen.h>


Classes | |
| struct | audio_sample |
Public Member Functions | |
| Player (const AudioSettings &audio, const PianodSong *song) | |
| void | createTone (int volume) |
| virtual void | setVolume (float volume) override |
| Adjust volume in decibels. More... | |
| State | currentState (void) const override |
| virtual float | trackDuration (void) const override |
| Length of track in seconds, or a negative number if unknown. More... | |
| virtual float | playPoint (void) const override |
| Seconds from start, or a negative value if unknown. More... | |
| virtual RESPONSE_CODE | playerThread (void) override |
Public Member Functions inherited from Media::ThreadedPlayer | |
| virtual void | pausing (void) |
| Invoked when pausing. More... | |
| virtual void | resuming (void) |
| Invoked when when resuming. More... | |
| ThreadedPlayer (void) | |
| virtual | ~ThreadedPlayer (void) |
Public Member Functions inherited from Media::Player | |
| virtual | ~Player (void) |
| virtual float | playRemaining (void) const |
| Seconds left in playback, or a negative number if unknown. More... | |
| bool | ready (void) const |
| Indicate if player has finished initializing. More... | |
| bool | playbackComplete (void) const |
| Indicate if playback is complete and ready for cleanup. More... | |
| virtual time_t | getPauseTimeout (void) |
| When paused, get the time at which the song will expire. More... | |
Public Attributes | |
| const AudioSettings | audio |
| const Song * | song |
| const TEST_SONG * | media |
| volatile int | repetitions = 0 |
| volatile int | current_rep = 0 |
| int | seconds_into_rep = 0 |
| std::unique_ptr< AUDIO_SAMPLE > | tone |
| float | duration = 0 |
| long | samples = 0 |
Private Types | |
| using | channel_sample = int16_t |
| typedef struct ToneGenerator::Player::audio_sample | AUDIO_SAMPLE |
Private Attributes | |
| Audio::Output * | output = nullptr |
Additional Inherited Members | |
Public Types inherited from Media::Player | |
| enum | State { DoesNotExist , Initializing , Cueing , Playing , Done } |
Static Public Member Functions inherited from Media::Player | |
| static Media::Player * | getPlayer (const AudioSettings &settings, const std::string &media_url, float initial_gain) |
| Get the a media player currently compiled in the code. More... | |
Protected Member Functions inherited from Media::ThreadedPlayer | |
| bool | checkForPauseOrQuit (void) |
|
private |
|
private |
| ToneGenerator::Player::Player | ( | const AudioSettings & | audio, |
| const PianodSong * | song | ||
| ) |
| void ToneGenerator::Player::createTone | ( | int | volume | ) |
|
overridevirtual |
Implements Media::Player.
|
overridevirtual |
Implements Media::ThreadedPlayer.


|
overridevirtual |
Seconds from start, or a negative value if unknown.
Implements Media::Player.

|
overridevirtual |
Adjust volume in decibels.
Implements Media::Player.
|
overridevirtual |
Length of track in seconds, or a negative number if unknown.
Implements Media::Player.
| const AudioSettings ToneGenerator::Player::audio |
| volatile int ToneGenerator::Player::current_rep = 0 |
| float ToneGenerator::Player::duration = 0 |
| const TEST_SONG* ToneGenerator::Player::media |
|
private |
| volatile int ToneGenerator::Player::repetitions = 0 |
| long ToneGenerator::Player::samples = 0 |
| int ToneGenerator::Player::seconds_into_rep = 0 |
| const Song* ToneGenerator::Player::song |
| std::unique_ptr<AUDIO_SAMPLE> ToneGenerator::Player::tone |