many bugfixes and updated projects
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@49 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* audio_alsa.cpp - device-class which implements ALSA-PCM-output
|
||||
*
|
||||
* 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
|
||||
*
|
||||
@@ -182,8 +182,12 @@ void audioALSA::startProcessing( void )
|
||||
if( !isRunning() )
|
||||
{
|
||||
start(
|
||||
#ifdef QT4
|
||||
QThread::HighPriority
|
||||
#else
|
||||
#if QT_VERSION >= 0x030200
|
||||
QThread::HighestPriority
|
||||
#endif
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* audio_jack.cpp - support for JACK-transport
|
||||
*
|
||||
* 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
|
||||
*
|
||||
@@ -108,7 +108,9 @@ audioJACK::audioJACK( Uint32 _sample_rate, bool & _success_ful ) :
|
||||
#endif
|
||||
jack_get_client_name( m_client ) );
|
||||
}
|
||||
#else
|
||||
|
||||
#else /* OLD_JACK */
|
||||
|
||||
m_client = jack_client_new( client_name.
|
||||
#ifdef QT4
|
||||
toAscii().constData()
|
||||
@@ -116,6 +118,12 @@ audioJACK::audioJACK( Uint32 _sample_rate, bool & _success_ful ) :
|
||||
ascii()
|
||||
#endif
|
||||
);
|
||||
if( m_client == NULL )
|
||||
{
|
||||
printf( "jack_client_new() failed\n" );
|
||||
return;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// set process-callback
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* audio_oss.cpp - device-class that implements OSS-PCM-output
|
||||
*
|
||||
* 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
|
||||
*
|
||||
@@ -285,8 +285,12 @@ void audioOSS::startProcessing( void )
|
||||
if( !isRunning() )
|
||||
{
|
||||
start(
|
||||
#ifdef QT4
|
||||
QThread::HighPriority
|
||||
#else
|
||||
#if QT_VERSION >= 0x030200
|
||||
QThread::HighestPriority
|
||||
#endif
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|
||||
@@ -41,6 +41,9 @@
|
||||
#include <qcombobox.h>
|
||||
#include <qwhatsthis.h>
|
||||
|
||||
#define setCurrentIndex setCurrentItem
|
||||
#define currentIndex currentItem
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -61,6 +64,7 @@
|
||||
#include "tempo_sync_knob.h"
|
||||
#include "channel_track.h"
|
||||
#include "led_checkbox.h"
|
||||
#include "preset_preview_play_handle.h"
|
||||
|
||||
|
||||
|
||||
@@ -208,7 +212,7 @@ arpAndChordsTabWidget::arpAndChordsTabWidget( channelTrack * _channel_track ) :
|
||||
CHORDS_GROUPBOX_HEIGHT );
|
||||
|
||||
m_chordsComboBox = new QComboBox( m_chordsGroupBox );
|
||||
m_chordsComboBox->setFont( pointSize<9>( m_chordsComboBox->font() ) );
|
||||
m_chordsComboBox->setFont( pointSize<8>( m_chordsComboBox->font() ) );
|
||||
m_chordsComboBox->setGeometry( 10, 25, 140, 22 );
|
||||
|
||||
for( int i = 0; s_chords[i].interval[0] != -1; ++i )
|
||||
@@ -259,7 +263,7 @@ arpAndChordsTabWidget::arpAndChordsTabWidget( channelTrack * _channel_track ) :
|
||||
"major or minor triads. But there're a lot of other "
|
||||
"possible chords, you can select." ) );
|
||||
m_arpComboBox = new QComboBox( m_arpGroupBox );
|
||||
m_arpComboBox->setFont( pointSize<9>( m_arpComboBox->font() ) );
|
||||
m_arpComboBox->setFont( pointSize<8>( m_arpComboBox->font() ) );
|
||||
m_arpComboBox->setGeometry( 10, 25, 140, 22 );
|
||||
|
||||
for( int i = 0; s_chords[i].interval[0] != -1; ++i )
|
||||
@@ -270,6 +274,8 @@ arpAndChordsTabWidget::arpAndChordsTabWidget( channelTrack * _channel_track ) :
|
||||
#endif
|
||||
) );
|
||||
}
|
||||
|
||||
|
||||
m_arpRangeKnob = new knob( knobBright_26, m_arpGroupBox,
|
||||
tr( "Arpeggio range" ) );
|
||||
m_arpRangeKnob->setLabel( tr( "RANGE" ) );
|
||||
@@ -321,8 +327,8 @@ arpAndChordsTabWidget::arpAndChordsTabWidget( channelTrack * _channel_track ) :
|
||||
"arpeggio-tone that should be played. With this you "
|
||||
"can make cool staccato-arpeggios." ) );
|
||||
|
||||
m_arpDirectionLbl = new QLabel( tr( "DIRECTION:" ), m_arpGroupBox );
|
||||
m_arpDirectionLbl->setGeometry( 10, 60, 64, 8 );
|
||||
m_arpDirectionLbl = new QLabel( tr( "Direction:" ), m_arpGroupBox );
|
||||
m_arpDirectionLbl->setGeometry( 10, 60, 64, 10 );
|
||||
m_arpDirectionLbl->setFont( pointSize<7>( m_arpDirectionLbl->font() ) );
|
||||
|
||||
|
||||
@@ -392,9 +398,21 @@ arpAndChordsTabWidget::arpAndChordsTabWidget( channelTrack * _channel_track ) :
|
||||
m_arpDirections_group->hide();
|
||||
#endif
|
||||
|
||||
m_sortMode = new ledCheckBox( tr( "SORT-MODE" ), m_arpGroupBox );
|
||||
m_sortMode->move( 10, 90 );
|
||||
/* m_sortMode = new ledCheckBox( tr( "Sort-mode" ), m_arpGroupBox );
|
||||
m_sortMode->move( 10, 90 );*/
|
||||
|
||||
QLabel * mode_lbl = new QLabel( tr( "Mode:" ), m_arpGroupBox );
|
||||
mode_lbl->setGeometry( 10, 90, 64, 10 );
|
||||
mode_lbl->setFont( pointSize<7>( mode_lbl->font() ) );
|
||||
|
||||
m_arpModeComboBox = new QComboBox( m_arpGroupBox );
|
||||
m_arpModeComboBox->setFont( pointSize<8>( m_arpModeComboBox->font() ) );
|
||||
m_arpModeComboBox->setGeometry( 70, 87, 80, 22 );
|
||||
|
||||
m_arpModeComboBox->addItem( tr( "Free" ) );
|
||||
m_arpModeComboBox->addItem( tr( "Sort" ) );
|
||||
m_arpModeComboBox->addItem( tr( "Sync" ) );
|
||||
m_arpModeComboBox->setCurrentItem( 0 );
|
||||
}
|
||||
|
||||
|
||||
@@ -421,11 +439,8 @@ void arpAndChordsTabWidget::processNote( notePlayHandle * _n )
|
||||
m_chordsGroupBox->isActive() == TRUE )
|
||||
{
|
||||
// then insert sub-notes for chord
|
||||
#ifdef QT4
|
||||
const int selected_chord = m_chordsComboBox->currentIndex();
|
||||
#else
|
||||
const int selected_chord = m_chordsComboBox->currentItem();
|
||||
#endif
|
||||
|
||||
for( int octave_cnt = 0;
|
||||
octave_cnt < m_chordRangeKnob->value(); ++octave_cnt )
|
||||
{
|
||||
@@ -482,18 +497,21 @@ void arpAndChordsTabWidget::processNote( notePlayHandle * _n )
|
||||
}
|
||||
|
||||
|
||||
#ifdef QT4
|
||||
const int selected_arp = m_arpComboBox->currentIndex();
|
||||
#else
|
||||
const int selected_arp = m_arpComboBox->currentItem();
|
||||
#endif
|
||||
|
||||
constNotePlayHandleVector cnphv = notePlayHandle::nphsOfChannelTrack(
|
||||
_n->getChannelTrack() );
|
||||
// VERY unlikely, but better check this before ending in a crash
|
||||
if( cnphv.size() == 0 )
|
||||
if( m_arpModeComboBox->currentIndex() != FREE && cnphv.size() == 0 )
|
||||
{
|
||||
return;
|
||||
// maybe we're playing only a preset-preview-note?
|
||||
cnphv = presetPreviewPlayHandle::nphsOfChannelTrack(
|
||||
_n->getChannelTrack() );
|
||||
if( cnphv.size() == 0 )
|
||||
{
|
||||
// still nothing found here, so lets return
|
||||
//return;
|
||||
cnphv.push_back( _n );
|
||||
}
|
||||
}
|
||||
|
||||
const int cur_chord_size = getChordSize( s_chords[selected_arp] );
|
||||
@@ -509,7 +527,7 @@ void arpAndChordsTabWidget::processNote( notePlayHandle * _n )
|
||||
// used for calculating remaining frames for arp-note, we have to add
|
||||
// arp_frames-1, otherwise the first arp-note will not be setup
|
||||
// correctly... -> arp_frames frames silence at the start of every note!
|
||||
int cur_frame = ( ( m_sortMode->isChecked() == TRUE ) ?
|
||||
int cur_frame = ( ( m_arpModeComboBox->currentIndex() != FREE ) ?
|
||||
cnphv.first()->totalFramesPlayed() :
|
||||
_n->totalFramesPlayed() )
|
||||
+ arp_frames - 1;
|
||||
@@ -533,14 +551,14 @@ void arpAndChordsTabWidget::processNote( notePlayHandle * _n )
|
||||
// init with zero
|
||||
int cur_arp_idx = 0;
|
||||
|
||||
if( m_sortMode->isChecked() == TRUE &&
|
||||
if( m_arpModeComboBox->currentIndex() == SORT &&
|
||||
( ( cur_frame / arp_frames ) % total_range ) /
|
||||
range != (csize) _n->index() )
|
||||
range != (Uint32) _n->index() )
|
||||
{
|
||||
// update counters
|
||||
frames_processed += arp_frames;
|
||||
cur_frame += arp_frames;
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
|
||||
// process according to arpeggio-direction...
|
||||
@@ -609,7 +627,8 @@ void arpAndChordsTabWidget::processNote( notePlayHandle * _n )
|
||||
// and is_arp_note=TRUE
|
||||
notePlayHandle * note_play_handle = new notePlayHandle(
|
||||
_n->getChannelTrack(),
|
||||
( ( m_sortMode->isChecked() == TRUE ) ?
|
||||
( ( m_arpModeComboBox->currentIndex() !=
|
||||
FREE ) ?
|
||||
cnphv.first()->framesAhead() :
|
||||
_n->framesAhead() ) +
|
||||
frames_processed,
|
||||
@@ -628,8 +647,10 @@ void arpAndChordsTabWidget::processNote( notePlayHandle * _n )
|
||||
|
||||
// make sure, note is handled as arp-base-note, even if we didn't add a
|
||||
// sub-note so far
|
||||
_n->setArpNote( TRUE );
|
||||
|
||||
if( m_arpModeComboBox->currentIndex() != FREE )
|
||||
{
|
||||
_n->setArpNote( TRUE );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -640,19 +661,11 @@ void arpAndChordsTabWidget::saveSettings( QDomDocument & _doc,
|
||||
{
|
||||
QDomElement act_de = _doc.createElement( nodeName() );
|
||||
act_de.setAttribute( "chorddisabled", !m_chordsGroupBox->isActive() );
|
||||
#ifdef QT4
|
||||
act_de.setAttribute( "chord", m_chordsComboBox->currentIndex() );
|
||||
#else
|
||||
act_de.setAttribute( "chord", m_chordsComboBox->currentItem() );
|
||||
#endif
|
||||
act_de.setAttribute( "chordrange", m_chordRangeKnob->value() );
|
||||
|
||||
act_de.setAttribute( "arpdisabled", !m_arpGroupBox->isActive() );
|
||||
#ifdef QT4
|
||||
act_de.setAttribute( "arp", m_arpComboBox->currentIndex() );
|
||||
#else
|
||||
act_de.setAttribute( "arp", m_arpComboBox->currentItem() );
|
||||
#endif
|
||||
act_de.setAttribute( "arprange", m_arpRangeKnob->value() );
|
||||
act_de.setAttribute( "arptime", m_arpTimeKnob->value() );
|
||||
act_de.setAttribute( "arpgate", m_arpGateKnob->value() );
|
||||
@@ -660,7 +673,7 @@ void arpAndChordsTabWidget::saveSettings( QDomDocument & _doc,
|
||||
act_de.setAttribute( "arpsyncmode",
|
||||
( int ) m_arpTimeKnob->getSyncMode() );
|
||||
|
||||
act_de.setAttribute( "sortmode", m_sortMode->isChecked() );
|
||||
act_de.setAttribute( "arpmode", m_arpModeComboBox->currentIndex() );
|
||||
_parent.appendChild( act_de );
|
||||
}
|
||||
|
||||
@@ -671,17 +684,9 @@ void arpAndChordsTabWidget::loadSettings( const QDomElement & _this )
|
||||
{
|
||||
m_chordsGroupBox->setState( !_this.attribute
|
||||
( "chorddisabled" ).toInt() );
|
||||
#ifdef QT4
|
||||
m_chordsComboBox->setCurrentIndex( _this.attribute( "chord" ).toInt() );
|
||||
#else
|
||||
m_chordsComboBox->setCurrentItem( _this.attribute( "chord" ).toInt() );
|
||||
#endif
|
||||
m_chordRangeKnob->setValue( _this.attribute( "chordrange" ).toFloat() );
|
||||
#ifdef QT4
|
||||
m_arpComboBox->setCurrentIndex( _this.attribute( "arp" ).toInt() );
|
||||
#else
|
||||
m_arpComboBox->setCurrentItem( _this.attribute( "arp" ).toInt() );
|
||||
#endif
|
||||
m_arpRangeKnob->setValue( _this.attribute( "arprange" ).toFloat() );
|
||||
m_arpTimeKnob->setValue( _this.attribute( "arptime" ).toFloat() );
|
||||
m_arpGateKnob->setValue( _this.attribute( "arpgate" ).toFloat() );
|
||||
@@ -691,7 +696,8 @@ void arpAndChordsTabWidget::loadSettings( const QDomElement & _this )
|
||||
( tempoSyncKnob::tempoSyncMode ) _this.attribute(
|
||||
"arpsyncmode" ).toInt() );
|
||||
|
||||
m_sortMode->setChecked( _this.attribute( "sortmode" ).toInt() );
|
||||
m_arpModeComboBox->setCurrentIndex( _this.attribute( "arpmode"
|
||||
).toInt() );
|
||||
|
||||
m_arpGroupBox->setState( m_arpDirection != OFF &&
|
||||
!_this.attribute( "arpdisabled" ).toInt() );
|
||||
@@ -766,6 +772,8 @@ void arpAndChordsTabWidget::arpRandomToggled( bool _on )
|
||||
|
||||
|
||||
#undef setChecked
|
||||
#undef currentIndex
|
||||
#undef setCurrentIndex
|
||||
|
||||
#include "arp_and_chords_tab_widget.moc"
|
||||
|
||||
|
||||
@@ -780,7 +780,7 @@ bool configManager::loadConfigFile( void )
|
||||
stringPairVector attr;
|
||||
QDomNamedNodeMap node_attr =
|
||||
node.toElement().attributes();
|
||||
for( unsigned int i = 0; i < node_attr.count(); ++i )
|
||||
for( csize i = 0; i < node_attr.count(); ++i )
|
||||
{
|
||||
QDomNode n = node_attr.item( i );
|
||||
if( n.isAttr() )
|
||||
|
||||
@@ -319,7 +319,7 @@ listView::listView( QWidget * _parent ) :
|
||||
setSorting( -1 );
|
||||
setShowToolTips( TRUE );
|
||||
|
||||
setFont( pointSize<8>( font() ) );
|
||||
setFont( pointSizeF( font(), 7.5f ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@ int main( int argc, char * * argv )
|
||||
pal.setColor( QPalette::Text, QColor( 224, 224, 224 ) );
|
||||
pal.setColor( QPalette::Button, QColor( 160, 160, 160 ) );
|
||||
pal.setColor( QPalette::ButtonText, QColor( 255, 255, 255 ) );
|
||||
pal.setColor( QPalette::Highlight, QColor( 255, 224, 224 ) );
|
||||
pal.setColor( QPalette::Highlight, QColor( 224, 224, 224 ) );
|
||||
pal.setColor( QPalette::HighlightedText, QColor( 0, 0, 0 ) );
|
||||
#else
|
||||
pal.setColor( QColorGroup::Background, QColor( 128, 128, 128 ) );
|
||||
|
||||
@@ -93,7 +93,7 @@ midiTabWidget::midiTabWidget( channelTrack * _channel_track,
|
||||
outputChannelChanged( m_outputChannelSpinBox->value() );
|
||||
|
||||
|
||||
m_receiveCheckBox = new ledCheckBox( tr( "RECEIVE MIDI-EVENTS" ),
|
||||
m_receiveCheckBox = new ledCheckBox( tr( "Receive MIDI-events" ),
|
||||
m_setupTabWidget );
|
||||
m_receiveCheckBox->move( 10, 34 );
|
||||
connect( m_receiveCheckBox, SIGNAL( toggled( bool ) ),
|
||||
@@ -102,7 +102,7 @@ midiTabWidget::midiTabWidget( channelTrack * _channel_track,
|
||||
m_inputChannelSpinBox, SLOT( setEnabled( bool ) ) );
|
||||
|
||||
|
||||
m_sendCheckBox = new ledCheckBox( tr( "SEND MIDI-EVENTS" ),
|
||||
m_sendCheckBox = new ledCheckBox( tr( "Send MIDI-events" ),
|
||||
m_setupTabWidget );
|
||||
m_sendCheckBox->move( 10, 94 );
|
||||
connect( m_sendCheckBox, SIGNAL( toggled( bool ) ),
|
||||
|
||||
@@ -51,7 +51,7 @@ nameLabel::nameLabel( const QString & _initial_name, QWidget * _parent,
|
||||
QLabel( _initial_name, _parent ),
|
||||
m_pm( _pm )
|
||||
{
|
||||
#ifndef QT4
|
||||
#ifdef QT3
|
||||
setBackgroundMode( Qt::NoBackground );
|
||||
#endif
|
||||
}
|
||||
@@ -100,6 +100,7 @@ void nameLabel::paintEvent( QPaintEvent * )
|
||||
{
|
||||
#ifdef QT4
|
||||
QPainter p( this );
|
||||
p.fillRect( rect(), palette().color( backgroundRole() ) );
|
||||
#else
|
||||
QPixmap draw_pm( rect().size() );
|
||||
draw_pm.fill( this, rect().topLeft() );
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "midi_port.h"
|
||||
#include "song_editor.h"
|
||||
#include "piano_widget.h"
|
||||
#include "config_mgr.h"
|
||||
|
||||
|
||||
|
||||
@@ -58,7 +59,11 @@ notePlayHandle::notePlayHandle( channelTrack * _chnl_trk,
|
||||
m_muted( FALSE )
|
||||
{
|
||||
setFrames( _frames );
|
||||
m_channelTrack->m_pianoWidget->setKeyState( key(), TRUE );
|
||||
if( !configManager::inst()->value( "ui",
|
||||
"manualchannelpiano" ).toInt() )
|
||||
{
|
||||
m_channelTrack->m_pianoWidget->setKeyState( key(), TRUE );
|
||||
}
|
||||
// send MIDI-note-on-event
|
||||
m_channelTrack->processOutEvent( midiEvent( NOTE_ON,
|
||||
m_channelTrack->m_midiPort->outputChannel(),
|
||||
@@ -243,7 +248,12 @@ void notePlayHandle::noteOff( Uint32 _s )
|
||||
{
|
||||
m_releaseFramesToDo =
|
||||
m_channelTrack->m_envWidget->releaseFrames();
|
||||
m_channelTrack->m_pianoWidget->setKeyState( key(), FALSE );
|
||||
if( !configManager::inst()->value( "ui",
|
||||
"manualchannelpiano" ).toInt() )
|
||||
{
|
||||
m_channelTrack->m_pianoWidget->setKeyState( key(),
|
||||
FALSE );
|
||||
}
|
||||
// send MIDI-note-off-event
|
||||
m_channelTrack->processOutEvent( midiEvent( NOTE_OFF,
|
||||
m_channelTrack->m_midiPort->outputChannel(),
|
||||
|
||||
@@ -2093,8 +2093,14 @@ void pianoRoll::recordNote( const note & _n )
|
||||
note n( _n );
|
||||
n.setPos( songEditor::inst()->getPlayPos(
|
||||
songEditor::PLAY_PATTERN ) - n.length() );
|
||||
#ifndef QT4
|
||||
qApp->lock();
|
||||
#endif
|
||||
m_pattern->addNote( n );
|
||||
update();
|
||||
#ifndef QT4
|
||||
qApp->unlock();
|
||||
#endif
|
||||
songEditor::inst()->setModified();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* preset_preview_play_handle.cpp - implementation of class
|
||||
* presetPreviewPlayHandle
|
||||
*
|
||||
* 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
|
||||
*
|
||||
@@ -79,13 +79,16 @@ private:
|
||||
{
|
||||
hide();
|
||||
}
|
||||
~blindTrackContainer()
|
||||
|
||||
virtual ~blindTrackContainer()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
static blindTrackContainer * s_instanceOfMe;
|
||||
|
||||
friend void presetPreviewPlayHandle::cleanUp( void );
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
@@ -94,7 +97,7 @@ blindTrackContainer * blindTrackContainer::s_instanceOfMe = NULL;
|
||||
|
||||
channelTrack * presetPreviewPlayHandle::s_globalChannelTrack = NULL;
|
||||
notePlayHandle * presetPreviewPlayHandle::s_globalPreviewNote = NULL;
|
||||
QMutex * presetPreviewPlayHandle::s_globalDataMutex = NULL;
|
||||
QMutex presetPreviewPlayHandle::s_globalDataMutex;
|
||||
|
||||
|
||||
presetPreviewPlayHandle::presetPreviewPlayHandle(
|
||||
@@ -102,12 +105,13 @@ presetPreviewPlayHandle::presetPreviewPlayHandle(
|
||||
playHandle( PRESET_PREVIEW_PLAY_HANDLE ),
|
||||
m_previewNote( NULL )
|
||||
{
|
||||
if( s_globalDataMutex == NULL )
|
||||
/* if( s_globalDataMutex == NULL )
|
||||
{
|
||||
s_globalDataMutex = new QMutex;
|
||||
}
|
||||
|
||||
s_globalDataMutex->lock();
|
||||
s_globalDataMutex->lock();*/
|
||||
s_globalDataMutex.lock();
|
||||
|
||||
if( s_globalPreviewNote != NULL )
|
||||
{
|
||||
@@ -141,7 +145,7 @@ presetPreviewPlayHandle::presetPreviewPlayHandle(
|
||||
|
||||
s_globalPreviewNote = m_previewNote;
|
||||
|
||||
s_globalDataMutex->unlock();
|
||||
s_globalDataMutex.unlock();
|
||||
}
|
||||
|
||||
|
||||
@@ -149,21 +153,13 @@ presetPreviewPlayHandle::presetPreviewPlayHandle(
|
||||
|
||||
presetPreviewPlayHandle::~presetPreviewPlayHandle()
|
||||
{
|
||||
s_globalDataMutex->lock();
|
||||
s_globalDataMutex.lock();
|
||||
if( m_previewNote->muted() == FALSE )
|
||||
{
|
||||
s_globalPreviewNote = NULL;
|
||||
}
|
||||
delete m_previewNote;
|
||||
s_globalDataMutex->unlock();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void presetPreviewPlayHandle::cleanUp( void )
|
||||
{
|
||||
delete blindTrackContainer::inst();
|
||||
s_globalDataMutex.unlock();
|
||||
}
|
||||
|
||||
|
||||
@@ -182,3 +178,31 @@ bool presetPreviewPlayHandle::done( void ) const
|
||||
return( m_previewNote->muted() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void presetPreviewPlayHandle::cleanUp( void )
|
||||
{
|
||||
delete blindTrackContainer::inst();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
constNotePlayHandleVector presetPreviewPlayHandle::nphsOfChannelTrack(
|
||||
const channelTrack * _ct )
|
||||
{
|
||||
constNotePlayHandleVector cnphv;
|
||||
s_globalDataMutex.lock();
|
||||
if( s_globalPreviewNote != NULL &&
|
||||
s_globalPreviewNote->getChannelTrack() == _ct )
|
||||
{
|
||||
cnphv.push_back( s_globalPreviewNote );
|
||||
}
|
||||
s_globalDataMutex.unlock();
|
||||
return( cnphv );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -109,7 +109,12 @@ setupDialog::setupDialog( configTabs _tab_to_open ) :
|
||||
m_noMsgAfterSetup( configManager::inst()->value( "app",
|
||||
"nomsgaftersetup" ).toInt() ),
|
||||
m_workingDir( configManager::inst()->workingDir() ),
|
||||
m_vstDir( configManager::inst()->vstDir() )
|
||||
m_vstDir( configManager::inst()->vstDir() ),
|
||||
m_disableChActInd( configManager::inst()->value( "ui",
|
||||
"disablechannelactivityindicators" ).toInt() ),
|
||||
m_manualChPiano( configManager::inst()->value( "ui",
|
||||
"manualchannelpiano" ).toInt() )
|
||||
|
||||
{
|
||||
setWindowIcon( embed::getIconPixmap( "setup_general" ) );
|
||||
setWindowTitle( tr( "Setup LMMS" ) );
|
||||
@@ -288,6 +293,42 @@ setupDialog::setupDialog( configTabs _tab_to_open ) :
|
||||
|
||||
|
||||
|
||||
QWidget * performance = new QWidget( ws );
|
||||
performance->setFixedSize( 360, 200 );
|
||||
QVBoxLayout * perf_layout = new QVBoxLayout( performance );
|
||||
perf_layout->setSpacing( 0 );
|
||||
perf_layout->setMargin( 0 );
|
||||
labelWidget( performance, tr( "Performance settings" ) );
|
||||
|
||||
tabWidget * ui_fx_tw = new tabWidget( tr( "UI effects vs. "
|
||||
"performance" ).toUpper(),
|
||||
performance );
|
||||
ui_fx_tw->setFixedHeight( 70 );
|
||||
|
||||
ledCheckBox * disable_ch_act_ind = new ledCheckBox(
|
||||
tr( "Disable channel activity indicators" ),
|
||||
ui_fx_tw );
|
||||
disable_ch_act_ind->move( 10, 20 );
|
||||
disable_ch_act_ind->setChecked( m_disableChActInd );
|
||||
connect( disable_ch_act_ind, SIGNAL( toggled( bool ) ),
|
||||
this, SLOT( toggleDisableChActInd( bool ) ) );
|
||||
|
||||
|
||||
ledCheckBox * manual_ch_piano = new ledCheckBox(
|
||||
tr( "Only press keys on channel-piano manually" ),
|
||||
ui_fx_tw );
|
||||
manual_ch_piano->move( 10, 40 );
|
||||
manual_ch_piano->setChecked( m_manualChPiano );
|
||||
connect( manual_ch_piano, SIGNAL( toggled( bool ) ),
|
||||
this, SLOT( toggleManualChPiano( bool ) ) );
|
||||
|
||||
|
||||
|
||||
|
||||
perf_layout->addWidget( ui_fx_tw );
|
||||
perf_layout->addStretch();
|
||||
|
||||
|
||||
|
||||
QWidget * audio = new QWidget( ws );
|
||||
audio->setFixedSize( 360, 200 );
|
||||
@@ -297,7 +338,7 @@ setupDialog::setupDialog( configTabs _tab_to_open ) :
|
||||
labelWidget( audio, tr( "Audio settings" ) );
|
||||
|
||||
tabWidget * audioiface_tw = new tabWidget( tr( "AUDIO INTERFACE" ),
|
||||
audio );
|
||||
audio );
|
||||
audioiface_tw->setFixedHeight( 60 );
|
||||
|
||||
m_audioInterfaces = new QComboBox( audioiface_tw );
|
||||
@@ -466,9 +507,12 @@ setupDialog::setupDialog( configTabs _tab_to_open ) :
|
||||
m_tabBar->addTab( directories, tr( "Directories" ), 1, FALSE, TRUE
|
||||
)->setIcon( embed::getIconPixmap(
|
||||
"setup_directories" ) );
|
||||
m_tabBar->addTab( audio, tr( "Audio settings" ), 2, FALSE, TRUE
|
||||
m_tabBar->addTab( performance, tr( "Performance settings" ), 2, FALSE,
|
||||
TRUE )->setIcon( embed::getIconPixmap(
|
||||
"setup_performance" ) );
|
||||
m_tabBar->addTab( audio, tr( "Audio settings" ), 3, FALSE, TRUE
|
||||
)->setIcon( embed::getIconPixmap( "setup_audio" ) );
|
||||
m_tabBar->addTab( midi, tr( "MIDI settings" ), 3, TRUE, TRUE
|
||||
m_tabBar->addTab( midi, tr( "MIDI settings" ), 4, TRUE, TRUE
|
||||
)->setIcon( embed::getIconPixmap( "setup_midi" ) );
|
||||
|
||||
#undef setIcon
|
||||
@@ -541,6 +585,11 @@ void setupDialog::accept( void )
|
||||
QString::number( m_noWizard ) );
|
||||
configManager::inst()->setValue( "app", "nomsgaftersetup",
|
||||
QString::number( m_noMsgAfterSetup ) );
|
||||
configManager::inst()->setValue( "ui",
|
||||
"disablechannelactivityindicators",
|
||||
QString::number( m_disableChActInd ) );
|
||||
configManager::inst()->setValue( "ui", "manualchannelpiano",
|
||||
QString::number( m_manualChPiano ) );
|
||||
|
||||
configManager::inst()->setWorkingDir( m_workingDir );
|
||||
configManager::inst()->setVSTDir( m_vstDir );
|
||||
@@ -590,7 +639,7 @@ void setupDialog::setBufferSize( int _value )
|
||||
}
|
||||
|
||||
m_bufferSize = _value * 64;
|
||||
m_bufSizeLbl->setText( tr( "FRAMES: %1\nLATENCY: %2 ms" ).arg(
|
||||
m_bufSizeLbl->setText( tr( "Frames: %1\nLatency: %2 ms" ).arg(
|
||||
m_bufferSize ).arg(
|
||||
1000.0f * m_bufferSize /
|
||||
mixer::inst()->sampleRate(),
|
||||
@@ -627,6 +676,62 @@ void setupDialog::displayBufSizeHelp( void )
|
||||
|
||||
|
||||
|
||||
void setupDialog::toggleToolTips( bool _disabled )
|
||||
{
|
||||
m_disableToolTips = _disabled;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void setupDialog::toggleKnobUsability( bool _classical )
|
||||
{
|
||||
m_classicalKnobUsability = _classical;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void setupDialog::toggleGIMPLikeWindows( bool _enabled )
|
||||
{
|
||||
m_gimpLikeWindows = _enabled;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void setupDialog::toggleNoWizard( bool _enabled )
|
||||
{
|
||||
m_noWizard = _enabled;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void setupDialog::toggleNoMsgAfterSetup( bool _enabled )
|
||||
{
|
||||
m_noMsgAfterSetup = _enabled;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void setupDialog::toggleDisableChActInd( bool _disabled )
|
||||
{
|
||||
m_disableChActInd = _disabled;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void setupDialog::toggleManualChPiano( bool _enabled )
|
||||
{
|
||||
m_manualChPiano = _enabled;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void setupDialog::openWorkingDir( void )
|
||||
{
|
||||
#ifdef QT4
|
||||
@@ -761,45 +866,5 @@ void setupDialog::displayMIDIHelp( void )
|
||||
|
||||
|
||||
|
||||
void setupDialog::toggleToolTips( bool _disabled )
|
||||
{
|
||||
m_disableToolTips = _disabled;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void setupDialog::toggleKnobUsability( bool _classical )
|
||||
{
|
||||
m_classicalKnobUsability = _classical;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void setupDialog::toggleGIMPLikeWindows( bool _enabled )
|
||||
{
|
||||
m_gimpLikeWindows = _enabled;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void setupDialog::toggleNoWizard( bool _enabled )
|
||||
{
|
||||
m_noWizard = _enabled;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void setupDialog::toggleNoMsgAfterSetup( bool _enabled )
|
||||
{
|
||||
m_noMsgAfterSetup = _enabled;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#include "setup_dialog.moc"
|
||||
|
||||
|
||||
@@ -920,12 +920,10 @@ trackWidget::trackWidget( track * _track, QWidget * _parent ) :
|
||||
m_initialMouseX( -1 )
|
||||
{
|
||||
#ifdef QT4
|
||||
{
|
||||
QPalette pal;
|
||||
pal.setColor( m_trackOperationsWidget.backgroundRole(),
|
||||
QPalette pal;
|
||||
pal.setColor( m_trackOperationsWidget.backgroundRole(),
|
||||
QColor( 128, 128, 128 ) );
|
||||
m_trackOperationsWidget.setPalette( pal );
|
||||
}
|
||||
m_trackOperationsWidget.setPalette( pal );
|
||||
#else
|
||||
m_trackOperationsWidget.setPaletteBackgroundColor(
|
||||
QColor( 128, 128, 128 ) );
|
||||
@@ -934,9 +932,8 @@ trackWidget::trackWidget( track * _track, QWidget * _parent ) :
|
||||
|
||||
|
||||
#ifdef QT4
|
||||
QPalette pal;
|
||||
pal.setColor( m_trackSettingsWidget.backgroundRole(),
|
||||
QColor( 64, 64, 64 ) );
|
||||
QColor( 64, 64, 64 ) );
|
||||
m_trackSettingsWidget.setPalette( pal );
|
||||
#else
|
||||
m_trackSettingsWidget.setPaletteBackgroundColor( QColor( 64, 64, 64 ) );
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* mmp.cpp - implementation of class multimediaProject
|
||||
*
|
||||
* 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
|
||||
*
|
||||
@@ -196,7 +196,8 @@ bool multimediaProject::writeFile( const QString & _fn, bool _overwrite_check )
|
||||
}
|
||||
else if( type() == SONG_PROJECT )
|
||||
{
|
||||
if( fn.section( '.',-1 ) != "mmp" )
|
||||
if( fn.section( '.', -1 ) != "mmp" &&
|
||||
fn.section( '.', -1 ) != "mpt" )
|
||||
{
|
||||
fn += ".mmp";
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* midi_alsa_seq.cpp - ALSA-sequencer-client
|
||||
*
|
||||
* 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
|
||||
*
|
||||
@@ -101,7 +101,7 @@ midiALSASeq::midiALSASeq( void ) :
|
||||
|
||||
start(
|
||||
#if QT_VERSION >= 0x030200
|
||||
QThread::LowPriority
|
||||
QThread::IdlePriority
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -73,8 +73,8 @@ ledCheckBox::ledCheckBox( const QString & _text, QWidget * _parent,
|
||||
setBackgroundMode( Qt::PaletteBackground );
|
||||
#endif
|
||||
|
||||
setFont( pointSize<7>( font() ) );
|
||||
setFixedSize( m_ledOffPixmap->width() + 6 +
|
||||
setFont( pointSizeF( font(), 7.5f ) );
|
||||
setFixedSize( m_ledOffPixmap->width() + 4 +
|
||||
QFontMetrics( font() ).width( text() ),
|
||||
m_ledOffPixmap->height() );
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* side_bar_widget.cpp - implementation of base-widget for side-bar
|
||||
*
|
||||
* 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
|
||||
*
|
||||
@@ -55,6 +55,7 @@ sideBarWidget::sideBarWidget( const QString & _title, const QPixmap & _icon,
|
||||
m_contents = new QWidget( this );
|
||||
m_layout = new QVBoxLayout( m_contents );
|
||||
m_layout->setSpacing( 5 );
|
||||
m_layout->setMargin( 0 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user