Fix warning about depreciated alsa function in new alsa versions

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1472 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Paul Giblock
2008-08-23 04:21:36 +00:00
parent 82968f9cba
commit 9f3406ffc3
2 changed files with 7 additions and 1 deletions

View File

@@ -6,6 +6,10 @@
* src/core/lfo_controller.cpp:
Fix various casting warnings
* src/core/audio/audio_alsa.cpp:
Fix warning about obsolete snd_pcm_sw_params_set_xfer_align().
ALSA >= 1.0.16 defaults to 1 now.
2008-08-22 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
* src/core/main.cpp:

View File

@@ -29,7 +29,6 @@
#include <QtGui/QLineEdit>
#include <QtGui/QLabel>
#include "audio_alsa.h"
#ifdef LMMS_HAVE_ALSA
@@ -455,6 +454,8 @@ int audioALSA::setSWParams( void )
}
// align all transfers to 1 sample
#if SND_LIB_VERSION < ((1<<16)|(0)|16)
if( ( err = snd_pcm_sw_params_set_xfer_align( m_handle,
m_swParams, 1 ) ) < 0 )
{
@@ -462,6 +463,7 @@ int audioALSA::setSWParams( void )
snd_strerror( err ) );
return( err );
}
#endif
// write the parameters to the playback device
if( ( err = snd_pcm_sw_params( m_handle, m_swParams ) ) < 0 )