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

Method ResizeAudio

src/Frame.cpp:804–815  ·  view source on GitHub ↗

Resize audio container to hold more (or less) samples and channels

Source from the content-addressed store, hash-verified

802
803// Resize audio container to hold more (or less) samples and channels
804void Frame::ResizeAudio(int channels, int length, int rate, ChannelLayout layout)
805{
806 const std::lock_guard<std::recursive_mutex> lock(addingAudioMutex);
807
808 // Resize JUCE audio buffer
809 audio->setSize(channels, length, true, true, false);
810 channel_layout = layout;
811 sample_rate = rate;
812
813 // Calculate max audio sample added
814 max_audio_sample = length;
815}
816
817/// Set the direction of the audio buffer of this frame
818void Frame::SetAudioDirection(bool is_increasing) {

Callers 5

GetFrameMethod · 0.80
add_layerMethod · 0.80
ResampleMappedAudioMethod · 0.80
CacheMemory.cppFile · 0.80
CacheDisk.cppFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected