Whole code base: various cleanups, removed SINGLE_SOURCE_COMPILE relicts
* cleaned up code and improved coding style
* removed old SINGLE_SOURCE_COMPILE macro relicts
* use QString::toUtf8() instead of QString::toAscii() wherever possible
(cherry picked from commit 0bb54199b0)
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
* instrument.h - declaration of class instrument, which provides a
|
||||
* standard interface for all instrument plugins
|
||||
*
|
||||
* Copyright (c) 2005-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* Copyright (c) 2005-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -23,7 +23,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _INSTRUMENT_H
|
||||
#define _INSTRUMENT_H
|
||||
|
||||
@@ -80,20 +79,20 @@ public:
|
||||
// if no envelope is active - such instruments can re-implement this
|
||||
// method for returning how many frames they at least like to have for
|
||||
// release
|
||||
virtual f_cnt_t desiredReleaseFrames( void ) const
|
||||
virtual f_cnt_t desiredReleaseFrames() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// return false if instrument is not bendable
|
||||
inline virtual bool isBendable( void ) const
|
||||
inline virtual bool isBendable() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// return true if instruments reacts to MIDI events passed to
|
||||
// handleMidiEvent() rather than playNote() & Co
|
||||
inline virtual bool isMidiBased( void ) const
|
||||
inline virtual bool isMidiBased() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -106,7 +105,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual QString fullDisplayName( void ) const;
|
||||
virtual QString fullDisplayName() const;
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
// provided functions:
|
||||
@@ -121,7 +120,7 @@ public:
|
||||
|
||||
|
||||
protected:
|
||||
inline instrumentTrack * getInstrumentTrack( void ) const
|
||||
inline instrumentTrack * getInstrumentTrack() const
|
||||
{
|
||||
return m_instrumentTrack;
|
||||
}
|
||||
@@ -137,5 +136,4 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* midi.h - constants, structs etc. concerning MIDI
|
||||
*
|
||||
* Copyright (c) 2005-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -22,7 +22,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _MIDI_H
|
||||
#define _MIDI_H
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* sample_buffer.h - container-class sampleBuffer
|
||||
*
|
||||
* Copyright (c) 2005-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
class EXPORT handleState
|
||||
{
|
||||
public:
|
||||
handleState( bool _varying_pitch = FALSE );
|
||||
handleState( bool _varying_pitch = false );
|
||||
virtual ~handleState();
|
||||
|
||||
|
||||
@@ -66,16 +66,16 @@ public:
|
||||
// constructor which either loads sample _audio_file or decodes
|
||||
// base64-data out of string
|
||||
sampleBuffer( const QString & _audio_file = QString(),
|
||||
bool _is_base64_data = FALSE );
|
||||
bool _is_base64_data = false );
|
||||
sampleBuffer( const sampleFrame * _data, const f_cnt_t _frames );
|
||||
sampleBuffer( const f_cnt_t _frames );
|
||||
|
||||
|
||||
virtual ~sampleBuffer();
|
||||
|
||||
bool play( sampleFrame * _ab, handleState * _state,
|
||||
const fpp_t _frames,
|
||||
const float _freq,
|
||||
const bool _looped = FALSE );
|
||||
const bool _looped = false );
|
||||
|
||||
void visualize( QPainter & _p, const QRect & _dr, const QRect & _clip );
|
||||
inline void visualize( QPainter & _p, const QRect & _dr )
|
||||
@@ -83,17 +83,17 @@ public:
|
||||
visualize( _p, _dr, _dr );
|
||||
}
|
||||
|
||||
inline const QString & audioFile( void ) const
|
||||
inline const QString & audioFile() const
|
||||
{
|
||||
return m_audioFile;
|
||||
}
|
||||
|
||||
inline f_cnt_t startFrame( void ) const
|
||||
inline f_cnt_t startFrame() const
|
||||
{
|
||||
return m_startFrame;
|
||||
}
|
||||
|
||||
inline f_cnt_t endFrame( void ) const
|
||||
inline f_cnt_t endFrame() const
|
||||
{
|
||||
return m_endFrame;
|
||||
}
|
||||
@@ -112,22 +112,22 @@ public:
|
||||
m_varLock.unlock();
|
||||
}
|
||||
|
||||
inline f_cnt_t frames( void ) const
|
||||
inline f_cnt_t frames() const
|
||||
{
|
||||
return m_frames;
|
||||
}
|
||||
|
||||
inline float amplification( void ) const
|
||||
inline float amplification() const
|
||||
{
|
||||
return m_amplification;
|
||||
}
|
||||
|
||||
inline bool reversed( void ) const
|
||||
inline bool reversed() const
|
||||
{
|
||||
return m_reversed;
|
||||
}
|
||||
|
||||
inline float frequency( void ) const
|
||||
inline float frequency() const
|
||||
{
|
||||
return m_frequency;
|
||||
}
|
||||
@@ -146,12 +146,12 @@ public:
|
||||
m_varLock.unlock();
|
||||
}
|
||||
|
||||
inline const sampleFrame * data( void ) const
|
||||
inline const sampleFrame * data() const
|
||||
{
|
||||
return m_data;
|
||||
}
|
||||
|
||||
QString openAudioFile( void ) const;
|
||||
QString openAudioFile() const;
|
||||
|
||||
QString & toBase64( QString & _dst ) const;
|
||||
|
||||
@@ -170,7 +170,7 @@ public:
|
||||
}
|
||||
|
||||
void normalizeSampleRate( const sample_rate_t _src_sr,
|
||||
bool _keep_settings = FALSE );
|
||||
bool _keep_settings = false );
|
||||
|
||||
inline sample_t userWaveSample( const float _sample ) const
|
||||
{
|
||||
@@ -207,7 +207,7 @@ public slots:
|
||||
|
||||
|
||||
private:
|
||||
void update( bool _keep_settings = FALSE );
|
||||
void update( bool _keep_settings = false );
|
||||
|
||||
|
||||
f_cnt_t decodeSampleSF( const char * _f, int_sample_t * & _buf,
|
||||
@@ -222,7 +222,6 @@ private:
|
||||
ch_cnt_t & _channels,
|
||||
sample_rate_t & _sample_rate );
|
||||
|
||||
|
||||
QString m_audioFile;
|
||||
sampleFrame * m_origData;
|
||||
f_cnt_t m_origFrames;
|
||||
@@ -245,7 +244,7 @@ private:
|
||||
|
||||
|
||||
signals:
|
||||
void sampleUpdated( void );
|
||||
void sampleUpdated();
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user