MayaFlux 0.3.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ start()

void MayaFlux::Core::RtAudioStream::start ( )
overridevirtual

Activates the audio stream and begins data transfer.

Starts the RtAudio stream, initiating the real-time processing of audio data through the registered callback function.

Implements MayaFlux::Core::AudioStream.

Definition at line 289 of file RtAudioBackend.cpp.

290{
291 if (!is_open()) {
292 throw std::runtime_error("Cannot start stream: stream not open");
293 }
294
295 if (is_running()) {
296 return;
297 }
298
299 try {
300 m_context->startStream();
301 m_isRunning = true;
302 } catch (const RtAudioErrorType& e) {
306 std::source_location::current(),
307 "Failed to start RtAudio stream: {}",
308 m_context->getErrorText());
309 }
310}
bool is_open() const override
Checks if the stream is initialized and ready for activation.
bool m_isRunning
Flag indicating if the stream is currently running.
RtAudio * m_context
Pointer to the underlying RtAudio context.
bool is_running() const override
Checks if the stream is actively processing audio data.
@ AudioBackend
Audio processing backend (RtAudio, JACK, ASIO)
void error_rethrow(Component component, Context context, std::source_location location=std::source_location::current(), std::string_view additional_context="")
Catch and log an exception, then rethrow it.
@ Core
Core engine, backend, subsystems.

References MayaFlux::Journal::AudioBackend, MayaFlux::Journal::Core, is_open(), is_running(), m_context, and m_isRunning.

+ Here is the call graph for this function: