improve output

This commit is contained in:
Glenn Maynard
2003-11-14 05:54:55 +00:00
parent 8954370991
commit 3513e5963a
2 changed files with 9 additions and 11 deletions
+3 -4
View File
@@ -7,9 +7,9 @@
/* int err; must be defined before using this macro */
#define ALSA_CHECK(x) \
if ( err < 0 ) { LOG->Info("ALSA9: %s: %s (%i)", x, dsnd_strerror(err), err); return false; }
if ( err < 0 ) { LOG->Info("ALSA9: %s: %s", x, dsnd_strerror(err)); return false; }
#define ALSA_ASSERT(x) \
if (err < 0) { LOG->Trace("ALSA9: %s: %s (%i)", x, dsnd_strerror(err), err); }
if (err < 0) { LOG->Trace("ALSA9: %s: %s", x, dsnd_strerror(err)); }
bool Alsa9Buf::SetHWParams()
{
@@ -76,10 +76,9 @@ void Alsa9Buf::GetSoundCardDebugInfo()
snd_ctl_t *handle;
int err;
err = dsnd_ctl_open( &handle, id, 0 );
ALSA_ASSERT("dsnd_pcm_sw_params_set_stop_threshold");
if ( err < 0 )
{
LOG->Info( "Couldn't open card #%i (\"%s\"): %s", card, id.c_str(), dsnd_strerror(err) );
LOG->Info( "Couldn't open card #%i (\"%s\") to probe: %s", card, id.c_str(), dsnd_strerror(err) );
continue;
}
@@ -231,13 +231,12 @@ try {
for(int n = 0; n < i; ++n)
delete stream_pool[n];
if(i)
{
/* We created at least one hardware buffer. */
LOG->Trace("Could only create %i buffers; need at least 8 (failed with %s). Hardware ALSA driver can't be used.", i, e.what());
RageException::ThrowNonfatal("Driver unusable (not enough hardware buffers)");
}
RageException::ThrowNonfatal("Driver unusable (no hardware buffers)");
if( !i )
RageException::ThrowNonfatal( "%s", e.what() );
/* We created at least one hardware buffer. */
LOG->Trace("Could only create %i buffers; need at least 8 (failed with %s). Hardware ALSA driver can't be used.", i, e.what());
RageException::ThrowNonfatal("Driver unusable (not enough mixing streams)");
}
stream *s = new stream;