Changed the preset location for the audiofileprocessors.
Corrected seg fault in vibed deconstructor. Add harmonic to vibed save and restore presets. Corrected load and save seg fault when using gimp like windows. Corrected big endian alsa driver. Changed parameters in single precision trig functions to use single precision PI. Modified Files: ChangeLog Makefile.am data/presets/AudioFileProcessor/Bass-Mania.cs.xml data/presets/AudioFileProcessor/Fat-Reversed-Kick.cs.xml data/presets/AudioFileProcessor/Kick-4-your-Subwoofer.cs.xml data/projects/cool_songs/Djeezus-BeatRolls.mmp data/projects/cool_songs/Djeezus-Oscilisous.mmp data/projects/cool_songs/Marfil-MarfilDrum01.mmp data/projects/cool_songs/Mart-Concave_flow.mmp data/projects/cool_songs/Mart-Dirt_Track.mmp data/projects/cool_songs/MaxFellner-Ease.mmp data/projects/cool_songs/SharkyX-DeadManDancing.mmp data/projects/cool_songs/SharkyX-Experiments.mmp data/projects/cool_songs/Siegel-DreamWave.mmp data/projects/cool_songs/TobyDox-Confused.mmp data/projects/cool_songs/TobyDox-Psycho.mmp data/projects/cool_songs/TobyDox-TheFourthDimension.mmp data/projects/covers/J.S.Bach-Preludium_and_Fugue_A-Minor.mmp data/projects/demos/basses-demo.mmp data/projects/demos/beat_collection.mmp data/projects/demos/demo1.mmp data/projects/demos/demo3.mmp data/projects/demos/demo5.mmp data/projects/demos/demo6.mmp data/projects/demos/loop_collection.mmp data/projects/demos/some_basslines.mmp data/projects/misc/1st.mmp data/projects/misc/time_machine.mmp data/projects/templates/AcousticDrumset.mpt data/projects/templates/ClubMix.mpt include/basic_filters.h include/interpolation.h include/oscillator.h plugins/vibed/nine_button_selector.cpp plugins/vibed/nine_button_selector.h plugins/vibed/vibed.cpp plugins/vibed/vibed.h src/audio/audio_alsa.cpp src/audio/audio_device.cpp src/audio/audio_file_wave.cpp src/core/main_window.cpp include/lmms_constants.h git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@126 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -228,7 +228,7 @@ void audioALSA::run( void )
|
||||
const f_cnt_t frames = getNextBuffer( temp );
|
||||
|
||||
convertToS16( temp, frames, getMixer()->masterGain(), outbuf,
|
||||
m_littleEndian != isLittleEndian() );
|
||||
m_littleEndian );
|
||||
|
||||
f_cnt_t frame = 0;
|
||||
int_sample_t * ptr = outbuf;
|
||||
|
||||
@@ -289,37 +289,41 @@ Uint32 FASTCALL audioDevice::convertToS16( const surroundSampleFrame * _ab,
|
||||
const fpab_t _frames,
|
||||
const float _master_gain,
|
||||
int_sample_t * _output_buffer,
|
||||
const bool _convert_endian )
|
||||
const bool _little_endian )
|
||||
{
|
||||
for( fpab_t frame = 0; frame < _frames; ++frame )
|
||||
{
|
||||
for( ch_cnt_t chnl = 0; chnl < channels(); ++chnl )
|
||||
{
|
||||
( _output_buffer + frame * channels() )[chnl] =
|
||||
static_cast<int_sample_t>(
|
||||
mixer::clip( _ab[frame][chnl] *
|
||||
_master_gain ) *
|
||||
OUTPUT_SAMPLE_MULTIPLIER );
|
||||
}
|
||||
}
|
||||
if( _convert_endian )
|
||||
if( _little_endian )
|
||||
{
|
||||
for( fpab_t frame = 0; frame < _frames; ++frame )
|
||||
{
|
||||
for( ch_cnt_t chnl = 0; chnl < channels(); ++chnl )
|
||||
{
|
||||
Sint8 * ptr = reinterpret_cast<Sint8 *>(
|
||||
_output_buffer +
|
||||
frame * channels() +
|
||||
chnl );
|
||||
*(int_sample_t *)ptr =
|
||||
( ( int_sample_t )*ptr << 8
|
||||
) |
|
||||
( ( int_sample_t ) *
|
||||
( ptr+1 ) );
|
||||
( _output_buffer + frame * channels() )[chnl] =
|
||||
static_cast<int_sample_t>(
|
||||
mixer::clip( _ab[frame][chnl] *
|
||||
_master_gain ) *
|
||||
OUTPUT_SAMPLE_MULTIPLIER );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Uint16 temp;
|
||||
for( fpab_t frame = 0; frame < _frames; ++frame )
|
||||
{
|
||||
for( ch_cnt_t chnl = 0; chnl < channels(); ++chnl )
|
||||
{
|
||||
temp = static_cast<int_sample_t>(
|
||||
mixer::clip( _ab[frame][chnl] *
|
||||
_master_gain ) *
|
||||
OUTPUT_SAMPLE_MULTIPLIER );
|
||||
|
||||
( _output_buffer + frame * channels() )[chnl] =
|
||||
( temp & 0x00ff ) << 8 |
|
||||
( temp & 0xff00 ) >> 8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return( _frames * channels() * BYTES_PER_INT_SAMPLE );
|
||||
}
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ void FASTCALL audioFileWave::writeBuffer( const surroundSampleFrame * _ab,
|
||||
int_sample_t * outbuf = bufferAllocator::alloc<int_sample_t>(
|
||||
_frames * channels() );
|
||||
Uint32 bytes = convertToS16( _ab, _frames, _master_gain, outbuf,
|
||||
!isLittleEndian() );
|
||||
TRUE );
|
||||
writeData( outbuf, bytes );
|
||||
|
||||
bufferAllocator::free( outbuf );
|
||||
|
||||
@@ -611,8 +611,16 @@ void mainWindow::clearKeyModifiers( void )
|
||||
|
||||
void mainWindow::saveWidgetState( QWidget * _w, QDomElement & _de )
|
||||
{
|
||||
_de.setAttribute( "x", _w->parentWidget()->x() );
|
||||
_de.setAttribute( "y", _w->parentWidget()->y() );
|
||||
if( _w->parentWidget() != NULL )
|
||||
{
|
||||
_de.setAttribute( "x", _w->parentWidget()->x() );
|
||||
_de.setAttribute( "y", _w->parentWidget()->y() );
|
||||
}
|
||||
else
|
||||
{
|
||||
_de.setAttribute( "x", 0 );
|
||||
_de.setAttribute( "y", 0 );
|
||||
}
|
||||
_de.setAttribute( "width", _w->width() );
|
||||
_de.setAttribute( "height", _w->height() );
|
||||
_de.setAttribute( "visible", _w->isVisible() );
|
||||
@@ -629,7 +637,10 @@ void mainWindow::restoreWidgetState( QWidget * _w, const QDomElement & _de )
|
||||
if( !r.isNull() )
|
||||
{
|
||||
_w->show();
|
||||
_w->parentWidget()->move( r.topLeft() );
|
||||
if( _w->parentWidget() != NULL )
|
||||
{
|
||||
_w->parentWidget()->move( r.topLeft() );
|
||||
}
|
||||
_w->setShown( _de.attribute( "visible" ).toInt() );
|
||||
_w->resize( r.size() );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user