|
Ring Daemon
|
#include <tone.h>


Public Types | |
| enum class | ToneId { DIALTONE = 0 , BUSY , RINGTONE , CONGESTION , TONE_NULL } |
| The different kind of tones. More... | |
Public Member Functions | |
| Tone (std::string_view definition, unsigned int sampleRate, AVSampleFormat sampleFormat) | |
| Constructor. | |
Public Member Functions inherited from jami::AudioLoop | |
| AudioLoop (AudioFormat format) | |
| AudioFormat | getFormat () const |
| void | getNext (AVFrame *output, bool mute) |
| Get the next fragment of the tone the function change the intern position, and will loop. | |
| std::unique_ptr< AudioFrame > | getNext (size_t samples=0, bool mute=false) |
| size_t | getSize () const |
| Accessor to the size of the buffer. | |
| AudioLoop & | operator= (AudioLoop &&o) noexcept |
| void | reset () |
| Reset the pointer position. | |
| void | seek (double relative_position) |
| virtual | ~AudioLoop () |
Static Public Member Functions | |
| static void | genSin (AVFrame *buffer, size_t outPos, unsigned nb_samples, unsigned frequency1, unsigned frequency2) |
| Add a simple or double sin to the buffer, it double the sin in stereo. | |
Additional Inherited Members | |
Protected Attributes inherited from jami::AudioLoop | |
| libjami::FrameBuffer | buffer_ {} |
| The data buffer. | |
| AudioFormat | format_ |
| size_t | pos_ {0} |
| current position, set to 0, when initialize | |
|
strong |
| jami::Tone::Tone | ( | std::string_view | definition, |
| unsigned int | sampleRate, | ||
| AVSampleFormat | sampleFormat | ||
| ) |
Constructor.
| definition | String that contain frequency/time of the tone |
| sampleRate | SampleRating of audio tone |
Definition at line 31 of file tone.cpp.
References jami::emitSignal().

|
static |
Add a simple or double sin to the buffer, it double the sin in stereo.
| buffer | The data |
| frequency1 | The first frequency |
| frequency2 | The second frequency |
| nb | the number of samples to generate |
Definition at line 111 of file tone.cpp.
References jami::emitSignal(), and JAMI_ERROR.
