in draft-mode use zero-order-hold interpolation instead of linear interpolation - fixes some issues with resampling, cleanups
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@961 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -1,5 +1,14 @@
|
||||
2008-05-12 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
|
||||
|
||||
* 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
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user