AudioAlsa: fix FTBFS on non-Linux platforms

The ESTRPIPE error code is only available on Linux (and not on BSD) and
thus should only be used if defined.
This commit is contained in:
Tobias Doerffel
2014-10-01 23:25:03 +02:00
parent eb2c47f81d
commit 7a64d0975e

View File

@@ -1,7 +1,7 @@
/*
* audio_alsa.cpp - device-class which implements ALSA-PCM-output
*
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -149,6 +149,7 @@ int AudioAlsa::handleError( int _err )
"failed: %s\n", snd_strerror( _err ) );
return ( 0 );
}
#ifdef ESTRPIPE
else if( _err == -ESTRPIPE )
{
while( ( _err = snd_pcm_resume( m_handle ) ) == -EAGAIN )
@@ -166,6 +167,7 @@ int AudioAlsa::handleError( int _err )
}
return ( 0 );
}
#endif
return _err;
}