[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 :)
This commit is contained in:
Bill Currie 2022-06-05 17:39:44 +09:00
parent 91140acfee
commit 48f704c84e
6 changed files with 22 additions and 22 deletions

View file

@ -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;

View file

@ -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);

View file

@ -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];

View file

@ -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;

View file

@ -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;

View file

@ -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;