Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC - when the osc. volume is zero, still need to process the entire sound sample in case there's a zero which triggers the end. #107

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 = 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