Entropy Piano Tuner
1.1.3 (documentation not yet complete)
An open-source experimental software for piano tuning by entropy minimization
|
#include <audiorecorderforqt.h>
Public Slots | |
void | onReadPacket () |
Public Member Functions | |
AudioRecorderForQt (QObject *parent) | |
virtual | ~AudioRecorderForQt () |
void | init () override |
Inizialize the audio device. More... | |
void | exit () override |
Destroy the audio device. More... | |
void | start () override |
Start/restart the audio device. More... | |
void | stop () override |
Stop the audio device. More... | |
virtual void | setDeviceInputGain (double volume) overridefinal |
virtual double | getDeviceInputGain () const overridefinal |
Public Member Functions inherited from AudioRecorderAdapter | |
AudioRecorderAdapter () | |
Constructor. More... | |
virtual | ~AudioRecorderAdapter () |
Empty destructor. More... | |
void | resetInputLevelControl () |
Reset input level control. More... | |
void | setMuted (bool muted) |
Set and reset the muting flag. More... | |
void | readAll (PacketType &packet) |
Read all data from the internal buffer. More... | |
void | cutSilence (PacketType &packet) |
Cut trailing silence. More... | |
double | getStopLevel () const |
void | setStandby (bool flag) |
void | setWaitingFlag (bool flag) |
Stroboscope * | getStroboscope () |
Public Member Functions inherited from AudioBase | |
AudioBase () | |
Constructor. More... | |
virtual | ~AudioBase () |
Destructor (no functionality). More... | |
const std::string & | getDeviceName () const |
Get a readable string of the name of the audio device. More... | |
void | setDeviceName (const std::string &n) |
Set the device name. More... | |
int | getSamplingRate () const |
Get the actual sampling rate. More... | |
int | getChannelCount () const |
Get the actual number of channels (1=mono, 2=stereo). More... | |
virtual void | setChannelCount (int cnt) |
Set the number of channels (1=mono, 2=stereo). More... | |
Private Types | |
typedef int16_t | DataFormat |
Data format of the input/output stream. More... | |
Private Attributes | |
QAudioInput * | mAudioInput |
QIODevice * | mIODevice |
QTimer | mReadTimer |
Static Private Attributes | |
static const DataFormat | SIGNAL_SCALING = std::numeric_limits<AudioRecorderForQt::DataFormat>::max() |
maximal alloed value of the stream More... | |
Additional Inherited Members | |
Public Types inherited from AudioBase | |
typedef double | PCMDataType |
typedef std::vector< PCMDataType > | PacketType |
Type definition of a PCM packet (vector of PCM values). More... | |
Static Public Attributes inherited from AudioRecorderAdapter | |
static const int | BUFFER_SIZE_IN_SECONDS = 2 |
Capacity of the local circular audio buffer in seconds. More... | |
static const int | UPDATE_IN_MILLISECONDS = 50 |
Update interval in milliseconds, defining the packet size. More... | |
static const double | ATTACKRATE = 0.97 |
Attack rate at which the sliding level goes up (1=instantly). More... | |
static const double | DECAYRATE = 0.7 |
Decay rate at which the sliding level goes down. More... | |
static const double | LEVEL_RETRIGGER = 0.3 |
Level below which retriggering (restart) is allowed. More... | |
static const double | LEVEL_TRIGGER = 0.48 |
Level above which the recorder starts to operate. More... | |
static const double | LEVEL_CUTOFF = 0.9 |
Level above which the input mGain is automatically reduced. More... | |
static const double | DB_OFF = 2 |
dB shift for off mark (high value = shorter recording) More... | |
Protected Member Functions inherited from AudioRecorderAdapter | |
void | pushRawData (const PacketType &data) |
The implementation calls this function when new data is available. More... | |
void | setSamplingRate (int rate) override |
Definition at line 28 of file audiorecorderforqt.h.
|
private |
Data format of the input/output stream.
Definition at line 40 of file audiorecorderforqt.h.
AudioRecorderForQt::AudioRecorderForQt | ( | QObject * | parent | ) |
|
virtual |
Definition at line 40 of file audiorecorderforqt.cpp.
|
overridevirtual |
Destroy the audio device.
Implements AudioBase.
Definition at line 107 of file audiorecorderforqt.cpp.
|
finaloverridevirtual |
Implements AudioRecorderAdapter.
Definition at line 152 of file audiorecorderforqt.cpp.
|
overridevirtual |
Inizialize the audio device.
Implements AudioBase.
Definition at line 45 of file audiorecorderforqt.cpp.
|
slot |
|
finaloverridevirtual |
Implements AudioRecorderAdapter.
Definition at line 146 of file audiorecorderforqt.cpp.
|
overridevirtual |
Start/restart the audio device.
Implements AudioBase.
Definition at line 122 of file audiorecorderforqt.cpp.
|
overridevirtual |
|
private |
Definition at line 60 of file audiorecorderforqt.h.
|
private |
Definition at line 61 of file audiorecorderforqt.h.
|
private |
Definition at line 62 of file audiorecorderforqt.h.
|
staticprivate |
maximal alloed value of the stream
Definition at line 42 of file audiorecorderforqt.h.