Skip to content

Commit

Permalink
Merge pull request #1 from teeberg/coding
Browse files Browse the repository at this point in the history
  • Loading branch information
M374LX committed Feb 10, 2015
2 parents 2834bd1 + 76ffbd6 commit 593fd1c
Show file tree
Hide file tree
Showing 78 changed files with 1,008 additions and 752 deletions.
2 changes: 1 addition & 1 deletion .travis/linux..script.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUSE_WERROR=ON ..
2 changes: 1 addition & 1 deletion .travis/linux.win32.before_install.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
sudo add-apt-repository ppa:tobydox/mingw -y
sudo add-apt-repository ppa:tobydox/mingw-x-precise -y
sudo apt-get update -qq
1 change: 1 addition & 0 deletions .travis/linux.win32.script.sh
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export CMAKE_OPTS="-DUSE_WERROR=ON"
../build_mingw32 || ../build_mingw32
1 change: 1 addition & 0 deletions .travis/linux.win64.script.sh
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export CMAKE_OPTS="-DUSE_WERROR=ON"
../build_mingw64 || ../build_mingw64
2 changes: 1 addition & 1 deletion .travis/osx..script.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .. -DUSE_WERROR=OFF
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,8 @@ CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/plugins/zynaddsubfx/zynaddsubfx.rc.in" "${CM

# set compiler flags
SET(WERROR_FLAGS "-Wall -Werror=unused-function -Wno-sign-compare -Wno-strict-overflow")
IF(NOT LMMS_BUILD_APPLE)
OPTION(USE_WERROR "Add -werror to the build flags. Stops the build on warnings" OFF)
IF(${USE_WERROR})
SET(WERROR_FLAGS "${WERROR_FLAGS} -Werror")
ENDIF()

Expand Down
382 changes: 191 additions & 191 deletions data/locale/sv.ts

Large diffs are not rendered by default.

Binary file not shown.
8 changes: 6 additions & 2 deletions data/projects/CoolSongs/LICENSES.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@
* Farbro-Tectonic.mmpz
- CC (by)
- http://lmms.io/lsp/index.php?action=show&file=1327


* Greippi - Krem Kaakkuja (Second Flight Remix)
- CC (by)
- http://lmms.io/lsp/index.php?action=show&file=6337

* Greippi-ardudar.mmpz
- CC (by-sa)
- http://lmms.io/lsp/index.php?action=show&file=4916
Expand Down Expand Up @@ -57,7 +61,7 @@
* TameAnderson-MakeMe.mmpz
- Artistic 2.0
- http://lmms.io/lsp/index.php?action=show&file=1060

* unfa-Spoken.mmpz
- CC (by-nc)
- http://lmms.io/lsp/index.php?action=show&file=4929
Expand Down
19 changes: 9 additions & 10 deletions include/AutomatableModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#ifndef AUTOMATABLE_MODEL_H
#define AUTOMATABLE_MODEL_H

#include "lmms_math.h"
#include <QtCore/QMutex>

#include "JournallingObject.h"
Expand Down Expand Up @@ -174,7 +173,7 @@ class EXPORT AutomatableModel : public Model, public JournallingObject
{
return castValue<T>( m_step );
}

//! @brief Returns value scaled with the scale type and min/max values of this model
float scaledValue( float value ) const;
//! @brief Returns value applied with the inverse of this model's scale type
Expand Down Expand Up @@ -265,22 +264,22 @@ class EXPORT AutomatableModel : public Model, public JournallingObject
}

float globalAutomationValueAt( const MidiTime& time );

bool hasStrictStepSize() const
{
return m_hasStrictStepSize;
}

void setStrictStepSize( const bool b )
{
m_hasStrictStepSize = b;
}

static void incrementPeriodCounter()
{
++s_periodCounter;
}

static void resetPeriodCounter()
{
s_periodCounter = 0;
Expand Down Expand Up @@ -333,13 +332,13 @@ public slots:
float m_step;
float m_range;
float m_centerValue;

bool m_valueChanged;

// currently unused?
float m_oldValue;
int m_setValueDepth;

// used to determine if step size should be applied strictly (ie. always)
// or only when value set from gui (default)
bool m_hasStrictStepSize;
Expand All @@ -357,9 +356,9 @@ public slots:
ValueBuffer m_valueBuffer;
long m_lastUpdatedPeriod;
static long s_periodCounter;

bool m_hasSampleExactData;

// prevent several threads from attempting to write the same vb at the same time
QMutex m_valueBufferMutex;

Expand Down
3 changes: 3 additions & 0 deletions include/AutomationEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,9 @@ class AutomationEditorWindow : public Editor
void setCurrentPattern(AutomationPattern* pattern);
const AutomationPattern* currentPattern();

virtual void dropEvent( QDropEvent * _de );
virtual void dragEnterEvent( QDragEnterEvent * _dee );

void open(AutomationPattern* pattern);

AutomationEditor* m_editor;
Expand Down
8 changes: 4 additions & 4 deletions include/BBEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ public slots:
void play();
void stop();

protected:
virtual void closeEvent( QCloseEvent * _ce );

private:
BBTrackContainerView* m_trackContainerView;
ComboBox * m_bbComboBox;
Expand All @@ -80,13 +77,16 @@ class BBTrackContainerView : public TrackContainerView

void removeBBView(int bb);

void saveSettings(QDomDocument& doc, QDomElement& element);
void loadSettings(const QDomElement& element);

public slots:
void addSteps();
void removeSteps();
void addAutomationTrack();

protected slots:
virtual void dropEvent(QDropEvent * de );
void dropEvent(QDropEvent * de );
void updatePosition();

private:
Expand Down
2 changes: 1 addition & 1 deletion include/BBTrackContainer.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#define BB_TRACK_CONTAINER_H

#include "TrackContainer.h"
#include "ComboBox.h"
#include "ComboBoxModel.h"


class EXPORT BBTrackContainer : public TrackContainer
Expand Down
6 changes: 2 additions & 4 deletions include/BandLimitedWave.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,9 @@
#ifndef BANDLIMITEDWAVE_H
#define BANDLIMITEDWAVE_H

#include <QString>
#include <QDataStream>
#include <QFile>
class QDataStream;
class QString;

#include "ConfigManager.h"
#include "export.h"
#include "interpolation.h"
#include "lmms_basics.h"
Expand Down
13 changes: 5 additions & 8 deletions include/BufferManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,14 @@
* Boston, MA 02110-1301 USA.
*
*/

#ifndef BUFFER_MANAGER_H
#define BUFFER_MANAGER_H

#include "MemoryManager.h"
#include "export.h"
#include "lmms_basics.h"
#include "Engine.h"
#include "Mixer.h"
#include <QtCore/QAtomicInt>
#include <QtCore/QReadWriteLock>

class QAtomicInt;

const int BM_INITIAL_BUFFERS = 512;
//const int BM_INCREMENT = 64;
Expand All @@ -45,11 +42,11 @@ class EXPORT BufferManager
static void release( sampleFrame * buf );
static void refresh();
// static void extend( int c );

private:
static sampleFrame ** s_available;
static QAtomicInt s_availableIndex;

static sampleFrame ** s_released;
static QAtomicInt s_releasedIndex;
// static QReadWriteLock s_mutex;
Expand Down
1 change: 0 additions & 1 deletion include/ComboBoxModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include <QtCore/QPair>

#include "AutomatableModel.h"
#include "templates.h"

class PixmapLoader;

Expand Down
4 changes: 2 additions & 2 deletions include/DataFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
#define DATA_FILE_H

#include <QDomDocument>
#include <QTextStream>

#include "export.h"
#include "lmms_basics.h"
#include "MemoryManager.h"

class QTextStream;

class EXPORT DataFile : public QDomDocument
{
MM_OPERATORS
Expand Down
6 changes: 3 additions & 3 deletions include/DrumSynth.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Copyright (c) 1998-2000 Paul Kellett (mda-vst.com)
* Copyright (c) 2007 Paul Giblock <drfaygo/at/gmail.com>
*
*
* This file is part of LMMS - http://lmms.io
*
* This program is free software; you can redistribute it and/or
Expand Down Expand Up @@ -42,11 +42,11 @@ class DrumSynth {
void GetEnv(int env, const char *sec, const char *key, const char *ini);

float waveform(float ph, int form);

int GetPrivateProfileString(const char *sec, const char *key, const char *def, char *buffer, int size, const char *file);
int GetPrivateProfileInt(const char *sec, const char *key, int def, const char *file);
float GetPrivateProfileFloat(const char *sec, const char *key, float def, const char *file);

};

#endif
#endif
11 changes: 0 additions & 11 deletions include/Engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,17 @@
#ifndef ENGINE_H
#define ENGINE_H

#include "lmmsconfig.h"
#include "MemoryManager.h"

#include <QtCore/QMap>

#include "export.h"

class AutomationEditorWindow;
class BBEditor;
class BBTrackContainer;
class DummyTrackContainer;
class FxMixer;
class FxMixerView;
class ProjectJournal;
class MainWindow;
class Mixer;
class PianoRollWindow;
class ProjectNotes;
class Song;
class SongEditorWindow;
class Ladspa2LMMS;
class ControllerRackView;


class EXPORT Engine
Expand Down
1 change: 1 addition & 0 deletions include/FadeButton.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class FadeButton : public QAbstractButton
_activated_color, QWidget * _parent );

virtual ~FadeButton();
void setActiveColor( const QColor & activated_color );


public slots:
Expand Down
11 changes: 6 additions & 5 deletions include/Instrument.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,18 @@
#ifndef INSTRUMENT_H
#define INSTRUMENT_H

#include <QWidget>

#include <QString>
#include <QtGlobal>
#include "export.h"
#include "lmms_basics.h"
#include "MemoryManager.h"
#include "MidiTime.h"
#include "Plugin.h"
#include "Mixer.h"


// forward-declarations
class InstrumentTrack;
class InstrumentView;
class MidiEvent;
class MidiTime;
class NotePlayHandle;
class Track;

Expand Down
13 changes: 13 additions & 0 deletions include/InstrumentTrack.h
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,9 @@ class InstrumentTrackView : public TrackView

static void cleanupWindowCache();

// Create a menu for assigning/creating channels for this track
QMenu * createFxMenu( QString title, QString newFxLabel );


protected:
virtual void dragEnterEvent( QDragEnterEvent * _dee );
Expand All @@ -320,6 +323,10 @@ private slots:
void midiInSelected();
void midiOutSelected();
void midiConfigChanged();
void muteChanged();

void assignFxLine( int channelIndex );
void createFxLine();


private:
Expand Down Expand Up @@ -374,6 +381,12 @@ class InstrumentTrackWindow : public QWidget, public ModelView,

void setInstrumentTrackView( InstrumentTrackView * _tv );

InstrumentTrackView *instrumentTrackView()
{
return m_itv;
}


PianoView * pianoView()
{
return m_pianoView;
Expand Down
3 changes: 2 additions & 1 deletion include/MemoryManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@

#include <QtCore/QVector>
#include <QtCore/QMutex>
#include <QtCore/QReadWriteLock>
#include <QtCore/QHash>
#include "MemoryHelper.h"
#include "export.h"

class QReadWriteLock;

const int MM_CHUNK_SIZE = 64; // granularity of managed memory
const int MM_INITIAL_CHUNKS = 1024 * 1024; // how many chunks to allocate at startup - TODO: make configurable
const int MM_INCREMENT_CHUNKS = 16 * 1024; // min. amount of chunks to increment at a time
Expand Down
12 changes: 3 additions & 9 deletions include/MixerWorkerThread.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,9 @@
#include <QtCore/QAtomicPointer>
#include <QtCore/QThread>

#include "ThreadableJob.h"
#include "Mixer.h"

#ifdef __SSE__
#include <xmmintrin.h>
#endif
#ifdef __SSE3__
#include <pmmintrin.h>
#endif
class QWaitCondition;
class Mixer;
class ThreadableJob;

class MixerWorkerThread : public QThread
{
Expand Down
2 changes: 1 addition & 1 deletion include/Model.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
#ifndef MODEL_H
#define MODEL_H

#include <QtCore/QString>
#include <QtCore/QObject>
#include <QtCore/QPointer>

#include "export.h"

Expand Down
Loading

0 comments on commit 593fd1c

Please sign in to comment.