SampleBuffer, SamplePlayHandle, SampleRecordHandle, SampleTrack: new coding style
Renamed file and class names.
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
#include "debug.h"
|
||||
#include "engine.h"
|
||||
#include "config_mgr.h"
|
||||
#include "sample_play_handle.h"
|
||||
#include "SamplePlayHandle.h"
|
||||
#include "piano_roll.h"
|
||||
#include "MicroTimer.h"
|
||||
#include "atomic_int.h"
|
||||
@@ -565,7 +565,7 @@ const surroundSampleFrame * Mixer::renderNextBuffer()
|
||||
p != last_metro_pos && p.getTicks() %
|
||||
(DefaultTicksPerTact / 4 ) == 0 )
|
||||
{
|
||||
addPlayHandle( new samplePlayHandle( "misc/metronome01.ogg" ) );
|
||||
addPlayHandle( new SamplePlayHandle( "misc/metronome01.ogg" ) );
|
||||
last_metro_pos = p;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* sample_buffer.cpp - container-class sampleBuffer
|
||||
* SampleBuffer.cpp - container-class SampleBuffer
|
||||
*
|
||||
* Copyright (c) 2005-2013 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "sample_buffer.h"
|
||||
#include "SampleBuffer.h"
|
||||
#include "Mixer.h"
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
#include "templates.h"
|
||||
|
||||
|
||||
sampleBuffer::sampleBuffer( const QString & _audio_file,
|
||||
SampleBuffer::SampleBuffer( const QString & _audio_file,
|
||||
bool _is_base64_data ) :
|
||||
m_audioFile( ( _is_base64_data == true ) ? "" : _audio_file ),
|
||||
m_origData( NULL ),
|
||||
@@ -88,7 +88,7 @@ sampleBuffer::sampleBuffer( const QString & _audio_file,
|
||||
|
||||
|
||||
|
||||
sampleBuffer::sampleBuffer( const sampleFrame * _data, const f_cnt_t _frames ) :
|
||||
SampleBuffer::SampleBuffer( const sampleFrame * _data, const f_cnt_t _frames ) :
|
||||
m_audioFile( "" ),
|
||||
m_origData( NULL ),
|
||||
m_origFrames( 0 ),
|
||||
@@ -115,7 +115,7 @@ sampleBuffer::sampleBuffer( const sampleFrame * _data, const f_cnt_t _frames ) :
|
||||
|
||||
|
||||
|
||||
sampleBuffer::sampleBuffer( const f_cnt_t _frames ) :
|
||||
SampleBuffer::SampleBuffer( const f_cnt_t _frames ) :
|
||||
m_audioFile( "" ),
|
||||
m_origData( NULL ),
|
||||
m_origFrames( 0 ),
|
||||
@@ -142,7 +142,7 @@ sampleBuffer::sampleBuffer( const f_cnt_t _frames ) :
|
||||
|
||||
|
||||
|
||||
sampleBuffer::~sampleBuffer()
|
||||
SampleBuffer::~SampleBuffer()
|
||||
{
|
||||
delete[] m_origData;
|
||||
delete[] m_data;
|
||||
@@ -153,7 +153,7 @@ sampleBuffer::~sampleBuffer()
|
||||
|
||||
|
||||
|
||||
void sampleBuffer::update( bool _keep_settings )
|
||||
void SampleBuffer::update( bool _keep_settings )
|
||||
{
|
||||
const bool lock = ( m_data != NULL );
|
||||
if( lock )
|
||||
@@ -266,7 +266,7 @@ void sampleBuffer::update( bool _keep_settings )
|
||||
}
|
||||
|
||||
|
||||
void sampleBuffer::convertIntToFloat ( int_sample_t * & _ibuf, f_cnt_t _frames, int _channels)
|
||||
void SampleBuffer::convertIntToFloat ( int_sample_t * & _ibuf, f_cnt_t _frames, int _channels)
|
||||
{
|
||||
// following code transforms int-samples into
|
||||
// float-samples and does amplifying & reversing
|
||||
@@ -308,7 +308,7 @@ void sampleBuffer::convertIntToFloat ( int_sample_t * & _ibuf, f_cnt_t _frames,
|
||||
|
||||
}
|
||||
|
||||
void sampleBuffer::directFloatWrite ( sample_t * & _fbuf, f_cnt_t _frames, int _channels)
|
||||
void SampleBuffer::directFloatWrite ( sample_t * & _fbuf, f_cnt_t _frames, int _channels)
|
||||
|
||||
{
|
||||
|
||||
@@ -347,13 +347,13 @@ void sampleBuffer::directFloatWrite ( sample_t * & _fbuf, f_cnt_t _frames, int _
|
||||
}
|
||||
|
||||
|
||||
void sampleBuffer::normalizeSampleRate( const sample_rate_t _src_sr,
|
||||
void SampleBuffer::normalizeSampleRate( const sample_rate_t _src_sr,
|
||||
bool _keep_settings )
|
||||
{
|
||||
// do samplerate-conversion to our default-samplerate
|
||||
if( _src_sr != engine::mixer()->baseSampleRate() )
|
||||
{
|
||||
sampleBuffer * resampled = resample( this, _src_sr,
|
||||
SampleBuffer * resampled = resample( this, _src_sr,
|
||||
engine::mixer()->baseSampleRate() );
|
||||
delete[] m_data;
|
||||
m_frames = resampled->frames();
|
||||
@@ -374,7 +374,7 @@ void sampleBuffer::normalizeSampleRate( const sample_rate_t _src_sr,
|
||||
|
||||
|
||||
|
||||
f_cnt_t sampleBuffer::decodeSampleSF( const char * _f,
|
||||
f_cnt_t SampleBuffer::decodeSampleSF( const char * _f,
|
||||
int_sample_t * & _buf,
|
||||
ch_cnt_t & _channels,
|
||||
sample_rate_t & _samplerate )
|
||||
@@ -404,7 +404,7 @@ f_cnt_t sampleBuffer::decodeSampleSF( const char * _f,
|
||||
if( sf_rr < sf_info.channels * frames )
|
||||
{
|
||||
#ifdef DEBUG_LMMS
|
||||
printf( "sampleBuffer::decodeSampleSF(): could not read"
|
||||
printf( "SampleBuffer::decodeSampleSF(): could not read"
|
||||
" sample %s: %s\n", _f, sf_strerror( NULL ) );
|
||||
#endif
|
||||
}
|
||||
@@ -416,7 +416,7 @@ f_cnt_t sampleBuffer::decodeSampleSF( const char * _f,
|
||||
else
|
||||
{
|
||||
#ifdef DEBUG_LMMS
|
||||
printf( "sampleBuffer::decodeSampleSF(): could not load "
|
||||
printf( "SampleBuffer::decodeSampleSF(): could not load "
|
||||
"sample %s: %s\n", _f, sf_strerror( NULL ) );
|
||||
#endif
|
||||
}
|
||||
@@ -489,7 +489,7 @@ long qfileTellCallback( void * _udata )
|
||||
|
||||
|
||||
|
||||
f_cnt_t sampleBuffer::decodeSampleOGGVorbis( const char * _f,
|
||||
f_cnt_t SampleBuffer::decodeSampleOGGVorbis( const char * _f,
|
||||
int_sample_t * & _buf,
|
||||
ch_cnt_t & _channels,
|
||||
sample_rate_t & _samplerate )
|
||||
@@ -520,23 +520,23 @@ f_cnt_t sampleBuffer::decodeSampleOGGVorbis( const char * _f,
|
||||
switch( err )
|
||||
{
|
||||
case OV_EREAD:
|
||||
printf( "sampleBuffer::decodeSampleOGGVorbis():"
|
||||
printf( "SampleBuffer::decodeSampleOGGVorbis():"
|
||||
" media read error\n" );
|
||||
break;
|
||||
case OV_ENOTVORBIS:
|
||||
/* printf( "sampleBuffer::decodeSampleOGGVorbis():"
|
||||
/* printf( "SampleBuffer::decodeSampleOGGVorbis():"
|
||||
" not an Ogg Vorbis file\n" );*/
|
||||
break;
|
||||
case OV_EVERSION:
|
||||
printf( "sampleBuffer::decodeSampleOGGVorbis():"
|
||||
printf( "SampleBuffer::decodeSampleOGGVorbis():"
|
||||
" vorbis version mismatch\n" );
|
||||
break;
|
||||
case OV_EBADHEADER:
|
||||
printf( "sampleBuffer::decodeSampleOGGVorbis():"
|
||||
printf( "SampleBuffer::decodeSampleOGGVorbis():"
|
||||
" invalid Vorbis bitstream header\n" );
|
||||
break;
|
||||
case OV_EFAULT:
|
||||
printf( "sampleBuffer::decodeSampleOgg(): "
|
||||
printf( "SampleBuffer::decodeSampleOgg(): "
|
||||
"internal logic fault\n" );
|
||||
break;
|
||||
}
|
||||
@@ -585,7 +585,7 @@ f_cnt_t sampleBuffer::decodeSampleOGGVorbis( const char * _f,
|
||||
|
||||
|
||||
|
||||
f_cnt_t sampleBuffer::decodeSampleDS( const char * _f,
|
||||
f_cnt_t SampleBuffer::decodeSampleDS( const char * _f,
|
||||
int_sample_t * & _buf,
|
||||
ch_cnt_t & _channels,
|
||||
sample_rate_t & _samplerate )
|
||||
@@ -605,7 +605,7 @@ f_cnt_t sampleBuffer::decodeSampleDS( const char * _f,
|
||||
|
||||
|
||||
|
||||
bool sampleBuffer::play( sampleFrame * _ab, handleState * _state,
|
||||
bool SampleBuffer::play( sampleFrame * _ab, handleState * _state,
|
||||
const fpp_t _frames,
|
||||
const float _freq,
|
||||
const bool _looped )
|
||||
@@ -683,12 +683,12 @@ bool sampleBuffer::play( sampleFrame * _ab, handleState * _state,
|
||||
&src_data );
|
||||
if( error )
|
||||
{
|
||||
printf( "sampleBuffer: error while resampling: %s\n",
|
||||
printf( "SampleBuffer: error while resampling: %s\n",
|
||||
src_strerror( error ) );
|
||||
}
|
||||
if( src_data.output_frames_gen > _frames )
|
||||
{
|
||||
printf( "sampleBuffer: not enough frames: %ld / %d\n",
|
||||
printf( "SampleBuffer: not enough frames: %ld / %d\n",
|
||||
src_data.output_frames_gen, _frames );
|
||||
}
|
||||
// Advance
|
||||
@@ -726,7 +726,7 @@ bool sampleBuffer::play( sampleFrame * _ab, handleState * _state,
|
||||
|
||||
|
||||
|
||||
sampleFrame * sampleBuffer::getSampleFragment( f_cnt_t _start,
|
||||
sampleFrame * SampleBuffer::getSampleFragment( f_cnt_t _start,
|
||||
f_cnt_t _frames, bool _looped, sampleFrame * * _tmp ) const
|
||||
{
|
||||
if( _looped )
|
||||
@@ -773,7 +773,7 @@ sampleFrame * sampleBuffer::getSampleFragment( f_cnt_t _start,
|
||||
|
||||
|
||||
|
||||
f_cnt_t sampleBuffer::getLoopedIndex( f_cnt_t _index ) const
|
||||
f_cnt_t SampleBuffer::getLoopedIndex( f_cnt_t _index ) const
|
||||
{
|
||||
if( _index < m_loopEndFrame )
|
||||
{
|
||||
@@ -786,7 +786,7 @@ f_cnt_t sampleBuffer::getLoopedIndex( f_cnt_t _index ) const
|
||||
|
||||
|
||||
|
||||
void sampleBuffer::visualize( QPainter & _p, const QRect & _dr,
|
||||
void SampleBuffer::visualize( QPainter & _p, const QRect & _dr,
|
||||
const QRect & _clip, f_cnt_t _from_frame, f_cnt_t _to_frame )
|
||||
{
|
||||
const bool focus_on_range = _to_frame <= m_frames
|
||||
@@ -827,7 +827,7 @@ void sampleBuffer::visualize( QPainter & _p, const QRect & _dr,
|
||||
|
||||
|
||||
|
||||
QString sampleBuffer::openAudioFile() const
|
||||
QString SampleBuffer::openAudioFile() const
|
||||
{
|
||||
QFileDialog ofd( NULL, tr( "Open audio file" ) );
|
||||
#if QT_VERSION >= 0x040806
|
||||
@@ -932,7 +932,7 @@ void flacStreamEncoderMetadataCallback( const FLAC__StreamEncoder *,
|
||||
|
||||
|
||||
|
||||
QString & sampleBuffer::toBase64( QString & _dst ) const
|
||||
QString & SampleBuffer::toBase64( QString & _dst ) const
|
||||
{
|
||||
#ifdef LMMS_HAVE_FLAC_STREAM_ENCODER_H
|
||||
const f_cnt_t FRAMES_PER_BUF = 1152;
|
||||
@@ -997,14 +997,14 @@ QString & sampleBuffer::toBase64( QString & _dst ) const
|
||||
|
||||
|
||||
|
||||
sampleBuffer * sampleBuffer::resample( sampleFrame * _data,
|
||||
SampleBuffer * SampleBuffer::resample( sampleFrame * _data,
|
||||
const f_cnt_t _frames,
|
||||
const sample_rate_t _src_sr,
|
||||
const sample_rate_t _dst_sr )
|
||||
{
|
||||
const f_cnt_t dst_frames = static_cast<f_cnt_t>( _frames /
|
||||
(float) _src_sr * (float) _dst_sr );
|
||||
sampleBuffer * dst_sb = new sampleBuffer( dst_frames );
|
||||
SampleBuffer * dst_sb = new SampleBuffer( dst_frames );
|
||||
sampleFrame * dst_buf = dst_sb->m_origData;
|
||||
|
||||
// yeah, libsamplerate, let's rock with sinc-interpolation!
|
||||
@@ -1022,7 +1022,7 @@ sampleBuffer * sampleBuffer::resample( sampleFrame * _data,
|
||||
src_data.src_ratio = (double) _dst_sr / _src_sr;
|
||||
if( ( error = src_process( state, &src_data ) ) )
|
||||
{
|
||||
printf( "sampleBuffer: error while resampling: %s\n",
|
||||
printf( "SampleBuffer: error while resampling: %s\n",
|
||||
src_strerror( error ) );
|
||||
}
|
||||
src_delete( state );
|
||||
@@ -1038,7 +1038,7 @@ sampleBuffer * sampleBuffer::resample( sampleFrame * _data,
|
||||
|
||||
|
||||
|
||||
void sampleBuffer::setAudioFile( const QString & _audio_file )
|
||||
void SampleBuffer::setAudioFile( const QString & _audio_file )
|
||||
{
|
||||
m_audioFile = tryToMakeRelative( _audio_file );
|
||||
update();
|
||||
@@ -1139,7 +1139,7 @@ void flacStreamDecoderErrorCallback( const FLAC__StreamDecoder *,
|
||||
#endif
|
||||
|
||||
|
||||
void sampleBuffer::loadFromBase64( const QString & _data )
|
||||
void SampleBuffer::loadFromBase64( const QString & _data )
|
||||
{
|
||||
char * dst = NULL;
|
||||
int dsize = 0;
|
||||
@@ -1203,7 +1203,7 @@ void sampleBuffer::loadFromBase64( const QString & _data )
|
||||
|
||||
|
||||
|
||||
void sampleBuffer::setStartFrame( const f_cnt_t _s )
|
||||
void SampleBuffer::setStartFrame( const f_cnt_t _s )
|
||||
{
|
||||
m_varLock.lock();
|
||||
m_loopStartFrame = m_startFrame = _s;
|
||||
@@ -1213,7 +1213,7 @@ void sampleBuffer::setStartFrame( const f_cnt_t _s )
|
||||
|
||||
|
||||
|
||||
void sampleBuffer::setEndFrame( const f_cnt_t _e )
|
||||
void SampleBuffer::setEndFrame( const f_cnt_t _e )
|
||||
{
|
||||
m_varLock.lock();
|
||||
m_loopEndFrame = m_endFrame = _e;
|
||||
@@ -1223,7 +1223,7 @@ void sampleBuffer::setEndFrame( const f_cnt_t _e )
|
||||
|
||||
|
||||
|
||||
void sampleBuffer::setAmplification( float _a )
|
||||
void SampleBuffer::setAmplification( float _a )
|
||||
{
|
||||
m_amplification = _a;
|
||||
update( true );
|
||||
@@ -1232,7 +1232,7 @@ void sampleBuffer::setAmplification( float _a )
|
||||
|
||||
|
||||
|
||||
void sampleBuffer::setReversed( bool _on )
|
||||
void SampleBuffer::setReversed( bool _on )
|
||||
{
|
||||
m_reversed = _on;
|
||||
update( true );
|
||||
@@ -1241,7 +1241,7 @@ void sampleBuffer::setReversed( bool _on )
|
||||
|
||||
|
||||
|
||||
QString sampleBuffer::tryToMakeRelative( const QString & _file )
|
||||
QString SampleBuffer::tryToMakeRelative( const QString & _file )
|
||||
{
|
||||
if( QFileInfo( _file ).isRelative() == false )
|
||||
{
|
||||
@@ -1265,7 +1265,7 @@ QString sampleBuffer::tryToMakeRelative( const QString & _file )
|
||||
|
||||
|
||||
|
||||
QString sampleBuffer::tryToMakeAbsolute( const QString & _file )
|
||||
QString SampleBuffer::tryToMakeAbsolute( const QString & _file )
|
||||
{
|
||||
if( QFileInfo( _file ).isAbsolute() )
|
||||
{
|
||||
@@ -1288,7 +1288,7 @@ QString sampleBuffer::tryToMakeAbsolute( const QString & _file )
|
||||
|
||||
|
||||
|
||||
sampleBuffer::handleState::handleState( bool _varying_pitch ) :
|
||||
SampleBuffer::handleState::handleState( bool _varying_pitch ) :
|
||||
m_frameIndex( 0 ),
|
||||
m_varyingPitch( _varying_pitch )
|
||||
{
|
||||
@@ -1306,7 +1306,7 @@ sampleBuffer::handleState::handleState( bool _varying_pitch ) :
|
||||
|
||||
|
||||
|
||||
sampleBuffer::handleState::~handleState()
|
||||
SampleBuffer::handleState::~handleState()
|
||||
{
|
||||
src_delete( m_resamplingData );
|
||||
}
|
||||
@@ -1314,7 +1314,7 @@ sampleBuffer::handleState::~handleState()
|
||||
|
||||
|
||||
|
||||
#include "moc_sample_buffer.cxx"
|
||||
#include "moc_SampleBuffer.cxx"
|
||||
|
||||
|
||||
/* vim: set tw=0 noexpandtab: */
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* sample_play_handle.cpp - implementation of class samplePlayHandle
|
||||
* SamplePlayHandle.cpp - implementation of class SamplePlayHandle
|
||||
*
|
||||
* Copyright (c) 2005-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -22,23 +22,23 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "sample_play_handle.h"
|
||||
#include "SamplePlayHandle.h"
|
||||
#include "AudioPort.h"
|
||||
#include "bb_track.h"
|
||||
#include "engine.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "pattern.h"
|
||||
#include "sample_buffer.h"
|
||||
#include "sample_track.h"
|
||||
#include "SampleBuffer.h"
|
||||
#include "SampleTrack.h"
|
||||
|
||||
|
||||
|
||||
samplePlayHandle::samplePlayHandle( const QString & _sample_file ) :
|
||||
playHandle( SamplePlayHandle ),
|
||||
m_sampleBuffer( new sampleBuffer( _sample_file ) ),
|
||||
SamplePlayHandle::SamplePlayHandle( const QString& sampleFile ) :
|
||||
playHandle( playHandle::SamplePlayHandle ),
|
||||
m_sampleBuffer( new SampleBuffer( sampleFile ) ),
|
||||
m_doneMayReturnTrue( true ),
|
||||
m_frame( 0 ),
|
||||
m_audioPort( new AudioPort( "samplePlayHandle", false ) ),
|
||||
m_audioPort( new AudioPort( "SamplePlayHandle", false ) ),
|
||||
m_ownAudioPort( true ),
|
||||
m_defaultVolumeModel( DefaultVolume, MinVolume, MaxVolume, 1 ),
|
||||
m_volumeModel( &m_defaultVolumeModel ),
|
||||
@@ -50,12 +50,12 @@ samplePlayHandle::samplePlayHandle( const QString & _sample_file ) :
|
||||
|
||||
|
||||
|
||||
samplePlayHandle::samplePlayHandle( sampleBuffer * _sample_buffer ) :
|
||||
playHandle( SamplePlayHandle ),
|
||||
m_sampleBuffer( sharedObject::ref( _sample_buffer ) ),
|
||||
SamplePlayHandle::SamplePlayHandle( SampleBuffer* sampleBuffer ) :
|
||||
playHandle( playHandle::SamplePlayHandle ),
|
||||
m_sampleBuffer( sharedObject::ref( sampleBuffer ) ),
|
||||
m_doneMayReturnTrue( true ),
|
||||
m_frame( 0 ),
|
||||
m_audioPort( new AudioPort( "samplePlayHandle", false ) ),
|
||||
m_audioPort( new AudioPort( "SamplePlayHandle", false ) ),
|
||||
m_ownAudioPort( true ),
|
||||
m_defaultVolumeModel( DefaultVolume, MinVolume, MaxVolume, 1 ),
|
||||
m_volumeModel( &m_defaultVolumeModel ),
|
||||
@@ -67,16 +67,16 @@ samplePlayHandle::samplePlayHandle( sampleBuffer * _sample_buffer ) :
|
||||
|
||||
|
||||
|
||||
samplePlayHandle::samplePlayHandle( sampleTCO * _tco ) :
|
||||
playHandle( SamplePlayHandle ),
|
||||
m_sampleBuffer( sharedObject::ref( _tco->getSampleBuffer() ) ),
|
||||
SamplePlayHandle::SamplePlayHandle( SampleTCO* tco ) :
|
||||
playHandle( playHandle::SamplePlayHandle ),
|
||||
m_sampleBuffer( sharedObject::ref( tco->sampleBuffer() ) ),
|
||||
m_doneMayReturnTrue( true ),
|
||||
m_frame( 0 ),
|
||||
m_audioPort( ( (sampleTrack *)_tco->getTrack() )->audioPort() ),
|
||||
m_audioPort( ( (SampleTrack *)tco->getTrack() )->audioPort() ),
|
||||
m_ownAudioPort( false ),
|
||||
m_defaultVolumeModel( DefaultVolume, MinVolume, MaxVolume, 1 ),
|
||||
m_volumeModel( &m_defaultVolumeModel ),
|
||||
m_track( _tco->getTrack() ),
|
||||
m_track( tco->getTrack() ),
|
||||
m_bbTrack( NULL )
|
||||
{
|
||||
}
|
||||
@@ -84,8 +84,8 @@ samplePlayHandle::samplePlayHandle( sampleTCO * _tco ) :
|
||||
|
||||
|
||||
|
||||
samplePlayHandle::samplePlayHandle( pattern * _pattern ) :
|
||||
playHandle( SamplePlayHandle ),
|
||||
SamplePlayHandle::SamplePlayHandle( pattern * _pattern ) :
|
||||
playHandle( playHandle::SamplePlayHandle ),
|
||||
m_sampleBuffer( sharedObject::ref( _pattern->frozenPattern() ) ),
|
||||
m_doneMayReturnTrue( true ),
|
||||
m_frame( 0 ),
|
||||
@@ -101,7 +101,7 @@ samplePlayHandle::samplePlayHandle( pattern * _pattern ) :
|
||||
|
||||
|
||||
|
||||
samplePlayHandle::~samplePlayHandle()
|
||||
SamplePlayHandle::~SamplePlayHandle()
|
||||
{
|
||||
sharedObject::unref( m_sampleBuffer );
|
||||
if( m_ownAudioPort )
|
||||
@@ -113,7 +113,7 @@ samplePlayHandle::~samplePlayHandle()
|
||||
|
||||
|
||||
|
||||
void samplePlayHandle::play( sampleFrame * _working_buffer )
|
||||
void SamplePlayHandle::play( sampleFrame * _working_buffer )
|
||||
{
|
||||
//play( 0, _try_parallelizing );
|
||||
if( framesDone() >= totalFrames() )
|
||||
@@ -140,7 +140,7 @@ void samplePlayHandle::play( sampleFrame * _working_buffer )
|
||||
|
||||
|
||||
|
||||
bool samplePlayHandle::done() const
|
||||
bool SamplePlayHandle::done() const
|
||||
{
|
||||
return( framesDone() >= totalFrames() && m_doneMayReturnTrue == true );
|
||||
}
|
||||
@@ -148,7 +148,7 @@ bool samplePlayHandle::done() const
|
||||
|
||||
|
||||
|
||||
bool samplePlayHandle::isFromTrack( const track * _track ) const
|
||||
bool SamplePlayHandle::isFromTrack( const track * _track ) const
|
||||
{
|
||||
return( m_track == _track || m_bbTrack == _track );
|
||||
}
|
||||
@@ -156,7 +156,7 @@ bool samplePlayHandle::isFromTrack( const track * _track ) const
|
||||
|
||||
|
||||
|
||||
f_cnt_t samplePlayHandle::totalFrames() const
|
||||
f_cnt_t SamplePlayHandle::totalFrames() const
|
||||
{
|
||||
return( ( m_sampleBuffer->endFrame() - m_sampleBuffer->startFrame() ) *
|
||||
( engine::mixer()->processingSampleRate() /
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* sample_record_handle.cpp - implementation of class sampleRecordHandle
|
||||
* SampleRecordHandle.cpp - implementation of class SampleRecordHandle
|
||||
*
|
||||
* Copyright (c) 2008 Csaba Hruska <csaba.hruska/at/gmail.com>
|
||||
*
|
||||
@@ -23,34 +23,34 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "sample_record_handle.h"
|
||||
#include "SampleRecordHandle.h"
|
||||
#include "bb_track.h"
|
||||
#include "engine.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "pattern.h"
|
||||
#include "sample_buffer.h"
|
||||
#include "sample_track.h"
|
||||
#include "SampleBuffer.h"
|
||||
#include "SampleTrack.h"
|
||||
|
||||
|
||||
|
||||
sampleRecordHandle::sampleRecordHandle( sampleTCO * _tco ) :
|
||||
SampleRecordHandle::SampleRecordHandle( SampleTCO* tco ) :
|
||||
playHandle( SamplePlayHandle ),
|
||||
m_framesRecorded( 0 ),
|
||||
m_minLength( _tco->length() ),
|
||||
m_track( _tco->getTrack() ),
|
||||
m_minLength( tco->length() ),
|
||||
m_track( tco->getTrack() ),
|
||||
m_bbTrack( NULL ),
|
||||
m_tco( _tco )
|
||||
m_tco( tco )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
sampleRecordHandle::~sampleRecordHandle()
|
||||
SampleRecordHandle::~SampleRecordHandle()
|
||||
{
|
||||
if( !m_buffers.empty() )
|
||||
{
|
||||
sampleBuffer * sb;
|
||||
SampleBuffer* sb;
|
||||
createSampleBuffer( &sb );
|
||||
m_tco->setSampleBuffer( sb );
|
||||
}
|
||||
@@ -66,7 +66,7 @@ sampleRecordHandle::~sampleRecordHandle()
|
||||
|
||||
|
||||
|
||||
void sampleRecordHandle::play( sampleFrame * /*_working_buffer*/ )
|
||||
void SampleRecordHandle::play( sampleFrame * /*_working_buffer*/ )
|
||||
{
|
||||
const sampleFrame * recbuf = engine::mixer()->inputBuffer();
|
||||
const f_cnt_t frames = engine::mixer()->inputBufferFrames();
|
||||
@@ -84,7 +84,7 @@ void sampleRecordHandle::play( sampleFrame * /*_working_buffer*/ )
|
||||
|
||||
|
||||
|
||||
bool sampleRecordHandle::done() const
|
||||
bool SampleRecordHandle::done() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -92,7 +92,7 @@ bool sampleRecordHandle::done() const
|
||||
|
||||
|
||||
|
||||
bool sampleRecordHandle::isFromTrack( const track * _track ) const
|
||||
bool SampleRecordHandle::isFromTrack( const track * _track ) const
|
||||
{
|
||||
return( m_track == _track || m_bbTrack == _track );
|
||||
}
|
||||
@@ -100,7 +100,7 @@ bool sampleRecordHandle::isFromTrack( const track * _track ) const
|
||||
|
||||
|
||||
|
||||
f_cnt_t sampleRecordHandle::framesRecorded() const
|
||||
f_cnt_t SampleRecordHandle::framesRecorded() const
|
||||
{
|
||||
return( m_framesRecorded );
|
||||
}
|
||||
@@ -108,7 +108,7 @@ f_cnt_t sampleRecordHandle::framesRecorded() const
|
||||
|
||||
|
||||
|
||||
void sampleRecordHandle::createSampleBuffer( sampleBuffer * * _sample_buf )
|
||||
void SampleRecordHandle::createSampleBuffer( SampleBuffer** sampleBuf )
|
||||
{
|
||||
const f_cnt_t frames = framesRecorded();
|
||||
// create buffer to store all recorded buffers in
|
||||
@@ -128,15 +128,15 @@ void sampleRecordHandle::createSampleBuffer( sampleBuffer * * _sample_buf )
|
||||
data_ptr += ( *it ).second;
|
||||
}
|
||||
// create according sample-buffer out of big buffer
|
||||
*_sample_buf = new sampleBuffer( data, frames );
|
||||
( *_sample_buf )->setSampleRate( engine::mixer()->inputSampleRate() );
|
||||
*sampleBuf = new SampleBuffer( data, frames );
|
||||
( *sampleBuf)->setSampleRate( engine::mixer()->inputSampleRate() );
|
||||
delete[] data;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void sampleRecordHandle::writeBuffer( const sampleFrame * _ab,
|
||||
void SampleRecordHandle::writeBuffer( const sampleFrame * _ab,
|
||||
const f_cnt_t _frames )
|
||||
{
|
||||
sampleFrame * buf = new sampleFrame[_frames];
|
||||
@@ -2,7 +2,7 @@
|
||||
* AudioSampleRecorder.cpp - device-class that implements recording
|
||||
* audio-buffers into RAM
|
||||
*
|
||||
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
|
||||
#include "AudioSampleRecorder.h"
|
||||
#include "sample_buffer.h"
|
||||
#include "SampleBuffer.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ f_cnt_t AudioSampleRecorder::framesRecorded() const
|
||||
|
||||
|
||||
|
||||
void AudioSampleRecorder::createSampleBuffer( sampleBuffer * * _sample_buf )
|
||||
void AudioSampleRecorder::createSampleBuffer( SampleBuffer** sampleBuf )
|
||||
{
|
||||
const f_cnt_t frames = framesRecorded();
|
||||
// create buffer to store all recorded buffers in
|
||||
@@ -88,8 +88,8 @@ void AudioSampleRecorder::createSampleBuffer( sampleBuffer * * _sample_buf )
|
||||
data_ptr += ( *it ).second;
|
||||
}
|
||||
// create according sample-buffer out of big buffer
|
||||
*_sample_buf = new sampleBuffer( data, frames );
|
||||
( *_sample_buf )->setSampleRate( sampleRate() );
|
||||
*sampleBuf = new SampleBuffer( data, frames );
|
||||
( *sampleBuf )->setSampleRate( sampleRate() );
|
||||
delete[] data;
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
#include "mmp.h"
|
||||
#include "pixmap_button.h"
|
||||
#include "ProjectJournal.h"
|
||||
#include "sample_track.h"
|
||||
#include "SampleTrack.h"
|
||||
#include "song.h"
|
||||
#include "string_pair_drag.h"
|
||||
#include "templates.h"
|
||||
@@ -1602,7 +1602,7 @@ track * track::create( TrackTypes _tt, TrackContainer * _tc )
|
||||
{
|
||||
case InstrumentTrack: t = new ::InstrumentTrack( _tc ); break;
|
||||
case BBTrack: t = new bbTrack( _tc ); break;
|
||||
case SampleTrack: t = new sampleTrack( _tc ); break;
|
||||
case SampleTrack: t = new ::SampleTrack( _tc ); break;
|
||||
// case EVENT_TRACK:
|
||||
// case VIDEO_TRACK:
|
||||
case AutomationTrack: t = new ::AutomationTrack( _tc ); break;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* file_browser.cpp - implementation of the project-, preset- and
|
||||
* sample-file-browser
|
||||
*
|
||||
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -45,7 +45,7 @@
|
||||
#include "MainWindow.h"
|
||||
#include "mmp.h"
|
||||
#include "preset_preview_play_handle.h"
|
||||
#include "sample_play_handle.h"
|
||||
#include "SamplePlayHandle.h"
|
||||
#include "song.h"
|
||||
#include "string_pair_drag.h"
|
||||
#include "text_float.h"
|
||||
@@ -418,7 +418,7 @@ void fileBrowserTreeWidget::mousePressEvent( QMouseEvent * _me )
|
||||
}
|
||||
|
||||
// in special case of sample-files we do not care about
|
||||
// handling() rather than directly creating a samplePlayHandle
|
||||
// handling() rather than directly creating a SamplePlayHandle
|
||||
if( f->type() == fileItem::SampleFile )
|
||||
{
|
||||
textFloat * tf = textFloat::displayMessage(
|
||||
@@ -429,7 +429,7 @@ void fileBrowserTreeWidget::mousePressEvent( QMouseEvent * _me )
|
||||
24, 24 ), 0 );
|
||||
qApp->processEvents(
|
||||
QEventLoop::ExcludeUserInputEvents );
|
||||
samplePlayHandle * s = new samplePlayHandle(
|
||||
SamplePlayHandle * s = new SamplePlayHandle(
|
||||
f->fullName() );
|
||||
s->setDoneMayReturnTrue( false );
|
||||
m_previewPlayHandle = s;
|
||||
@@ -520,7 +520,7 @@ void fileBrowserTreeWidget::mouseReleaseEvent( QMouseEvent * _me )
|
||||
if( m_previewPlayHandle->type() ==
|
||||
playHandle::SamplePlayHandle )
|
||||
{
|
||||
samplePlayHandle * s = dynamic_cast<samplePlayHandle *>(
|
||||
SamplePlayHandle * s = dynamic_cast<SamplePlayHandle *>(
|
||||
m_previewPlayHandle );
|
||||
if( s && s->totalFrames() - s->framesDone() <=
|
||||
static_cast<f_cnt_t>( engine::mixer()->
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
#include "graph.h"
|
||||
#include "string_pair_drag.h"
|
||||
#include "sample_buffer.h"
|
||||
#include "SampleBuffer.h"
|
||||
#include "Oscillator.h"
|
||||
#include "engine.h"
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
#include "note_play_handle.h"
|
||||
#include "pattern.h"
|
||||
#include "PluginView.h"
|
||||
#include "sample_play_handle.h"
|
||||
#include "SamplePlayHandle.h"
|
||||
#include "song.h"
|
||||
#include "string_pair_drag.h"
|
||||
#include "surround_area.h"
|
||||
@@ -658,7 +658,7 @@ bool InstrumentTrack::play( const midiTime & _start,
|
||||
continue;
|
||||
}
|
||||
|
||||
samplePlayHandle * handle = new samplePlayHandle( p );
|
||||
SamplePlayHandle* handle = new SamplePlayHandle( p );
|
||||
handle->setBBTrack( bb_track );
|
||||
handle->setOffset( _offset );
|
||||
// send it to the mixer
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* sample_track.cpp - implementation of class sampleTrack, a track which
|
||||
* provides arrangement of samples
|
||||
* SampleTrack.cpp - implementation of class SampleTrack, a track which
|
||||
* provides arrangement of samples
|
||||
*
|
||||
* Copyright (c) 2005-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
@@ -33,14 +33,14 @@
|
||||
#include <QtGui/QPushButton>
|
||||
|
||||
#include "gui_templates.h"
|
||||
#include "sample_track.h"
|
||||
#include "SampleTrack.h"
|
||||
#include "song.h"
|
||||
#include "embed.h"
|
||||
#include "engine.h"
|
||||
#include "tooltip.h"
|
||||
#include "AudioPort.h"
|
||||
#include "sample_play_handle.h"
|
||||
#include "sample_record_handle.h"
|
||||
#include "SamplePlayHandle.h"
|
||||
#include "SampleRecordHandle.h"
|
||||
#include "string_pair_drag.h"
|
||||
#include "knob.h"
|
||||
#include "MainWindow.h"
|
||||
@@ -49,9 +49,9 @@
|
||||
#include "config_mgr.h"
|
||||
|
||||
|
||||
sampleTCO::sampleTCO( track * _track ) :
|
||||
SampleTCO::SampleTCO( track * _track ) :
|
||||
trackContentObject( _track ),
|
||||
m_sampleBuffer( new sampleBuffer )
|
||||
m_sampleBuffer( new SampleBuffer )
|
||||
{
|
||||
saveJournallingState( false );
|
||||
setSampleFile( "" );
|
||||
@@ -66,7 +66,7 @@ sampleTCO::sampleTCO( track * _track ) :
|
||||
|
||||
|
||||
|
||||
sampleTCO::~sampleTCO()
|
||||
SampleTCO::~SampleTCO()
|
||||
{
|
||||
sharedObject::unref( m_sampleBuffer );
|
||||
}
|
||||
@@ -74,7 +74,7 @@ sampleTCO::~sampleTCO()
|
||||
|
||||
|
||||
|
||||
void sampleTCO::changeLength( const midiTime & _length )
|
||||
void SampleTCO::changeLength( const midiTime & _length )
|
||||
{
|
||||
trackContentObject::changeLength( qMax( static_cast<Sint32>( _length ),
|
||||
DefaultTicksPerTact ) );
|
||||
@@ -83,17 +83,17 @@ void sampleTCO::changeLength( const midiTime & _length )
|
||||
|
||||
|
||||
|
||||
const QString & sampleTCO::sampleFile() const
|
||||
const QString & SampleTCO::sampleFile() const
|
||||
{
|
||||
return m_sampleBuffer->audioFile();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void sampleTCO::setSampleBuffer( sampleBuffer * _sb )
|
||||
void SampleTCO::setSampleBuffer( SampleBuffer* sb )
|
||||
{
|
||||
sharedObject::unref( m_sampleBuffer );
|
||||
m_sampleBuffer = _sb;
|
||||
m_sampleBuffer = sb;
|
||||
updateLength();
|
||||
|
||||
emit sampleChanged();
|
||||
@@ -101,7 +101,7 @@ void sampleTCO::setSampleBuffer( sampleBuffer * _sb )
|
||||
|
||||
|
||||
|
||||
void sampleTCO::setSampleFile( const QString & _sf )
|
||||
void SampleTCO::setSampleFile( const QString & _sf )
|
||||
{
|
||||
m_sampleBuffer->setAudioFile( _sf );
|
||||
updateLength();
|
||||
@@ -112,7 +112,7 @@ void sampleTCO::setSampleFile( const QString & _sf )
|
||||
|
||||
|
||||
|
||||
void sampleTCO::toggleRecord()
|
||||
void SampleTCO::toggleRecord()
|
||||
{
|
||||
m_recordModel.setValue( !m_recordModel.value() );
|
||||
emit dataChanged();
|
||||
@@ -121,7 +121,7 @@ void sampleTCO::toggleRecord()
|
||||
|
||||
|
||||
|
||||
void sampleTCO::updateLength( bpm_t )
|
||||
void SampleTCO::updateLength( bpm_t )
|
||||
{
|
||||
changeLength( sampleLength() );
|
||||
}
|
||||
@@ -129,7 +129,7 @@ void sampleTCO::updateLength( bpm_t )
|
||||
|
||||
|
||||
|
||||
midiTime sampleTCO::sampleLength() const
|
||||
midiTime SampleTCO::sampleLength() const
|
||||
{
|
||||
return (int)( m_sampleBuffer->frames() / engine::framesPerTick() );
|
||||
}
|
||||
@@ -137,7 +137,7 @@ midiTime sampleTCO::sampleLength() const
|
||||
|
||||
|
||||
|
||||
void sampleTCO::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
void SampleTCO::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
{
|
||||
if( _this.parentNode().nodeName() == "clipboard" )
|
||||
{
|
||||
@@ -161,7 +161,7 @@ void sampleTCO::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
|
||||
|
||||
|
||||
void sampleTCO::loadSettings( const QDomElement & _this )
|
||||
void SampleTCO::loadSettings( const QDomElement & _this )
|
||||
{
|
||||
if( _this.attribute( "pos" ).toInt() >= 0 )
|
||||
{
|
||||
@@ -179,9 +179,9 @@ void sampleTCO::loadSettings( const QDomElement & _this )
|
||||
|
||||
|
||||
|
||||
trackContentObjectView * sampleTCO::createView( trackView * _tv )
|
||||
trackContentObjectView * SampleTCO::createView( trackView * _tv )
|
||||
{
|
||||
return new sampleTCOView( this, _tv );
|
||||
return new SampleTCOView( this, _tv );
|
||||
}
|
||||
|
||||
|
||||
@@ -193,14 +193,14 @@ trackContentObjectView * sampleTCO::createView( trackView * _tv )
|
||||
|
||||
|
||||
|
||||
sampleTCOView::sampleTCOView( sampleTCO * _tco, trackView * _tv ) :
|
||||
SampleTCOView::SampleTCOView( SampleTCO * _tco, trackView * _tv ) :
|
||||
trackContentObjectView( _tco, _tv ),
|
||||
m_tco( _tco )
|
||||
{
|
||||
// update UI and tooltip
|
||||
updateSample();
|
||||
|
||||
// track future changes of sampleTCO
|
||||
// track future changes of SampleTCO
|
||||
connect( m_tco, SIGNAL( sampleChanged() ),
|
||||
this, SLOT( updateSample() ) );
|
||||
}
|
||||
@@ -208,14 +208,14 @@ sampleTCOView::sampleTCOView( sampleTCO * _tco, trackView * _tv ) :
|
||||
|
||||
|
||||
|
||||
sampleTCOView::~sampleTCOView()
|
||||
SampleTCOView::~SampleTCOView()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void sampleTCOView::updateSample()
|
||||
void SampleTCOView::updateSample()
|
||||
{
|
||||
update();
|
||||
// set tooltip to filename so that user can see what sample this
|
||||
@@ -228,7 +228,7 @@ void sampleTCOView::updateSample()
|
||||
|
||||
|
||||
|
||||
void sampleTCOView::contextMenuEvent( QContextMenuEvent * _cme )
|
||||
void SampleTCOView::contextMenuEvent( QContextMenuEvent * _cme )
|
||||
{
|
||||
QMenu contextMenu( this );
|
||||
if( fixedTCOs() == false )
|
||||
@@ -259,7 +259,7 @@ void sampleTCOView::contextMenuEvent( QContextMenuEvent * _cme )
|
||||
|
||||
|
||||
|
||||
void sampleTCOView::dragEnterEvent( QDragEnterEvent * _dee )
|
||||
void SampleTCOView::dragEnterEvent( QDragEnterEvent * _dee )
|
||||
{
|
||||
if( stringPairDrag::processDragEnterEvent( _dee,
|
||||
"samplefile,sampledata" ) == false )
|
||||
@@ -271,7 +271,7 @@ void sampleTCOView::dragEnterEvent( QDragEnterEvent * _dee )
|
||||
|
||||
|
||||
|
||||
void sampleTCOView::dropEvent( QDropEvent * _de )
|
||||
void SampleTCOView::dropEvent( QDropEvent * _de )
|
||||
{
|
||||
if( stringPairDrag::decodeKey( _de ) == "samplefile" )
|
||||
{
|
||||
@@ -296,7 +296,7 @@ void sampleTCOView::dropEvent( QDropEvent * _de )
|
||||
|
||||
|
||||
|
||||
void sampleTCOView::mousePressEvent( QMouseEvent * _me )
|
||||
void SampleTCOView::mousePressEvent( QMouseEvent * _me )
|
||||
{
|
||||
if( _me->button() == Qt::LeftButton &&
|
||||
_me->modifiers() & Qt::ControlModifier &&
|
||||
@@ -313,7 +313,7 @@ void sampleTCOView::mousePressEvent( QMouseEvent * _me )
|
||||
|
||||
|
||||
|
||||
void sampleTCOView::mouseDoubleClickEvent( QMouseEvent * )
|
||||
void SampleTCOView::mouseDoubleClickEvent( QMouseEvent * )
|
||||
{
|
||||
QString af = m_tco->m_sampleBuffer->openAudioFile();
|
||||
if( af != "" && af != m_tco->m_sampleBuffer->audioFile() )
|
||||
@@ -326,7 +326,7 @@ void sampleTCOView::mouseDoubleClickEvent( QMouseEvent * )
|
||||
|
||||
|
||||
|
||||
void sampleTCOView::paintEvent( QPaintEvent * _pe )
|
||||
void SampleTCOView::paintEvent( QPaintEvent * _pe )
|
||||
{
|
||||
QPainter p( this );
|
||||
|
||||
@@ -385,8 +385,8 @@ void sampleTCOView::paintEvent( QPaintEvent * _pe )
|
||||
|
||||
|
||||
|
||||
sampleTrack::sampleTrack( TrackContainer* tc ) :
|
||||
track( SampleTrack, tc ),
|
||||
SampleTrack::SampleTrack( TrackContainer* tc ) :
|
||||
track( track::SampleTrack, tc ),
|
||||
m_audioPort( tr( "Sample track" ) ),
|
||||
m_volumeModel( DefaultVolume, MinVolume, MaxVolume, 1.0, this,
|
||||
tr( "Volume" ) )
|
||||
@@ -397,7 +397,7 @@ sampleTrack::sampleTrack( TrackContainer* tc ) :
|
||||
|
||||
|
||||
|
||||
sampleTrack::~sampleTrack()
|
||||
SampleTrack::~SampleTrack()
|
||||
{
|
||||
engine::mixer()->removePlayHandles( this );
|
||||
}
|
||||
@@ -405,7 +405,7 @@ sampleTrack::~sampleTrack()
|
||||
|
||||
|
||||
|
||||
bool sampleTrack::play( const midiTime & _start, const fpp_t _frames,
|
||||
bool SampleTrack::play( const midiTime & _start, const fpp_t _frames,
|
||||
const f_cnt_t _offset,
|
||||
Sint16 /*_tco_num*/ )
|
||||
{
|
||||
@@ -419,7 +419,7 @@ bool sampleTrack::play( const midiTime & _start, const fpp_t _frames,
|
||||
{
|
||||
continue;
|
||||
}
|
||||
sampleTCO * st = dynamic_cast<sampleTCO *>( tco );
|
||||
SampleTCO * st = dynamic_cast<SampleTCO *>( tco );
|
||||
if( !st->isMuted() )
|
||||
{
|
||||
playHandle * handle;
|
||||
@@ -429,12 +429,12 @@ bool sampleTrack::play( const midiTime & _start, const fpp_t _frames,
|
||||
{
|
||||
return played_a_note;
|
||||
}
|
||||
sampleRecordHandle * smpHandle = new sampleRecordHandle( st );
|
||||
SampleRecordHandle* smpHandle = new SampleRecordHandle( st );
|
||||
handle = smpHandle;
|
||||
}
|
||||
else
|
||||
{
|
||||
samplePlayHandle * smpHandle = new samplePlayHandle( st );
|
||||
SamplePlayHandle* smpHandle = new SamplePlayHandle( st );
|
||||
smpHandle->setVolumeModel( &m_volumeModel );
|
||||
handle = smpHandle;
|
||||
}
|
||||
@@ -453,23 +453,23 @@ bool sampleTrack::play( const midiTime & _start, const fpp_t _frames,
|
||||
|
||||
|
||||
|
||||
trackView * sampleTrack::createView( TrackContainerView* tcv )
|
||||
trackView * SampleTrack::createView( TrackContainerView* tcv )
|
||||
{
|
||||
return new sampleTrackView( this, tcv );
|
||||
return new SampleTrackView( this, tcv );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
trackContentObject * sampleTrack::createTCO( const midiTime & )
|
||||
trackContentObject * SampleTrack::createTCO( const midiTime & )
|
||||
{
|
||||
return new sampleTCO( this );
|
||||
return new SampleTCO( this );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void sampleTrack::saveTrackSpecificSettings( QDomDocument & _doc,
|
||||
void SampleTrack::saveTrackSpecificSettings( QDomDocument & _doc,
|
||||
QDomElement & _this )
|
||||
{
|
||||
m_audioPort.effects()->saveState( _doc, _this );
|
||||
@@ -482,7 +482,7 @@ void sampleTrack::saveTrackSpecificSettings( QDomDocument & _doc,
|
||||
|
||||
|
||||
|
||||
void sampleTrack::loadTrackSpecificSettings( const QDomElement & _this )
|
||||
void SampleTrack::loadTrackSpecificSettings( const QDomElement & _this )
|
||||
{
|
||||
QDomNode node = _this.firstChild();
|
||||
m_audioPort.effects()->clear();
|
||||
@@ -505,7 +505,7 @@ void sampleTrack::loadTrackSpecificSettings( const QDomElement & _this )
|
||||
|
||||
|
||||
|
||||
sampleTrackView::sampleTrackView( sampleTrack * _t, TrackContainerView* tcv ) :
|
||||
SampleTrackView::SampleTrackView( SampleTrack * _t, TrackContainerView* tcv ) :
|
||||
trackView( _t, tcv )
|
||||
{
|
||||
setFixedHeight( 32 );
|
||||
@@ -550,7 +550,7 @@ sampleTrackView::sampleTrackView( sampleTrack * _t, TrackContainerView* tcv ) :
|
||||
|
||||
|
||||
|
||||
sampleTrackView::~sampleTrackView()
|
||||
SampleTrackView::~SampleTrackView()
|
||||
{
|
||||
m_effWindow->deleteLater();
|
||||
}
|
||||
@@ -558,7 +558,7 @@ sampleTrackView::~sampleTrackView()
|
||||
|
||||
|
||||
|
||||
void sampleTrackView::showEffects()
|
||||
void SampleTrackView::showEffects()
|
||||
{
|
||||
if( m_effWindow->isHidden() )
|
||||
{
|
||||
@@ -574,9 +574,9 @@ void sampleTrackView::showEffects()
|
||||
|
||||
|
||||
|
||||
void sampleTrackView::modelChanged()
|
||||
void SampleTrackView::modelChanged()
|
||||
{
|
||||
sampleTrack * st = castModel<sampleTrack>();
|
||||
SampleTrack * st = castModel<SampleTrack>();
|
||||
m_volumeKnob->setModel( &st->m_volumeModel );
|
||||
|
||||
trackView::modelChanged();
|
||||
@@ -584,5 +584,5 @@ void sampleTrackView::modelChanged()
|
||||
|
||||
|
||||
|
||||
#include "moc_sample_track.cxx"
|
||||
#include "moc_SampleTrack.cxx"
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
#include "piano_roll.h"
|
||||
#include "TrackContainer.h"
|
||||
#include "rename_dialog.h"
|
||||
#include "sample_buffer.h"
|
||||
#include "SampleBuffer.h"
|
||||
#include "AudioSampleRecorder.h"
|
||||
#include "song.h"
|
||||
#include "tooltip.h"
|
||||
|
||||
Reference in New Issue
Block a user