SampleBuffer, SamplePlayHandle, SampleRecordHandle, SampleTrack: new coding style

Renamed file and class names.
This commit is contained in:
Tobias Doerffel
2014-01-14 18:01:14 +01:00
parent 4e5507a30a
commit 9a7ad0264f
28 changed files with 249 additions and 255 deletions

View File

@@ -2,7 +2,7 @@
* AudioSampleRecorder.h - 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
*
@@ -31,7 +31,7 @@
#include "AudioDevice.h"
class sampleBuffer;
class SampleBuffer;
class AudioSampleRecorder : public AudioDevice
@@ -42,7 +42,7 @@ public:
virtual ~AudioSampleRecorder();
f_cnt_t framesRecorded() const;
void createSampleBuffer( sampleBuffer * * _sample_buf );
void createSampleBuffer( SampleBuffer** sampleBuffer );
private:

View File

@@ -1,7 +1,7 @@
/*
* EnvelopeAndLfoParameters.h - class EnvelopeAndLfoParameters
*
* Copyright (c) 2004-2010 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
*
@@ -29,7 +29,7 @@
#include "JournallingObject.h"
#include "AutomatableModel.h"
#include "sample_buffer.h"
#include "SampleBuffer.h"
#include "TempoSyncKnobModel.h"
#include "lmms_basics.h"
@@ -158,7 +158,7 @@ private:
bool m_lfoAmountIsZero;
sample_t * m_lfoShapeData;
bool m_bad_lfoShapeData;
sampleBuffer m_userWave;
SampleBuffer m_userWave;
enum LfoShapes
{

View File

@@ -1,7 +1,7 @@
/*
* Oscillator.h - declaration of class Oscillator
*
* 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
*
@@ -33,11 +33,11 @@
#include <stdlib.h>
#endif
#include "sample_buffer.h"
#include "SampleBuffer.h"
#include "lmms_constants.h"
class sampleBuffer;
class SampleBuffer;
class IntModel;
@@ -81,7 +81,7 @@ public:
}
inline void setUserWave( const sampleBuffer * _wave )
inline void setUserWave( const SampleBuffer * _wave )
{
m_userWave = _wave;
}
@@ -165,7 +165,7 @@ private:
Oscillator * m_subOsc;
float m_phaseOffset;
float m_phase;
const sampleBuffer * m_userWave;
const SampleBuffer * m_userWave;
void updateNoSub( sampleFrame * _ab, const fpp_t _frames,

View File

@@ -1,7 +1,7 @@
/*
* sample_buffer.h - container-class sampleBuffer
* SampleBuffer.h - container-class SampleBuffer
*
* 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
*
@@ -42,7 +42,7 @@
class QPainter;
class EXPORT sampleBuffer : public QObject, public sharedObject
class EXPORT SampleBuffer : public QObject, public sharedObject
{
Q_OBJECT
public:
@@ -58,19 +58,19 @@ public:
const bool m_varyingPitch;
SRC_STATE * m_resamplingData;
friend class sampleBuffer;
friend class SampleBuffer;
} ;
// constructor which either loads sample _audio_file or decodes
// base64-data out of string
sampleBuffer( const QString & _audio_file = QString(),
SampleBuffer( const QString & _audio_file = QString(),
bool _is_base64_data = false );
sampleBuffer( const sampleFrame * _data, const f_cnt_t _frames );
sampleBuffer( const f_cnt_t _frames );
SampleBuffer( const sampleFrame * _data, const f_cnt_t _frames );
SampleBuffer( const f_cnt_t _frames );
virtual ~sampleBuffer();
virtual ~SampleBuffer();
bool play( sampleFrame * _ab, handleState * _state,
const fpp_t _frames,
@@ -166,12 +166,12 @@ public:
QString & toBase64( QString & _dst ) const;
static sampleBuffer * resample( sampleFrame * _data,
static SampleBuffer * resample( sampleFrame * _data,
const f_cnt_t _frames,
const sample_rate_t _src_sr,
const sample_rate_t _dst_sr );
static inline sampleBuffer * resample( sampleBuffer * _buf,
static inline SampleBuffer * resample( SampleBuffer * _buf,
const sample_rate_t _src_sr,
const sample_rate_t _dst_sr )
{

View File

@@ -1,7 +1,7 @@
/*
* sample_play_handle.h - play-handle for playing a sample
* SamplePlayHandle.h - play-handle for playing a sample
*
* Copyright (c) 2005-2008 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,29 +22,28 @@
*
*/
#ifndef _SAMPLE_PLAY_HANDLE_H
#define _SAMPLE_PLAY_HANDLE_H
#include "Mixer.h"
#include "sample_buffer.h"
#include "SampleBuffer.h"
#include "AutomatableModel.h"
class bbTrack;
class pattern;
class sampleTCO;
class SampleTCO;
class track;
class AudioPort;
class samplePlayHandle : public playHandle
class SamplePlayHandle : public playHandle
{
public:
samplePlayHandle( const QString & _sample_file );
samplePlayHandle( sampleBuffer * _sample_buffer );
samplePlayHandle( sampleTCO * _tco );
samplePlayHandle( pattern * _pattern );
virtual ~samplePlayHandle();
SamplePlayHandle( const QString& sampleFile );
SamplePlayHandle( SampleBuffer* sampleBuffer );
SamplePlayHandle( SampleTCO* tco );
SamplePlayHandle( pattern * _pattern );
virtual ~SamplePlayHandle();
virtual inline bool affinityMatters() const
{
@@ -79,11 +78,11 @@ public:
private:
sampleBuffer * m_sampleBuffer;
SampleBuffer * m_sampleBuffer;
bool m_doneMayReturnTrue;
f_cnt_t m_frame;
sampleBuffer::handleState m_state;
SampleBuffer::handleState m_state;
AudioPort * m_audioPort;
const bool m_ownAudioPort;

View File

@@ -1,5 +1,5 @@
/*
* sample_record_handle.h - play-handle for recording a sample
* SampleRecordHandle.h - play-handle for recording a sample
*
* Copyright (c) 2008 Csaba Hruska <csaba.hruska/at/gmail.com>
*
@@ -31,19 +31,19 @@
#include <qobject.h>
#include "Mixer.h"
#include "sample_buffer.h"
#include "SampleBuffer.h"
class bbTrack;
class pattern;
class sampleTCO;
class SampleTCO;
class track;
class sampleRecordHandle : public playHandle
class SampleRecordHandle : public playHandle
{
public:
sampleRecordHandle( sampleTCO * _tco );
virtual ~sampleRecordHandle();
SampleRecordHandle( SampleTCO* tco );
virtual ~SampleRecordHandle();
virtual void play( sampleFrame * _working_buffer );
virtual bool done() const;
@@ -51,7 +51,7 @@ public:
virtual bool isFromTrack( const track * _track ) const;
f_cnt_t framesRecorded() const;
void createSampleBuffer( sampleBuffer * * _sample_buf );
void createSampleBuffer( SampleBuffer * * _sample_buf );
private:
@@ -65,7 +65,7 @@ private:
track * m_track;
bbTrack * m_bbTrack;
sampleTCO * m_tco;
SampleTCO * m_tco;
} ;

View File

@@ -1,6 +1,5 @@
/*
* sample_track.h - class sampleTrack, a track which provides arrangement of
* samples
* SampleTrack.h - class SampleTrack, a track which provides arrangement of samples
*
* Copyright (c) 2005-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
@@ -33,16 +32,16 @@
class EffectRackView;
class knob;
class sampleBuffer;
class SampleBuffer;
class sampleTCO : public trackContentObject
class SampleTCO : public trackContentObject
{
Q_OBJECT
mapPropertyFromModel(bool,isRecord,setRecord,m_recordModel);
public:
sampleTCO( track * _track );
virtual ~sampleTCO();
SampleTCO( track * _track );
virtual ~SampleTCO();
virtual void changeLength( const midiTime & _length );
const QString & sampleFile() const;
@@ -54,7 +53,7 @@ public:
return "sampletco";
}
sampleBuffer * getSampleBuffer()
SampleBuffer* sampleBuffer()
{
return m_sampleBuffer;
}
@@ -65,18 +64,18 @@ public:
public slots:
void setSampleBuffer( sampleBuffer * _sb );
void setSampleBuffer( SampleBuffer* sb );
void setSampleFile( const QString & _sf );
void updateLength( bpm_t = 0 );
void toggleRecord();
private:
sampleBuffer * m_sampleBuffer;
SampleBuffer* m_sampleBuffer;
BoolModel m_recordModel;
friend class sampleTCOView;
friend class SampleTCOView;
signals:
@@ -86,12 +85,12 @@ signals:
class sampleTCOView : public trackContentObjectView
class SampleTCOView : public trackContentObjectView
{
Q_OBJECT
public:
sampleTCOView( sampleTCO * _tco, trackView * _tv );
virtual ~sampleTCOView();
SampleTCOView( SampleTCO * _tco, trackView * _tv );
virtual ~SampleTCOView();
public slots:
@@ -108,19 +107,19 @@ protected:
private:
sampleTCO * m_tco;
SampleTCO * m_tco;
} ;
class sampleTrack : public track
class SampleTrack : public track
{
Q_OBJECT
public:
sampleTrack( TrackContainer* tc );
virtual ~sampleTrack();
SampleTrack( TrackContainer* tc );
virtual ~SampleTrack();
virtual bool play( const midiTime & _start, const fpp_t _frames,
const f_cnt_t _frame_base,
@@ -149,18 +148,18 @@ private:
FloatModel m_volumeModel;
friend class sampleTrackView;
friend class SampleTrackView;
} ;
class sampleTrackView : public trackView
class SampleTrackView : public trackView
{
Q_OBJECT
public:
sampleTrackView( sampleTrack * _track, TrackContainerView* tcv );
virtual ~sampleTrackView();
SampleTrackView( SampleTrack* track, TrackContainerView* tcv );
virtual ~SampleTrackView();
public slots:

View File

@@ -2,7 +2,7 @@
* pattern.h - declaration of class pattern, which contains all informations
* about a pattern
*
* Copyright (c) 2004-2011 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
*
@@ -43,7 +43,7 @@ class QPushButton;
class InstrumentTrack;
class patternFreezeThread;
class sampleBuffer;
class SampleBuffer;
@@ -104,7 +104,7 @@ public:
return m_frozenPattern != NULL;
}
sampleBuffer *frozenPattern()
SampleBuffer *frozenPattern()
{
return m_frozenPattern;
}
@@ -157,7 +157,7 @@ private:
int m_steps;
// pattern freezing
sampleBuffer * m_frozenPattern;
SampleBuffer* m_frozenPattern;
bool m_freezing;
volatile bool m_freezeAborted;