diff psg.c @ 2081:cfd53c94fffb

Initial stab at RF5C164 emulation
author Michael Pavone <pavone@retrodev.com>
date Thu, 03 Feb 2022 23:15:42 -0800
parents c3c62dbf1ceb
children 2648081f3100
line wrap: on
line diff
--- a/psg.c	Wed Feb 02 01:10:07 2022 -0800
+++ b/psg.c	Thu Feb 03 23:15:42 2022 -0800
@@ -13,7 +13,7 @@
 void psg_init(psg_context * context, uint32_t master_clock, uint32_t clock_div)
 {
 	memset(context, 0, sizeof(*context));
-	context->audio = render_audio_source(master_clock, clock_div, 1);
+	context->audio = render_audio_source("PSG", master_clock, clock_div, 1);
 	context->clock_inc = clock_div;
 	for (int i = 0; i < 4; i++) {
 		context->volume[i] = 0xF;
@@ -111,7 +111,7 @@
 		}
 
 		int16_t accum = 0;
-		
+
 		for (int i = 0; i < 3; i++) {
 			if (context->output_state[i]) {
 				accum += volume_table[context->volume[i]];
@@ -120,7 +120,7 @@
 		if (context->noise_out) {
 			accum += volume_table[context->volume[3]];
 		}
-		
+
 		render_put_mono_sample(context->audio, accum);
 
 		context->cycles += context->clock_inc;