From 00e9f34b20f5c200d9781e6ad6093cba214d86f8 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Wed, 28 Sep 2005 07:40:40 +0000 Subject: [PATCH] more compat hacks git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@10 0778d3d1-df1d-0410-868b-ea421aaaa00d --- ChangeLog | 21 +++++++++++++++++++-- TODO | 2 ++ configure.in | 4 ++-- include/audio_alsa.h | 3 +++ include/piano_roll.h | 4 ++++ include/qt3support.h | 6 +++++- resources/songeditor.png | Bin 1052 -> 767 bytes src/core/arp_and_chords_tab_widget.cpp | 22 +++++++++++----------- src/core/envelope_tab_widget.cpp | 2 +- src/midi/midi_oss.cpp | 6 +++++- 10 files changed, 52 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 72a9d57ec..d2003ec84 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2005-09-27 Tobias Doerffel + + * projects/cool_songs/TobyDox-TheFourthDimension.xml: + added another song... + + * include/qt3support.h: + Qt 3.1-support + + * include/audio_alsa.h: + define macro ALSA_PCM_NEW_HW_PARAMS_API for working with older ALSA- + versions which offer old and new HW-param-API - we're using the new one + +2005-09-26 Tobias Doerffel + + * many files: + make LMMS compile with Qt 3.0 and GCC 2.95 + 2005-09-25 Tobias Doerffel * src/audio/audio_jack.cpp: @@ -9,8 +26,8 @@ * src/core/timeline.cpp: do not call update() in updatePosition, call paintEvent() directly instead - hopefully fixes the "unexspected Xlib async replies" - which occured in some seldom cases because now there're no events - generated anymore + which occured in some seldom cases because there were paint-events + generated - something that must not be done in other threads... * resources/source/songeditor.svg: * resources/songeditor.png: diff --git a/TODO b/TODO index f06358739..6666f89c6 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,5 @@ +- make channel-track-window use tab-widget instead of tab-bar +- capture wheel-event in tab-widget for switching pages - add select-boxes for zooming in song-editor and piano-roll - use own scrollview for capturing wheel-events - make usable with Qt4 diff --git a/configure.in b/configure.in index b08224d8e..eeb547895 100644 --- a/configure.in +++ b/configure.in @@ -2,8 +2,8 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.50) -AC_INIT(lmms, 0.1.1-cvs20050927, tobydox@users.sourceforge.net) -AM_INIT_AUTOMAKE(lmms, 0.1.1-cvs20050927) +AC_INIT(lmms, 0.1.1-cvs20050928, tobydox@users.sourceforge.net) +AM_INIT_AUTOMAKE(lmms, 0.1.1-cvs20050928) AM_CONFIG_HEADER(config.h) diff --git a/include/audio_alsa.h b/include/audio_alsa.h index 80b5f927b..0604724e2 100644 --- a/include/audio_alsa.h +++ b/include/audio_alsa.h @@ -35,6 +35,9 @@ #define ALSA_SUPPORT #endif +// older ALSA-versions might require this +#define ALSA_PCM_NEW_HW_PARAMS_API + #include #include "audio_device.h" diff --git a/include/piano_roll.h b/include/piano_roll.h index e2c0b70ce..f5abd7d60 100644 --- a/include/piano_roll.h +++ b/include/piano_roll.h @@ -53,6 +53,7 @@ class pattern; class notePlayHandle; class pixmapButton; class timeLine; +class lmmsMainWin; @@ -227,6 +228,9 @@ private: ~pianoRoll(); + friend class lmmsMainWin; + + signals: void positionChanged( const midiTime & ); diff --git a/include/qt3support.h b/include/qt3support.h index 5697ae892..eefdc7f6a 100644 --- a/include/qt3support.h +++ b/include/qt3support.h @@ -171,10 +171,14 @@ typedef int csize; typedef unsigned int csize; // some compat-stuff for older qt-versions... -#if QT_VERSION < 0x030100 +#if QT_VERSION < 0x030200 #define wasCanceled wasCancelled +#endif + +#if QT_VERSION < 0x030100 + #include // Qt 3.0.x doesn't have QMutexLocker, so we implement it on our own... diff --git a/resources/songeditor.png b/resources/songeditor.png index 31b862ba7459713af5d87541ab4bca8db11c5cdf..27d79fb4a4173111c54409c914636bc0aea5d77b 100644 GIT binary patch delta 757 zcmV%6;7Jn891^@s6#I$TX00004b3#c}2nYxWdwcu1ttPq=G~R5|mqO zp`|UQ7uwEH7X!7!&}LltuD9KtDpH#ifno%J=$R;!cP0TCx;I4omk!h>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LLGXz3DBi{T<0R9HFmdVAV01n4P P00000NkvXXu0mjf18d^t diff --git a/src/core/arp_and_chords_tab_widget.cpp b/src/core/arp_and_chords_tab_widget.cpp index 4b501ee14..bff450677 100644 --- a/src/core/arp_and_chords_tab_widget.cpp +++ b/src/core/arp_and_chords_tab_widget.cpp @@ -190,7 +190,7 @@ const int CHORDS_GROUPBOX_HEIGHT = 65; const int ARP_GROUPBOX_X = CHORDS_GROUPBOX_X; const int ARP_GROUPBOX_Y = 10 + CHORDS_GROUPBOX_Y + CHORDS_GROUPBOX_HEIGHT; const int ARP_GROUPBOX_WIDTH = CHORDS_GROUPBOX_WIDTH; -const int ARP_GROUPBOX_HEIGHT = 180 - ARP_GROUPBOX_Y; +const int ARP_GROUPBOX_HEIGHT = 200 - ARP_GROUPBOX_Y; @@ -208,7 +208,7 @@ arpAndChordsTabWidget::arpAndChordsTabWidget( channelTrack * _channel_track, m_chordsComboBox = new QComboBox( m_chordsGroupBox ); m_chordsComboBox->setFont( pointSize<9>( m_chordsComboBox->font() ) ); - m_chordsComboBox->setGeometry( 10, 25, 100, 22 ); + m_chordsComboBox->setGeometry( 10, 25, 140, 22 ); for( int i = 0; s_chords[i].interval[0] != -1; ++i ) { @@ -224,7 +224,7 @@ arpAndChordsTabWidget::arpAndChordsTabWidget( channelTrack * _channel_track, m_chordRangeKnob->setLabel( tr( "RANGE" ) ); m_chordRangeKnob->setRange( 1.0, 9.0, 1.0 ); m_chordRangeKnob->setValue( 1.0, TRUE ); - m_chordRangeKnob->move( 123, 23 ); + m_chordRangeKnob->move( 164, 24 ); m_chordRangeKnob->setHintText( tr( "Chord range:" ) + " ", " " + tr( "octave(s)" ) ); #ifdef QT4 @@ -259,7 +259,7 @@ arpAndChordsTabWidget::arpAndChordsTabWidget( channelTrack * _channel_track, "possible chords, you can select." ) ); m_arpComboBox = new QComboBox( m_arpGroupBox ); m_arpComboBox->setFont( pointSize<9>( m_arpComboBox->font() ) ); - m_arpComboBox->setGeometry( 10, 25, 100, 22 ); + m_arpComboBox->setGeometry( 10, 25, 140, 22 ); for( int i = 0; s_chords[i].interval[0] != -1; ++i ) { @@ -274,7 +274,7 @@ arpAndChordsTabWidget::arpAndChordsTabWidget( channelTrack * _channel_track, m_arpRangeKnob->setLabel( tr( "RANGE" ) ); m_arpRangeKnob->setRange( 1.0, 9.0, 1.0 ); m_arpRangeKnob->setValue( 1.0, TRUE ); - m_arpRangeKnob->move( 124, 24 ); + m_arpRangeKnob->move( 164, 24 ); m_arpRangeKnob->setHintText( tr( "Arpeggio range:" ) + " ", " " + tr( "octave(s)" ) ); #ifdef QT4 @@ -291,7 +291,7 @@ arpAndChordsTabWidget::arpAndChordsTabWidget( channelTrack * _channel_track, m_arpTimeKnob->setLabel( tr( "TIME" ) ); m_arpTimeKnob->setRange( 10.0, 1000.0, 1.0 ); m_arpTimeKnob->setValue( 100.0, TRUE ); - m_arpTimeKnob->move( 164, 24 ); + m_arpTimeKnob->move( 164, 70 ); m_arpTimeKnob->setHintText( tr( "Arpeggio time:" ) + " ", " " + tr( "ms" ) ); #ifdef QT4 @@ -308,7 +308,7 @@ arpAndChordsTabWidget::arpAndChordsTabWidget( channelTrack * _channel_track, m_arpGateKnob->setLabel( tr( "GATE" ) ); m_arpGateKnob->setRange( 1.0, 200.0, 1.0 ); m_arpGateKnob->setValue( 100.0, TRUE ); - m_arpGateKnob->move( 204, 24 ); + m_arpGateKnob->move( 204, 70 ); m_arpGateKnob->setHintText( tr( "Arpeggio gate:" ) + " ", tr( "%" ) ); #ifdef QT4 m_arpGateKnob->setWhatsThis( @@ -327,7 +327,7 @@ arpAndChordsTabWidget::arpAndChordsTabWidget( channelTrack * _channel_track, m_arpUpBtn = new pixmapButton( m_arpGroupBox ); - m_arpUpBtn->move( 80, 70 ); + m_arpUpBtn->move( 70, 70 ); m_arpUpBtn->setActiveGraphic( embed::getIconPixmap( "arp_up_on" ) ); m_arpUpBtn->setInactiveGraphic( embed::getIconPixmap( "arp_up_off" ) ); #ifdef QT4 @@ -343,7 +343,7 @@ arpAndChordsTabWidget::arpAndChordsTabWidget( channelTrack * _channel_track, SLOT( arpUpToggled( bool ) ) ); m_arpDownBtn = new pixmapButton( m_arpGroupBox ); - m_arpDownBtn->move( 100, 70 ); + m_arpDownBtn->move( 90, 70 ); m_arpDownBtn->setActiveGraphic( embed::getIconPixmap( "arp_down_on" ) ); m_arpDownBtn->setInactiveGraphic( embed::getIconPixmap( "arp_down_off" ) ); @@ -355,7 +355,7 @@ arpAndChordsTabWidget::arpAndChordsTabWidget( channelTrack * _channel_track, SLOT( arpDownToggled( bool ) ) ); m_arpUpAndDownBtn = new pixmapButton( m_arpGroupBox ); - m_arpUpAndDownBtn->move( 120, 70 ); + m_arpUpAndDownBtn->move( 110, 70 ); m_arpUpAndDownBtn->setActiveGraphic( embed::getIconPixmap( "arp_up_and_down_on" ) ); m_arpUpAndDownBtn->setInactiveGraphic( embed::getIconPixmap( @@ -369,7 +369,7 @@ arpAndChordsTabWidget::arpAndChordsTabWidget( channelTrack * _channel_track, SLOT( arpUpAndDownToggled( bool ) ) ); m_arpRandomBtn = new pixmapButton( m_arpGroupBox ); - m_arpRandomBtn->move( 140, 70 ); + m_arpRandomBtn->move( 130, 70 ); m_arpRandomBtn->setActiveGraphic( embed::getIconPixmap( "arp_random_on" ) ); m_arpRandomBtn->setInactiveGraphic( embed::getIconPixmap( diff --git a/src/core/envelope_tab_widget.cpp b/src/core/envelope_tab_widget.cpp index 8bd5fb236..a8582c67b 100644 --- a/src/core/envelope_tab_widget.cpp +++ b/src/core/envelope_tab_widget.cpp @@ -71,7 +71,7 @@ const float RES_PRECISION = 1000.0f; // names for env- and lfo-targets - first is name being displayed to user // and second one is used internally, e.g. for saving/restoring settings -const char * targetNames[envelopeTabWidget::TARGET_COUNT][2] = +static const QString targetNames[envelopeTabWidget::TARGET_COUNT][2] = { { envelopeTabWidget::tr( "VOLUME" ), "vol" }, /* envelopeTabWidget::tr( "Pan" ), diff --git a/src/midi/midi_oss.cpp b/src/midi/midi_oss.cpp index 8d6c7fb2b..3245460e4 100644 --- a/src/midi/midi_oss.cpp +++ b/src/midi/midi_oss.cpp @@ -42,6 +42,10 @@ #endif +#ifdef HAVE_STDLIB_H +#include +#endif + #include "config_mgr.h" #include "gui_templates.h" @@ -118,7 +122,7 @@ void midiOSS::sendByte( Uint8 _c ) void midiOSS::run( void ) { - while( m_quit == FALSE ) + while( m_quit == FALSE && m_midiDev.isOpen() ) { #ifdef QT4 char c;