From 48f704c84eabc69f128331482d62345d6c75e0f3 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sun, 5 Jun 2022 17:39:44 +0900 Subject: [PATCH] [sound] Use SYS_snd for all masked prints SYS_dev is a holdover from when we had only the one flag and is not meant to be used for tests (I seem to remember mentioning an audit was necessary, but obviously forgotten). One step at a time, I guess :) --- libs/audio/renderer/flac.c | 12 ++++++------ libs/audio/renderer/midi.c | 2 +- libs/audio/renderer/snd_channels.c | 6 +++--- libs/audio/renderer/snd_mem.c | 8 ++++---- libs/audio/renderer/vorbis.c | 12 ++++++------ libs/audio/renderer/wav.c | 4 ++-- 6 files changed, 22 insertions(+), 22 deletions(-) diff --git a/libs/audio/renderer/flac.c b/libs/audio/renderer/flac.c index 4d8ed5a94..54068bc78 100644 --- a/libs/audio/renderer/flac.c +++ b/libs/audio/renderer/flac.c @@ -412,7 +412,7 @@ flac_get_info (flacfile_t *ff) vc = &ff->vorbis_info->data.vorbis_comment; for (i = 0, ve = vc->comments; i < vc->num_comments; ve++, i++) { - Sys_MaskPrintf (SYS_dev, "%.*s\n", ve->length, ve->entry); + Sys_MaskPrintf (SYS_snd, "%.*s\n", ve->length, ve->entry); if (strncmp ("CUEPOINT=", (char *) ve->entry, 9) == 0) { char *str = alloca (ve->length + 1); strncpy (str, (char *) ve->entry, ve->length); @@ -433,12 +433,12 @@ flac_get_info (flacfile_t *ff) info.dataofs = 0; info.datalen = samples * info.channels * sizeof (float); - Sys_MaskPrintf (SYS_dev, "\nBitstream is %d channel, %dHz\n", + Sys_MaskPrintf (SYS_snd, "\nBitstream is %d channel, %dHz\n", info.channels, info.rate); - Sys_MaskPrintf (SYS_dev, "\nDecoded length: %d samples (%d bytes)\n", + Sys_MaskPrintf (SYS_snd, "\nDecoded length: %d samples (%d bytes)\n", info.frames, info.width); if (vc) { - Sys_MaskPrintf (SYS_dev, "Encoded by: %.*s\n\n", + Sys_MaskPrintf (SYS_snd, "Encoded by: %.*s\n\n", vc->vendor_string.length, vc->vendor_string.entry); } @@ -461,10 +461,10 @@ SND_LoadFLAC (QFile *file, sfx_t *sfx, char *realname) return -1; } if (info.frames / info.rate < 3) { - Sys_MaskPrintf (SYS_dev, "cache %s\n", realname); + Sys_MaskPrintf (SYS_snd, "cache %s\n", realname); flac_cache (sfx, realname, ff, info); } else { - Sys_MaskPrintf (SYS_dev, "stream %s\n", realname); + Sys_MaskPrintf (SYS_snd, "stream %s\n", realname); flac_stream (sfx, realname, ff, info); } return 0; diff --git a/libs/audio/renderer/midi.c b/libs/audio/renderer/midi.c index 8185060e6..6df371b0c 100644 --- a/libs/audio/renderer/midi.c +++ b/libs/audio/renderer/midi.c @@ -213,7 +213,7 @@ SND_LoadMidi (QFile *file, sfx_t *sfx, char *realname) WildMidi_Close (handle); - Sys_MaskPrintf (SYS_dev, "stream %s\n", realname); + Sys_MaskPrintf (SYS_snd, "stream %s\n", realname); // we init stream here cause we will only ever stream SND_SFX_Stream (sfx, realname, info, midi_stream_open); diff --git a/libs/audio/renderer/snd_channels.c b/libs/audio/renderer/snd_channels.c index d90b98e8a..679386d3f 100644 --- a/libs/audio/renderer/snd_channels.c +++ b/libs/audio/renderer/snd_channels.c @@ -207,7 +207,7 @@ SND_ScanChannels (snd_t *snd, int wait) return; if (wait) { - Sys_MaskPrintf (SYS_dev, "scanning channels...\n"); + Sys_MaskPrintf (SYS_snd, "scanning channels...\n"); do { count = 0; for (i = 0; i < MAX_CHANNELS; i++) { @@ -217,12 +217,12 @@ SND_ScanChannels (snd_t *snd, int wait) ch->stop = 1; count++; } - Sys_MaskPrintf (SYS_dev, "count = %d\n", count); + Sys_MaskPrintf (SYS_snd, "count = %d\n", count); #ifdef HAVE_USLEEP usleep (1000); #endif } while (count); - Sys_MaskPrintf (SYS_dev, "scanning done.\n"); + Sys_MaskPrintf (SYS_snd, "scanning done.\n"); } else { for (i = 0; i < MAX_CHANNELS; i++) { ch = &snd_channels[i]; diff --git a/libs/audio/renderer/snd_mem.c b/libs/audio/renderer/snd_mem.c index 05ee1d55a..43d166705 100644 --- a/libs/audio/renderer/snd_mem.c +++ b/libs/audio/renderer/snd_mem.c @@ -402,7 +402,7 @@ SND_Load (sfx_t *sfx) Qseek (file, 0, SEEK_SET); #ifdef HAVE_VORBIS if (strnequal ("OggS", buf, 4)) { - Sys_MaskPrintf (SYS_dev, "SND_Load: ogg file\n"); + Sys_MaskPrintf (SYS_snd, "SND_Load: ogg file\n"); if (SND_LoadOgg (file, sfx, realname) == -1) goto bail; return 0; @@ -410,7 +410,7 @@ SND_Load (sfx_t *sfx) #endif #ifdef HAVE_FLAC if (strnequal ("fLaC", buf, 4)) { - Sys_MaskPrintf (SYS_dev, "SND_Load: flac file\n"); + Sys_MaskPrintf (SYS_snd, "SND_Load: flac file\n"); if (SND_LoadFLAC (file, sfx, realname) == -1) goto bail; return 0; @@ -418,14 +418,14 @@ SND_Load (sfx_t *sfx) #endif #ifdef HAVE_WILDMIDI if (strnequal ("MThd", buf, 4)) { - Sys_MaskPrintf (SYS_dev, "SND_Load: midi file\n"); + Sys_MaskPrintf (SYS_snd, "SND_Load: midi file\n"); if (SND_LoadMidi (file, sfx, realname) == -1) goto bail; return 0; } #endif if (strnequal ("RIFF", buf, 4)) { - Sys_MaskPrintf (SYS_dev, "SND_Load: wav file\n"); + Sys_MaskPrintf (SYS_snd, "SND_Load: wav file\n"); if (SND_LoadWav (file, sfx, realname) == -1) goto bail; return 0; diff --git a/libs/audio/renderer/vorbis.c b/libs/audio/renderer/vorbis.c index e7b4565c1..acd420beb 100644 --- a/libs/audio/renderer/vorbis.c +++ b/libs/audio/renderer/vorbis.c @@ -101,7 +101,7 @@ vorbis_get_info (OggVorbis_File *vf) samples = ov_pcm_total (vf, -1); for (ptr = ov_comment (vf, -1)->user_comments; *ptr; ptr++) { - Sys_MaskPrintf (SYS_dev, "%s\n", *ptr); + Sys_MaskPrintf (SYS_snd, "%s\n", *ptr); if (strncmp ("CUEPOINT=", *ptr, 9) == 0) { sscanf (*ptr + 9, "%d %d", &sample_start, &sample_count); } @@ -118,11 +118,11 @@ vorbis_get_info (OggVorbis_File *vf) info.dataofs = 0; info.datalen = samples * info.channels * info.width; - Sys_MaskPrintf (SYS_dev, "\nBitstream is %d channel, %dHz\n", + Sys_MaskPrintf (SYS_snd, "\nBitstream is %d channel, %dHz\n", info.channels, info.rate); - Sys_MaskPrintf (SYS_dev, "\nDecoded length: %d samples (%d bytes)\n", + Sys_MaskPrintf (SYS_snd, "\nDecoded length: %d samples (%d bytes)\n", info.frames, info.width); - Sys_MaskPrintf (SYS_dev, "Encoded by: %s\n\n", + Sys_MaskPrintf (SYS_snd, "Encoded by: %s\n\n", ov_comment (vf, -1)->vendor); return info; @@ -302,10 +302,10 @@ SND_LoadOgg (QFile *file, sfx_t *sfx, char *realname) return -1; } if (info.frames / info.rate < 3) { - Sys_MaskPrintf (SYS_dev, "cache %s\n", realname); + Sys_MaskPrintf (SYS_snd, "cache %s\n", realname); vorbis_cache (sfx, realname, &vf, info); } else { - Sys_MaskPrintf (SYS_dev, "stream %s\n", realname); + Sys_MaskPrintf (SYS_snd, "stream %s\n", realname); vorbis_stream (sfx, realname, &vf, info); } return 0; diff --git a/libs/audio/renderer/wav.c b/libs/audio/renderer/wav.c index 24dc27863..b5fef9bdf 100644 --- a/libs/audio/renderer/wav.c +++ b/libs/audio/renderer/wav.c @@ -289,10 +289,10 @@ SND_LoadWav (QFile *file, sfx_t *sfx, char *realname) } if (info.frames / info.rate < 3) { - Sys_MaskPrintf (SYS_dev, "cache %s\n", realname); + Sys_MaskPrintf (SYS_snd, "cache %s\n", realname); wav_cache (sfx, realname, file, info); } else { - Sys_MaskPrintf (SYS_dev, "stream %s\n", realname); + Sys_MaskPrintf (SYS_snd, "stream %s\n", realname); wav_stream (sfx, realname, file, info); } return 0;