Merge branch 'master'

This commit is contained in:
Hyunjin Song
2022-02-02 14:48:55 +09:00
1160 changed files with 56850 additions and 56708 deletions

View File

@@ -56,9 +56,6 @@ const int BYTES_PER_SURROUND_FRAME = sizeof( surroundSampleFrame );
const float OUTPUT_SAMPLE_MULTIPLIER = 32767.0f;
#include "PlayHandle.h"
class AudioEngineWorkerThread;

View File

@@ -71,11 +71,11 @@ public:
void setExtOutputEnabled( bool _enabled );
// next effect-channel after this audio-port
// next mixer-channel after this audio-port
// (-1 = none 0 = master)
inline fx_ch_t nextFxChannel() const
inline mix_ch_t nextMixerChannel() const
{
return m_nextFxChannel;
return m_nextMixerChannel;
}
inline EffectChain * effects()
@@ -83,9 +83,9 @@ public:
return m_effects.get();
}
void setNextFxChannel( const fx_ch_t _chnl )
void setNextMixerChannel( const mix_ch_t _chnl )
{
m_nextFxChannel = _chnl;
m_nextMixerChannel = _chnl;
}
@@ -116,7 +116,7 @@ private:
QMutex m_portBufferLock;
bool m_extOutputEnabled;
fx_ch_t m_nextFxChannel;
mix_ch_t m_nextMixerChannel;
QString m_name;

View File

@@ -1,6 +1,6 @@
/*
* AutomationPattern.h - declaration of class AutomationPattern, which contains
* all information about an automation pattern
* AutomationClip.h - declaration of class AutomationClip, which contains
* all information about an automation clip
*
* Copyright (c) 2008-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2006-2008 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
@@ -24,14 +24,14 @@
*
*/
#ifndef AUTOMATION_PATTERN_H
#define AUTOMATION_PATTERN_H
#ifndef AUTOMATION_CLIP_H
#define AUTOMATION_CLIP_H
#include <QtCore/QMap>
#include <QtCore/QPointer>
#include "AutomationNode.h"
#include "TrackContentObject.h"
#include "Clip.h"
class AutomationTrack;
@@ -39,7 +39,7 @@ class TimePos;
class LMMS_EXPORT AutomationPattern : public TrackContentObject
class LMMS_EXPORT AutomationClip : public Clip
{
Q_OBJECT
public:
@@ -55,9 +55,9 @@ public:
using TimemapIterator = timeMap::const_iterator;
AutomationPattern( AutomationTrack * _auto_track );
AutomationPattern( const AutomationPattern & _pat_to_copy );
virtual ~AutomationPattern() = default;
AutomationClip( AutomationTrack * _auto_track );
AutomationClip( const AutomationClip & _clip_to_copy );
virtual ~AutomationClip() = default;
bool addObject( AutomatableModel * _obj, bool _search_dup = true );
@@ -152,12 +152,12 @@ public:
static const QString classNodeName() { return "automationpattern"; }
QString nodeName() const override { return classNodeName(); }
TrackContentObjectView * createView( TrackView * _tv ) override;
ClipView * createView( TrackView * _tv ) override;
static bool isAutomated( const AutomatableModel * _m );
static QVector<AutomationPattern *> patternsForModel( const AutomatableModel * _m );
static AutomationPattern * globalAutomationPattern( AutomatableModel * _m );
static QVector<AutomationClip *> clipsForModel( const AutomatableModel * _m );
static AutomationClip * globalAutomationClip( AutomatableModel * _m );
static void resolveAllIDs();
bool isRecording() const { return m_isRecording; }
@@ -179,9 +179,9 @@ private:
void generateTangents(timeMap::iterator it, int numToGenerate);
float valueAt( timeMap::const_iterator v, int offset ) const;
// Mutex to make methods involving automation patterns thread safe
// Mutex to make methods involving automation clips thread safe
// Mutable so we can lock it from const objects
mutable QMutex m_patternMutex;
mutable QMutex m_clipMutex;
AutomationTrack * m_autoTrack;
QVector<jo_id_t> m_idsToResolve;
@@ -204,40 +204,40 @@ private:
static const float DEFAULT_MIN_VALUE;
static const float DEFAULT_MAX_VALUE;
friend class AutomationPatternView;
friend class AutomationClipView;
friend class AutomationNode;
} ;
//Short-hand functions to access node values in an automation pattern;
//Short-hand functions to access node values in an automation clip;
// replacement for CPP macros with the same purpose; could be refactored
// further in the future.
inline float INVAL(AutomationPattern::TimemapIterator it)
inline float INVAL(AutomationClip::TimemapIterator it)
{
return it->getInValue();
}
inline float OUTVAL(AutomationPattern::TimemapIterator it)
inline float OUTVAL(AutomationClip::TimemapIterator it)
{
return it->getOutValue();
}
inline float OFFSET(AutomationPattern::TimemapIterator it)
inline float OFFSET(AutomationClip::TimemapIterator it)
{
return it->getValueOffset();
}
inline float INTAN(AutomationPattern::TimemapIterator it)
inline float INTAN(AutomationClip::TimemapIterator it)
{
return it->getInTangent();
}
inline float OUTTAN(AutomationPattern::TimemapIterator it)
inline float OUTTAN(AutomationClip::TimemapIterator it)
{
return it->getOutTangent();
}
inline int POS(AutomationPattern::TimemapIterator it)
inline int POS(AutomationClip::TimemapIterator it)
{
return it.key();
}

View File

@@ -1,5 +1,5 @@
/*
* AutomationPatternView.h - declaration of class AutomationPatternView
* AutomationClipView.h - declaration of class AutomationClipView
*
* Copyright (c) 2008-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
@@ -22,28 +22,28 @@
*
*/
#ifndef AUTOMATION_PATTERN_VIEW_H
#define AUTOMATION_PATTERN_VIEW_H
#ifndef AUTOMATION_CLIP_VIEW_H
#define AUTOMATION_CLIP_VIEW_H
#include <QStaticText>
#include "AutomationPattern.h"
#include "AutomationClip.h"
#include "Song.h"
#include "SongEditor.h"
#include "TrackContentObjectView.h"
#include "ClipView.h"
class AutomationPatternView : public TrackContentObjectView
class AutomationClipView : public ClipView
{
Q_OBJECT
public:
AutomationPatternView( AutomationPattern * _pat, TrackView * _parent );
virtual ~AutomationPatternView();
AutomationClipView( AutomationClip * _clip, TrackView * _parent );
virtual ~AutomationClipView();
public slots:
/// Opens this view's pattern in the global automation editor
/// Opens this view's clip in the global automation editor
void openInAutomationEditor();
void update() override;
@@ -65,12 +65,12 @@ protected:
private:
AutomationPattern * m_pat;
AutomationClip * m_clip;
QPixmap m_paintPixmap;
QStaticText m_staticTextName;
static QPixmap * s_pat_rec;
static QPixmap * s_clip_rec;
void scaleTimemapToFit( float oldMin, float oldMax );
} ;

View File

@@ -34,7 +34,7 @@
#include "lmms_basics.h"
#include "JournallingObject.h"
#include "TimePos.h"
#include "AutomationPattern.h"
#include "AutomationClip.h"
#include "ComboBoxModel.h"
#include "Knob.h"
@@ -61,16 +61,16 @@ class AutomationEditor : public QWidget, public JournallingObject
Q_PROPERTY(QColor crossColor MEMBER m_crossColor)
Q_PROPERTY(QColor backgroundShade MEMBER m_backgroundShade)
public:
void setCurrentPattern(AutomationPattern * new_pattern);
void setCurrentClip(AutomationClip * new_clip);
inline const AutomationPattern * currentPattern() const
inline const AutomationClip * currentClip() const
{
return m_pattern;
return m_clip;
}
inline bool validPattern() const
inline bool validClip() const
{
return m_pattern != nullptr;
return m_clip != nullptr;
}
void saveSettings(QDomDocument & doc, QDomElement & parent) override;
@@ -89,11 +89,11 @@ public:
public slots:
void update();
void updateAfterPatternChange();
void updateAfterClipChange();
protected:
typedef AutomationPattern::timeMap timeMap;
typedef AutomationClip::timeMap timeMap;
void keyPressEvent(QKeyEvent * ke) override;
void leaveEvent(QEvent * e) override;
@@ -125,7 +125,7 @@ protected slots:
void setEditMode(AutomationEditor::EditModes mode);
void setEditMode(int mode);
void setProgressionType(AutomationPattern::ProgressionTypes type);
void setProgressionType(AutomationClip::ProgressionTypes type);
void setProgressionType(int type);
void setTension();
@@ -134,7 +134,7 @@ protected slots:
void zoomingXChanged();
void zoomingYChanged();
/// Updates the pattern's quantization using the current user selected value.
/// Updates the clip's quantization using the current user selected value.
void setQuantization();
private:
@@ -178,7 +178,7 @@ private:
FloatModel * m_tensionModel;
AutomationPattern * m_pattern;
AutomationClip * m_clip;
float m_minLevel;
float m_maxLevel;
float m_step;
@@ -234,7 +234,7 @@ private:
signals:
void currentPatternChanged();
void currentClipChanged();
void positionChanged( const TimePos & );
} ;
@@ -251,23 +251,23 @@ public:
AutomationEditorWindow();
~AutomationEditorWindow();
void setCurrentPattern(AutomationPattern* pattern);
const AutomationPattern* currentPattern();
void setCurrentClip(AutomationClip* clip);
const AutomationClip* currentClip();
void dropEvent( QDropEvent * _de ) override;
void dragEnterEvent( QDragEnterEvent * _dee ) override;
void open(AutomationPattern* pattern);
void open(AutomationClip* clip);
AutomationEditor* m_editor;
QSize sizeHint() const override;
public slots:
void clearCurrentPattern();
void clearCurrentClip();
signals:
void currentPatternChanged();
void currentClipChanged();
protected:
void focusInEvent(QFocusEvent * event) override;

View File

@@ -26,18 +26,18 @@
#ifndef AUTOMATION_NODE_H
#define AUTOMATION_NODE_H
class AutomationPattern;
class AutomationClip;
// Note: We use the default copy-assignment on the AutomationPattern constructor. It's
// Note: We use the default copy-assignment on the AutomationClip constructor. It's
// fine for now as we don't have dynamic allocated members, but if any are added we should
// have an user-defined one to perform a deep-copy.
class AutomationNode
{
public:
AutomationNode(); // Dummy constructor for the QMap
AutomationNode(AutomationPattern* pat, float value, int pos);
AutomationNode(AutomationPattern* pat, float inValue, float outValue, int pos);
AutomationNode(AutomationClip* clip, float value, int pos);
AutomationNode(AutomationClip* clip, float inValue, float outValue, int pos);
AutomationNode& operator+=(float f)
{
@@ -123,18 +123,18 @@ public:
}
/**
* @brief Sets the pattern this node belongs to
* @param AutomationPattern* pattern that m_pattern will be
* @brief Sets the clip this node belongs to
* @param AutomationClip* clip that m_clip will be
* set to
*/
inline void setPattern(AutomationPattern* pat)
inline void setClip(AutomationClip* clip)
{
m_pattern = pat;
m_clip = clip;
}
private:
// Pattern that this node belongs to
AutomationPattern* m_pattern;
// Clip that this node belongs to
AutomationClip* m_clip;
// Time position of this node (matches the timeMap key)
int m_pos;

View File

@@ -38,7 +38,7 @@ public:
virtual ~AutomationTrack() = default;
virtual bool play( const TimePos & _start, const fpp_t _frames,
const f_cnt_t _frame_base, int _tco_num = -1 ) override;
const f_cnt_t _frame_base, int _clip_num = -1 ) override;
QString nodeName() const override
{
@@ -46,7 +46,7 @@ public:
}
TrackView * createView( TrackContainerView* ) override;
TrackContentObject* createTCO(const TimePos & pos) override;
Clip* createClip(const TimePos & pos) override;
virtual void saveTrackSpecificSettings( QDomDocument & _doc,
QDomElement & _parent ) override;

View File

@@ -1,5 +1,5 @@
/*
* BBTCO.h
* BBClip.h
*
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
@@ -23,17 +23,17 @@
*/
#ifndef BB_TCO_H
#define BB_TCO_H
#ifndef BB_CLIP_H
#define BB_CLIP_H
#include "TrackContentObjectView.h"
#include "ClipView.h"
class BBTCO : public TrackContentObject
class BBClip : public Clip
{
public:
BBTCO( Track * _track );
virtual ~BBTCO() = default;
BBClip( Track * _track );
virtual ~BBClip() = default;
void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override;
void loadSettings( const QDomElement & _this ) override;
@@ -44,10 +44,10 @@ public:
int bbTrackIndex();
TrackContentObjectView * createView( TrackView * _tv ) override;
ClipView * createView( TrackView * _tv ) override;
private:
friend class BBTCOView;
friend class BBClipView;
} ;

View File

@@ -1,5 +1,5 @@
/*
* BBTCOView.h
* BBClipView.h
*
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
@@ -23,20 +23,20 @@
*/
#ifndef BB_TCO_VIEW_H
#define BB_TCO_VIEW_H
#ifndef BB_CLIP_VIEW_H
#define BB_CLIP_VIEW_H
#include "BBTCO.h"
#include "BBClip.h"
#include <QStaticText>
class BBTCOView : public TrackContentObjectView
class BBClipView : public ClipView
{
Q_OBJECT
public:
BBTCOView( TrackContentObject * _tco, TrackView * _tv );
virtual ~BBTCOView() = default;
BBClipView( Clip * _clip, TrackView * _tv );
virtual ~BBClipView() = default;
public slots:
@@ -55,7 +55,7 @@ protected:
private:
BBTCO * m_bbTCO;
BBClip * m_bbClip;
QPixmap m_paintPixmap;
QStaticText m_staticTextName;

View File

@@ -71,7 +71,7 @@ class BBTrackContainerView : public TrackContainerView
public:
BBTrackContainerView(BBTrackContainer* tc);
bool fixedTCOs() const override
bool fixedClips() const override
{
return true;
}
@@ -87,7 +87,7 @@ public slots:
void removeSteps();
void addSampleTrack();
void addAutomationTrack();
void clonePattern();
void cloneClip();
protected slots:
void dropEvent(QDropEvent * de ) override;

View File

@@ -30,7 +30,7 @@
#include <QtCore/QMap>
#include "BBTCOView.h"
#include "BBClipView.h"
#include "Track.h"
class TrackLabelButton;
@@ -45,9 +45,9 @@ public:
virtual ~BBTrack();
virtual bool play( const TimePos & _start, const fpp_t _frames,
const f_cnt_t _frame_base, int _tco_num = -1 ) override;
const f_cnt_t _frame_base, int _clip_num = -1 ) override;
TrackView * createView( TrackContainerView* tcv ) override;
TrackContentObject* createTCO(const TimePos & pos) override;
Clip* createClip(const TimePos & pos) override;
virtual void saveTrackSpecificSettings( QDomDocument & _doc,
QDomElement & _parent ) override;

View File

@@ -38,7 +38,7 @@ public:
BBTrackContainer();
virtual ~BBTrackContainer();
virtual bool play(TimePos start, const fpp_t frames, const f_cnt_t frameBase, int tcoNum = -1);
virtual bool play(TimePos start, const fpp_t frames, const f_cnt_t frameBase, int clipNum = -1);
void updateAfterTrackAdd() override;
@@ -57,11 +57,11 @@ public:
void swapBB(int bb1, int bb2);
void updateBBTrack(TrackContentObject * tco);
void updateBBTrack(Clip * clip);
void fixIncorrectPositions();
void createTCOsForBB(int bb);
void createClipsForBB(int bb);
AutomatedValueMap automatedValuesAt(TimePos time, int tcoNum) const override;
AutomatedValueMap automatedValuesAt(TimePos time, int clipNum) const override;
public slots:
void play();

View File

@@ -1,5 +1,5 @@
/*
* TrackConteintObject.h - declaration of TrackContentObject class
* TrackConteintObject.h - declaration of Clip class
*
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
@@ -32,20 +32,20 @@
class Track;
class TrackContentObjectView;
class ClipView;
class TrackContainer;
class TrackView;
class LMMS_EXPORT TrackContentObject : public Model, public JournallingObject
class LMMS_EXPORT Clip : public Model, public JournallingObject
{
Q_OBJECT
MM_OPERATORS
mapPropertyFromModel(bool,isMuted,setMuted,m_mutedModel);
mapPropertyFromModel(bool,isSolo,setSolo,m_soloModel);
public:
TrackContentObject( Track * track );
virtual ~TrackContentObject();
Clip( Track * track );
virtual ~Clip();
inline Track * getTrack() const
{
@@ -117,7 +117,7 @@ public:
virtual void movePosition( const TimePos & pos );
virtual void changeLength( const TimePos & length );
virtual TrackContentObjectView * createView( TrackView * tv ) = 0;
virtual ClipView * createView( TrackView * tv ) = 0;
inline void selectViewOnCreate( bool select )
{
@@ -130,13 +130,13 @@ public:
}
/// Returns true if and only if a->startPosition() < b->startPosition()
static bool comparePosition(const TrackContentObject* a, const TrackContentObject* b);
static bool comparePosition(const Clip* a, const Clip* b);
TimePos startTimeOffset() const;
void setStartTimeOffset( const TimePos &startTimeOffset );
// Will copy the state of a TCO to another TCO
static void copyStateTo( TrackContentObject *src, TrackContentObject *dst );
// Will copy the state of a clip to another clip
static void copyStateTo( Clip *src, Clip *dst );
public slots:
void toggleMute();
@@ -145,7 +145,7 @@ public slots:
signals:
void lengthChanged();
void positionChanged();
void destroyedTCO();
void destroyedClip();
void colorChanged();
@@ -173,7 +173,7 @@ private:
QColor m_color;
bool m_useCustomClipColor;
friend class TrackContentObjectView;
friend class ClipView;
} ;

View File

@@ -1,5 +1,5 @@
/*
* TrackContentObjectView.h - declaration of TrackContentObjectView class
* ClipView.h - declaration of ClipView class
*
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
@@ -30,7 +30,7 @@
#include "ModelView.h"
#include "Rubberband.h"
#include "TrackContentObject.h"
#include "Clip.h"
class QMenu;
@@ -38,11 +38,11 @@ class QContextMenuEvent;
class DataFile;
class TextFloat;
class TrackContentObject;
class Clip;
class TrackView;
class TrackContentObjectView : public selectableObject, public ModelView
class ClipView : public selectableObject, public ModelView
{
Q_OBJECT
@@ -53,7 +53,7 @@ class TrackContentObjectView : public selectableObject, public ModelView
Q_PROPERTY( QColor textColor READ textColor WRITE setTextColor )
Q_PROPERTY( QColor textBackgroundColor READ textBackgroundColor WRITE setTextBackgroundColor )
Q_PROPERTY( QColor textShadowColor READ textShadowColor WRITE setTextShadowColor )
Q_PROPERTY( QColor BBPatternBackground READ BBPatternBackground WRITE setBBPatternBackground )
Q_PROPERTY( QColor BBClipBackground READ BBClipBackground WRITE setBBClipBackground )
Q_PROPERTY( bool gradient READ gradient WRITE setGradient )
// We have to use a QSize here because using QPoint isn't supported.
// width -> x, height -> y
@@ -61,14 +61,14 @@ class TrackContentObjectView : public selectableObject, public ModelView
Q_PROPERTY( QSize mouseHotspotKnife MEMBER m_mouseHotspotKnife )
public:
TrackContentObjectView( TrackContentObject * tco, TrackView * tv );
virtual ~TrackContentObjectView();
ClipView( Clip * clip, TrackView * tv );
virtual ~ClipView();
bool fixedTCOs();
bool fixedClips();
inline TrackContentObject * getTrackContentObject()
inline Clip * getClip()
{
return m_tco;
return m_clip;
}
inline TrackView * getTrackView()
@@ -83,7 +83,7 @@ public:
QColor textColor() const;
QColor textBackgroundColor() const;
QColor textShadowColor() const;
QColor BBPatternBackground() const;
QColor BBClipBackground() const;
bool gradient() const;
void setMutedColor( const QColor & c );
void setMutedBackgroundColor( const QColor & c );
@@ -91,30 +91,30 @@ public:
void setTextColor( const QColor & c );
void setTextBackgroundColor( const QColor & c );
void setTextShadowColor( const QColor & c );
void setBBPatternBackground( const QColor & c );
void setBBClipBackground( const QColor & c );
void setGradient( const bool & b );
// access needsUpdate member variable
bool needsUpdate();
void setNeedsUpdate( bool b );
// Method to get a QVector of TCOs to be affected by a context menu action
QVector<TrackContentObjectView *> getClickedTCOs();
// Method to get a QVector of Clips to be affected by a context menu action
QVector<ClipView *> getClickedClips();
// Methods to remove, copy, cut, paste and mute a QVector of TCO views
void copy( QVector<TrackContentObjectView *> tcovs );
void cut( QVector<TrackContentObjectView *> tcovs );
// Methods to remove, copy, cut, paste and mute a QVector of Clip views
void copy( QVector<ClipView *> clipvs );
void cut( QVector<ClipView *> clipvs );
void paste();
// remove and toggleMute are static because they don't depend
// being called from a particular TCO view, but can be called anywhere as long
// as a valid TCO view list is given, while copy/cut require an instance for
// being called from a particular Clip view, but can be called anywhere as long
// as a valid Clip view list is given, while copy/cut require an instance for
// some metadata to be written to the clipboard.
static void remove( QVector<TrackContentObjectView *> tcovs );
static void toggleMute( QVector<TrackContentObjectView *> tcovs );
static void mergeTCOs(QVector<TrackContentObjectView*> tcovs);
static void remove( QVector<ClipView *> clipvs );
static void toggleMute( QVector<ClipView *> clipvs );
static void mergeClips(QVector<ClipView*> clipvs);
// Returns true if selection can be merged and false if not
static bool canMergeSelection(QVector<TrackContentObjectView*> tcovs);
static bool canMergeSelection(QVector<ClipView*> clipvs);
QColor getColorForDisplay( QColor );
@@ -142,8 +142,8 @@ protected:
};
TrackView * m_trackView;
TimePos m_initialTCOPos;
TimePos m_initialTCOEnd;
TimePos m_initialClipPos;
TimePos m_initialClipEnd;
bool m_marker = false;
int m_markerPos = 0;
@@ -171,7 +171,7 @@ protected:
float pixelsPerBar();
DataFile createTCODataFiles(const QVector<TrackContentObjectView *> & tcos) const;
DataFile createClipDataFiles(const QVector<ClipView *> & clips) const;
virtual void paintTextLabel(QString const & text, QPainter & painter);
@@ -196,7 +196,7 @@ private:
static TextFloat * s_textFloat;
TrackContentObject * m_tco;
Clip * m_clip;
Actions m_action;
QPoint m_initialMousePos;
QPoint m_initialMouseGlobalPos;
@@ -211,7 +211,7 @@ private:
QColor m_textColor;
QColor m_textBackgroundColor;
QColor m_textShadowColor;
QColor m_BBPatternBackground;
QColor m_BBClipBackground;
bool m_gradient;
QSize m_mouseHotspotHand; // QSize must be used because QPoint
QSize m_mouseHotspotKnife; // isn't supported by property system
@@ -224,17 +224,17 @@ private:
{
m_initialMousePos = pos;
m_initialMouseGlobalPos = mapToGlobal( pos );
m_initialTCOPos = m_tco->startPosition();
m_initialTCOEnd = m_initialTCOPos + m_tco->length();
m_initialClipPos = m_clip->startPosition();
m_initialClipEnd = m_initialClipPos + m_clip->length();
}
void setInitialOffsets();
bool mouseMovedDistance( QMouseEvent * me, int distance );
TimePos draggedTCOPos( QMouseEvent * me );
TimePos draggedClipPos( QMouseEvent * me );
int knifeMarkerPos( QMouseEvent * me );
void setColor(const QColor* color);
//! Return true iff TCO could be split. Currently only implemented for samples
virtual bool splitTCO( const TimePos pos ){ return false; };
//! Return true iff the clip could be split. Currently only implemented for samples
virtual bool splitClip( const TimePos pos ){ return false; };
void updateCursor(QMouseEvent * me);
} ;

View File

@@ -1,5 +1,5 @@
/*
* Clipboard.h - the clipboard for patterns, notes etc.
* Clipboard.h - the clipboard for clips, notes etc.
*
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*

View File

@@ -274,6 +274,7 @@ private:
void upgrade_1_1_90();
void upgrade_1_1_91();
void upgrade_1_2_2();
void upgrade();
// List of all upgrade methods

View File

@@ -53,7 +53,7 @@ public:
ClipboardData,
JournalData,
EffectSettings,
NotePattern,
MidiClip,
TypeCount
} ;
typedef Types Type;
@@ -122,6 +122,7 @@ private:
void upgrade_automationNodes();
void upgrade_extendedNoteRange();
void upgrade_defaultTripleOscillatorHQ();
void upgrade_mixerRename();
// List of all upgrade methods
static const std::vector<UpgradeMethod> UPGRADE_METHODS;

View File

@@ -36,7 +36,7 @@
class AudioEngine;
class BBTrackContainer;
class FxMixer;
class Mixer;
class ProjectJournal;
class Song;
class Ladspa2LMMS;
@@ -67,9 +67,9 @@ public:
return s_audioEngine;
}
static FxMixer * fxMixer()
static Mixer * mixer()
{
return s_fxMixer;
return s_mixer;
}
static Song * getSong()
@@ -141,7 +141,7 @@ private:
// core
static AudioEngine *s_audioEngine;
static FxMixer * s_fxMixer;
static Mixer * s_mixer;
static Song * s_song;
static BBTrackContainer * s_bbTrackContainer;
static ProjectJournal * s_projectJournal;

View File

@@ -1,5 +1,5 @@
/*
* Fader.h - fader-widget used in FX-mixer - partly taken from Hydrogen
* Fader.h - fader-widget used in Mixer - partly taken from Hydrogen
*
* Copyright (c) 2008-2012 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*

View File

@@ -35,7 +35,7 @@ class QLabel;
class AutomationEditorWindow;
class BBEditor;
class ControllerRackView;
class FxMixerView;
class MixerView;
class MainWindow;
class MicrotunerConfig;
class PianoRollWindow;
@@ -55,7 +55,7 @@ public:
#endif
MainWindow* mainWindow() { return m_mainWindow; }
FxMixerView* fxMixerView() { return m_fxMixerView; }
MixerView* mixerView() { return m_mixerView; }
SongEditorWindow* songEditor() { return m_songEditor; }
BBEditor* getBBEditor() { return m_bbEditor; }
PianoRollWindow* pianoRoll() { return m_pianoRoll; }
@@ -74,7 +74,7 @@ private:
static GuiApplication* s_instance;
MainWindow* m_mainWindow;
FxMixerView* m_fxMixerView;
MixerView* m_mixerView;
SongEditorWindow* m_songEditor;
AutomationEditorWindow* m_automationEditor;
BBEditor* m_bbEditor;

View File

@@ -26,7 +26,7 @@
#define INLINE_AUTOMATION_H
#include "AutomationNode.h"
#include "AutomationPattern.h"
#include "AutomationClip.h"
#include "shared_object.h"
@@ -36,15 +36,15 @@ public:
InlineAutomation() :
FloatModel(),
sharedObject(),
m_autoPattern( nullptr )
m_autoClip( nullptr )
{
}
virtual ~InlineAutomation()
{
if( m_autoPattern )
if( m_autoClip )
{
delete m_autoPattern;
delete m_autoClip;
}
}
@@ -52,16 +52,16 @@ public:
bool hasAutomation() const
{
if( m_autoPattern != nullptr && m_autoPattern->getTimeMap().isEmpty() == false )
if( m_autoClip != nullptr && m_autoClip->getTimeMap().isEmpty() == false )
{
// Prevent saving inline automation if there's just one node at the beginning of
// the pattern, which has a InValue equal to the value of model (which is going
// the clip, which has a InValue equal to the value of model (which is going
// to be saved anyways) and no offset between the InValue and OutValue
AutomationPattern::timeMap::const_iterator firstNode =
m_autoPattern->getTimeMap().begin();
AutomationClip::timeMap::const_iterator firstNode =
m_autoClip->getTimeMap().begin();
if (isAtInitValue()
&& m_autoPattern->getTimeMap().size() == 1
&& m_autoClip->getTimeMap().size() == 1
&& POS(firstNode) == 0
&& INVAL(firstNode) == value()
&& OFFSET(firstNode) == 0)
@@ -75,14 +75,14 @@ public:
return false;
}
AutomationPattern * automationPattern()
AutomationClip * automationClip()
{
if( m_autoPattern == nullptr )
if( m_autoClip == nullptr )
{
m_autoPattern = new AutomationPattern( nullptr );
m_autoPattern->addObject( this );
m_autoClip = new AutomationClip( nullptr );
m_autoClip->addObject( this );
}
return m_autoPattern;
return m_autoClip;
}
void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override;
@@ -90,7 +90,7 @@ public:
private:
AutomationPattern * m_autoPattern;
AutomationClip * m_autoClip;
} ;

View File

@@ -111,12 +111,12 @@ public:
// play everything in given frame-range - creates note-play-handles
virtual bool play( const TimePos & _start, const fpp_t _frames,
const f_cnt_t _frame_base, int _tco_num = -1 ) override;
const f_cnt_t _frame_base, int _clip_num = -1 ) override;
// create new view for me
TrackView * createView( TrackContainerView* tcv ) override;
// create new track-content-object = pattern
TrackContentObject* createTCO(const TimePos & pos) override;
// create new track-content-object = clip
Clip* createClip(const TimePos & pos) override;
// called by track
@@ -207,9 +207,9 @@ public:
return &m_pitchRangeModel;
}
IntModel * effectChannelModel()
IntModel * mixerChannelModel()
{
return &m_effectChannelModel;
return &m_mixerChannelModel;
}
void setPreviewMode( const bool );
@@ -245,7 +245,7 @@ protected slots:
void updateBaseNote();
void updatePitch();
void updatePitchRange();
void updateEffectChannel();
void updateMixerChannel();
private:
@@ -281,7 +281,7 @@ private:
FloatModel m_pitchModel;
IntModel m_pitchRangeModel;
IntModel m_effectChannelModel;
IntModel m_mixerChannelModel;
BoolModel m_useMasterPitchModel;
Instrument * m_instrument;

View File

@@ -64,7 +64,7 @@ public:
}
// Create a menu for assigning/creating channels for this track
QMenu * createFxMenu( QString title, QString newFxLabel ) override;
QMenu * createMixerMenu( QString title, QString newMixerLabel ) override;
protected:
@@ -82,8 +82,8 @@ private slots:
void midiOutSelected();
void midiConfigChanged();
void assignFxLine( int channelIndex );
void createFxLine();
void assignMixerLine( int channelIndex );
void createMixerLine();
void handleConfigChange(QString cls, QString attr, QString value);

View File

@@ -32,7 +32,7 @@
class EffectRackView;
class FxLineLcdSpinBox;
class MixerLineLcdSpinBox;
class InstrumentFunctionArpeggioView;
class InstrumentFunctionNoteStackingView;
class InstrumentMidiIOView;
@@ -135,7 +135,7 @@ private:
QLabel * m_pitchLabel;
LcdSpinBox* m_pitchRangeSpinBox;
QLabel * m_pitchRangeLabel;
FxLineLcdSpinBox * m_effectChannelNumber;
MixerLineLcdSpinBox * m_mixerChannelNumber;

View File

@@ -153,7 +153,7 @@ public slots:
void toggleSongEditorWin();
void toggleProjectNotesWin();
void toggleMicrotunerWin();
void toggleFxMixerWin();
void toggleMixerWin();
void togglePianoRollWin();
void toggleControllerRack();
void toggleFullscreen();

View File

@@ -1,6 +1,6 @@
/*
* Pattern.h - declaration of class Pattern, which contains all information
* about a pattern
* MidiClip.h - declaration of class MidiClip, which contains all information
* about a clip
*
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
@@ -23,32 +23,32 @@
*
*/
#ifndef PATTERN_H
#define PATTERN_H
#ifndef MIDI_CLIP_H
#define MIDI_CLIP_H
#include <QStaticText>
#include "Note.h"
#include "PatternView.h"
#include "TrackContentObjectView.h"
#include "MidiClipView.h"
#include "ClipView.h"
class InstrumentTrack;
class LMMS_EXPORT Pattern : public TrackContentObject
class LMMS_EXPORT MidiClip : public Clip
{
Q_OBJECT
public:
enum PatternTypes
enum MidiClipTypes
{
BeatPattern,
MelodyPattern
BeatClip,
MelodyClip
} ;
Pattern( InstrumentTrack* instrumentTrack );
Pattern( const Pattern& other );
virtual ~Pattern();
MidiClip( InstrumentTrack* instrumentTrack );
MidiClip( const MidiClip& other );
virtual ~MidiClip();
void init();
@@ -75,22 +75,23 @@ public:
// Split the list of notes on the given position
void splitNotes(NoteVector notes, TimePos pos);
// pattern-type stuff
inline PatternTypes type() const
// clip-type stuff
inline MidiClipTypes type() const
{
return m_patternType;
return m_clipType;
}
// next/previous track based on position in the containing track
Pattern * previousPattern() const;
Pattern * nextPattern() const;
MidiClip * previousMidiClip() const;
MidiClip * nextMidiClip() const;
// settings-management
void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override;
void loadSettings( const QDomElement & _this ) override;
inline QString nodeName() const override
{
//TODO: rename to "midiClip"
return "pattern";
}
@@ -102,7 +103,7 @@ public:
bool empty();
TrackContentObjectView * createView( TrackView * _tv ) override;
ClipView * createView( TrackView * _tv ) override;
using Model::dataChanged;
@@ -121,29 +122,29 @@ protected slots:
private:
TimePos beatPatternLength() const;
TimePos beatClipLength() const;
void setType( PatternTypes _new_pattern_type );
void setType( MidiClipTypes _new_clip_type );
void checkType();
void resizeToFirstTrack();
InstrumentTrack * m_instrumentTrack;
PatternTypes m_patternType;
MidiClipTypes m_clipType;
// data-stuff
NoteVector m_notes;
int m_steps;
Pattern * adjacentPatternByOffset(int offset) const;
MidiClip * adjacentMidiClipByOffset(int offset) const;
friend class PatternView;
friend class MidiClipView;
friend class BBTrackContainerView;
signals:
void destroyedPattern( Pattern* );
void destroyedMidiClip( MidiClip* );
} ;

View File

@@ -1,5 +1,5 @@
/*
* PatternView.h
* MidiClipView.h
*
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
@@ -22,22 +22,22 @@
*
*/
#ifndef PATTERN_VIEW_H
#define PATTERN_VIEW_H
#ifndef MIDI_CLIP_VIEW_H
#define MIDI_CLIP_VIEW_H
#include "Pattern.h"
#include "TrackContentObjectView.h"
#include "MidiClip.h"
#include "ClipView.h"
class Pattern;
class MidiClip;
class PatternView : public TrackContentObjectView
class MidiClipView : public ClipView
{
Q_OBJECT
public:
PatternView( Pattern* pattern, TrackView* parent );
virtual ~PatternView() = default;
MidiClipView( MidiClip* clip, TrackView* parent );
virtual ~MidiClipView() = default;
Q_PROPERTY(QColor noteFillColor READ getNoteFillColor WRITE setNoteFillColor)
Q_PROPERTY(QColor noteBorderColor READ getNoteBorderColor WRITE setNoteBorderColor)
@@ -57,7 +57,7 @@ public:
void setMutedNoteBorderColor(QColor const & color) { m_mutedNoteBorderColor = color; }
public slots:
Pattern* getPattern();
MidiClip* getMidiClip();
void update() override;
@@ -83,7 +83,7 @@ private:
static QPixmap * s_stepBtnOff;
static QPixmap * s_stepBtnOffLight;
Pattern* m_pat;
MidiClip* m_clip;
QPixmap m_paintPixmap;
QColor m_noteFillColor;
@@ -98,4 +98,4 @@ private:
#endif
#endif

View File

@@ -1,5 +1,5 @@
/*
* FxMixer.h - effect-mixer for LMMS
* Mixer.h - effect-mixer for LMMS
*
* Copyright (c) 2008-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
@@ -22,8 +22,8 @@
*
*/
#ifndef FX_MIXER_H
#define FX_MIXER_H
#ifndef MIXER_H
#define MIXER_H
#include "Model.h"
#include "EffectChain.h"
@@ -34,14 +34,14 @@
#include <QColor>
class FxRoute;
typedef QVector<FxRoute *> FxRouteVector;
class MixerRoute;
typedef QVector<MixerRoute *> MixerRouteVector;
class FxChannel : public ThreadableJob
class MixerChannel : public ThreadableJob
{
public:
FxChannel( int idx, Model * _parent );
virtual ~FxChannel();
MixerChannel( int idx, Model * _parent );
virtual ~MixerChannel();
EffectChain m_fxChain;
@@ -64,10 +64,10 @@ class FxChannel : public ThreadableJob
bool m_muted; // are we muted? updated per period so we don't have to call m_muteModel.value() twice
// pointers to other channels that this one sends to
FxRouteVector m_sends;
MixerRouteVector m_sends;
// pointers to other channels that send to this one
FxRouteVector m_receives;
MixerRouteVector m_receives;
bool requiresProcessing() const override { return true; }
void unmuteForSolo();
@@ -93,19 +93,19 @@ class FxChannel : public ThreadableJob
};
class FxRoute : public QObject
class MixerRoute : public QObject
{
Q_OBJECT
public:
FxRoute( FxChannel * from, FxChannel * to, float amount );
virtual ~FxRoute();
MixerRoute( MixerChannel * from, MixerChannel * to, float amount );
virtual ~MixerRoute();
fx_ch_t senderIndex() const
mix_ch_t senderIndex() const
{
return m_from->m_channelIndex;
}
fx_ch_t receiverIndex() const
mix_ch_t receiverIndex() const
{
return m_to->m_channelIndex;
}
@@ -115,12 +115,12 @@ class FxRoute : public QObject
return &m_amount;
}
FxChannel * sender() const
MixerChannel * sender() const
{
return m_from;
}
FxChannel * receiver() const
MixerChannel * receiver() const
{
return m_to;
}
@@ -128,20 +128,20 @@ class FxRoute : public QObject
void updateName();
private:
FxChannel * m_from;
FxChannel * m_to;
MixerChannel * m_from;
MixerChannel * m_to;
FloatModel m_amount;
};
class LMMS_EXPORT FxMixer : public Model, public JournallingObject
class LMMS_EXPORT Mixer : public Model, public JournallingObject
{
Q_OBJECT
public:
FxMixer();
virtual ~FxMixer();
Mixer();
virtual ~Mixer();
void mixToChannel( const sampleFrame * _buf, fx_ch_t _ch );
void mixToChannel( const sampleFrame * _buf, mix_ch_t _ch );
void prepareMasterMix();
void masterMix( sampleFrame * _buf );
@@ -151,38 +151,38 @@ public:
QString nodeName() const override
{
return "fxmixer";
return "mixer";
}
FxChannel * effectChannel( int _ch )
MixerChannel * mixerChannel( int _ch )
{
return m_fxChannels[_ch];
return m_mixerChannels[_ch];
}
// make the output of channel fromChannel go to the input of channel toChannel
// it is safe to call even if the send already exists
FxRoute * createChannelSend(fx_ch_t fromChannel, fx_ch_t toChannel,
MixerRoute * createChannelSend(mix_ch_t fromChannel, mix_ch_t toChannel,
float amount = 1.0f);
FxRoute * createRoute( FxChannel * from, FxChannel * to, float amount );
MixerRoute * createRoute( MixerChannel * from, MixerChannel * to, float amount );
// delete the connection made by createChannelSend
void deleteChannelSend(fx_ch_t fromChannel, fx_ch_t toChannel);
void deleteChannelSend( FxRoute * route );
void deleteChannelSend(mix_ch_t fromChannel, mix_ch_t toChannel);
void deleteChannelSend( MixerRoute * route );
// determine if adding a send from sendFrom to
// sendTo would result in an infinite mixer loop.
bool isInfiniteLoop(fx_ch_t fromChannel, fx_ch_t toChannel);
bool checkInfiniteLoop( FxChannel * from, FxChannel * to );
bool isInfiniteLoop(mix_ch_t fromChannel, mix_ch_t toChannel);
bool checkInfiniteLoop( MixerChannel * from, MixerChannel * to );
// return the FloatModel of fromChannel sending its output to the input of
// toChannel. NULL if there is no send.
FloatModel * channelSendModel(fx_ch_t fromChannel, fx_ch_t toChannel);
FloatModel * channelSendModel(mix_ch_t fromChannel, mix_ch_t toChannel);
// add a new channel to the Fx Mixer.
// add a new channel to the mixer.
// returns the index of the channel that was just added
int createChannel();
// delete a channel from the FX mixer.
// delete a channel from the mixer.
void deleteChannel(int index);
// delete all the mixer channels except master and remove all effects
@@ -193,7 +193,7 @@ public:
void moveChannelRight(int index);
// reset a channel's name, fx, sends, etc
void clearChannel(fx_ch_t channelIndex);
void clearChannel(mix_ch_t channelIndex);
// rename channels when moving etc. if they still have their original name
void validateChannelName( int index, int oldIndex );
@@ -202,22 +202,21 @@ public:
void activateSolo();
void deactivateSolo();
inline fx_ch_t numChannels() const
inline mix_ch_t numChannels() const
{
return m_fxChannels.size();
return m_mixerChannels.size();
}
FxRouteVector m_fxRoutes;
MixerRouteVector m_mixerRoutes;
private:
// the fx channels in the mixer. index 0 is always master.
QVector<FxChannel *> m_fxChannels;
// the mixer channels in the mixer. index 0 is always master.
QVector<MixerChannel *> m_mixerChannels;
// make sure we have at least num channels
void allocateChannelsTo(int num);
int m_lastSoloed;
} ;

View File

@@ -1,5 +1,5 @@
/*
* FxLine.h - FX line widget
* MixerLine.h - Mixer line widget
*
* Copyright (c) 2009 Andrew Kelley <superjoe30/at/gmail/dot/com>
* Copyright (c) 2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
@@ -23,8 +23,8 @@
*
*/
#ifndef FX_LINE_H
#define FX_LINE_H
#ifndef MIXER_LINE_H
#define MIXER_LINE_H
#include <QColorDialog>
#include <QGraphicsView>
@@ -38,10 +38,10 @@
class FxMixerView;
class MixerView;
class SendButtonIndicator;
class FxLine : public QWidget
class MixerLine : public QWidget
{
Q_OBJECT
public:
@@ -50,8 +50,8 @@ public:
Q_PROPERTY( QColor strokeOuterInactive READ strokeOuterInactive WRITE setStrokeOuterInactive )
Q_PROPERTY( QColor strokeInnerActive READ strokeInnerActive WRITE setStrokeInnerActive )
Q_PROPERTY( QColor strokeInnerInactive READ strokeInnerInactive WRITE setStrokeInnerInactive )
FxLine( QWidget * _parent, FxMixerView * _mv, int _channelIndex);
~FxLine();
MixerLine( QWidget * _parent, MixerView * _mv, int _channelIndex);
~MixerLine();
void paintEvent( QPaintEvent * ) override;
void mousePressEvent( QMouseEvent * ) override;
@@ -79,15 +79,15 @@ public:
QColor strokeInnerInactive() const;
void setStrokeInnerInactive( const QColor & c );
static const int FxLineHeight;
static const int MixerLineHeight;
bool eventFilter (QObject *dist, QEvent *event) override;
private:
void drawFxLine( QPainter* p, const FxLine *fxLine, bool isActive, bool sendToThis, bool receiveFromThis );
void drawMixerLine( QPainter* p, const MixerLine *mixerLine, bool isActive, bool sendToThis, bool receiveFromThis );
QString elideName( const QString & name );
FxMixerView * m_mv;
MixerView * m_mv;
LcdWidget* m_lcd;
int m_channelIndex;
QBrush m_backgroundActive;
@@ -116,4 +116,4 @@ private slots:
};
#endif // FXLINE_H
#endif // MIXERLINE_H

View File

@@ -1,5 +1,5 @@
/*
* FxLineLcdSpinBox.h - a specialization of LcdSpnBox for setting FX channels
* MixerLineLcdSpinBox.h - a specialization of LcdSpnBox for setting mixer channels
*
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
@@ -22,22 +22,22 @@
*
*/
#ifndef FX_LINE_LCD_SPIN_BOX_H
#define FX_LINE_LCD_SPIN_BOX_H
#ifndef MIXER_LINE_LCD_SPIN_BOX_H
#define MIXER_LINE_LCD_SPIN_BOX_H
#include "LcdSpinBox.h"
class TrackView;
class FxLineLcdSpinBox : public LcdSpinBox
class MixerLineLcdSpinBox : public LcdSpinBox
{
Q_OBJECT
public:
FxLineLcdSpinBox(int numDigits, QWidget * parent, const QString& name, TrackView * tv = nullptr) :
MixerLineLcdSpinBox(int numDigits, QWidget * parent, const QString& name, TrackView * tv = nullptr) :
LcdSpinBox(numDigits, parent, name), m_tv(tv)
{}
virtual ~FxLineLcdSpinBox() {}
virtual ~MixerLineLcdSpinBox() {}
void setTrackView(TrackView * tv);
@@ -47,7 +47,6 @@ protected:
private:
TrackView * m_tv;
};
#endif

View File

@@ -1,5 +1,5 @@
/*
* FxMixerView.h - effect-mixer-view for LMMS
* MixerView.h - effect-mixer-view for LMMS
*
* Copyright (c) 2008-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
@@ -22,8 +22,8 @@
*
*/
#ifndef FX_MIXER_VIEW_H
#define FX_MIXER_VIEW_H
#ifndef MIXER_VIEW_H
#define MIXER_VIEW_H
#include <QWidget>
#include <QHBoxLayout>
@@ -39,21 +39,21 @@
#include "EffectRackView.h"
class QButtonGroup;
class FxLine;
class MixerLine;
class LMMS_EXPORT FxMixerView : public QWidget, public ModelView,
class LMMS_EXPORT MixerView : public QWidget, public ModelView,
public SerializingObjectHook
{
Q_OBJECT
public:
class FxChannelView
class MixerChannelView
{
public:
FxChannelView(QWidget * _parent, FxMixerView * _mv, int _chIndex );
MixerChannelView(QWidget * _parent, MixerView * _mv, int _chIndex );
void setChannelIndex( int index );
FxLine * m_fxLine;
MixerLine * m_mixerLine;
PixmapButton * m_muteBtn;
PixmapButton * m_soloBtn;
Fader * m_fader;
@@ -61,35 +61,35 @@ public:
};
FxMixerView();
virtual ~FxMixerView();
MixerView();
virtual ~MixerView();
void keyPressEvent(QKeyEvent * e) override;
void saveSettings( QDomDocument & _doc, QDomElement & _this ) override;
void loadSettings( const QDomElement & _this ) override;
inline FxLine * currentFxLine()
inline MixerLine * currentMixerLine()
{
return m_currentFxLine;
return m_currentMixerLine;
}
inline FxChannelView * channelView(int index)
inline MixerChannelView * channelView(int index)
{
return m_fxChannelViews[index];
return m_mixerChannelViews[index];
}
void setCurrentFxLine( FxLine * _line );
void setCurrentFxLine( int _line );
void setCurrentMixerLine( MixerLine * _line );
void setCurrentMixerLine( int _line );
void clear();
// display the send button and knob correctly
void updateFxLine(int index);
void updateMixerLine(int index);
// notify the view that an fx channel was deleted
// notify the view that a mixer channel was deleted
void deleteChannel(int index);
// delete all unused channels
@@ -102,7 +102,7 @@ public:
void renameChannel(int index);
// make sure the display syncs up with the fx mixer.
// make sure the display syncs up with the mixer.
// useful for loading projects
void refreshDisplay();
@@ -117,10 +117,9 @@ private slots:
void toggledSolo();
private:
QVector<MixerChannelView *> m_mixerChannelViews;
QVector<FxChannelView *> m_fxChannelViews;
FxLine * m_currentFxLine;
MixerLine * m_currentMixerLine;
QScrollArea * channelArea;
QHBoxLayout * chLayout;
@@ -130,7 +129,7 @@ private:
void updateMaxChannelSelector();
friend class FxChannelView;
friend class MixerChannelView;
} ;
#endif

View File

@@ -55,7 +55,7 @@ public:
// specifies origin of NotePlayHandle
enum Origins
{
OriginPattern, /*! playback of a note from a pattern */
OriginMidiClip, /*! playback of a note from a MIDI clip */
OriginMidiInput, /*! playback of a MIDI note input event */
OriginNoteStacking, /*! created by note stacking instrument function */
OriginArpeggio, /*! created by arpeggio instrument function */
@@ -69,7 +69,7 @@ public:
const Note& noteToPlay,
NotePlayHandle* parent = nullptr,
int midiEventChannel = -1,
Origin origin = OriginPattern );
Origin origin = OriginMidiClip );
virtual ~NotePlayHandle();
void * operator new ( size_t size, void * p )
@@ -249,7 +249,7 @@ public:
/*! Updates total length (m_frames) depending on a new tempo */
void resize( const bpm_t newTempo );
/*! Set song-global offset (relative to containing pattern) in order to properly perform the note detuning */
/*! Set song-global offset (relative to containing MIDI clip) in order to properly perform the note detuning */
void setSongGlobalParentOffset( const TimePos& offset )
{
m_songGlobalParentOffset = offset;
@@ -346,7 +346,7 @@ public:
const Note& noteToPlay,
NotePlayHandle* parent = nullptr,
int midiEventChannel = -1,
NotePlayHandle::Origin origin = NotePlayHandle::OriginPattern );
NotePlayHandle::Origin origin = NotePlayHandle::OriginMidiClip );
static void release( NotePlayHandle * nph );
static void extend( int i );
static void free();

View File

@@ -51,7 +51,7 @@ class QToolButton;
class ComboBox;
class NotePlayHandle;
class Pattern;
class MidiClip;
class TimeLineWidget;
class PianoRoll : public QWidget
@@ -110,8 +110,8 @@ public:
void showVolTextFloat(volume_t vol, const QPoint &pos, int timeout=-1);
void showPanTextFloat(panning_t pan, const QPoint &pos, int timeout=-1);
void setCurrentPattern( Pattern* newPattern );
void setGhostPattern( Pattern* newPattern );
void setCurrentMidiClip( MidiClip* newMidiClip );
void setGhostMidiClip( MidiClip* newMidiClip );
void loadGhostNotes( const QDomElement & de );
void loadMarkedSemiTones(const QDomElement & de);
@@ -130,14 +130,14 @@ public:
return m_stepRecorder.isRecording();
}
const Pattern* currentPattern() const
const MidiClip* currentMidiClip() const
{
return m_pattern;
return m_midiClip;
}
bool hasValidPattern() const
bool hasValidMidiClip() const
{
return m_pattern != nullptr;
return m_midiClip != nullptr;
}
Song::PlayModes desiredPlayModeForAccompany() const;
@@ -215,11 +215,11 @@ protected slots:
void changeNoteEditMode( int i );
void markSemiTone(int i, bool fromMenu = true);
void hidePattern( Pattern* pattern );
void hideMidiClip( MidiClip* clip );
void selectRegionFromPixels( int xStart, int xEnd );
void clearGhostPattern();
void clearGhostClip();
void glueNotes();
void fitNoteLengths(bool fill);
void constrainNoteLengths(bool constrainMax);
@@ -228,8 +228,8 @@ protected slots:
signals:
void currentPatternChanged();
void ghostPatternSet(bool);
void currentMidiClipChanged();
void ghostClipSet(bool);
void semiToneMarkerMenuScaleSetEnabled(bool);
void semiToneMarkerMenuChordSetEnabled(bool);
@@ -349,7 +349,7 @@ private:
static const QVector<float> m_zoomLevels;
static const QVector<float> m_zoomYLevels;
Pattern* m_pattern;
MidiClip* m_midiClip;
NoteVector m_ghostNotes;
inline const NoteVector & ghostNotes() const
@@ -496,9 +496,9 @@ class PianoRollWindow : public Editor, SerializingObject
public:
PianoRollWindow();
const Pattern* currentPattern() const;
void setCurrentPattern( Pattern* pattern );
void setGhostPattern( Pattern* pattern );
const MidiClip* currentMidiClip() const;
void setCurrentMidiClip( MidiClip* clip );
void setGhostMidiClip( MidiClip* clip );
int quantization() const;
@@ -528,17 +528,17 @@ public:
bool hasFocus() const;
signals:
void currentPatternChanged();
void currentMidiClipChanged();
private slots:
void updateAfterPatternChange();
void ghostPatternSet( bool state );
void exportPattern();
void importPattern();
void updateAfterMidiClipChange();
void ghostClipSet( bool state );
void exportMidiClip();
void importMidiClip();
private:
void patternRenamed();
void clipRenamed();
void focusInEvent(QFocusEvent * event) override;
void stopStepRecording();
void updateStepRecordingIcon();

View File

@@ -1,5 +1,5 @@
/*
* SampleTCO.h
* SampleClip.h
*
* Copyright (c) 2005-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
@@ -22,24 +22,24 @@
*
*/
#ifndef SAMPLE_TCO_H
#define SAMPLE_TCO_H
#ifndef SAMPLE_CLIP_H
#define SAMPLE_CLIP_H
#include "SampleBuffer.h"
#include "SampleTrack.h"
#include "TrackContentObject.h"
#include "Clip.h"
class SampleTCO : public TrackContentObject
class SampleClip : public Clip
{
Q_OBJECT
mapPropertyFromModel(bool,isRecord,setRecord,m_recordModel);
public:
SampleTCO( Track * _track );
SampleTCO( const SampleTCO& orig );
virtual ~SampleTCO();
SampleClip( Track * _track );
SampleClip( const SampleClip& orig );
virtual ~SampleClip();
SampleTCO& operator=( const SampleTCO& that ) = delete;
SampleClip& operator=( const SampleClip& that ) = delete;
void changeLength( const TimePos & _length ) override;
const QString & sampleFile() const;
@@ -59,7 +59,7 @@ public:
TimePos sampleLength() const;
void setSampleStartFrame( f_cnt_t startFrame );
void setSamplePlayLength( f_cnt_t length );
TrackContentObjectView * createView( TrackView * _tv ) override;
ClipView * createView( TrackView * _tv ) override;
bool isPlaying() const;
@@ -71,7 +71,7 @@ public slots:
void updateLength();
void toggleRecord();
void playbackPositionChanged();
void updateTrackTcos();
void updateTrackClips();
private:
@@ -79,7 +79,7 @@ private:
BoolModel m_recordModel;
bool m_isPlaying;
friend class SampleTCOView;
friend class SampleClipView;
signals:

View File

@@ -1,5 +1,5 @@
/*
* SampleTCOView.h
* SampleClipView.h
*
* Copyright (c) 2005-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
@@ -22,21 +22,21 @@
*
*/
#ifndef SAMPLE_TCO_VIEW_H
#define SAMPLE_TCO_VIEW_H
#ifndef SAMPLE_CLIP_VIEW_H
#define SAMPLE_CLIP_VIEW_H
#include "SampleTCOView.h"
#include "SampleClipView.h"
#include "SampleTCO.h"
#include "TrackContentObjectView.h"
#include "SampleClip.h"
#include "ClipView.h"
class SampleTCOView : public TrackContentObjectView
class SampleClipView : public ClipView
{
Q_OBJECT
public:
SampleTCOView( SampleTCO * _tco, TrackView * _tv );
virtual ~SampleTCOView() = default;
SampleClipView( SampleClip * _clip, TrackView * _tv );
virtual ~SampleClipView() = default;
public slots:
void updateSample();
@@ -55,9 +55,9 @@ protected:
private:
SampleTCO * m_tco;
SampleClip * m_clip;
QPixmap m_paintPixmap;
bool splitTCO( const TimePos pos ) override;
bool splitClip( const TimePos pos ) override;
} ;

View File

@@ -31,7 +31,7 @@
#include "PlayHandle.h"
class BBTrack;
class SampleTCO;
class SampleClip;
class Track;
class AudioPort;
@@ -41,7 +41,7 @@ class SamplePlayHandle : public PlayHandle
public:
SamplePlayHandle( SampleBuffer* sampleBuffer , bool ownAudioPort = true );
SamplePlayHandle( const QString& sampleFile );
SamplePlayHandle( SampleTCO* tco );
SamplePlayHandle( SampleClip* clip );
virtual ~SamplePlayHandle();
inline bool affinityMatters() const override

View File

@@ -34,14 +34,14 @@
class BBTrack;
class SampleBuffer;
class SampleTCO;
class SampleClip;
class Track;
class SampleRecordHandle : public PlayHandle
{
public:
explicit SampleRecordHandle(SampleTCO* tco, TimePos startRecordTimeOffset);
explicit SampleRecordHandle(SampleClip* clip, TimePos startRecordTimeOffset);
virtual ~SampleRecordHandle();
void play( sampleFrame * _working_buffer ) override;
@@ -64,7 +64,7 @@ private:
Track * m_track;
BBTrack * m_bbTrack;
SampleTCO * m_tco;
SampleClip * m_clip;
// The offset from the start of m_track that the record has
// started from.

View File

@@ -29,8 +29,8 @@
#include "AudioPort.h"
#include "FadeButton.h"
#include "FxMixer.h"
#include "SampleTCO.h"
#include "Mixer.h"
#include "SampleClip.h"
#include "SampleTrackView.h"
#include "Track.h"
@@ -43,18 +43,18 @@ public:
virtual ~SampleTrack();
virtual bool play( const TimePos & _start, const fpp_t _frames,
const f_cnt_t _frame_base, int _tco_num = -1 ) override;
const f_cnt_t _frame_base, int _clip_num = -1 ) override;
TrackView * createView( TrackContainerView* tcv ) override;
TrackContentObject* createTCO(const TimePos & pos) override;
Clip* createClip(const TimePos & pos) override;
virtual void saveTrackSpecificSettings( QDomDocument & _doc,
QDomElement & _parent ) override;
void loadTrackSpecificSettings( const QDomElement & _this ) override;
inline IntModel * effectChannelModel()
inline IntModel * mixerChannelModel()
{
return &m_effectChannelModel;
return &m_mixerChannelModel;
}
inline AudioPort * audioPort()
@@ -82,14 +82,14 @@ signals:
void playingChanged();
public slots:
void updateTcos();
void setPlayingTcos( bool isPlaying );
void updateEffectChannel();
void updateClips();
void setPlayingClips( bool isPlaying );
void updateMixerChannel();
private:
FloatModel m_volumeModel;
FloatModel m_panningModel;
IntModel m_effectChannelModel;
IntModel m_mixerChannelModel;
AudioPort m_audioPort;
bool m_isPlaying;

View File

@@ -58,7 +58,7 @@ public:
}
QMenu * createFxMenu( QString title, QString newFxLabel ) override;
QMenu * createMixerMenu( QString title, QString newMixerLabel ) override;
public slots:
@@ -77,8 +77,8 @@ protected:
void dropEvent(QDropEvent *de) override;
private slots:
void assignFxLine( int channelIndex );
void createFxLine();
void assignMixerLine( int channelIndex );
void createMixerLine();
private:

View File

@@ -26,7 +26,7 @@
#ifndef SAMPLE_TRACK_WINDOW_H
#define SAMPLE_TRACK_WINDOW_H
#include "FxLineLcdSpinBox.h"
#include "MixerLineLcdSpinBox.h"
#include <QLineEdit>
@@ -82,7 +82,7 @@ private:
QLineEdit * m_nameLineEdit;
Knob * m_volumeKnob;
Knob * m_panningKnob;
FxLineLcdSpinBox * m_effectChannelNumber;
MixerLineLcdSpinBox * m_mixerChannelNumber;
EffectRackView * m_effectRack;
} ;

View File

@@ -5,25 +5,25 @@
#include <QLabel>
#include <QPixmap>
#include "FxLine.h"
#include "FxMixerView.h"
#include "MixerLine.h"
#include "MixerView.h"
class FxLine;
class FxMixerView;
class MixerLine;
class MixerView;
class SendButtonIndicator : public QLabel
{
public:
SendButtonIndicator( QWidget * _parent, FxLine * _owner,
FxMixerView * _mv);
SendButtonIndicator( QWidget * _parent, MixerLine * _owner,
MixerView * _mv);
void mousePressEvent( QMouseEvent * e ) override;
void updateLightStatus();
private:
FxLine * m_parent;
FxMixerView * m_mv;
MixerLine * m_parent;
MixerView * m_mv;
static QPixmap * s_qpmOn;
static QPixmap * s_qpmOff;

View File

@@ -44,7 +44,7 @@
class AutomationTrack;
class Pattern;
class MidiClip;
class TimeLineWidget;
@@ -66,8 +66,8 @@ public:
Mode_None,
Mode_PlaySong,
Mode_PlayBB,
Mode_PlayPattern,
Mode_PlayAutomationPattern,
Mode_PlayMidiClip,
Mode_PlayAutomationClip,
Mode_Count
} ;
@@ -276,7 +276,7 @@ public:
bpm_t getTempo();
AutomationPattern * tempoAutomationPattern() override;
AutomationClip * tempoAutomationClip() override;
AutomationTrack * globalAutomationTrack()
{
@@ -284,7 +284,7 @@ public:
}
//TODO: Add Q_DECL_OVERRIDE when Qt4 is dropped
AutomatedValueMap automatedValuesAt(TimePos time, int tcoNum = -1) const override;
AutomatedValueMap automatedValuesAt(TimePos time, int clipNum = -1) const override;
// file management
void createNewProject();
@@ -325,7 +325,7 @@ public:
return "song";
}
virtual bool fixedTCOs() const
virtual bool fixedClips() const
{
return false;
}
@@ -364,7 +364,7 @@ public slots:
void record();
void playAndRecord();
void playBB();
void playPattern( const Pattern * patternToPlay, bool loop = true );
void playMidiClip( const MidiClip * midiClipToPlay, bool loop = true );
void togglePause();
void stop();
@@ -473,8 +473,8 @@ private:
PlayPos m_playPos[Mode_Count];
bar_t m_length;
const Pattern* m_patternToPlay;
bool m_loopPattern;
const MidiClip* m_midiClipToPlay;
bool m_loopMidiClip;
double m_elapsedMilliSeconds[Mode_Count];
tick_t m_elapsedTicks;

View File

@@ -84,7 +84,7 @@ public slots:
void updatePosition( const TimePos & t );
void updatePositionLine();
void selectAllTcos( bool select );
void selectAllClips( bool select );
protected:
void closeEvent( QCloseEvent * ce ) override;

View File

@@ -28,7 +28,7 @@
#include "Note.h"
#include "lmms_basics.h"
#include "Pattern.h"
#include "MidiClip.h"
class PianoRoll;
class StepRecorderWidget;
@@ -47,7 +47,7 @@ class StepRecorder : public QObject
void noteReleased(const Note & n);
bool keyPressEvent(QKeyEvent* ke);
bool mousePressEvent(QMouseEvent* ke);
void setCurrentPattern(Pattern* newPattern);
void setCurrentMidiClip(MidiClip* newMidiClip);
void setStepsLength(const TimePos& newLength);
QVector<Note*> getCurStepNotes();
@@ -93,7 +93,7 @@ class StepRecorder : public QObject
QTimer m_updateReleasedTimer;
Pattern* m_pattern;
MidiClip* m_midiClip;
class StepNote
{
@@ -133,7 +133,7 @@ class StepRecorder : public QObject
QElapsedTimer releasedTimer;
} ;
QVector<StepNote*> m_curStepNotes; // contains the current recorded step notes (i.e. while user still press the notes; before they are applied to the pattern)
QVector<StepNote*> m_curStepNotes; // contains the current recorded step notes (i.e. while user still press the notes; before they are applied to the clip)
StepNote* findCurStepNote(const int key);

View File

@@ -235,7 +235,7 @@ private:
MovePositionMarker,
MoveLoopBegin,
MoveLoopEnd,
SelectSongTCO,
SelectSongClip,
} m_action;
int m_moveXOff;

View File

@@ -37,7 +37,7 @@
class TimePos;
class TrackContainer;
class TrackContainerView;
class TrackContentObject;
class Clip;
class TrackView;
@@ -60,7 +60,7 @@ class LMMS_EXPORT Track : public Model, public JournallingObject
mapPropertyFromModel(bool,isMuted,setMuted,m_mutedModel);
mapPropertyFromModel(bool,isSolo,setSolo,m_soloModel);
public:
typedef QVector<TrackContentObject *> tcoVector;
typedef QVector<Clip *> clipVector;
enum TrackTypes
{
@@ -90,11 +90,11 @@ public:
}
virtual bool play( const TimePos & start, const fpp_t frames,
const f_cnt_t frameBase, int tcoNum = -1 ) = 0;
const f_cnt_t frameBase, int clipNum = -1 ) = 0;
virtual TrackView * createView( TrackContainerView * view ) = 0;
virtual TrackContentObject * createTCO( const TimePos & pos ) = 0;
virtual Clip * createClip( const TimePos & pos ) = 0;
virtual void saveTrackSpecificSettings( QDomDocument & doc,
QDomElement & parent ) = 0;
@@ -109,25 +109,25 @@ public:
m_simpleSerializingMode = true;
}
// -- for usage by TrackContentObject only ---------------
TrackContentObject * addTCO( TrackContentObject * tco );
void removeTCO( TrackContentObject * tco );
// -- for usage by Clip only ---------------
Clip * addClip( Clip * clip );
void removeClip( Clip * clip );
// -------------------------------------------------------
void deleteTCOs();
void deleteClips();
int numOfTCOs();
TrackContentObject * getTCO( int tcoNum );
int getTCONum(const TrackContentObject* tco );
int numOfClips();
Clip * getClip( int clipNum );
int getClipNum(const Clip* clip );
const tcoVector & getTCOs() const
const clipVector & getClips() const
{
return m_trackContentObjects;
return m_clips;
}
void getTCOsInRange( tcoVector & tcoV, const TimePos & start,
void getClipsInRange( clipVector & clipV, const TimePos & start,
const TimePos & end );
void swapPositionOfTCOs( int tcoNum1, int tcoNum2 );
void swapPositionOfClips( int clipNum1, int clipNum2 );
void createTCOsForBB( int bb );
void createClipsForBB( int bb );
void insertBar( const TimePos & pos );
@@ -186,6 +186,11 @@ public:
{
return m_hasColor;
}
bool isMutedBeforeSolo() const
{
return m_mutedBeforeSolo;
}
BoolModel* getMutedModel();
@@ -196,6 +201,11 @@ public slots:
emit nameChanged();
}
void setMutedBeforeSolo(const bool muted)
{
m_mutedBeforeSolo = muted;
}
void toggleSolo();
void setColor(const QColor& c);
@@ -209,13 +219,14 @@ private:
protected:
BoolModel m_mutedModel;
private:
BoolModel m_soloModel;
bool m_mutedBeforeSolo;
bool m_simpleSerializingMode;
tcoVector m_trackContentObjects;
clipVector m_clips;
QMutex m_processingLock;
@@ -228,9 +239,8 @@ private:
signals:
void destroyedTrack();
void nameChanged();
void trackContentObjectAdded( TrackContentObject * );
void clipAdded( Clip * );
void colorChanged();
} ;

View File

@@ -32,7 +32,7 @@
#include "JournallingObject.h"
class AutomationPattern;
class AutomationClip;
class InstrumentTrack;
class TrackContainerView;
@@ -56,7 +56,7 @@ public:
void loadSettings( const QDomElement & _this ) override;
virtual AutomationPattern * tempoAutomationPattern()
virtual AutomationClip * tempoAutomationClip()
{
return nullptr;
}
@@ -93,13 +93,13 @@ public:
return m_TrackContainerType;
}
virtual AutomatedValueMap automatedValuesAt(TimePos time, int tcoNum = -1) const;
virtual AutomatedValueMap automatedValuesAt(TimePos time, int clipNum = -1) const;
signals:
void trackAdded( Track * _track );
protected:
static AutomatedValueMap automatedValuesFromTracks(const TrackList &tracks, TimePos timeStart, int tcoNum = -1);
static AutomatedValueMap automatedValuesFromTracks(const TrackList &tracks, TimePos timeStart, int clipNum = -1);
mutable QReadWriteLock m_tracksMutex;

View File

@@ -65,7 +65,7 @@ public:
return m_currentPosition;
}
virtual bool fixedTCOs() const
virtual bool fixedClips() const
{
return false;
}

View File

@@ -34,7 +34,7 @@
class QMimeData;
class Track;
class TrackContentObjectView;
class ClipView;
class TrackView;
@@ -55,20 +55,20 @@ public:
/*! \brief Updates the background tile pixmap. */
void updateBackground();
void addTCOView( TrackContentObjectView * tcov );
void removeTCOView( TrackContentObjectView * tcov );
void removeTCOView( int tcoNum )
void addClipView( ClipView * clipv );
void removeClipView( ClipView * clipv );
void removeClipView( int clipNum )
{
if( tcoNum >= 0 && tcoNum < m_tcoViews.size() )
if( clipNum >= 0 && clipNum < m_clipViews.size() )
{
removeTCOView( m_tcoViews[tcoNum] );
removeClipView( m_clipViews[clipNum] );
}
}
bool canPasteSelection( TimePos tcoPos, const QDropEvent *de );
bool canPasteSelection( TimePos tcoPos, const QMimeData *md, bool allowSameBar = false );
bool pasteSelection( TimePos tcoPos, QDropEvent * de );
bool pasteSelection( TimePos tcoPos, const QMimeData * md, bool skipSafetyCheck = false );
bool canPasteSelection( TimePos clipPos, const QDropEvent *de );
bool canPasteSelection( TimePos clipPos, const QMimeData *md, bool allowSameBar = false );
bool pasteSelection( TimePos clipPos, QDropEvent * de );
bool pasteSelection( TimePos clipPos, const QMimeData * md, bool skipSafetyCheck = false );
TimePos endPosition( const TimePos & posStart );
@@ -126,8 +126,8 @@ private:
TrackView * m_trackView;
typedef QVector<TrackContentObjectView *> tcoViewVector;
tcoViewVector m_tcoViews;
typedef QVector<ClipView *> clipViewVector;
clipViewVector m_clipViews;
QPixmap m_background;

View File

@@ -53,7 +53,7 @@ private slots:
void selectTrackColor();
void randomizeTrackColor();
void resetTrackColor();
void resetTCOColors();
void resetClipColors();
void toggleRecording(bool on);
void recordingOn();
void recordingOff();

View File

@@ -40,7 +40,7 @@ class QMenu;
class FadeButton;
class Track;
class TrackContainerView;
class TrackContentObject;
class Clip;
const int DEFAULT_SETTINGS_WIDGET_WIDTH = 224;
@@ -50,7 +50,7 @@ const int TRACK_OP_WIDTH = 78;
const int DEFAULT_SETTINGS_WIDGET_WIDTH_COMPACT = 96;
const int TRACK_OP_WIDTH_COMPACT = 62;
const int TCO_BORDER_WIDTH = 2;
const int CLIP_BORDER_WIDTH = 2;
class TrackView : public QWidget, public ModelView, public JournallingObject
@@ -99,7 +99,7 @@ public:
// Create a menu for assigning/creating channels for this track
// Currently instrument track and sample track supports it
virtual QMenu * createFxMenu(QString title, QString newFxLabel);
virtual QMenu * createMixerMenu(QString title, QString newMixerLabel);
public slots:
@@ -163,7 +163,7 @@ private:
private slots:
void createTCOView( TrackContentObject * tco );
void createClipView( Clip * clip );
void muteChanged();
} ;

View File

@@ -4,27 +4,37 @@
#ifndef DENORMALS_H
#define DENORMALS_H
#ifdef __SSE__
#include <xmmintrin.h>
#endif
#ifdef __SSE3__
#include <pmmintrin.h>
#include <immintrin.h>
#ifdef __GNUC__
#include <x86intrin.h>
#endif
// Intel® 64 and IA-32 Architectures Software Developers Manual,
// Volume 1: Basic Architecture,
// 11.6.3 Checking for the DAZ Flag in the MXCSR Register
int inline can_we_daz() {
alignas(16) unsigned char buffer[512] = {0};
#if defined(LMMS_HOST_X86)
_fxsave(buffer);
#elif defined(LMMS_HOST_X86_64)
_fxsave64(buffer);
#endif
// Bit 6 of the MXCSR_MASK, i.e. in the lowest byte,
// tells if we can use the DAZ flag.
return ((buffer[28] & (1 << 6)) != 0);
}
#endif
// Set denormal protection for this thread.
// To be on the safe side, don't set the DAZ flag for SSE2 builds,
// even if most SSE2 CPUs can handle it.
void inline disable_denormals() {
#ifdef __SSE3__
/* DAZ flag */
_MM_SET_DENORMALS_ZERO_MODE( _MM_DENORMALS_ZERO_ON );
#endif
#ifdef __SSE__
/* FTZ flag */
_MM_SET_FLUSH_ZERO_MODE( _MM_FLUSH_ZERO_ON );
/* Setting DAZ might freeze systems not supporting it */
if (can_we_daz()) {
_MM_SET_DENORMALS_ZERO_MODE( _MM_DENORMALS_ZERO_ON );
}
/* FTZ flag */
_MM_SET_FLUSH_ZERO_MODE( _MM_FLUSH_ZERO_ON );
#endif
}

View File

@@ -53,7 +53,7 @@ typedef int32_t f_cnt_t; // standard frame-count
typedef uint8_t ch_cnt_t; // channel-count (0-SURROUND_CHANNELS)
typedef uint16_t bpm_t; // tempo (MIN_BPM to MAX_BPM)
typedef uint16_t bitrate_t; // bitrate in kbps
typedef uint16_t fx_ch_t; // FX-channel (0 to MAX_EFFECT_CHANNEL)
typedef uint16_t mix_ch_t; // Mixer-channel (0 to MAX_CHANNEL)
typedef uint32_t jo_id_t; // (unique) ID of a journalling object