From 0ad51dd73be0fea3da7400ef998ff386100d2c87 Mon Sep 17 00:00:00 2001 From: SarahW Date: Mon, 31 May 2021 09:31:50 +0100 Subject: [PATCH] Add status window text for GUS --- src/sound_gus.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/sound_gus.c b/src/sound_gus.c index d1d54e5..05700c2 100644 --- a/src/sound_gus.c +++ b/src/sound_gus.c @@ -1181,6 +1181,16 @@ void gus_speed_changed(void *p) gus->samp_latch = (uint64_t)(TIMER_USEC * (1000000.0 / gusfreqs[gus->voices - 14])); } +static void gus_add_status_info(char *s, int max_len, void *p) +{ + gus_t *gus = (gus_t *)p; + char temps[256]; + + sprintf(temps, "GUS max voices : %i\nGUS playback frequency : %iHz\n\n", + gus->voices, gusfreqs[gus->voices-14]); + strncat(s, temps, max_len); +} + device_t gus_device = { "Gravis UltraSound", @@ -1190,5 +1200,5 @@ device_t gus_device = NULL, gus_speed_changed, NULL, - NULL + gus_add_status_info };