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

◆ record_into() [2/3]

MAYAFLUX_API std::shared_ptr< Kriya::BufferPipeline > MayaFlux::record_into ( const std::shared_ptr< Kakshya::DynamicSoundStream > &  stream,
Kriya::CaptureBuilder  source,
uint32_t  channel = 0 
)

Record a signal into one channel of a stream, a block at a time.

Captures source every cycle and appends each block at the stream's write head for channel, wrapping if the stream is a ring. A stereo ring needs a call per channel. Keep the returned pipeline alive for as long as the recording should run.

auto ring = MayaFlux::create_ring(10.0);
auto recorder = MayaFlux::record_into(ring,
.tap().lag(0.05)
.tap().lag(Kinesis::TimeMaps::linear(0.3, 4.0, 30.0)).level(0.6)
.start();
static CaptureBuilder capture_file_from(const std::shared_ptr< IO::IOManager > &io_manager, const std::string &filepath, uint32_t channel=0)
Create CaptureBuilder for file with fluent configuration.
TapSet start()
Build the taps and start them.
Definition TapSet.cpp:156
TapSetBuilder & tap()
Begin a new tap.
Definition TapSet.cpp:69
TapSetBuilder & lag(double seconds)
Make the current tap trail the write head of a live ring by seconds.
Definition TapSet.cpp:121
TapSetBuilder & level(double gain)
Linear gain of the current tap on each of its outputs.
Definition TapSet.cpp:95
TimeMap linear(double from, double to, double duration)
Straight path from one position to another, then constant.
Definition TimeMap.hpp:25
std::shared_ptr< Kakshya::DynamicSoundStream > create_ring(double seconds, uint32_t channels)
Make a circular stream that keeps the most recent seconds of a signal.
Definition Rigs.cpp:199
std::shared_ptr< Kriya::BufferPipeline > record_into(const std::shared_ptr< Kakshya::DynamicSoundStream > &stream, Kriya::CaptureBuilder source, uint32_t channel)
Record a signal into one channel of a stream, a block at a time.
Definition Rigs.cpp:215
std::shared_ptr< IO::IOManager > get_io_manager()
Retrieves the global IOManager instance for file loading and buffer management.
Definition Depot.cpp:575
Kriya::TapSetBuilder create_tap_set_from_stream(std::shared_ptr< Kakshya::DynamicSoundStream > stream)
Begin describing several taps that read an existing DynamicSoundStream.
Definition Rigs.cpp:160
Parameters
streamStream to record into.
sourceWhat to capture, for example from capture_file_from, capture_input_from or capture_from.
channelChannel of the stream that receives the signal.
Returns
The running pipeline, or nullptr if the stream is null.

Definition at line 215 of file Rigs.cpp.

218{
219 if (!stream) {
220 return nullptr;
221 }
222
223 source.for_cycles(1);
224
225 auto pipeline = create_buffer_pipeline();
226 *pipeline >> static_cast<Kriya::BufferOperation>(source)
227 >> Kriya::BufferOperation::route_to_container(stream, channel);
228 pipeline->execute_buffer_rate();
229
230 return pipeline;
231}
Core::GlobalStreamInfo stream
Definition Config.cpp:40

References create_buffer_pipeline(), MayaFlux::Kriya::BufferOperation::route_to_container(), and stream.

Referenced by MayaFlux::Yantra::Vision::VisionWorkflow::process_to_live_container(), record_into(), and record_into().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: