|
tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications
« « « Anklang Documentation |
Classes | |
| struct | WaveRecordingContext |
Public Member Functions | |
| WaveInputDeviceInstance (WaveInputDevice &dev, EditPlaybackContext &c) | |
| bool | isRecordingActive () const override |
| Returns true if recording is enabled and the input is connected to any target. | |
| bool | isRecordingActive (EditItemID targetID) const override |
| Returns true if recording is enabled and the input is connected the given target. | |
| bool | isRecordingQueuedToStop (EditItemID targetID) override |
| Returns true if the async stopRecording function has been used and this target is waiting to stop. | |
| bool | shouldTrackContentsBeMuted (const Track &t) override |
| Should return true if this input is currently actively recording into a track and it wants the existing track contents to be muted. | |
| juce::AudioFormat * | getFormatToUse () const |
| tl::expected< std::unique_ptr< RecordingContext >, juce::String > | prepareToRecordTarget (EditItemID targetID, TimeRange punchRange) |
| std::vector< tl::expected< std::unique_ptr< RecordingContext >, juce::String > > | prepareToRecord (RecordingParameters params) override |
| Prepares a recording operation. | |
| std::vector< std::unique_ptr< RecordingContext > > | startRecording (std::vector< std::unique_ptr< RecordingContext > > newContexts) override |
| Starts a recording. | |
| TimePosition | getPunchInTime (EditItemID targetID) override |
| Returns the time that a given target started recording. | |
| bool | isRecording (EditItemID targetID) override |
| Returns true if there are any active recordings for this device. | |
| bool | isRecording () override |
| Returns true if there are any active recordings for this device. | |
| tl::expected< Clip::Array, juce::String > | stopRecording (StopRecordingParameters params) override |
| Stops a recording. | |
| void | stopRecording (StopRecordingParameters params, std::function< void(tl::expected< Clip::Array, juce::String >)> callback) override |
| Stops a recording asyncronously. | |
| juce::File | getRecordingFile (EditItemID targetID) const override |
| Returns the File that the given target is currently recording to. | |
| tl::expected< Clip::Array, juce::String > | applyRecording (std::unique_ptr< WaveRecordingContext > rc, TimePosition unloopedEndTime, bool isLooping, TimeRange loopRange, bool discardRecordings) |
| tl::expected< Clip::Array, juce::String > | applyLastRecording (const WaveRecordingContext &rc, const AudioFile &recordedFile, ClipOwner &destClipOwner, TimeRange recordedRange, bool isLooping, bool isPunching, TimePosition loopEnd) |
| tl::expected< Clip::Array, juce::String > | applyLastRecording (const WaveRecordingContext &rc, const ProjectItem::Ptr projectItem, const AudioFile &recordedFile, ClipOwner &destClipOwner, TimeDuration recordedFileLength, TimeDuration newClipLen, bool isLooping, bool isPunching, TimePosition loopEnd) |
| juce::Array< Clip * > | applyRetrospectiveRecord (bool armedOnly) override |
| Takes the retrospective buffer and creates clips from it, as if recording had been triggered in the past and stopped at the time of calling this function. | |
| void | copyIncomingDataIntoBuffer (const float *const *allChannels, int numChannels, int numSamples) |
| void | acceptInputBuffer (const float *const *allChannels, int numChannels, int numSamples, double streamTime, LevelMeasurer *measurerToUpdate, RetrospectiveRecordBuffer *retrospectiveBuffer, bool addToRetrospective) |
Public Member Functions inherited from tracktion::engine::InputDeviceInstance | |
| InputDeviceInstance (InputDevice &, EditPlaybackContext &) | |
| ~InputDeviceInstance () override | |
| Destructor. | |
| InputDevice & | getInputDevice () noexcept |
| Returns the InputDevice this instance belongs to. | |
| juce::Array< EditItemID > | getTargets () const |
| Returns the targets this instance is assigned to. | |
| tl::expected< Destination *, juce::String > | setTarget (EditItemID targetID, bool moveToTrack, juce::UndoManager *, std::optional< int > index=std::nullopt) |
| Assigns this input to either an AudioTrack or a ClipSlot. | |
| juce::Result | removeTarget (EditItemID targetID, juce::UndoManager *) |
| Removes the destination with the given targetID. | |
| virtual bool | isLivePlayEnabled (const Track &) const |
| Whether the track should monitor the input or not. | |
| bool | isRecordingEnabled (EditItemID) const |
| Returns true if recording is enabled for the given target. | |
| void | setRecordingEnabled (EditItemID, bool) |
| Enabled/disables recording for a given target. | |
| virtual std::shared_ptr< choc::fifo::SingleReaderSingleWriterFIFO< juce::MidiMessage > > | getRecordingNotes (EditItemID) const |
| Returns a fifo of recorded MIDInotes that can be used for drawing UI components. | |
Static Public Member Functions | |
| static tl::expected< juce::File, juce::String > | getDestinationRecordingFile (Edit &ed, EditItemID targetID, const juce::AudioFormat &format, juce::String filenameMask) |
| static bool | splitRecordingIntoMultipleTakes (EditPlaybackContext &epc, const AudioFile &recordedFile, const ProjectItem::Ptr &projectItem, TimeDuration recordedFileLength, juce::ReferenceCountedArray< ProjectItem > &extraTakes, juce::Array< juce::File > &filesCreated) |
Protected Member Functions | |
| WaveRecordingContext * | getContextForID (EditItemID targetID) const |
| RecordStopper & | getRecordStopper () |
| WaveInputDevice & | getWaveInput () const noexcept |
| void | addConsumer (Consumer *consumer) override |
| Base classes should override this to add any Consumers internally. | |
| void | removeConsumer (Consumer *consumer) override |
| Base classes should override this to remove the Consumer internally. | |
Protected Member Functions inherited from tracktion::engine::InputDeviceInstance | |
| void | valueTreePropertyChanged (juce::ValueTree &, const juce::Identifier &) override |
| void | valueTreeChildAdded (juce::ValueTree &, juce::ValueTree &) override |
| void | valueTreeChildRemoved (juce::ValueTree &, juce::ValueTree &, int) override |
| ClipSlot * | getFreeSlot (AudioTrack &) |
Protected Member Functions inherited from juce::ValueTree::Listener | |
| virtual void | valueTreeChildOrderChanged (ValueTree &parentTreeWhoseChildrenHaveMoved, int oldIndex, int newIndex) |
| virtual void | valueTreeParentChanged (ValueTree &treeWhoseParentHasChanged) |
| virtual void | valueTreeRedirected (ValueTree &treeWhichHasBeenChanged) |
Additional Inherited Members | |
Public Types inherited from tracktion::engine::InputDeviceInstance | |
| using | PreparedContext = std::vector< tl::expected< std::unique_ptr< RecordingContext >, juce::String > > |
| An array of either valid RecordingContexts or an error message if the recording couldn't be started. | |
Public Attributes inherited from tracktion::engine::InputDeviceInstance | |
| juce::ValueTree | state |
| InputDevice & | owner |
| The state of this instance. | |
| EditPlaybackContext & | context |
| The EditPlaybackContext this instance belongs to. | |
| Edit & | edit |
| The Edit this instance belongs to. | |
| DestinationList | destinations |
| The list of assigned destinations. | |
Definition at line 211 of file tracktion_WaveInputDevice.cpp.
| tracktion::engine::WaveInputDeviceInstance::WaveInputDeviceInstance | ( | WaveInputDevice & | dev, |
| EditPlaybackContext & | c | ||
| ) |
Definition at line 214 of file tracktion_WaveInputDevice.cpp.
|
override |
Definition at line 221 of file tracktion_WaveInputDevice.cpp.
| void tracktion::engine::WaveInputDeviceInstance::acceptInputBuffer | ( | const float *const * | allChannels, |
| int | numChannels, | ||
| int | numSamples, | ||
| double | streamTime, | ||
| LevelMeasurer * | measurerToUpdate, | ||
| RetrospectiveRecordBuffer * | retrospectiveBuffer, | ||
| bool | addToRetrospective | ||
| ) |
Definition at line 1124 of file tracktion_WaveInputDevice.cpp.
|
overrideprotectedvirtual |
Base classes should override this to add any Consumers internally.
Implements tracktion::engine::InputDeviceInstance.
Definition at line 1282 of file tracktion_WaveInputDevice.cpp.
| tl::expected< Clip::Array, juce::String > tracktion::engine::WaveInputDeviceInstance::applyLastRecording | ( | const WaveRecordingContext & | rc, |
| const AudioFile & | recordedFile, | ||
| ClipOwner & | destClipOwner, | ||
| TimeRange | recordedRange, | ||
| bool | isLooping, | ||
| bool | isPunching, | ||
| TimePosition | loopEnd | ||
| ) |
Definition at line 716 of file tracktion_WaveInputDevice.cpp.
| tl::expected< Clip::Array, juce::String > tracktion::engine::WaveInputDeviceInstance::applyLastRecording | ( | const WaveRecordingContext & | rc, |
| const ProjectItem::Ptr | projectItem, | ||
| const AudioFile & | recordedFile, | ||
| ClipOwner & | destClipOwner, | ||
| TimeDuration | recordedFileLength, | ||
| TimeDuration | newClipLen, | ||
| bool | isLooping, | ||
| bool | isPunching, | ||
| TimePosition | loopEnd | ||
| ) |
Definition at line 778 of file tracktion_WaveInputDevice.cpp.
| tl::expected< Clip::Array, juce::String > tracktion::engine::WaveInputDeviceInstance::applyRecording | ( | std::unique_ptr< WaveRecordingContext > | rc, |
| TimePosition | unloopedEndTime, | ||
| bool | isLooping, | ||
| TimeRange | loopRange, | ||
| bool | discardRecordings | ||
| ) |
Definition at line 670 of file tracktion_WaveInputDevice.cpp.
|
overridevirtual |
Takes the retrospective buffer and creates clips from it, as if recording had been triggered in the past and stopped at the time of calling this function.
Implements tracktion::engine::InputDeviceInstance.
Definition at line 956 of file tracktion_WaveInputDevice.cpp.
| void tracktion::engine::WaveInputDeviceInstance::copyIncomingDataIntoBuffer | ( | const float *const * | allChannels, |
| int | numChannels, | ||
| int | numSamples | ||
| ) |
Definition at line 1097 of file tracktion_WaveInputDevice.cpp.
|
protected |
Definition at line 1234 of file tracktion_WaveInputDevice.cpp.
|
static |
Definition at line 288 of file tracktion_WaveInputDevice.cpp.
| juce::AudioFormat * tracktion::engine::WaveInputDeviceInstance::getFormatToUse | ( | ) | const |
Definition at line 283 of file tracktion_WaveInputDevice.cpp.
|
overridevirtual |
Returns the time that a given target started recording.
Implements tracktion::engine::InputDeviceInstance.
Definition at line 470 of file tracktion_WaveInputDevice.cpp.
|
overridevirtual |
Returns the File that the given target is currently recording to.
Reimplemented from tracktion::engine::InputDeviceInstance.
Definition at line 609 of file tracktion_WaveInputDevice.cpp.
|
protected |
Definition at line 1245 of file tracktion_WaveInputDevice.cpp.
|
protectednoexcept |
Definition at line 1276 of file tracktion_WaveInputDevice.cpp.
|
overridevirtual |
Returns true if there are any active recordings for this device.
Implements tracktion::engine::InputDeviceInstance.
Definition at line 488 of file tracktion_WaveInputDevice.cpp.
|
overridevirtual |
Returns true if there are any active recordings for this device.
Implements tracktion::engine::InputDeviceInstance.
Definition at line 483 of file tracktion_WaveInputDevice.cpp.
|
overridevirtual |
Returns true if recording is enabled and the input is connected to any target.
Reimplemented from tracktion::engine::InputDeviceInstance.
Definition at line 237 of file tracktion_WaveInputDevice.cpp.
|
overridevirtual |
Returns true if recording is enabled and the input is connected the given target.
Reimplemented from tracktion::engine::InputDeviceInstance.
Definition at line 242 of file tracktion_WaveInputDevice.cpp.
|
overridevirtual |
Returns true if the async stopRecording function has been used and this target is waiting to stop.
Implements tracktion::engine::InputDeviceInstance.
Definition at line 247 of file tracktion_WaveInputDevice.cpp.
|
overridevirtual |
Prepares a recording operation.
| RecordingParameters | Determines the destinations and punch ranges |
Implements tracktion::engine::InputDeviceInstance.
Definition at line 422 of file tracktion_WaveInputDevice.cpp.
| tl::expected< std::unique_ptr< RecordingContext >, juce::String > tracktion::engine::WaveInputDeviceInstance::prepareToRecordTarget | ( | EditItemID | targetID, |
| TimeRange | punchRange | ||
| ) |
Definition at line 332 of file tracktion_WaveInputDevice.cpp.
|
overrideprotectedvirtual |
Base classes should override this to remove the Consumer internally.
Implements tracktion::engine::InputDeviceInstance.
Definition at line 1288 of file tracktion_WaveInputDevice.cpp.
|
overridevirtual |
Should return true if this input is currently actively recording into a track and it wants the existing track contents to be muted.
Reimplemented from tracktion::engine::InputDeviceInstance.
Definition at line 252 of file tracktion_WaveInputDevice.cpp.
|
static |
Definition at line 879 of file tracktion_WaveInputDevice.cpp.
|
overridevirtual |
Starts a recording.
| The | prepared recording contexts to start. |
Implements tracktion::engine::InputDeviceInstance.
Definition at line 441 of file tracktion_WaveInputDevice.cpp.
|
overridevirtual |
Stops a recording.
| StopRecordingParameters | determines how stopped recordings are treated. |
Implements tracktion::engine::InputDeviceInstance.
Definition at line 494 of file tracktion_WaveInputDevice.cpp.
|
overridevirtual |
Stops a recording asyncronously.
This can be used to trigger a recording to stop at a time in the future. This function will return immidiately and call the provided callback when the recording actually stops.
| StopRecordingParameters | Determines how stopped recordings are treated. |
| recordingStoppedCallback | A callback to call when the recording stops. |
Implements tracktion::engine::InputDeviceInstance.
Definition at line 555 of file tracktion_WaveInputDevice.cpp.
|
protected |
Definition at line 1280 of file tracktion_WaveInputDevice.cpp.
|
protected |
Definition at line 1279 of file tracktion_WaveInputDevice.cpp.
|
mutableprotected |
Definition at line 1228 of file tracktion_WaveInputDevice.cpp.
|
protected |
Definition at line 1232 of file tracktion_WaveInputDevice.cpp.
|
protected |
Definition at line 1229 of file tracktion_WaveInputDevice.cpp.
|
protected |
Definition at line 1230 of file tracktion_WaveInputDevice.cpp.