diff --git a/ChangeLog b/ChangeLog index 72e7c8b83..91f1241f9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2008-05-12 Tobias Doerffel + * plugins/bass_booster/bassbooster_controls.cpp: + * plugins/sf2_player/sf2_player.cpp: + * src/core/audio/audio_device.cpp: + cleanups and the like + + * include/mixer.h: + in draft-mode use zero-order-hold interpolation instead of linear + interpolation - fixes some issues with resampling + * plugins/bass_booster/bassbooster_controls.cpp: made bass-booster HQ-mode-capable diff --git a/include/mixer.h b/include/mixer.h index 31f86c3a0..ecc4717cd 100644 --- a/include/mixer.h +++ b/include/mixer.h @@ -177,7 +177,7 @@ public: switch( interpolation ) { case Interpolation_Linear: - return( SRC_LINEAR ); + return( SRC_ZERO_ORDER_HOLD ); case Interpolation_SincFastest: return( SRC_SINC_FASTEST ); case Interpolation_SincMedium: diff --git a/plugins/bass_booster/bassbooster_controls.cpp b/plugins/bass_booster/bassbooster_controls.cpp index 1635c776f..1abc1525e 100644 --- a/plugins/bass_booster/bassbooster_controls.cpp +++ b/plugins/bass_booster/bassbooster_controls.cpp @@ -57,7 +57,8 @@ bassBoosterControls::bassBoosterControls( bassBoosterEffect * _eff ) : void bassBoosterControls::changeFrequency( void ) { - const sample_t fac = engine::getMixer()->processingSampleRate() / 44100; + const sample_t fac = engine::getMixer()->processingSampleRate() / + 44100.0f; m_effect->m_bbFX.leftFX().setFrequency( m_freqModel.value() * fac ); m_effect->m_bbFX.rightFX().setFrequency( m_freqModel.value() * fac ); } diff --git a/plugins/sf2_player/sf2_player.cpp b/plugins/sf2_player/sf2_player.cpp index 12959e594..28bde1344 100644 --- a/plugins/sf2_player/sf2_player.cpp +++ b/plugins/sf2_player/sf2_player.cpp @@ -490,7 +490,7 @@ void sf2Instrument::play( bool _try_parallelizing, src_data.data_out = _working_buffer[0]; src_data.input_frames = f; src_data.output_frames = frames; - src_data.src_ratio = (float) frames / f; + src_data.src_ratio = (double) frames / f; src_data.end_of_input = 0; int error = src_process( m_srcState, &src_data ); delete[] tmp; diff --git a/src/core/audio/audio_device.cpp b/src/core/audio/audio_device.cpp index 95b77d3f5..00d564c3d 100644 --- a/src/core/audio/audio_device.cpp +++ b/src/core/audio/audio_device.cpp @@ -168,18 +168,17 @@ void audioDevice::resample( const surroundSampleFrame * _src, m_srcData.data_in = (float *) _src[0]; m_srcData.data_out = _dst[0]; m_srcData.src_ratio = (double) _dst_sr / _src_sr; - int error; if( ( error = src_process( m_srcState, &m_srcData ) ) ) { printf( "audioDevice::resample(): error while resampling: %s\n", src_strerror( error ) ); } + m_srcData.end_of_input = 0; } - Uint32 audioDevice::convertToS16( const surroundSampleFrame * _ab, const fpp_t _frames, const float _master_gain,