MCPcopy Create free account
hub / github.com/OpenShot/libopenshot / SetAudioDirection

Method SetAudioDirection

src/Frame.cpp:818–827  ·  view source on GitHub ↗

Set the direction of the audio buffer of this frame

Source from the content-addressed store, hash-verified

816
817/// Set the direction of the audio buffer of this frame
818void Frame::SetAudioDirection(bool is_increasing) {
819 if (audio && !audio_is_increasing && is_increasing) {
820 // Forward audio buffer
821 audio->reverse(0, audio->getNumSamples());
822 } else if (audio && audio_is_increasing && !is_increasing) {
823 // Reverse audio buffer
824 audio->reverse(0, audio->getNumSamples());
825 }
826 audio_is_increasing = is_increasing;
827}
828
829// Add audio samples to a specific channel
830void Frame::AddAudio(bool replaceSamples, int destChannel, int destStartSample, const float* source, int numSamples, float gainToApplyToSource = 1.0f) {

Callers 3

apply_timemappingMethod · 0.80
GetOrCreateFrameMethod · 0.80
GetFrameMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected