Resize audio container to hold more (or less) samples and channels
| 802 | |
| 803 | // Resize audio container to hold more (or less) samples and channels |
| 804 | void 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 |
| 818 | void Frame::SetAudioDirection(bool is_increasing) { |
no outgoing calls
no test coverage detected