Merged my own and Toby's changes from last week.

Modified Files:
 	ChangeLog Makefile.am TODO
 	data/presets/TripleOscillator/Makefile include/base64.h
 	include/config_mgr.h include/file_browser.h
 	include/instrument_track.h include/knob.h include/mixer.h
 	include/mmp.h include/sample_buffer.h include/sample_track.h
 	include/setup_dialog.h include/spc_bg_hndl_widget.h
 	plugins/audio_file_processor/audio_file_processor.cpp
 	plugins/audio_file_processor/audio_file_processor.h
 	plugins/bit_invader/bit_invader.cpp
 	plugins/organic/organic.cpp plugins/organic/organic.h
 	plugins/plucked_string_synth/plucked_string_synth.cpp
 	plugins/triple_oscillator/triple_oscillator.cpp
 	plugins/triple_oscillator/triple_oscillator.h
 	plugins/vestige/lvsl_client.cpp plugins/vestige/vestige.cpp
 	plugins/vibed/impulse_editor.cpp
 	plugins/vibed/nine_button_selector.cpp
 	plugins/vibed/nine_button_selector.h plugins/vibed/vibed.cpp
 	plugins/vibed/vibed.h src/lmms_single_source.cpp
 	src/core/bb_editor.cpp src/core/config_mgr.cpp
 	src/core/file_browser.cpp src/core/main_window.cpp
 	src/core/midi_tab_widget.cpp src/core/mixer.cpp
 	src/core/piano_roll.cpp src/core/setup_dialog.cpp
 	src/core/song_editor.cpp src/core/track.cpp src/lib/mmp.cpp
 	src/lib/sample_buffer.cpp src/tracks/instrument_track.cpp
 	src/tracks/sample_track.cpp src/widgets/fade_button.cpp
 	src/widgets/group_box.cpp src/widgets/lcd_spinbox.cpp
 	src/widgets/project_notes.cpp src/widgets/tab_widget.cpp
 	src/widgets/text_float.cpp src/widgets/tool_button.cpp
 Added Files:
 	data/themes/blue_scene/auto_limit.png
 	data/themes/default/auto_limit.png include/volume_knob.h
 	src/widgets/volume_knob.cpp


git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@131 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Danny McRae
2006-04-17 14:09:06 +00:00
parent 9faabaaf0d
commit 703adaf6a3
55 changed files with 941 additions and 186 deletions

View File

@@ -42,7 +42,8 @@ class QVariant;
namespace base64
{
#ifndef QT3
inline void encode( const char * _data, const int _size, QString & _dst )
inline void encode( const char * _data, const int _size,
QString & _dst )
{
_dst = QByteArray( _data, _size ).toBase64();
}
@@ -52,7 +53,7 @@ namespace base64
QByteArray data = QByteArray::fromBase64( _b64.toAscii() );
*_size = data.size();
*_data = new char[*_size];
memcpy( _data, data.constData(), *_size );
memcpy( *_data, data.constData(), *_size );
}
#else
void encode( const char * _data, const int _size, QString & _dst );

View File

@@ -92,19 +92,34 @@ public:
return( m_workingDir );
}
QString projectsDir( void ) const
QString userProjectsDir( void ) const
{
return( m_workingDir + PROJECTS_PATH );
return( workingDir() + PROJECTS_PATH );
}
QString presetsDir( void ) const
QString userPresetsDir( void ) const
{
return( m_workingDir + PRESETS_PATH );
return( workingDir() + PRESETS_PATH );
}
QString samplesDir( void ) const
QString userSamplesDir( void ) const
{
return( m_workingDir + SAMPLES_PATH );
return( workingDir() + SAMPLES_PATH );
}
QString factoryProjectsDir( void ) const
{
return( dataDir() + PROJECTS_PATH );
}
QString factoryPresetsDir( void ) const
{
return( dataDir() + PRESETS_PATH );
}
QString factorySamplesDir( void ) const
{
return( dataDir() + SAMPLES_PATH );
}
QString defaultArtworkDir( void ) const

View File

@@ -42,6 +42,8 @@
#include <qlistview.h>
#include <qdir.h>
#define cleanPath cleanDirPath
#endif
@@ -145,11 +147,9 @@ public:
{
_path = m_directories[0];
}
#ifdef QT4
return( QDir::cleanPath( _path + "/" + text( 0 ) + "/" ) );
#else
return( QDir::cleanDirPath( _path + "/" + text( 0 ) + "/" ) );
#endif
return( QDir::cleanPath( _path + QDir::separator() +
text( 0 ) ) +
QDir::separator() );
}
inline const QPixmap * pixmap( int ) const
@@ -194,7 +194,8 @@ public:
inline QString fullName( void ) const
{
return( m_path + "/" + text( 0 ) );
return( QDir::cleanPath( m_path ) + QDir::separator() +
text( 0 ) );
}
inline const QPixmap * pixmap( int ) const
{
@@ -230,5 +231,9 @@ private:
} ;
#ifdef QT3
#undef cleanPath
#endif
#endif

View File

@@ -51,7 +51,7 @@
#include "gui_templates.h"
#include "tab_widget.h"
#include "engine.h"
#include "volume_knob.h"
class QLineEdit;
class arpAndChordsTabWidget;
@@ -60,7 +60,6 @@ class instrumentTrackButton;
class envelopeTabWidget;
class fadeButton;
class instrument;
class knob;
class lcdSpinBox;
class midiPort;
class midiTabWidget;
@@ -223,7 +222,7 @@ private:
// widgets on the top of a instrument-track-window
tabWidget * m_generalSettingsWidget;
QLineEdit * m_instrumentNameLE;
knob * m_volumeKnob;
volumeKnob * m_volumeKnob;
surroundArea * m_surroundArea;
lcdSpinBox * m_effectChannelNumber;
QPushButton * m_saveSettingsBtn;
@@ -242,7 +241,7 @@ private:
// widgets in track-settings-widget
knob * m_tswVolumeKnob;
volumeKnob * m_tswVolumeKnob;
fadeButton * m_tswActivityIndicator;
instrumentTrackButton * m_tswInstrumentTrackButton;
QMenu * m_tswMidiMenu;

View File

@@ -90,7 +90,7 @@ public slots:
void reset( void );
void copyValue( void );
void pasteValue( void );
void enterValue( void );
virtual void enterValue( void );
void connectToMidiDevice( void );
void displayHelp( void );

View File

@@ -198,7 +198,7 @@ public:
inline const surroundSampleFrame * currentAudioBuffer( void ) const
{
return( m_curBuf );
return( m_writeBuf );
}
@@ -285,7 +285,7 @@ public:
public slots:
void setHighQuality( bool _hq_on = FALSE );
void setClipScaling( bool _state );
signals:
void sampleRateChanged( void );
@@ -315,15 +315,29 @@ private:
void processBuffer( const surroundSampleFrame * _buf,
const fx_ch_t _fx_chnl );
void FASTCALL scaleClip( fpab_t _frame, ch_cnt_t _chnl );
vvector<audioPort *> m_audioPorts;
fpab_t m_framesPerAudioBuffer;
surroundSampleFrame * m_curBuf;
surroundSampleFrame * m_nextBuf;
surroundSampleFrame * m_readBuf;
surroundSampleFrame * m_writeBuf;
vvector<surroundSampleFrame *> m_bufferPool;
Uint8 m_readBuffer;
Uint8 m_writeBuffer;
Uint8 m_analBuffer;
Uint8 m_poolDepth;
bool m_scaleClip;
surroundSampleFrame m_maxClip;
surroundSampleFrame m_previousSample;
fpab_t m_halfStart[SURROUND_CHANNELS];
bool m_clipped[SURROUND_CHANNELS];
bool m_oldBuffer[SURROUND_CHANNELS];
bool m_newBuffer[SURROUND_CHANNELS];
Uint8 m_cpuLoad;
playHandleVector m_playHandles;

View File

@@ -1,7 +1,7 @@
/*
* mmp.h - class for reading and writing multimedia-project-files
*
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2004-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -90,6 +90,9 @@ private:
static projectTypes FASTCALL type( const QString & _type_name );
static QString FASTCALL typeName( projectTypes _project_type );
void cleanMetaNodes( QDomElement _de );
struct typeDescStruct
{
projectTypes m_type;

View File

@@ -162,6 +162,9 @@ public slots:
private:
void FASTCALL update( bool _keep_settings = FALSE );
static QString tryToMakeRelative( const QString & _file );
#ifdef SDL_SDL_SOUND_H
f_cnt_t FASTCALL decodeSampleSDL( const char * _f,
int_sample_t * & _buf,

View File

@@ -42,12 +42,13 @@
#include "track.h"
#include "sample_buffer.h"
#include "volume_knob.h"
class nameLabel;
class audioPort;
class QLabel;
class knob;
//class sampleTCOSettingsDialog;
@@ -152,7 +153,7 @@ private:
nameLabel * m_trackLabel;
audioPort * m_audioPort;
knob * m_volumeKnob;
volumeKnob * m_volumeKnob;
float m_volume;
} ;

View File

@@ -98,7 +98,7 @@ private slots:
void toggleGIMPLikeWindows( bool _enabled );
void toggleNoWizard( bool _enabled );
void toggleNoMsgAfterSetup( bool _enabled );
void toggleDisplaydBV( bool _enabled );
void openWorkingDir( void );
void openVSTDir( void );
@@ -122,6 +122,7 @@ private:
bool m_gimpLikeWindows;
bool m_noWizard;
bool m_noMsgAfterSetup;
bool m_displaydBV;
QLineEdit * m_wdLineEdit;

View File

@@ -1,7 +1,7 @@
/*
* spc_bg_hndl_widget.h - class specialBgHandlingWidget
*
* Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2005-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -100,11 +100,18 @@ public:
{
#ifdef QT4
QPainter p( &pm );
// TODO: fix that for background-pixmaps, because
// drawing is started at the top left edge even
// if this widget isn't posated there
p.fillRect( _w->rect(), pw->palette().brush(
pw->backgroundRole() ) );
const QBrush & br = pw->palette().brush(
pw->backgroundRole() );
if( br.style() == Qt::TexturePattern )
{
p.drawPixmap( 0, 0, br.texture(),
_w->x(), _w->y(),
_w->width(), _w->height() );
}
else
{
pm.fill( br.color() );
}
#else
const QPixmap * pbp = pw->paletteBackgroundPixmap();
if( pbp == NULL )

59
include/volume_knob.h Normal file
View File

@@ -0,0 +1,59 @@
/*
* volume_knob.h - defines a knob that display it's value as either a
* percentage or in dbV.
*
* Copyright (c) 2006 Danny McRae <khjklujn/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
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*/
#ifndef _VOLUME_KNOB_H
#define _VOLUME_KNOB_H
#ifdef QT4
#include <QtGui/QPixmap>
#else
#include <qpixmap.h>
#endif
#include "types.h"
#include "knob.h"
class volumeKnob: public knob
{
Q_OBJECT
public:
volumeKnob( int _knob_num, QWidget * _parent, const QString & _name,
engine * _engine );
~volumeKnob();
public slots:
void enterValue( void );
protected:
virtual void mousePressEvent( QMouseEvent * _me );
virtual void mouseMoveEvent( QMouseEvent * _me );
virtual void wheelEvent( QWheelEvent * _we );
};
#endif