removed support for SDL_sound-library as libsndfile and libvorbis do everything we need
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1222 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
2008-06-30 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
|
||||
|
||||
* configure.in:
|
||||
* Makefile.am:
|
||||
* include/sample_buffer.h:
|
||||
* src/core/sample_buffer.cpp:
|
||||
removed support for SDL_sound-library as libsndfile and libvorbis do
|
||||
everything we need
|
||||
|
||||
* include/automatable_model.h:
|
||||
* include/combobox_model.h:
|
||||
* include/mv_base.h:
|
||||
|
||||
@@ -518,10 +518,6 @@ if HAVE_LIBSDL
|
||||
LIB_SDL_LDADD = -lSDL
|
||||
endif
|
||||
|
||||
if HAVE_LIBSDL_SOUND
|
||||
LIB_SDL_SOUND_LDADD = -lSDL_sound
|
||||
endif
|
||||
|
||||
if HAVE_LIBASOUND
|
||||
LIB_ASOUND_LDADD = -lasound
|
||||
endif
|
||||
@@ -567,7 +563,7 @@ lmms_win_resources.o: lmms.rc
|
||||
WIN32_RES_LDADD = lmms_win_resources.o
|
||||
endif
|
||||
|
||||
lmms_LDADD = $(QT_LDADD) $(LIB_SDL_LDADD) $(LIB_ASOUND_LDADD) $(LIB_JACK_LDADD) $(LIB_SDL_SOUND_LDADD) $(LIB_VORBIS_LDADD) $(LIB_SRC_LDADD) $(LIB_SF_LDADD) $(LIB_PA_LDADD) $(WIN32_RES_LDADD)
|
||||
lmms_LDADD = $(QT_LDADD) $(LIB_SDL_LDADD) $(LIB_ASOUND_LDADD) $(LIB_JACK_LDADD) $(LIB_VORBIS_LDADD) $(LIB_SRC_LDADD) $(LIB_SF_LDADD) $(LIB_PA_LDADD) $(WIN32_RES_LDADD)
|
||||
|
||||
#-rpath $(pkglibdir)
|
||||
|
||||
|
||||
44
configure.in
44
configure.in
@@ -114,7 +114,6 @@ done
|
||||
|
||||
AH_TEMPLATE(SDL_SDL_H, [Define to location of SDL.h])
|
||||
AH_TEMPLATE(SDL_SDL_AUDIO_H, [Define to location of SDL_audio.h])
|
||||
AH_TEMPLATE(SDL_SDL_SOUND_H, [Define to location of SDL_sound.h])
|
||||
|
||||
OLD_LIBS="$LIBS"
|
||||
#LIBS="$LIBS -lpthread"
|
||||
@@ -137,23 +136,6 @@ fi
|
||||
AM_CONDITIONAL(HAVE_LIBSDL, test ! -z "$HAVE_SDL_SDL_AUDIO_H")
|
||||
|
||||
|
||||
# check for SDL_sound-lib
|
||||
AC_ARG_WITH(sdlsound,
|
||||
AS_HELP_STRING([--without-sdlsound],
|
||||
[disable support for reading samples via SDL_sound]), ,
|
||||
[ with_sdlsound=yes ])
|
||||
AH_TEMPLATE(HAVE_SDL_SDL_SOUND_H, [Define to 1 if you have the <$SDL_INC_PATH/SDL_sound.h> header file.])
|
||||
if test "x$with_sdlsound" = "xyes" -a ! -z "$SDL_INC_PATH"; then
|
||||
AC_CHECK_HEADER($SDL_INC_PATH/SDL_sound.h, HAVE_SDL_SDL_SOUND_H="true")
|
||||
AC_CHECK_LIB([SDL_sound], [Sound_Init], HAVE_LIBSDL_SOUND="true", HAVE_SDL_SDL_SOUND_H="")
|
||||
fi
|
||||
if test ! -z "$HAVE_SDL_SDL_SOUND_H" ; then
|
||||
AC_DEFINE_UNQUOTED(SDL_SDL_SOUND_H, <$SDL_INC_PATH/SDL_sound.h>)
|
||||
AC_DEFINE(HAVE_SDL_SDL_SOUND_H)
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(HAVE_LIBSDL_SOUND, test ! -z "$HAVE_LIBSDL_SOUND")
|
||||
|
||||
LIBS="$OLD_LIBS"
|
||||
|
||||
|
||||
@@ -456,8 +438,8 @@ if test ! -z "$HAVE_SNDFILE_H" ; then
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_LIBSF, test ! -z "$HAVE_SNDFILE_H")
|
||||
|
||||
if test -z "$HAVE_SNDFILE_H" -a -z "$HAVE_SDL_SDL_SOUND_H" -a -z "$OGG_SUPPORT" ; then
|
||||
AC_MSG_ERROR([*** neither libsndfile nor SDL_sound nor libvorbis (or according devel-files) were found which would make LMMS unable to load any samples so please install at least one of the packages and try again!])
|
||||
if test -z "$HAVE_SNDFILE_H" -a -z "$OGG_SUPPORT" ; then
|
||||
AC_MSG_ERROR([*** neither libsndfile nor libvorbis (or according devel-files) were found which would make LMMS unable to load any samples so please install at least one of the packages and try again!])
|
||||
fi
|
||||
|
||||
|
||||
@@ -821,8 +803,8 @@ if test -z "$OGG_SUPPORT" ; then
|
||||
echo " ="
|
||||
echo " = You don't seem to have libvorbis installed and/or libvorbis-development-"
|
||||
echo " = package is missing. This will disable support for exporting songs to"
|
||||
echo " = OGG-files! If SDL_sound is missing too, you'll not be able to use the "
|
||||
echo " = samples coming with LMMS since libsndfile currently has no OGG-support!"
|
||||
echo " = OGG-files! You'll not be able to use the samples coming with LMMS since "
|
||||
ecoh " = libsndfile currently has no OGG-support!"
|
||||
echo " = Consider installing the missing packages for using the full power of LMMS."
|
||||
echo " ="
|
||||
with_warnings="true"
|
||||
@@ -832,24 +814,6 @@ fi
|
||||
|
||||
|
||||
|
||||
if test -z "$HAVE_SDL_SDL_SOUND_H" ; then
|
||||
echo " ========================"
|
||||
echo " === LMMS - WARNING ======================================================="
|
||||
echo " ========================"
|
||||
echo " ="
|
||||
echo " = You don't seem to have SDL_sound-library installed and/or SDL_sound-"
|
||||
echo " = development-package is missing. This means that you can only load samples"
|
||||
echo " = within LMMS if you have libsndfile and libvorbis installed!"
|
||||
echo " = Consider installing the missing packages for using the full power of LMMS."
|
||||
echo " ="
|
||||
with_warnings="true"
|
||||
else
|
||||
PLUGINS_TO_BUILD="$PLUGINS_TO_BUILD\n\t\* SDL_sound for sample-decoding"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
if test -z "$HAVE_SNDFILE_H" ; then
|
||||
echo " ========================"
|
||||
echo " === LMMS - WARNING ======================================================="
|
||||
|
||||
@@ -200,11 +200,6 @@ private:
|
||||
void update( bool _keep_settings = FALSE );
|
||||
|
||||
|
||||
#ifdef LMMS_SDL_SDL_SOUND_H
|
||||
f_cnt_t decodeSampleSDL( const char * _f, int_sample_t * & _buf,
|
||||
ch_cnt_t _channels,
|
||||
sample_rate_t _sample_rate );
|
||||
#endif
|
||||
#ifdef LMMS_HAVE_SNDFILE_H
|
||||
f_cnt_t decodeSampleSF( const char * _f, int_sample_t * & _buf,
|
||||
ch_cnt_t & _channels,
|
||||
|
||||
@@ -38,10 +38,6 @@
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#ifdef LMMS_SDL_SDL_SOUND_H
|
||||
#include LMMS_SDL_SDL_SOUND_H
|
||||
#endif
|
||||
|
||||
#ifdef LMMS_HAVE_SNDFILE_H
|
||||
#include <sndfile.h>
|
||||
#endif
|
||||
@@ -86,10 +82,6 @@ sampleBuffer::sampleBuffer( const QString & _audio_file,
|
||||
m_frequency( BaseFreq ),
|
||||
m_sampleRate( engine::getMixer()->baseSampleRate() )
|
||||
{
|
||||
#ifdef LMMS_SDL_SDL_SOUND_H
|
||||
// init sound-file-system of SDL
|
||||
Sound_Init();
|
||||
#endif
|
||||
if( _is_base64_data == TRUE )
|
||||
{
|
||||
loadFromBase64( _audio_file );
|
||||
@@ -121,10 +113,6 @@ sampleBuffer::sampleBuffer( const sampleFrame * _data, const f_cnt_t _frames ) :
|
||||
memcpy( m_origData, _data, _frames * BYTES_PER_FRAME );
|
||||
m_origFrames = _frames;
|
||||
}
|
||||
#ifdef LMMS_SDL_SDL_SOUND_H
|
||||
// init sound-file-system of SDL
|
||||
Sound_Init();
|
||||
#endif
|
||||
update();
|
||||
}
|
||||
|
||||
@@ -152,10 +140,6 @@ sampleBuffer::sampleBuffer( const f_cnt_t _frames ) :
|
||||
memset( m_origData, 0, _frames * BYTES_PER_FRAME );
|
||||
m_origFrames = _frames;
|
||||
}
|
||||
#ifdef LMMS_SDL_SDL_SOUND_H
|
||||
// init sound-file-system of SDL
|
||||
Sound_Init();
|
||||
#endif
|
||||
update();
|
||||
}
|
||||
|
||||
@@ -218,13 +202,6 @@ void sampleBuffer::update( bool _keep_settings )
|
||||
m_frames = decodeSampleOGGVorbis( f, buf, channels,
|
||||
samplerate );
|
||||
}
|
||||
#endif
|
||||
#ifdef LMMS_SDL_SDL_SOUND_H
|
||||
if( m_frames == 0 )
|
||||
{
|
||||
m_frames = decodeSampleSDL( f, buf, channels,
|
||||
samplerate );
|
||||
}
|
||||
#endif
|
||||
if( m_frames == 0 )
|
||||
{
|
||||
@@ -337,41 +314,6 @@ void sampleBuffer::normalizeSampleRate( const sample_rate_t _src_sr,
|
||||
|
||||
|
||||
|
||||
#ifdef LMMS_SDL_SDL_SOUND_H
|
||||
f_cnt_t sampleBuffer::decodeSampleSDL( const char * _f,
|
||||
int_sample_t * & _buf,
|
||||
ch_cnt_t _channels,
|
||||
sample_rate_t _samplerate )
|
||||
{
|
||||
Sound_AudioInfo STD_AUDIO_INFO =
|
||||
{
|
||||
AUDIO_S16SYS,
|
||||
_channels,
|
||||
_samplerate
|
||||
} ;
|
||||
f_cnt_t frames = 0;
|
||||
|
||||
Sound_Sample * snd_sample = Sound_NewSampleFromFile( _f,
|
||||
&STD_AUDIO_INFO, 16384 );
|
||||
// file found?
|
||||
if( snd_sample != NULL )
|
||||
{
|
||||
// let SDL_sound decode our file to requested format
|
||||
( void )Sound_DecodeAll( snd_sample );
|
||||
frames = snd_sample->buffer_size / ( BYTES_PER_INT_SAMPLE *
|
||||
_channels );
|
||||
_buf = new int_sample_t[frames * _channels];
|
||||
memcpy( _buf, snd_sample->buffer, snd_sample->buffer_size );
|
||||
|
||||
Sound_FreeSample( snd_sample );
|
||||
}
|
||||
return( frames );
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef LMMS_HAVE_SNDFILE_H
|
||||
f_cnt_t sampleBuffer::decodeSampleSF( const char * _f,
|
||||
int_sample_t * & _buf,
|
||||
|
||||
Reference in New Issue
Block a user