Mercurial > repos > blastem
diff psg.c @ 2255:74112041b2c7
Proper calculation of sample rate for YM2612/PSG oscilloscope view
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 12 Dec 2022 22:26:56 -0800 |
parents | 0e927fce8941 |
children | 0343f0d5add0 |
line wrap: on
line diff
--- a/psg.c Mon Dec 12 21:49:51 2022 -0800 +++ b/psg.c Mon Dec 12 22:26:56 2022 -0800 @@ -21,7 +21,7 @@ context->pan = 0xFF; } -void psg_enable_scope(psg_context *context, oscilloscope *scope) +void psg_enable_scope(psg_context *context, oscilloscope *scope, uint32_t master_clock) { context->scope = scope; static const char *names[] = { @@ -32,7 +32,7 @@ }; for (int i = 0; i < 4; i++) { - context->scope_channel[i] = scope_add_channel(scope, names[i], 53693175 / context->clock_inc); + context->scope_channel[i] = scope_add_channel(scope, names[i], master_clock / context->clock_inc); } }