diff psg.c @ 2305:6aca1734d573

Merge
author Michael Pavone <pavone@retrodev.com>
date Wed, 15 Mar 2023 19:28:11 -0700
parents 0343f0d5add0
children f6213de4224c
line wrap: on
line diff
--- a/psg.c	Wed Mar 15 18:50:24 2023 -0700
+++ b/psg.c	Wed Mar 15 19:28:11 2023 -0700
@@ -23,6 +23,7 @@
 
 void psg_enable_scope(psg_context *context, oscilloscope *scope, uint32_t master_clock)
 {
+#ifndef IS_LIB
 	context->scope = scope;
 	static const char *names[] = {
 		"PSG #1",
@@ -34,6 +35,7 @@
 	{
 		context->scope_channel[i] = scope_add_channel(scope, names[i], master_clock / context->clock_inc);
 	}
+#endif
 }
 
 void psg_free(psg_context *context)
@@ -146,9 +148,11 @@
 			} else {
 				value = 0;
 			}
+#ifndef IS_LIB
 			if (context->scope) {
 				scope_add_sample(context->scope, context->scope_channel[i], value, trigger[i]);
 			}
+#endif
 		}
 		value = 0;
 		if (context->noise_out) {
@@ -160,9 +164,11 @@
 				right_accum += value;
 			}
 		}
+#ifndef IS_LIB
 		if (context->scope) {
 			scope_add_sample(context->scope, context->scope_channel[3], value, trigger[3]);
 		}
+#endif
 
 		render_put_stereo_sample(context->audio, left_accum, right_accum);