made all sound-generator-plugins shared libraries which are loaded at runtime when needed; removed obsolete files and fixed bugs in tabWidget

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@13 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2005-09-30 10:31:55 +00:00
parent b3754454cd
commit 6ba478ff6b
10 changed files with 89 additions and 36 deletions

View File

@@ -52,8 +52,8 @@ public:
protected:
void keyPressEvent( QKeyEvent * _ke );
void resizeEvent( QResizeEvent * _re );
virtual void keyPressEvent( QKeyEvent * _ke );
virtual void resizeEvent( QResizeEvent * _re );
private:

View File

@@ -44,6 +44,8 @@ typedef void ( oscillator:: * oscFuncPtr )
( sampleFrame * _ab, Uint32 _frames, Uint8 _chnl );
const sampleFrame ZERO_FRAME = { 0.0f, 0.0f } ;
class oscillator
{
@@ -74,8 +76,16 @@ public:
}
inline void setUserWave( const sampleFrame * _data, Uint32 _frames )
{
m_userWaveData = _data;
m_userWaveFrames = _frames;
if( m_userWaveFrames > 0 )
{
m_userWaveData = _data;
m_userWaveFrames = _frames;
}
else
{
m_userWaveData = &ZERO_FRAME;
m_userWaveFrames = 1;
}
}
inline void update( sampleFrame * _ab, Uint32 _frames, Uint8 _chnl )
{
@@ -90,7 +100,7 @@ public:
recalcOscCoeff( phase( v ) );
}
static oscillator * FASTCALL createNewOsc( waveShapes _wave_shape,
static oscillator * FASTCALL createOsc( waveShapes _wave_shape,
modulationAlgos _modulation_algo, float _freq,
Sint16 _phase_offset, float _volume_factor,
oscillator * _m_subOsc = NULL );
@@ -102,6 +112,7 @@ public:
// check whether v2 is in next period
return( floorf( v2 ) > floorf( v1 ) );
}
static inline float phase( float _sample )
{
#ifndef modff
@@ -112,6 +123,7 @@ public:
return( modff( _sample, &t ) );
//return( _sample - floorf( _sample ) );
}
// now follow the wave-shape-routines...
static inline sampleType sinSample( float _sample )
{