SampleBuffer, SamplePlayHandle, SampleRecordHandle, SampleTrack: new coding style
Renamed file and class names.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* audio_file_processor.cpp - instrument for using audio-files
|
||||
*
|
||||
* 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
|
||||
*
|
||||
@@ -510,9 +510,9 @@ void AudioFileProcessorView::modelChanged( void )
|
||||
|
||||
|
||||
|
||||
AudioFileProcessorWaveView::AudioFileProcessorWaveView( QWidget * _parent, int _w, int _h, sampleBuffer & _buf ) :
|
||||
AudioFileProcessorWaveView::AudioFileProcessorWaveView( QWidget * _parent, int _w, int _h, SampleBuffer& buf ) :
|
||||
QWidget( _parent ),
|
||||
m_sampleBuffer( _buf ),
|
||||
m_sampleBuffer( buf ),
|
||||
m_graph( QPixmap( _w - 2 * s_padding, _h - 2 * s_padding ) ),
|
||||
m_from( 0 ),
|
||||
m_to( m_sampleBuffer.frames() ),
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* audio_file_processor.h - declaration of class audioFileProcessor
|
||||
* (instrument-plugin for using audio-files)
|
||||
*
|
||||
* Copyright (c) 2004-2008 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 "Instrument.h"
|
||||
#include "InstrumentView.h"
|
||||
#include "sample_buffer.h"
|
||||
#include "SampleBuffer.h"
|
||||
#include "knob.h"
|
||||
#include "pixmap_button.h"
|
||||
|
||||
@@ -81,9 +81,9 @@ signals:
|
||||
|
||||
|
||||
private:
|
||||
typedef sampleBuffer::handleState handleState;
|
||||
typedef SampleBuffer::handleState handleState;
|
||||
|
||||
sampleBuffer m_sampleBuffer;
|
||||
SampleBuffer m_sampleBuffer;
|
||||
|
||||
FloatModel m_ampModel;
|
||||
FloatModel m_startPointModel;
|
||||
@@ -219,7 +219,7 @@ private:
|
||||
sample_end,
|
||||
} ;
|
||||
|
||||
sampleBuffer & m_sampleBuffer;
|
||||
SampleBuffer& m_sampleBuffer;
|
||||
QPixmap m_graph;
|
||||
f_cnt_t m_from;
|
||||
f_cnt_t m_to;
|
||||
@@ -237,7 +237,7 @@ private:
|
||||
bool m_animation;
|
||||
|
||||
public:
|
||||
AudioFileProcessorWaveView( QWidget * _parent, int _w, int _h, sampleBuffer & _buf );
|
||||
AudioFileProcessorWaveView( QWidget * _parent, int _w, int _h, SampleBuffer& buf );
|
||||
void setKnobs( knob * _start, knob * _end );
|
||||
|
||||
|
||||
|
||||
@@ -192,9 +192,8 @@ void patmanInstrument::setFile( const QString & _patch_file, bool _rename )
|
||||
// else we don't touch the instrument-track-name, because the user
|
||||
// named it self
|
||||
|
||||
m_patchFile = sampleBuffer::tryToMakeRelative( _patch_file );
|
||||
LoadErrors error = loadPatch( sampleBuffer::tryToMakeAbsolute(
|
||||
_patch_file ) );
|
||||
m_patchFile = SampleBuffer::tryToMakeRelative( _patch_file );
|
||||
LoadErrors error = loadPatch( SampleBuffer::tryToMakeAbsolute( _patch_file ) );
|
||||
if( error )
|
||||
{
|
||||
printf("Load error\n");
|
||||
@@ -351,7 +350,7 @@ patmanInstrument::LoadErrors patmanInstrument::loadPatch(
|
||||
}
|
||||
}
|
||||
|
||||
sampleBuffer * psample = new sampleBuffer( data, frames );
|
||||
SampleBuffer* psample = new SampleBuffer( data, frames );
|
||||
psample->setFrequency( root_freq / 1000.0f );
|
||||
psample->setSampleRate( sample_rate );
|
||||
|
||||
@@ -390,10 +389,9 @@ void patmanInstrument::selectSample( notePlayHandle * _n )
|
||||
const float freq = _n->frequency();
|
||||
|
||||
float min_dist = HUGE_VALF;
|
||||
sampleBuffer * sample = NULL;
|
||||
SampleBuffer* sample = NULL;
|
||||
|
||||
for( QVector<sampleBuffer *>::iterator it = m_patchSamples.begin();
|
||||
it != m_patchSamples.end(); ++it )
|
||||
for( QVector<SampleBuffer *>::iterator it = m_patchSamples.begin(); it != m_patchSamples.end(); ++it )
|
||||
{
|
||||
float patch_freq = ( *it )->frequency();
|
||||
float dist = freq >= patch_freq ? freq / patch_freq :
|
||||
@@ -414,9 +412,9 @@ void patmanInstrument::selectSample( notePlayHandle * _n )
|
||||
}
|
||||
else
|
||||
{
|
||||
hdata->sample = new sampleBuffer( NULL, 0 );
|
||||
hdata->sample = new SampleBuffer( NULL, 0 );
|
||||
}
|
||||
hdata->state = new sampleBuffer::handleState( _n->hasDetuningInfo() );
|
||||
hdata->state = new SampleBuffer::handleState( _n->hasDetuningInfo() );
|
||||
|
||||
_n->m_pluginData = hdata;
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "Instrument.h"
|
||||
#include "InstrumentView.h"
|
||||
#include "sample_buffer.h"
|
||||
#include "SampleBuffer.h"
|
||||
#include "AutomatableModel.h"
|
||||
|
||||
|
||||
@@ -79,13 +79,13 @@ public slots:
|
||||
private:
|
||||
typedef struct
|
||||
{
|
||||
sampleBuffer::handleState * state;
|
||||
SampleBuffer::handleState* state;
|
||||
bool tuned;
|
||||
sampleBuffer * sample;
|
||||
SampleBuffer* sample;
|
||||
} handle_data;
|
||||
|
||||
QString m_patchFile;
|
||||
QVector<sampleBuffer *> m_patchSamples;
|
||||
QVector<SampleBuffer *> m_patchSamples;
|
||||
BoolModel m_loopedModel;
|
||||
BoolModel m_tunedModel;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* sf2_player.cpp - a soundfont2 player using fluidSynth
|
||||
*
|
||||
* Copyright (c) 2008 Paul Giblock <drfaygo/at/gmail/dot/com>
|
||||
* Copyright (c) 2009-2013 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2009-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -334,9 +334,8 @@ void sf2Instrument::openFile( const QString & _sf2File, bool updateTrackName )
|
||||
emit fileLoading();
|
||||
|
||||
// Used for loading file
|
||||
char * sf2Ascii = qstrdup( qPrintable(
|
||||
sampleBuffer::tryToMakeAbsolute( _sf2File ) ) );
|
||||
QString relativePath = sampleBuffer::tryToMakeRelative( _sf2File );
|
||||
char * sf2Ascii = qstrdup( qPrintable( SampleBuffer::tryToMakeAbsolute( _sf2File ) ) );
|
||||
QString relativePath = SampleBuffer::tryToMakeRelative( _sf2File );
|
||||
|
||||
// free reference to soundfont if one is selected
|
||||
freeFont();
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "lcd_spinbox.h"
|
||||
#include "led_checkbox.h"
|
||||
#include "fluidsynth.h"
|
||||
#include "sample_buffer.h"
|
||||
#include "SampleBuffer.h"
|
||||
|
||||
class sf2InstrumentView;
|
||||
class sf2Font;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* TripleOscillator.cpp - powerful instrument with three oscillators
|
||||
*
|
||||
* 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
|
||||
*
|
||||
@@ -35,7 +35,7 @@
|
||||
#include "knob.h"
|
||||
#include "note_play_handle.h"
|
||||
#include "pixmap_button.h"
|
||||
#include "sample_buffer.h"
|
||||
#include "SampleBuffer.h"
|
||||
#include "song_editor.h"
|
||||
#include "tooltip.h"
|
||||
|
||||
@@ -88,7 +88,7 @@ OscillatorObject::OscillatorObject( Model * _parent, int _idx ) :
|
||||
Oscillator::NumModulationAlgos-1, this,
|
||||
tr( "Modulation type %1" ).arg( _idx+1 ) ),
|
||||
|
||||
m_sampleBuffer( new sampleBuffer ),
|
||||
m_sampleBuffer( new SampleBuffer ),
|
||||
m_volumeLeft( 0.0f ),
|
||||
m_volumeRight( 0.0f ),
|
||||
m_detuningLeft( 0.0f ),
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* TripleOscillator.h - declaration of class TripleOscillator a powerful
|
||||
* instrument-plugin with 3 oscillators
|
||||
*
|
||||
* 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
|
||||
*
|
||||
@@ -36,7 +36,7 @@ class automatableButtonGroup;
|
||||
class knob;
|
||||
class notePlayHandle;
|
||||
class pixmapButton;
|
||||
class sampleBuffer;
|
||||
class SampleBuffer;
|
||||
|
||||
const int NUM_OF_OSCILLATORS = 3;
|
||||
|
||||
@@ -59,7 +59,7 @@ private:
|
||||
FloatModel m_stereoPhaseDetuningModel;
|
||||
IntModel m_waveShapeModel;
|
||||
IntModel m_modulationAlgoModel;
|
||||
sampleBuffer * m_sampleBuffer;
|
||||
SampleBuffer* m_sampleBuffer;
|
||||
|
||||
float m_volumeLeft;
|
||||
float m_volumeRight;
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
|
||||
#include "Instrument.h"
|
||||
#include "InstrumentView.h"
|
||||
#include "sample_buffer.h"
|
||||
#include "graph.h"
|
||||
#include "knob.h"
|
||||
#include "pixmap_button.h"
|
||||
|
||||
Reference in New Issue
Block a user