MayaFlux 0.1.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 272 of file RtAudioBackend.cpp.

273{
274 if (!is_open()) {
275 throw std::runtime_error("Cannot start stream: stream not open");
276 }
277
278 if (is_running()) {
279 return;
280 }
281
282 try {
283 m_context->startStream();
284 m_isRunning = true;
285 } catch (const RtAudioErrorType& e) {
289 std::source_location::current(),
290 "Failed to start RtAudio stream: {}",
291 m_context->getErrorText());
292 }
293}
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: