Skip to content

Commit

Permalink
Add status window text for GUS
Browse files Browse the repository at this point in the history
  • Loading branch information
sarah-walker-pcem committed May 31, 2021
1 parent be74288 commit 0ad51dd
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/sound_gus.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -1190,5 +1200,5 @@ device_t gus_device =
NULL,
gus_speed_changed,
NULL,
NULL
gus_add_status_info
};

0 comments on commit 0ad51dd

Please sign in to comment.