Overhaul to console structure, a bit
This commit is contained in:
+9
-9
@@ -82,7 +82,7 @@ flac_error_func (const FLAC__StreamDecoder *decoder,
|
||||
{
|
||||
flacfile_t *ff = (flacfile_t *) client_data;
|
||||
ff->error = -1;
|
||||
Con_Printf ("FLAC: decoder error %i\n", status);
|
||||
console::info ("FLAC: decoder error %i\n", status);
|
||||
}
|
||||
|
||||
static FLAC__StreamDecoderReadStatus
|
||||
@@ -151,7 +151,7 @@ flac_write_func (const FLAC__StreamDecoder *decoder,
|
||||
ff->buffer = (byte *) malloc (ff->info->blocksize * ff->info->channels * ff->info->width);
|
||||
if (!ff->buffer) {
|
||||
ff->error = -1; /* needn't set this here, but... */
|
||||
Con_Printf("Insufficient memory for fLaC audio\n");
|
||||
console::info("Insufficient memory for fLaC audio\n");
|
||||
return FLAC__STREAM_DECODER_WRITE_STATUS_ABORT;
|
||||
}
|
||||
}
|
||||
@@ -243,7 +243,7 @@ static bool S_FLAC_CodecOpenStream (snd_stream_t *stream)
|
||||
ff->decoder = FLAC__stream_decoder_new ();
|
||||
if (ff->decoder == NULL)
|
||||
{
|
||||
Con_Printf("Unable to create fLaC decoder\n");
|
||||
console::info("Unable to create fLaC decoder\n");
|
||||
goto _fail;
|
||||
}
|
||||
|
||||
@@ -277,7 +277,7 @@ static bool S_FLAC_CodecOpenStream (snd_stream_t *stream)
|
||||
#endif
|
||||
if (rc != FLAC__STREAM_DECODER_INIT_STATUS_OK) /* unlikely */
|
||||
{
|
||||
Con_Printf ("FLAC: decoder init error %i\n", rc);
|
||||
console::info ("FLAC: decoder init error %i\n", rc);
|
||||
goto _fail;
|
||||
}
|
||||
|
||||
@@ -285,24 +285,24 @@ static bool S_FLAC_CodecOpenStream (snd_stream_t *stream)
|
||||
if (rc == false || ff->error)
|
||||
{
|
||||
rc = FLAC__stream_decoder_get_state(ff->decoder);
|
||||
Con_Printf("%s not a valid flac file? (decoder state %i)\n",
|
||||
console::info("%s not a valid flac file? (decoder state %i)\n",
|
||||
stream->name, rc);
|
||||
goto _fail;
|
||||
}
|
||||
|
||||
if (ff->info->dataofs < 0)
|
||||
{
|
||||
Con_Printf("%s has no STREAMINFO\n", stream->name);
|
||||
console::info("%s has no STREAMINFO\n", stream->name);
|
||||
goto _fail;
|
||||
}
|
||||
if (ff->info->bits != 8 && ff->info->bits != 16)
|
||||
{
|
||||
Con_Printf("%s is not 8 or 16 bit\n", stream->name);
|
||||
console::info("%s is not 8 or 16 bit\n", stream->name);
|
||||
goto _fail;
|
||||
}
|
||||
if (ff->info->channels != 1 && ff->info->channels != 2)
|
||||
{
|
||||
Con_Printf("Unsupported number of channels %d in %s\n",
|
||||
console::info("Unsupported number of channels %d in %s\n",
|
||||
ff->info->channels, stream->name);
|
||||
goto _fail;
|
||||
}
|
||||
@@ -342,7 +342,7 @@ static int S_FLAC_CodecReadStream (snd_stream_t *stream, int len, void *buffer)
|
||||
} else if (res < 0) { /* error */
|
||||
return -1;
|
||||
} else {
|
||||
Con_DPrintf ("FLAC: EOF\n");
|
||||
console::debug ("FLAC: EOF\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user