diff --git a/native/serverconnection/src/audio/AudioOutput.cpp b/native/serverconnection/src/audio/AudioOutput.cpp index 8898410..c145df6 100644 --- a/native/serverconnection/src/audio/AudioOutput.cpp +++ b/native/serverconnection/src/audio/AudioOutput.cpp @@ -458,11 +458,11 @@ void AudioOutput::fill_buffer(void *output, size_t out_frame_count, size_t out_c if(actual_sources > 0) { if(local_frame_count == out_frame_count) { /* Output */ - if(!merge::merge_n_sources(output, this->source_merge_buffer, sources, this->channel_count_, local_frame_count)) { + if(!merge::merge_n_sources(output, this->source_merge_buffer, actual_sources, this->channel_count_, local_frame_count)) { log_warn(category::audio, tr("failed to merge buffers!")); } } else { - if(!merge::merge_n_sources(this->source_buffer, this->source_merge_buffer, sources, this->channel_count_, local_frame_count)) { + if(!merge::merge_n_sources(this->source_buffer, this->source_merge_buffer, actual_sources, this->channel_count_, local_frame_count)) { log_warn(category::audio, tr("failed to merge buffers!")); }