Overhaul to console structure, a bit

This commit is contained in:
iikorni
2026-08-30 00:50:23 -05:00
parent de75b014b3
commit 216dd1aecd
70 changed files with 2081 additions and 2260 deletions
+8 -8
View File
@@ -61,7 +61,7 @@ static bool S_MP3_CodecInitialize (void)
{
if (mpg123_init() != MPG123_OK)
{
Con_Printf ("Could not initialize mpg123\n");
console::info ("Could not initialize mpg123\n");
return false;
}
mp3_codec.initialized = true;
@@ -86,7 +86,7 @@ static bool S_MP3_CodecOpenStream (snd_stream_t *stream)
if (mp3_skiptags(stream) < 0)
{
Con_Printf("Corrupt mp3 file (bad tags.)\n");
console::info("Corrupt mp3 file (bad tags.)\n");
return false;
}
@@ -95,21 +95,21 @@ static bool S_MP3_CodecOpenStream (snd_stream_t *stream)
priv->handle = mpg123_new(NULL, NULL);
if (priv->handle == NULL)
{
Con_Printf("Unable to allocate mpg123 handle\n");
console::info("Unable to allocate mpg123 handle\n");
goto _fail;
}
if (mpg123_replace_reader_handle(priv->handle, mp3_read, mp3_seek, NULL) != MPG123_OK ||
mpg123_open_handle(priv->handle, &stream->fh) != MPG123_OK)
{
Con_Printf("Unable to open mpg123 handle\n");
console::info("Unable to open mpg123 handle\n");
goto _fail;
}
priv->handle_open = 1;
if (mpg123_getformat(priv->handle, &rate, &channels, &encoding) != MPG123_OK)
{
Con_Printf("Unable to retrieve mpg123 format for %s\n", stream->name);
console::info("Unable to retrieve mpg123 format for %s\n", stream->name);
goto _fail;
}
@@ -121,7 +121,7 @@ static bool S_MP3_CodecOpenStream (snd_stream_t *stream)
stream->info.channels = 2;
break;
default:
Con_Printf("Unsupported number of channels %d in %s\n", channels, stream->name);
console::info("Unsupported number of channels %d in %s\n", channels, stream->name);
goto _fail;
}
@@ -152,7 +152,7 @@ static bool S_MP3_CodecOpenStream (snd_stream_t *stream)
}
if (mpg123_format_support(priv->handle, rate, encoding) == 0)
{
Con_Printf("Unsupported format for %s\n", stream->name);
console::info("Unsupported format for %s\n", stream->name);
goto _fail;
}
mpg123_format_none(priv->handle);
@@ -180,7 +180,7 @@ static int S_MP3_CodecReadStream (snd_stream_t *stream, int bytes, void *buffer)
int res = mpg123_read (priv->handle, (unsigned char *)buffer, (size_t)bytes, &bytes_read);
switch (res) {
case MPG123_DONE:
Con_DPrintf("mp3 EOF\n");
console::debug("mp3 EOF\n");
case MPG123_OK:
return (int)bytes_read;
}