29 std::vector<std::thread> visThreads;
30 std::atomic<bool> endVis;
33 QString visType, language;
36 explicit QMLBridge(QObject *parent =
nullptr);
57 Q_INVOKABLE
bool stop();
58 Q_INVOKABLE
bool play();
59 Q_INVOKABLE
bool pause();
64 Q_INVOKABLE
void saveFile(QString dir);
71 static void reverseBits(
size_t x,
int n);
90 void visData(
const std::vector<qreal> &rawData,
const std::vector<qreal> &dataIn);
Q_INVOKABLE bool stop()
Trigger stop in the Transport and update the UI state via signal.
Definition: QMLBridge.cpp:200
Q_INVOKABLE QString getOutputDevices()
Get the current output devices.
Definition: QMLBridge.cpp:479
void startVisThread()
Start the thread that reads the ring buffer and updates the visualizer.
Definition: QMLBridge.cpp:589
Q_INVOKABLE void saveSettings()
Saves all settings into a JSON settings file.
Definition: QMLBridge.cpp:108
Q_INVOKABLE QString getSelectedLanguage()
Returns the setting value for showing record devices.
Definition: QMLBridge.cpp:560
Q_INVOKABLE void discard()
Deletes all the temp files that the program has created.
Definition: QMLBridge.cpp:294
void languageChanged()
Signal emmitted when the language changes.
Extra class for managing the state of the application and all audio related processes.
Definition: Transport.h:33
QMLBridge(QObject *parent=nullptr)
Construct a new instance of the QMLBridge class.
Definition: QMLBridge.cpp:32
QString getEmptyStr()
Return an empty QString to force QML to update when a new language is loaded.
Definition: QMLBridge.cpp:307
void stateChanged()
Signal emmitted when the Transport changes states.
Q_INVOKABLE void cleanTempFiles()
Deletes all the temp files that the program has created.
Definition: QMLBridge.cpp:771
Q_INVOKABLE void launchUpdateProcess()
Launch the updater process.
Definition: QMLBridge.cpp:713
Q_INVOKABLE bool wannaClose()
Get if the user has unsaved files.
Definition: QMLBridge.cpp:733
Q_INVOKABLE bool record()
Trigger record in the Transport and update the UI state via signal.
Definition: QMLBridge.cpp:166
Q_INVOKABLE bool loadLanguage(const QString &)
Modifies settings to load the specified language.
Definition: QMLBridge.cpp:542
Q_INVOKABLE void setActiveInputDevice(QString QDeviceName)
Match a string that the user chose to the input device list and notify the backend.
Definition: QMLBridge.cpp:316
Q_INVOKABLE QString getTransportState() const
Return the current state of the Transport instance as a QString.
Definition: QMLBridge.cpp:158
QString getVisualizerType()
Return the current visualizer type.
Definition: QMLBridge.cpp:138
Q_INVOKABLE QString getInputDevices()
Get the current input devices.
Definition: QMLBridge.cpp:438
Q_INVOKABLE void setActiveOutputDevice(QString QDeviceName)
Match a string that the user chose to the output device list and notify the backend.
Definition: QMLBridge.cpp:377
static void updateVisualizer(QMLBridge *_this)
Perform FFT and update the visualizer.
Definition: QMLBridge.cpp:621
HulaLoop wrapper class for PortAudio ring buffer.
Definition: HulaRingBuffer.h:86
virtual ~QMLBridge()
Destructor for QMLBridge.
Definition: QMLBridge.cpp:779
void discarded()
Signal emmitted when the Transport successfully discards.
void setVisualizerType(const QString &)
Sets the current visualizer type.
Definition: QMLBridge.cpp:148
void loadSettings()
Loads all settings stored in the JSON settings file.
Definition: QMLBridge.cpp:75
Q_INVOKABLE bool pause()
Trigger pause in the Transport and update the UI state via signal.
Definition: QMLBridge.cpp:264
void stopVisThread()
Stop the thread that updates the visualizer.
Definition: QMLBridge.cpp:604
Wrapper around translation functions for Qt.
Definition: Controller.h:10
Q_INVOKABLE void setShowRecordDevices(bool)
Modifies settings to display record devices.
Definition: QMLBridge.cpp:520
void visData(const std::vector< qreal > &rawData, const std::vector< qreal > &dataIn)
Signal emitted when the visualizer needs to update.
Class for communicating between QML and C++.
Definition: QMLBridge.h:20
Q_INVOKABLE bool getShowRecordDevices()
Returns the setting value for showing record devices.
Definition: QMLBridge.cpp:532
Q_INVOKABLE void saveFile(QString dir)
Get the directory the user wants to save to.
Definition: QMLBridge.cpp:572
Q_INVOKABLE bool play()
Trigger playback in the Transport and update the UI state via signal.
Definition: QMLBridge.cpp:230