Skip to content

Commit

Permalink
Fix: Process all sound
Browse files Browse the repository at this point in the history
  • Loading branch information
applemu authored Jan 13, 2021
1 parent e8b3d25 commit 118b42f
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/sound.c
Original file line number Diff line number Diff line change
Expand Up @@ -893,14 +893,9 @@ void sound_play(double dsamps) {
off = imul * 128;

samps_to_do = MIN(samps_left, num_samps - samp_offset);
if(imul == 0 || samps_to_do == 0) {
if(samps_to_do == 0) {
/* produce no sound */
samps_left = samps_left - samps_to_do;
cur_acc += cur_inc * samps_to_do;
rptr->samps_left = samps_left;
rptr->cur_acc = cur_acc;
cur_dsamp = last_dsamp +
(double)(samps_to_do + samp_offset);
cur_dsamp = cur_dsamp = last_dsamp + (double)(samp_offset);
DOC_LOG("nosnd", osc, cur_dsamp, samps_to_do);
rptr->complete_dsamp = dsamp_now;
cur_pos = rptr->cur_start+(cur_acc & cur_mask);
Expand Down

0 comments on commit 118b42f

Please sign in to comment.