# HG changeset patch # User Michael Pavone # Date 1669279390 28800 # Node ID 0e927fce89419833ac0112e434d04bf985e630d5 # Parent d220305e81b9bc9eae1f03a634aa331c1c162cdd Fix bug in PSG oscilloscope output diff -r d220305e81b9 -r 0e927fce8941 psg.c --- a/psg.c Wed Nov 23 09:36:42 2022 -0800 +++ b/psg.c Thu Nov 24 00:43:10 2022 -0800 @@ -131,7 +131,7 @@ int16_t left_accum = 0, right_accum = 0; uint8_t pan_left = 0x10, pan_right = 0x1; - int16_t value = 0; + int16_t value; for (int i = 0; i < 3; i++) { if (context->output_state[i]) { value = volume_table[context->volume[i]]; @@ -143,6 +143,8 @@ } pan_left <<= 1; pan_right <<= 1; + } else { + value = 0; } if (context->scope) { scope_add_sample(context->scope, context->scope_channel[i], value, trigger[i]);