Fixed crash

This commit is contained in:
WolverinDEV 2021-03-23 15:36:19 +01:00
parent 41ff890d81
commit d6c5275895
1 changed files with 2 additions and 2 deletions

View File

@ -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!"));
}