diff options
-rw-r--r-- | src/simpl/base.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/simpl/base.cpp b/src/simpl/base.cpp index 83155c5..2cbb285 100644 --- a/src/simpl/base.cpp +++ b/src/simpl/base.cpp @@ -356,6 +356,12 @@ void Frame::audio(sample* new_audio, int size) { std::rotate(_audio, _audio + size, _audio + _size); std::copy(new_audio, new_audio + size, _audio + (_size - size)); } + else if(size < _size) { + std::copy(new_audio, new_audio + size, _audio); + for(int i = size; i < _size; i++) { + _audio[i] = 0.0; + } + } else if(size == _size) { std::copy(new_audio, new_audio + size, _audio); } |