[Demudi-commits] r1215 - in mixxx/trunk: debian debian/patches src

Free Ekanayaka free-guest at alioth.debian.org
Thu Apr 19 06:47:57 UTC 2007


Author: free-guest
Date: 2007-04-19 06:47:48 +0000 (Thu, 19 Apr 2007)
New Revision: 1215

Added:
   mixxx/trunk/debian/patches/
   mixxx/trunk/debian/patches/00list
   mixxx/trunk/debian/patches/dxhead.h.dpatch
   mixxx/trunk/debian/patches/typos.dpatch
Modified:
   mixxx/trunk/debian/changelog
   mixxx/trunk/debian/control
   mixxx/trunk/debian/rules
   mixxx/trunk/src/dlgprefsound.cpp
   mixxx/trunk/src/mixxx.pro
   mixxx/trunk/src/mixxxview.cpp
   mixxx/trunk/src/soundsourcemp3.cpp
   mixxx/trunk/src/wvisualwaveform.cpp
Log:
* New upstream release

Modified: mixxx/trunk/debian/changelog
===================================================================
--- mixxx/trunk/debian/changelog	2007-04-19 06:40:31 UTC (rev 1214)
+++ mixxx/trunk/debian/changelog	2007-04-19 06:47:48 UTC (rev 1215)
@@ -1,3 +1,9 @@
+mixxx (1.5.0.1-1) UNRELEASED; urgency=low
+
+  * New upstream release
+
+ -- Free Ekanayaka <freee at debian.org>  Wed, 18 Apr 2007 21:42:37 +0200
+
 mixxx (1.4.2-1.1) unstable; urgency=high
 
   * Non-maintainer upload.

Modified: mixxx/trunk/debian/control
===================================================================
--- mixxx/trunk/debian/control	2007-04-19 06:40:31 UTC (rev 1214)
+++ mixxx/trunk/debian/control	2007-04-19 06:47:48 UTC (rev 1215)
@@ -1,9 +1,10 @@
 Source: mixxx
 Section: sound
 Priority: optional
-Maintainer: Paul Brossier <piem at debian.org>
-Build-Depends: debhelper (>= 4.0.0), pkg-config, docbook-to-man, xlibmesa-gl-dev, libglu1-mesa-dev, libqt3-mt-dev, libqt3-compat-headers, libjack-dev, libsamplerate-dev, libportaudio-dev (<< 19.1-1), libid3tag0-dev, libmad0-dev, libogg-dev, libsndfile1-dev, libvorbis-dev, libexpat-dev, libglib1.2-dev 
-Standards-Version: 3.6.2
+Maintainer: Debian Multimedia Team <debian-multimedia at lists.debian.org>
+Uploaders: Free Ekanayaka <freee at debian.org>, Paul Brossier <piem at debian.org>
+Build-Depends: debhelper (>= 4.0.0), pkg-config, docbook-to-man, xlibmesa-gl-dev, libglu1-mesa-dev, libqt3-mt-dev, libqt3-compat-headers, libjack-dev, libsamplerate-dev, portaudio19-dev, libid3tag0-dev, libmad0-dev, libogg-dev, libsndfile1-dev, libvorbis-dev, libexpat-dev, libglib1.2-dev, dpatch
+Standards-Version: 3.7.2
 
 Package: mixxx
 Section: sound

Added: mixxx/trunk/debian/patches/00list
===================================================================
--- mixxx/trunk/debian/patches/00list	2007-04-19 06:40:31 UTC (rev 1214)
+++ mixxx/trunk/debian/patches/00list	2007-04-19 06:47:48 UTC (rev 1215)
@@ -0,0 +1,2 @@
+dxhead.h
+typos

Added: mixxx/trunk/debian/patches/dxhead.h.dpatch
===================================================================
--- mixxx/trunk/debian/patches/dxhead.h.dpatch	2007-04-19 06:40:31 UTC (rev 1214)
+++ mixxx/trunk/debian/patches/dxhead.h.dpatch	2007-04-19 06:47:48 UTC (rev 1215)
@@ -0,0 +1,22 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## dxhead.h.dpatch by Free Ekanayaka <freee at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+ at DPATCH@
+diff -urNad mixxx-1.5.0.1~/src/soundsourcemp3.cpp mixxx-1.5.0.1/src/soundsourcemp3.cpp
+--- mixxx-1.5.0.1~/src/soundsourcemp3.cpp	2007-04-18 21:42:37.000000000 +0200
++++ mixxx-1.5.0.1/src/soundsourcemp3.cpp	2007-04-18 22:26:39.000000000 +0200
+@@ -16,9 +16,11 @@
+ 
+ #include "trackinfoobject.h"
+ #include "soundsourcemp3.h"
++#ifdef __VBRHEADERSDK__
+ extern "C" {
+ #include <dxhead.h>
+ }
++#endif
+ 
+ SoundSourceMp3::SoundSourceMp3(QString qFilename) : SoundSource(qFilename)
+ {


Property changes on: mixxx/trunk/debian/patches/dxhead.h.dpatch
___________________________________________________________________
Name: svn:executable
   + *

Added: mixxx/trunk/debian/patches/typos.dpatch
===================================================================
--- mixxx/trunk/debian/patches/typos.dpatch	2007-04-19 06:40:31 UTC (rev 1214)
+++ mixxx/trunk/debian/patches/typos.dpatch	2007-04-19 06:47:48 UTC (rev 1215)
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## typos.dpatch by Free Ekanayaka <freee at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+ at DPATCH@
+diff -urNad mixxx-1.5.0.1~/src/mixxxview.cpp mixxx-1.5.0.1/src/mixxxview.cpp
+--- mixxx-1.5.0.1~/src/mixxxview.cpp	2007-04-18 21:42:37.000000000 +0200
++++ mixxx-1.5.0.1/src/mixxxview.cpp	2007-04-18 22:40:43.000000000 +0200
+@@ -431,7 +431,7 @@
+     if ((m_pVisualCh1 && !((WVisualWaveform *)m_pVisualCh1)->directRendering()) ||
+         (m_pVisualCh2 && !((WVisualWaveform *)m_pVisualCh2)->directRendering()))
+         QMessageBox::warning(0, "OpenGL Direct Rendering",
+-                                "Direct redering is not enabled on your machine.\n\nThis means that the waveform displays will be very\nslow and take a lot of CPU time. Either update your\nconfiguration to enable direct rendering, or disable\nthe waveform displays in the control panel by\nselecting \"Simple\" under waveform displays.\nNOTE: In case you run on NVidia hardware,\ndirect rendering may not be present, but you will\nnot experience a degradation in performance.");
++                                "Direct rendering is not enabled on your machine.\n\nThis means that the waveform displays will be very\nslow and take a lot of CPU time. Either update your\nconfiguration to enable direct rendering, or disable\nthe waveform displays in the control panel by\nselecting \"Simple\" under waveform displays.\nNOTE: In case you run on NVidia hardware,\ndirect rendering may not be present, but you will\nnot experience a degradation in performance.");
+ }
+ 
+ bool MixxxView::activeWaveform()


Property changes on: mixxx/trunk/debian/patches/typos.dpatch
___________________________________________________________________
Name: svn:executable
   + *

Modified: mixxx/trunk/debian/rules
===================================================================
--- mixxx/trunk/debian/rules	2007-04-19 06:40:31 UTC (rev 1214)
+++ mixxx/trunk/debian/rules	2007-04-19 06:47:48 UTC (rev 1215)
@@ -9,9 +9,8 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+include /usr/share/dpatch/dpatch.make
 
-
-
 CFLAGS = -Wall -g
 
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
@@ -21,7 +20,7 @@
 endif
 
 configure: configure-stamp
-configure-stamp:
+configure-stamp: patch-stamp
 	dh_testdir
 	# Add here commands to configure the package.
 	(cd src; QTDIR=/usr/share/qt3 ./configure --enable-jack)
@@ -44,7 +43,7 @@
 
 	touch build-stamp
 
-clean:
+clean: unpatch
 	dh_testdir
 	dh_testroot
 	rm -f build-stamp configure-stamp

Modified: mixxx/trunk/src/dlgprefsound.cpp
===================================================================
--- mixxx/trunk/src/dlgprefsound.cpp	2007-04-19 06:40:31 UTC (rev 1214)
+++ mixxx/trunk/src/dlgprefsound.cpp	2007-04-19 06:47:48 UTC (rev 1215)
@@ -18,11 +18,14 @@
 #include "dlgprefsound.h"
 #include "playerproxy.h"
 #include <qcombobox.h>
+#include <qcheckbox.h>
 #include <qpushbutton.h>
 #include <qslider.h>
 #include <qlabel.h>
 #include <qmessagebox.h>
 #include <qthread.h>
+#include "controlobject.h"
+#include <qwidget.h>
 
 DlgPrefSound::DlgPrefSound(QWidget *parent, PlayerProxy *_player,
                            ConfigObject<ConfigValue> *_config) : DlgPrefSoundDlg(parent,"")
@@ -30,18 +33,25 @@
     m_bLatencySliderDrag = false;
     player = _player;
     config = _config;
-
+    
     // Update of latency label, when latency slider is updated
     connect(SliderLatency,                SIGNAL(sliderMoved(int)),  this, SLOT(slotLatency()));
     connect(SliderLatency,                SIGNAL(sliderReleased()),  this, SLOT(slotLatency()));
     connect(SliderLatency,                SIGNAL(valueChanged(int)), this, SLOT(slotLatency()));
 
-    // Set default sound quality as stored in config file if not already set
-    if (config->getValueString(ConfigKey("[Soundcard]","SoundQuality")).length() == 0)
-        config->set(ConfigKey("[Soundcard]","SoundQuality"),ConfigValue(4));
+    // Pitch-indp. time stretch disabled on mac
+#ifdef __MACX__
+    checkBoxPitchIndp->setChecked(false);
+    checkBoxPitchIndp->setEnabled(false);
+    textLabelSoundScaling->setEnabled(false);
+#endif
 
-    // Sound quality slider updates
-    SliderSoundQuality->setValue(2+4-config->getValueString(ConfigKey("[Soundcard]","SoundQuality")).toInt());
+    // Set default value for scale mode check box
+    int iPitchIndpTimeStretch = config->getValueString(ConfigKey("[Soundcard]","PitchIndpTimeStretch")).toInt();
+    if (iPitchIndpTimeStretch)
+        checkBoxPitchIndp->setChecked(true);
+    else
+        checkBoxPitchIndp->setChecked(false);
 
     // Apply changes whenever apply signal is emitted
     connect(ComboBoxSoundcardMasterLeft,  SIGNAL(activated(int)),    this, SLOT(slotApply()));
@@ -50,13 +60,10 @@
     connect(ComboBoxSoundcardHeadRight,   SIGNAL(activated(int)),    this, SLOT(slotApply()));
     connect(ComboBoxSamplerates,          SIGNAL(activated(int)),    this, SLOT(slotApply()));
     connect(ComboBoxSoundApi,             SIGNAL(activated(int)),    this, SLOT(slotApplyApi()));
+    connect(checkBoxPitchIndp,            SIGNAL(stateChanged(int)), this, SLOT(slotApply()));
     connect(SliderLatency,                SIGNAL(sliderPressed()),   this, SLOT(slotLatencySliderClick()));
     connect(SliderLatency,                SIGNAL(sliderReleased()),  this, SLOT(slotLatencySliderRelease()));
     connect(SliderLatency,                SIGNAL(valueChanged(int)), this, SLOT(slotLatencySliderChange(int)));
-    connect(SliderSoundQuality,           SIGNAL(valueChanged(int)), this, SLOT(slotApply()));
-
-    // Connect timer to latency query slot
-    connect(&m_qTimer, SIGNAL(timeout()), this, SLOT(slotQueryLatency()));
 }
 
 DlgPrefSound::~DlgPrefSound()
@@ -74,7 +81,7 @@
     ComboBoxSoundcardMasterLeft->insertItem("None");
     it = interfaces.begin();
     j = 1;
-    while ((*it))
+    while (it!=interfaces.end())
     {
         ComboBoxSoundcardMasterLeft->insertItem((*it));
         if ((*it)==config->getValueString(ConfigKey("[Soundcard]","DeviceMasterLeft")))
@@ -88,7 +95,7 @@
     ComboBoxSoundcardMasterRight->insertItem("None");
     it = interfaces.begin();
     j = 1;
-    while ((*it))
+    while (it!=interfaces.end())
     {
         ComboBoxSoundcardMasterRight->insertItem((*it));
         if ((*it)==config->getValueString(ConfigKey("[Soundcard]","DeviceMasterRight")))
@@ -102,7 +109,7 @@
     ComboBoxSoundcardHeadLeft->insertItem("None");
     it = interfaces.begin();
     j = 1;
-    while ((*it))
+    while (it!=interfaces.end())
     {
         ComboBoxSoundcardHeadLeft->insertItem((*it));
         if ((*it)==config->getValueString(ConfigKey("[Soundcard]","DeviceHeadLeft")))
@@ -116,7 +123,7 @@
     ComboBoxSoundcardHeadRight->insertItem("None");
     it = interfaces.begin();
     j = 1;
-    while ((*it))
+    while (it!=interfaces.end())
     {
         ComboBoxSoundcardHeadRight->insertItem((*it));
         if ((*it)==config->getValueString(ConfigKey("[Soundcard]","DeviceHeadRight")))
@@ -130,7 +137,7 @@
     QStringList srates = player->getSampleRates();
     it = srates.begin();
     j = 0;
-    while ((*it))
+    while (it!=srates.end())
     {
         ComboBoxSamplerates->insertItem((*it));
         if ((*it)==config->getValueString(ConfigKey("[Soundcard]","Samplerate")))
@@ -139,8 +146,10 @@
         ++it;
     }
 
-    // Latency
+    // Latency. Disconnect slider slot when updating...
+    disconnect(SliderLatency,                SIGNAL(valueChanged(int)), this, SLOT(slotLatencySliderChange(int)));
     SliderLatency->setValue(getSliderLatencyVal(config->getValueString(ConfigKey("[Soundcard]","Latency")).toInt()));
+    connect(SliderLatency,                SIGNAL(valueChanged(int)), this, SLOT(slotLatencySliderChange(int)));
 
     // API's
     ComboBoxSoundApi->clear();
@@ -148,7 +157,7 @@
     QStringList api = player->getSoundApiList();
     it = api.begin();
     j = 1;
-    while ((*it))
+    while (it!=api.end())
     {
         ComboBoxSoundApi->insertItem((*it));
         if ((*it)==config->getValueString(ConfigKey("[Soundcard]","SoundApi")))
@@ -190,61 +199,46 @@
     config->set(ConfigKey("[Soundcard]","DeviceMasterRight"), ConfigValue(ComboBoxSoundcardMasterRight->currentText()));
     config->set(ConfigKey("[Soundcard]","DeviceHeadLeft"), ConfigValue(ComboBoxSoundcardHeadLeft->currentText()));
     config->set(ConfigKey("[Soundcard]","DeviceHeadRight"), ConfigValue(ComboBoxSoundcardHeadRight->currentText()));
-
-    QString temp = ComboBoxSamplerates->currentText();
-    //temp.truncate(temp.length()-3);
-    config->set(ConfigKey("[Soundcard]","Samplerate"), ConfigValue(temp));
-    //config->set(ConfigKey("[Soundcard]","Bits"), ConfigValue(ComboBoxBits->currentText()));
+    config->set(ConfigKey("[Soundcard]","Samplerate"), ConfigValue(ComboBoxSamplerates->currentText()));
     config->set(ConfigKey("[Soundcard]","Latency"), ConfigValue(getSliderLatencyMsec(SliderLatency->value())));
-    config->set(ConfigKey("[Soundcard]","SoundQuality"), ConfigValue(2+4-SliderSoundQuality->value()));
- 
+    
+    if (checkBoxPitchIndp->isChecked())
+        config->set(ConfigKey("[Soundcard]","PitchIndpTimeStretch"), ConfigValue(1));
+    else
+        config->set(ConfigKey("[Soundcard]","PitchIndpTimeStretch"), ConfigValue(0));
+     
     qDebug("request msec %i", getSliderLatencyMsec(SliderLatency->value()));
     
     // Close devices, and open using config data
     player->close();
 
-    if (config->getValueString(ConfigKey("[Soundcard]","SoundApi"))=="None" || !player->open())
-        QMessageBox::warning(0, "Configuration error","Audio device could not be opened");
-    else
-    {
-        // Because the latency value configured with PortAudio, is not necessary what is actually
-        // used, it is read again 500 msec after the open
-        m_qTimer.start(500, true);
-        
-        // Configuration values might have changed after the opening of the player,
-        // so ensure the form is updated...
-        slotUpdate();
-    }
-    
+	// Not much to do if the API is None...
+	if (config->getValueString(ConfigKey("[Soundcard]","SoundApi"))!="None") {
+		if (!player->open())
+	        QMessageBox::warning(0, "Configuration error","Audio device could not be opened");
+	    else
+			slotUpdate();
+	}
 }
 
-void DlgPrefSound::slotQueryLatency()
-{
-    int iLatencyMsec = (int)ceil(1000.*((float)Player::getBufferSize()/((float)EngineObject::getPlaySrate()*2.)));
-    qDebug("got latency msec %i, buffer size %i",iLatencyMsec,Player::getBufferSize());
-    
-    // Only correct latency slider if it's more than two milliseconds off the actual value.
-    // By changing the latency sliders value, the device is closed and opened again, and this
-    // function will thus be called again, resulting in a loop
-    if (config->getValueString(ConfigKey("[Soundcard]","SoundApi"))!="None" && iLatencyMsec > 0 && 
-        abs(iLatencyMsec-config->getValueString(ConfigKey("[Soundcard]","Latency")).toInt())>2)
-    {
-        config->set(ConfigKey("[Soundcard]","Latency"), ConfigValue(iLatencyMsec));
-        slotUpdate();
-    }
-}
-
 void DlgPrefSound::slotApplyApi()
 {
     config->set(ConfigKey("[Soundcard]","SoundApi"), ConfigValue(ComboBoxSoundApi->currentText()));
-    if (!player->setSoundApi(ComboBoxSoundApi->currentText()))
-    {
-        QMessageBox::warning(0, "Configuration problem","Sound API could not be initialized");
-        config->set(ConfigKey("[Soundcard]","SoundApi"), ConfigValue("None"));
-    }
-    else if (!player->open())
-        QMessageBox::warning(0, "Configuration error","Audio device could not be opened");
 
+	if (!player->setSoundApi(ComboBoxSoundApi->currentText()))
+	{
+		// Did they select the null api?
+		if (ComboBoxSoundApi->currentText() != "None") {
+			QMessageBox::warning(0, "Configuration problem","Sound API could not be initialized");
+			config->set(ConfigKey("[Soundcard]","SoundApi"), ConfigValue("None"));
+		}
+	} else {
+		player->setDefaults();
+		if (!player->open()) {
+			QMessageBox::warning(0, "Configuration error","Audio device could not be opened");
+		}
+	}
+
     slotUpdate();
 }
 
@@ -264,4 +258,3 @@
     if (!m_bLatencySliderDrag)
         slotApply();
 }
-

Modified: mixxx/trunk/src/mixxx.pro
===================================================================
--- mixxx/trunk/src/mixxx.pro	2007-04-19 06:40:31 UTC (rev 1214)
+++ mixxx/trunk/src/mixxx.pro	2007-04-19 06:47:48 UTC (rev 1215)
@@ -15,14 +15,24 @@
 unix:!macx:include( main.qbas )
 
 # Path to Macintosh libraries
-macx:MACLIBPATH = ../../mixxx-maclib
+macx:MACLIBPATH = ../../mixxx-maclib/x86
 
 # Path to Windows libraries
 win32:WINLIBPATH = ../../mixxx-winlib
 
-# Path to ASIO SDK
+# Path to ASIO SDK. ASIO SDK can be downloaded from Steinbergs
+# homepage, or from here: http://www.irf.se/~ionogram/ionogram/SDK/ASIO%20SDK/asiosdk2.zip 
 ASIOSDK_DIR   = $$WINLIBPATH/asiosdk2
 
+# Define if compiling using QT4. Not currently working.
+#CONFIG += qt3support
+
+# Define if compiling using QT3
+CONFIG += qt3
+
+# Windows: Set to 1 if using Visual Studio, 0 if using MinGw
+win32:VISUALSTUDIO = 1
+
 #
 # End of options
 #
@@ -31,45 +41,72 @@
 DEFINES += __PORTAUDIO__
 SOURCES += playerportaudio.cpp
 HEADERS += playerportaudio.h
-#PORTAUDIO_DIR = ../lib/portaudio-v18
-#INCLUDEPATH += $$PORTAUDIO_DIR/pa_common
-#HEADERS += $$PORTAUDIO_DIR/pa_common/portaudio.h
+#PORTAUDIO_DIR = ../lib/portaudio-v19
+#INCLUDEPATH += $$PORTAUDIO_DIR/include
+#HEADERS += $$PORTAUDIO_DIR/include/portaudio.h
 unix {
-#SOURCES += $$PORTAUDIO_DIR/pa_common/pa_lib.c $$PORTAUDIO_DIR/pa_common/pa_convert.c
-#HEADERS += $$PORTAUDIO_DIR/pa_common/pa_host.h
-#unix:!macx:SOURCES += $$PORTAUDIO_DIR/pablio/ringbuffer.c $$PORTAUDIO_DIR/pa_unix_oss/pa_unix.c $$PORTAUDIO_DIR/pa_unix_oss/pa_unix_oss.c
-#unix:!macx:HEADERS += $$PORTAUDIO_DIR/pablio/ringbuffer.h $$PORTAUDIO_DIR/pa_unix_oss/pa_unix.h
-#unix:!macx:INCLUDEPATH += $$PORTAUDIO_DIR/pa_unix_oss
-# on debian uses the portaudio package
-unix:LIBS += -lportaudio
-macx:SOURCES += $$PORTAUDIO_DIR/pablio/ringbuffer.c $$PORTAUDIO_DIR/pa_mac_core/pa_mac_core.c
-macx:LIBS += -framework CoreAudio -framework AudioToolbox
-macx:INCLUDEPATH += $$PORTAUDIO_DIR/pa_mac_core $$PORTAUDIO_DIR/pablio 
+	#SOURCES += $$PORTAUDIO_DIR/pa_common/pa_lib.c $$PORTAUDIO_DIR/pa_common/pa_convert.c
+	#HEADERS += $$PORTAUDIO_DIR/pa_common/pa_host.h
+	#unix:!macx:SOURCES += $$PORTAUDIO_DIR/pablio/ringbuffer.c $$PORTAUDIO_DIR/pa_unix_oss/pa_unix.c $$PORTAUDIO_DIR/pa_unix_oss/pa_unix_oss.c
+	#unix:!macx:HEADERS += $$PORTAUDIO_DIR/pablio/ringbuffer.h $$PORTAUDIO_DIR/pa_unix_oss/pa_unix.h
+	#unix:!macx:INCLUDEPATH += $$PORTAUDIO_DIR/pa_unix_oss
+	#macx:SOURCES += $$PORTAUDIO_DIR/pablio/ringbuffer.c $$PORTAUDIO_DIR/pa_mac_core/pa_mac_core.c
+	#macx:LIBS += -framework CoreAudio -framework AudioToolbox
+	#macx:INCLUDEPATH += $$PORTAUDIO_DIR/pa_mac_core $$PORTAUDIO_DIR/pablio 
+	
+	#Hacked for PortAudio-v19
+	unix:!macx:LIBS += -lportaudio -lasound -ljack -lrt
+	#unix:!macx:LIBS += ../lib/portaudio-v19/lib/.libs/libportaudio.a -lasound -ljack -lrt
 }
-win32 {
-    message("Compiling with PortAudio/WMME drivers")
-    LIBS += winmm.lib PAStaticWMME.lib
+
+#Stuff for PortAudio
+macx {
+	#You should install PortAudio system-wide if you're building Mixxx, otherwise you'd want to uncomment the following line:
+	#LIBS += $$MACLIBPATH/lib/libportaudio.a
+	LIBS += -lportaudio
+	LIBS += -framework CoreAudio -framework AudioToolbox -framework AudioUnit
 }
 
-# RTAudio (Windows DirectSound)
 win32 {
-    message("Compiling with RtAudio/DirectSound drivers")
-    DEFINES += __RTAUDIO__ __WINDOWS_DS__
-    RTAUDIO_DIR = ../lib/rtaudio
-    INCLUDEPATH += $$RTAUDIO_DIR
-    HEADERS += playerrtaudio.h $$RTAUDIO_DIR/RtAudio.h $$RTAUDIO_DIR/RtError.h
-    SOURCES += playerrtaudio.cpp $$RTAUDIO_DIR/RtAudio.cpp
-    LIBS += dsound.lib
+    message("Compiling with PortAudio drivers")
+    contains(VISUALSTUDIO, 1) {
+	    LIBS += portaudio.lib
+	    HEADERS += $$WINLIBPATH/portaudio.h
+    }
+    contains(VISUALSTUDIO, 0) {
+		#Now insanely broken:
+		SOURCES += $$PORTAUDIO_DIR/pa_common/pa_lib.c $$PORTAUDIO_DIR/pa_common/pa_convert.c
+		HEADERS += $$PORTAUDIO_DIR/pa_common/pa_host.h
+		SOURCES += $$PORTAUDIO_DIR/pablio/ringbuffer.c $$PORTAUDIO_DIR/pa_win_wmme/pa_win_wmme.c
+		INCLUDEPATH += $$PORTAUDIO_DIR/pablio 
+		LIBS += -lwinmm
+    }
 }
 
+# RTAudio (Windows DirectSound)
+#win32 {
+#    message("Compiling with RtAudio/DirectSound drivers")
+#    DEFINES += __RTAUDIO__ __WINDOWS_DS__
+#    RTAUDIO_DIR = ../lib/rtaudio
+#    INCLUDEPATH += $$RTAUDIO_DIR
+#    HEADERS += playerrtaudio.h $$RTAUDIO_DIR/RtAudio.h $$RTAUDIO_DIR/RtError.h
+#    SOURCES += playerrtaudio.cpp $$RTAUDIO_DIR/RtAudio.cpp
+#    LIBS += dsound.lib
+#}
+
 # ASIO (Windows)
 #win32 {
+#    message("Compiling with ASIO drivers")
 #    DEFINES += __ASIO__
 #    SOURCES += playerasio.cpp $$ASIOSDK_DIR/common/asio.cpp $$ASIOSDK_DIR/host/asiodrivers.cpp $$ASIOSDK_DIR/host/pc/asiolist.cpp
 #    HEADERS += playerasio.h $$ASIOSDK_DIR/common/asio.h $$ASIOSDK_DIR/host/asiodrivers.h $$ASIOSDK_DIR/host/pc/asiolist.h
 #    INCLUDEPATH += $$ASIOSDK_DIR/common $$ASIOSDK_DIR/host $$ASIOSDK_DIR/host/pc
+#    contains(VISUALSTUDIO, 0) {
+#		LIBS += -lole32
+#	}
 #}
 
+
 # RTAudio (Linux ALSA)
 #unix:!macx {
 #    DEFINES += __RTAUDIO__ __LINUX_ALSA__
@@ -85,6 +122,14 @@
 unix:!macx:HEADERS += midiobjectoss.h
 unix:!macx:DEFINES += __OSSMIDI__
 
+# Jack (for MacOS X)
+# macx:HEADERS += ../../mixxx-maclib/includes/jack/jack.h
+#macx:LIBS += ../../mixxx-maclib/lib/libjack.a
+#macx:INCLUDEPATH += ../../mixxx-maclib/includes
+#macx:HEADERS += playerjack.h
+#macx:SOURCES += playerjack.cpp
+#DEFINES += __JACK__
+
 # Windows MIDI
 win32:SOURCES += midiobjectwin.cpp
 win32:HEADERS += midiobjectwin.h
@@ -113,7 +158,14 @@
 CONFIG += opengl
 
 # MP3
-win32:LIBS += libmad-release.lib libid3tag-release.lib
+win32 {
+    contains(VISUALSTUDIO, 1) {
+  		LIBS += libmad-release.lib libid3tag-release.lib
+	}
+    contains(VISUALSTUDIO, 0) {
+		LIBS += -lmad -lid3tag
+	}
+}
 macx:LIBS += $$MACLIBPATH/lib/libmad.a $$MACLIBPATH/lib/libid3tag.a
 
 # MP3 vbrheadersdk from Xing Technology
@@ -124,17 +176,31 @@
 #HEADERS += ../lib/vbrheadersdk/dxhead.h
 
 # Wave files
-win32:SOURCES += soundsourcesndfile.cpp
-win32:HEADERS += soundsourcesndfile.h
-win32:DEFINES += __SNDFILE__
-win32:LIBS += libsndfile.lib
+win32 {
+    SOURCES += soundsourcesndfile.cpp
+    HEADERS += soundsourcesndfile.h
+    DEFINES += __SNDFILE__
+	contains(VISUALSTUDIO, 1) {
+	    LIBS += libsndfile.lib
+	}
+	contains(VISUALSTUDIO, 0) {
+	    LIBS += libsndfile.dll
+	}
+}
 macx:SOURCES += soundsourceaudiofile.cpp
 macx:HEADERS += soundsourceaudiofile.h
 macx:DEFINES += __AUDIOFILE__
 macx:LIBS += $$MACLIBPATH/lib/libaudiofile.a
 
 # Ogg Vorbis
-win32:LIBS += vorbisfile_static.lib vorbis_static.lib ogg_static.lib
+win32 {
+	contains(VISUALSTUDIO, 1) {
+		LIBS += vorbisfile_static.lib vorbis_static.lib ogg_static.lib
+	}
+	contains(VISUALSTUDIO, 0) {
+		LIBS += ..\..\mixxx-winlib\vorbisfile.dll ..\..\mixxx-winlib\vorbis.dll ..\..\mixxx-winlib\ogg.dll
+	}
+}
 macx:LIBS += $$MACLIBPATH/lib/libvorbis.a $$MACLIBPATH/lib/libvorbisfile.a $$MACLIBPATH/lib/libogg.a
 
 # PowerMate
@@ -142,10 +208,16 @@
 HEADERS += powermate.h
 unix:!macx:SOURCES += powermatelinux.cpp
 unix:!macx:HEADERS += powermatelinux.h
-win32:SOURCES += powermatewin.cpp
-win32:HEADERS += powermatewin.h
-win32:LIBS += setupapi.lib
+#win32:SOURCES += powermatewin.cpp
+#win32:HEADERS += powermatewin.h
+#win32:LIBS += setupapi.lib
 
+# Hercules DJ Console
+SOURCES += hercules.cpp
+HEADERS += hercules.h
+unix:!macx:SOURCES += herculeslinux.cpp
+unix:!macx:HEADERS += herculeslinux.h
+
 # Mouse
 SOURCES += mouse.cpp
 HEADERS += mouse.h
@@ -166,15 +238,35 @@
 HEADERS += $$KISSFFT_DIR/kiss_fft.h $$KISSFFT_DIR/kiss_fftr.h $$KISSFFT_DIR/_kiss_fft_guts.h 
 INCLUDEPATH += $$KISSFFT_DIR
 
-# Audio scaling (use package on debian)
+# Audio scaling
 #INCLUDEPATH += ../lib/libsamplerate
-SOURCES += enginebufferscalesrc.cpp 
-#../lib/libsamplerate/samplerate.c ../lib/libsamplerate/src_linear.c ../lib/libsamplerate/src_sinc.c ../lib/libsamplerate/src_zoh.c
-HEADERS += enginebufferscalesrc.h 
-# on debian
-unix:LIBS += -lsamplerate
-#../lib/libsamplerate/samplerate.h ../lib/libsamplerate/config.h ../lib/libsamplerate/common.h ../lib/libsamplerate/float_cast.h ../lib/libsamplerate/fastest_coeffs.h ../lib/libsamplerate/high_qual_coeffs.h ../lib/libsamplerate/mid_qual_coeffs.h
+#SOURCES += enginebufferscalesrc.cpp ../lib/libsamplerate/samplerate.c ../lib/libsamplerate/src_linear.c ../lib/libsamplerate/src_sinc.c ../lib/libsamplerate/src_zoh.c
+#HEADERS += enginebufferscalesrc.h ../lib/libsamplerate/samplerate.h ../lib/libsamplerate/config.h ../lib/libsamplerate/common.h ../lib/libsamplerate/float_cast.h ../lib/libsamplerate/fastest_coeffs.h ../lib/libsamplerate/high_qual_coeffs.h ../lib/libsamplerate/mid_qual_coeffs.h
 
+# SoundTouch scaling
+unix {
+	INCLUDEPATH += ../lib/soundtouch
+	SOURCES += enginebufferscalest.cpp ../lib/soundtouch/SoundTouch.cpp ../lib/soundtouch/TDStretch.cpp ../lib/soundtouch/RateTransposer.cpp ../lib/soundtouch/AAFilter.cpp ../lib/soundtouch/FIFOSampleBuffer.cpp ../lib/soundtouch/FIRFilter.cpp
+	HEADERS += enginebufferscalest.h ../lib/soundtouch/TDStretch.h ../lib/soundtouch/RateTransposer.h ../lib/soundtouch/cpu_detect.h ../lib/soundtouch/STTypes.h ../lib/soundtouch/SoundTouch.h ../lib/soundtouch/FIFOSamplePipe.h ../lib/soundtouch/FIFOSampleBuffer.h ../lib/soundtouch/AAFilter.h ../lib/soundtouch/FIRFilter.h ../lib/soundtouch/config.h
+	!macx:SOURCES += ../lib/soundtouch/mmx_gcc.cpp
+	SOURCES += ../lib/soundtouch/cpu_detect_x86_gcc.cpp
+}
+win32 {
+    INCLUDEPATH += ../lib/soundtouch
+    SOURCES += enginebufferscalest.cpp
+    HEADERS += enginebufferscalest.h
+    contains(VISUALSTUDIO, 1) {
+        INCLUDEPATH += ../lib/soundtouch
+        SOURCES += ../lib/soundtouch/SoundTouch.cpp ../lib/soundtouch/TDStretch.cpp ../lib/soundtouch/RateTransposer.cpp ../lib/soundtouch/AAFilter.cpp ../lib/soundtouch/FIFOSampleBuffer.cpp ../lib/soundtouch/FIRFilter.cpp
+        HEADERS += ../lib/soundtouch/TDStretch.h ../lib/soundtouch/RateTransposer.h ../lib/soundtouch/cpu_detect.h ../lib/soundtouch/STTypes.h ../lib/soundtouch/SoundTouch.h ../lib/soundtouch/FIFOSamplePipe.h ../lib/soundtouch/FIFOSampleBuffer.h ../lib/soundtouch/AAFilter.h ../lib/soundtouch/FIRFilter.h ../lib/soundtouch/config.h
+        SOURCES += ../lib/soundtouch/cpu_detect_x86_win.cpp ../lib/soundtouch/mmx_win.cpp ../lib/soundtouch/sse_win.cpp ../lib/soundtouch/3dnow_win.cpp
+    }
+    contains(VISUALSTUDIO, 0) {
+        INCLUDEPATH += ../../mixxx-winlib/soundtouch
+	    LIBS += -L..\..\mixxx-winlib -lsoundtouch
+    }
+}
+
 # Debug plotting through gplot API
 #unix:DEFINES += __GNUPLOT__
 #unix:INCLUDEPATH += ../lib/gplot
@@ -220,8 +312,8 @@
   OBJECTS_DIR = .obj
 
 # GCC Compiler optimization flags
-#  QMAKE_CXXFLAGS += -pg -march=pentium3 -O3 -pipe
-#  QMAKE_CFLAGS   += -pg -march=pentium3 -O3 -pipe
+QMAKE_CXXFLAGS += -pg -O3 -pipe
+QMAKE_CFLAGS   += -pg -O3 -pipe
 
 # gcc Profiling
 #QMAKE_CXXFLAGS += -pg
@@ -231,8 +323,21 @@
 win32 {
   DEFINES += __WIN__
   INCLUDEPATH += $$WINLIBPATH ../lib .
-  QMAKE_CXXFLAGS += -GX
-  QMAKE_LFLAGS += /VERBOSE:LIB /LIBPATH:$$WINLIBPATH /NODEFAULTLIB:library /NODEFAULTLIB:libcd /NODEFAULTLIB:libcmt /NODEFAULTLIB:libc
+  contains(VISUALSTUDIO, 1) {
+    QMAKE_CXXFLAGS += -GX
+    QMAKE_LFLAGS += /VERBOSE:LIB /LIBPATH:$$WINLIBPATH /NODEFAULTLIB:library /NODEFAULTLIB:libcd /NODEFAULTLIB:libcmt /NODEFAULTLIB:libc
+  }
+  contains(VISUALSTUDIO, 0) {
+      QMAKE_CXXFLAGS += -UQT_NO_CAST_TO_ASCII -UQ_NO_DECLARED_NOT_DEFINED -UQT_NO_ASCII_CAST
+      QMAKE_LFLAGS += -mwindows -lwinmm     
+  }
+  contains(VISUALSTUDIO,0) {
+      LIBS += -L..\..\mixxx-winlib
+  }
+
+  QT += network xml opengl qt3support
+  CONFIG += uic3
+
   SETTINGS_FILE = \"mixxx.cfg\"
   TRACK_FILE = \"mixxxtrack.xml\"
   RC_FILE = mixxx.rc
@@ -245,9 +350,13 @@
   SETTINGS_FILE = \"mixxx.cfg\"
   TRACK_FILE = \"mixxxtrack.xml\"
   RC_FILE = icon.icns
-  QMAKE_CXXFLAGS += -O3 -faltivec -mtune=G4 -mcpu=G4 -mdynamic-no-pic -funroll-loops -ffast-math -fstrict-aliasing
-  QMAKE_CFLAGS += -O3 -faltivec -mtune=G4 -mcpu=G4 -mdynamic-no-pic -funroll-loops -ffast-math -fstrict-aliasing
-  QMAKE_LFLAGS += -O3 -faltivec -mtune=G4 -mcpu=G4 -mdynamic-no-pic -funroll-loops -ffast-math -fstrict-aliasing
+  QMAKE_CXXFLAGS += -O3 -mdynamic-no-pic -funroll-loops -ffast-math -fstrict-aliasing
+  QMAKE_CFLAGS += -O3 -mdynamic-no-pic -funroll-loops -ffast-math -fstrict-aliasing
+  QMAKE_LFLAGS += -O3 -mdynamic-no-pic -funroll-loops -ffast-math -fstrict-aliasing 
+  #Old flags for PPC Macs (above ones work for both Intel and PPC)
+  #QMAKE_CXXFLAGS += -O3 -faltivec -mtune=G4 -mcpu=G4 -mdynamic-no-pic -funroll-loops -ffast-math -fstrict-aliasing
+  #QMAKE_CFLAGS += -O3 -faltivec -mtune=G4 -mcpu=G4 -mdynamic-no-pic -funroll-loops -ffast-math -fstrict-aliasing
+  #QMAKE_LFLAGS += -O3 -faltivec -mtune=G4 -mcpu=G4 -mdynamic-no-pic -funroll-loops -ffast-math -fstrict-aliasing
 }
 
 # Install-phase for a traditional 'make install'
@@ -272,34 +381,41 @@
    keyb.files = keyboard/*
 
     # doc files...
-   readme.path = $${PREFIX}/share/doc/mixxx
+   readme.path = $${PREFIX}/share/doc/mixxx-1.3
    readme.files = ../README
-   # redundant on debian
-   #licence.path = $${PREFIX}/share/doc/mixxx
-   #licence.files = ../LICENSE
-   #copying.path = $${PREFIX}/share/doc/mixxx
-   #copying.files = ../COPYING
-   manual.path = $${PREFIX}/share/doc/mixxx
+   licence.path = $${PREFIX}/share/doc/mixxx-1.3
+   licence.files = ../LICENSE
+   copying.path = $${PREFIX}/share/doc/mixxx-1.3
+   copying.files = ../COPYING
+   manual.path = $${PREFIX}/share/doc/mixxx-1.3
    manual.files = ../Mixxx-Manual.pdf
 
-    # menu icons
+    # .desktop file for KDE/GNOME menu entry
+   desktop.path = $${PREFIX}/share/applications
+   desktop.files = mixxx.desktop
+    
+    # icon file for Mixxx menu icon
    icon.path = $${PREFIX}/share/pixmaps
-   icon.files = mixxx.xpm mixxx-16.xpm
+   icon.files = mixxx-icon.png
 
     # binary...
    TARGET = mixxx
    target.path = $${PREFIX}/bin
 
     # finally adding what we wanna install...
-   INSTALLS += skino skinoc skinos skint midi keyb readme licence copying manual target icon
+   INSTALLS += skino skinoc skinos skint midi keyb readme licence copying manual desktop icon target
 }
 
+contains(CONFIG, qt3support) {
+	FORMS3	= dlgprefsounddlg.ui dlgprefmididlg.ui dlgprefplaylistdlg.ui dlgprefcontrolsdlg.ui
+}
+contains(CONFIG, qt3) {
+	FORMS	= dlgprefsounddlg.ui dlgprefmididlg.ui dlgprefplaylistdlg.ui dlgprefcontrolsdlg.ui
+}
 
-FORMS	= dlgprefsounddlg.ui dlgprefmididlg.ui dlgprefplaylistdlg.ui dlgprefcontrolsdlg.ui
+SOURCES += enginebuffercue.cpp input.cpp mixxxmenuplaylists.cpp trackplaylistlist.cpp mixxxkeyboard.cpp configobject.cpp controlobjectthread.cpp controlobjectthreadwidget.cpp controlobjectthreadmain.cpp controlevent.cpp controllogpotmeter.cpp controlobject.cpp controlnull.cpp controlpotmeter.cpp controlpushbutton.cpp controlttrotary.cpp controlbeat.cpp dlgpreferences.cpp dlgprefsound.cpp dlgprefmidi.cpp dlgprefplaylist.cpp dlgprefcontrols.cpp enginebuffer.cpp enginebufferscale.cpp engineclipping.cpp enginefilterblock.cpp enginefilteriir.cpp engineobject.cpp enginepregain.cpp enginevolume.cpp main.cpp midiobject.cpp midiobjectnull.cpp mixxx.cpp mixxxview.cpp player.cpp playerproxy.cpp soundsource.cpp soundsourcemp3.cpp soundsourceoggvorbis.cpp enginechannel.cpp enginemaster.cpp wwidget.cpp wpixmapstore.cpp wlabel.cpp wnumber.cpp wnumberpos.cpp wnumberrate.cpp wnumberbpm.cpp wknob.cpp wdisplay.cpp wvumeter.cpp wpushbutton.cpp wslidercomposed.cpp wslider.cpp wtracktable.cpp wtracktableitem.cpp enginedelay.cpp engineflanger.cpp enginespectralfwd.cpp mathstuff.cpp readerextract.cpp readerextractwave.cpp readerevent.cpp rtthread.cpp windowkaiser.cpp probabilityvector.cpp reader.cpp trackinfoobject.cpp enginevumeter.cpp peaklist.cpp rotary.cpp log.cpp
+HEADERS += enginebuffercue.h input.h mixxxmenuplaylists.h trackplaylistlist.h mixxxkeyboard.h configobject.h controlobjectthread.h controlobjectthreadwidget.h controlobjectthreadmain.h controlevent.h controllogpotmeter.h controlobject.h controlnull.h controlpotmeter.h controlpushbutton.h controlttrotary.h controlbeat.h defs.h dlgpreferences.h dlgprefsound.h dlgprefmidi.h dlgprefplaylist.h dlgprefcontrols.h enginebuffer.h enginebufferscale.h engineclipping.h enginefilterblock.h enginefilteriir.h engineobject.h enginepregain.h enginevolume.h midiobject.h midiobjectnull.h mixxx.h mixxxview.h player.h playerproxy.h soundsource.h soundsourcemp3.h soundsourceoggvorbis.h enginechannel.h enginemaster.h wwidget.h wpixmapstore.h wlabel.h wnumber.h wnumberpos.h wnumberrate.h wnumberbpm.h wknob.h wdisplay.h wvumeter.h wpushbutton.h wslidercomposed.h wslider.h wtracktable.h wtracktableitem.h enginedelay.h engineflanger.h enginespectralfwd.h mathstuff.h readerextract.h readerextractwave.h readerevent.h rtthread.h windowkaiser.h probabilityvector.h reader.h trackinfoobject.h enginevumeter.h peaklist.h rotary.h log.h
 
-SOURCES += mixxxmenuplaylists.cpp trackplaylistlist.cpp mixxxkeyboard.cpp configobject.cpp fakemonitor.cpp controlobjectthread.cpp controlobjectthreadwidget.cpp controlobjectthreadmain.cpp controlevent.cpp controllogpotmeter.cpp controlobject.cpp controlnull.cpp controlpotmeter.cpp controlpushbutton.cpp controlttrotary.cpp controlbeat.cpp dlgpreferences.cpp dlgprefsound.cpp dlgprefmidi.cpp dlgprefplaylist.cpp dlgprefcontrols.cpp enginebuffer.cpp enginebufferscale.cpp enginebufferscalelinear.cpp engineclipping.cpp enginefilterblock.cpp enginefilteriir.cpp engineobject.cpp enginepregain.cpp enginevolume.cpp main.cpp midiobject.cpp midiobjectnull.cpp mixxx.cpp mixxxview.cpp player.cpp playerproxy.cpp soundsource.cpp soundsourcemp3.cpp soundsourceoggvorbis.cpp monitor.cpp enginechannel.cpp enginemaster.cpp wwidget.cpp wpixmapstore.cpp wnumber.cpp wnumberpos.cpp wnumberrate.cpp wnumberbpm.cpp wknob.cpp wdisplay.cpp wvumeter.cpp wpushbutton.cpp wslidercomposed.cpp wslider.cpp wtracktable.cpp wtracktableitem.cpp enginedelay.cpp engineflanger.cpp enginespectralfwd.cpp mathstuff.cpp readerextract.cpp readerextractwave.cpp readerextracthfc.cpp readerextractbeat.cpp readerevent.cpp rtthread.cpp windowkaiser.cpp probabilityvector.cpp reader.cpp trackinfoobject.cpp enginevumeter.cpp peaklist.cpp rotary.cpp
-HEADERS += mixxxmenuplaylists.h trackplaylistlist.h mixxxkeyboard.h configobject.h fakemonitor.h controlobjectthread.h controlobjectthreadwidget.h controlobjectthreadmain.h controlevent.h controllogpotmeter.h controlobject.h controlnull.h controlpotmeter.h controlpushbutton.h controlttrotary.h controlbeat.h defs.h dlgpreferences.h dlgprefsound.h dlgprefmidi.h dlgprefplaylist.h dlgprefcontrols.h enginebuffer.h enginebufferscale.h enginebufferscalelinear.h engineclipping.h enginefilterblock.h enginefilteriir.h engineobject.h enginepregain.h enginevolume.h midiobject.h midiobjectnull.h mixxx.h mixxxview.h player.h playerproxy.h soundsource.h soundsourcemp3.h soundsourceoggvorbis.h monitor.h enginechannel.h enginemaster.h wwidget.h wpixmapstore.h wnumber.h wnumberpos.h wnumberrate.h wnumberbpm.h wknob.h wdisplay.h wvumeter.h wpushbutton.h wslidercomposed.h wslider.h wtracktable.h wtracktableitem.h enginedelay.h engineflanger.h enginespectralfwd.h mathstuff.h readerextract.h readerextractwave.h readerextracthfc.h readerextractbeat.h readerevent.h rtthread.h windowkaiser.h probabilityvector.h reader.h trackinfoobject.h enginevumeter.h peaklist.h rotary.h
-
 # New track code:
 SOURCES += track.cpp trackcollection.cpp trackplaylist.cpp xmlparse.cpp wtreeview.cpp wtreeitem.cpp wtreeitemfile.cpp wtreeitemdir.cpp wtreeitemplaylist.cpp wtreeitemplaylistroot.cpp
 HEADERS += track.h trackcollection.h trackplaylist.h xmlparse.h wtreeview.h wtreeitem.h wtreeitemfile.h wtreeitemdir.h wtreeitemplaylist.h wtreeitemplaylistroot.h
@@ -312,12 +428,81 @@
 SOURCES += mixxxsocketserver.cpp mixxxsocketclient.cpp #mixxxsocketcli.cpp
 HEADERS += mixxxsocketserver.h mixxxsocketclient.h #mixxxsocket.cli.h
 
+# Temporal effect processing
+SOURCES += enginetemporal.cpp visual/visualbuffertemporal.cpp
+HEADERS += enginetemporal.h visual/visualbuffertemporal.h
+DEFINES += TEMPORAL
+
+# RECORDING SOUND
+unix:LIBS += -laudiofile
+
+# Waveform summary
+SOURCES += wavesummary.cpp wavesegmentation.cpp soundsourceproxy.cpp woverview.cpp
+HEADERS += wavesummary.h wavesegmentation.h soundsourceproxy.h woverview.h
+
+# Beat seek
+SOURCES += enginebeatseek.cpp
+HEADERS += enginebeatseek.h
+
+# RealSearch
+HEADERS += enginebufferscalereal.h
+SOURCES += enginebufferscalereal.cpp
+
+# Hack to save waveform output to wav file at exit
+#DEFINES += RECORD_OUTPUT
+
 IMAGES += icon.png
 DEFINES += SETTINGS_FILE=$$SETTINGS_FILE TRACK_FILE=$$TRACK_FILE
+#CONFIG += qt thread warn_off release
+#DEFINES += QT_NO_CHECK
+CONFIG += qt thread warn_on debug
 unix:TEMPLATE = app
-win32:TEMPLATE = vcapp
-CONFIG += qt thread warn_off release
-DEFINES += QT_NO_CHECK
-#CONFIG += qt thread warn_on debug
+
+win32 {
+  contains(VISUALSTUDIO, 0) {
+    message("Using mingw")
+	TEMPLATE = app
+  }
+  contains(VISUALSTUDIO, 1) {
+    message("Using Visual Studio")
+	TEMPLATE = vcapp
+  }
+}
+
 DBFILE = mixxx.db
 LANGUAGE = C++
+
+contains(ENABLED_FEATURES, lua) {
+	ENABLED_FEATURES += script
+} else:contains(ENABLED_FEATURES, python) {
+	ENABLED_FEATURES += script
+}
+
+contains(ENABLED_FEATURES, script) {
+	HEADERS += script/*.h
+	SOURCES += script/*.cpp
+	DEFINES += __SCRIPT__
+}
+
+contains(ENABLED_FEATURES, lua) {
+	HEADERS += script/lua/*.h
+	SOURCES += script/lua/*.cpp
+	LIBS+=-llua -llualib -ltolua
+	DEFINES += __LUA__
+}
+
+contains(ENABLED_FEATURES, python) {
+	HEADERS += script/python/*.h
+	SOURCES += script/python/*.cpp
+	DEFINES += __PYTHON__
+
+	LIBS += $$system(python-config)
+	exists(/usr/include/python2.4/Python.h) {
+		INCLUDEPATH += /usr/include/python2.4/
+	} else:exists(/usr/include/python2.3/Python.h) {
+		INCLUDEPATH += /usr/include/python2.3/
+	} else:exists(/usr/include/python2.2/Python.h) {
+		INCLUDEPATH += /usr/include/python2.2/
+	}
+}
+

Modified: mixxx/trunk/src/mixxxview.cpp
===================================================================
--- mixxx/trunk/src/mixxxview.cpp	2007-04-19 06:40:31 UTC (rev 1214)
+++ mixxx/trunk/src/mixxxview.cpp	2007-04-19 06:47:48 UTC (rev 1215)
@@ -35,12 +35,14 @@
 #include "wslidercomposed.h"
 #include "wdisplay.h"
 #include "wvumeter.h"
+#include "wlabel.h"
 #include "wnumber.h"
 #include "wnumberpos.h"
 #include "wnumberbpm.h"
 #include "wnumberrate.h"
 #include "wvisualwaveform.h"
 #include "wvisualsimple.h"
+#include "woverview.h"
 #include "mixxxkeyboard.h"
 #include "controlobject.h"
 #include "controlobjectthreadwidget.h"
@@ -72,9 +74,11 @@
     QDomElement docElem = skin.documentElement();
 
 #ifdef __WIN__
+#ifndef QT3_SUPPORT
     // QPixmap fix needed on Windows 9x
     QPixmap::setDefaultOptimization(QPixmap::MemoryOptim);
 #endif
+#endif
 
     // Default values for visuals
     m_pTrackTable = 0;
@@ -90,14 +94,16 @@
     m_bZoom = false;
     m_pSplitter = 0;
     m_bVisualWaveform = false;
+    m_pOverviewCh1 = 0;
+    m_pOverviewCh2 = 0;
 
-
     // Load all widgets defined in the XML file
     QDomNode node = docElem.firstChild();
     while (!node.isNull())
     {
         if (node.isElement())
         {
+	//printf("%s\n", node.nodeName());
             if (node.nodeName()=="PushButton")
             {
                 WPushButton *p = new WPushButton(this);
@@ -112,6 +118,13 @@
                 p->installEventFilter(m_pKeyboard);
                 m_qWidgetList.append(p);
             }
+	    else if (node.nodeName()=="Label")
+            {
+                WLabel *p = new WLabel(this);
+                p->setup(node);
+
+                m_qWidgetList.append(p);
+            }
             else if (node.nodeName()=="Number")
             {
                 WNumber *p = new WNumber(this);
@@ -182,9 +195,19 @@
                 QString filename = WWidget::selectNodeQString(node, "Path");
                 QPixmap background(WWidget::getPath(filename));
                 this->setPaletteBackgroundPixmap(background);
-                this->setFixedSize(background.width(),background.height()+((QMainWindow *)parent)->menuBar()->height());
-                parent->setFixedSize(background.width(),background.height()+((QMainWindow *)parent)->menuBar()->height());
+                // FWI: Begin of fullscreen patch
+                // this->setFixedSize(background.width(),background.height()+((QMainWindow *)parent)->menuBar()->height());
+                // parent->setFixedSize(background.width(),background.height()+((QMainWindow *)parent)->menuBar()->height());
+                this->setFixedSize(background.width(),background.height());
+                parent->setMinimumSize(background.width(),background.height());
+                // FWI: End of fullscreen patch
                 this->move(0,0);
+				
+				if (!WWidget::selectNode(node, "BgColor").isNull()) {
+					QColor c;
+					c.setNamedColor(WWidget::selectNodeQString(node, "BgColor"));
+					parent->setEraseColor(c);
+				}
             }
             else if (node.nodeName()=="SliderComposed")
             {
@@ -206,6 +229,21 @@
                 p->setup(node);
                 p->installEventFilter(m_pKeyboard);
             }
+            else if (node.nodeName()=="Overview")
+            {
+                if (WWidget::selectNodeInt(node, "Channel")==1 && m_pOverviewCh1==0)
+                {
+                    m_pOverviewCh1 = new WOverview(this);
+                    m_qWidgetList.append(m_pOverviewCh1);
+                    m_pOverviewCh1->setup(node);
+                }
+                else if (WWidget::selectNodeInt(node, "Channel")==2 && m_pOverviewCh2==0)
+                {
+                    m_pOverviewCh2 = new WOverview(this);
+                    m_qWidgetList.append(m_pOverviewCh2);
+                    m_pOverviewCh2->setup(node);
+                }
+            }
             else if (node.nodeName()=="Visual")
             {
                 if (WWidget::selectNodeInt(node, "Channel")==1 && m_pVisualCh1==0)
@@ -334,7 +372,7 @@
                 m_pSplitter->setFixedSize(x,y);
 
                 // This is QT 3.2 only
-        //m_pSplitter->setHandleWidth(2);
+                //m_pSplitter->setHandleWidth(2);
 
                 m_qWidgetList.append(m_pSplitter);
             }
@@ -374,9 +412,11 @@
     }
 
 #ifdef __WIN__
+#ifndef QT3_SUPPORT
     // QPixmap fix needed on Windows 9x
     QPixmap::setDefaultOptimization(QPixmap::NormalOptim);
 #endif
+#endif
 
 }
 
@@ -389,9 +429,9 @@
 {
     // Check if DirectRendering is enabled and display warning
     if ((m_pVisualCh1 && !((WVisualWaveform *)m_pVisualCh1)->directRendering()) ||
-	(m_pVisualCh2 && !((WVisualWaveform *)m_pVisualCh2)->directRendering()))
+        (m_pVisualCh2 && !((WVisualWaveform *)m_pVisualCh2)->directRendering()))
         QMessageBox::warning(0, "OpenGL Direct Rendering",
-                                "Direct rendering is not enabled on your machine.\n\nThis means that the waveform displays will be very\nslow and take a lot of CPU time. Either update your\nconfiguration to enable direct rendering, or disable\nthe waveform displays in the control panel by\nselecting \"Simple\" under waveform displays.\nNOTE: In case you run on NVidia hardware, direct rendering may not be present, but you will not experience a degradation in performance.");
+                                "Direct redering is not enabled on your machine.\n\nThis means that the waveform displays will be very\nslow and take a lot of CPU time. Either update your\nconfiguration to enable direct rendering, or disable\nthe waveform displays in the control panel by\nselecting \"Simple\" under waveform displays.\nNOTE: In case you run on NVidia hardware,\ndirect rendering may not be present, but you will\nnot experience a degradation in performance.");
 }
 
 bool MixxxView::activeWaveform()

Modified: mixxx/trunk/src/soundsourcemp3.cpp
===================================================================
--- mixxx/trunk/src/soundsourcemp3.cpp	2007-04-19 06:40:31 UTC (rev 1214)
+++ mixxx/trunk/src/soundsourcemp3.cpp	2007-04-19 06:47:48 UTC (rev 1215)
@@ -14,8 +14,8 @@
  *                                                                         *
  ***************************************************************************/
 
+#include "trackinfoobject.h"
 #include "soundsourcemp3.h"
-#include "trackinfoobject.h"
 #ifdef __VBRHEADERSDK__
 extern "C" {
 #include <dxhead.h>
@@ -24,22 +24,22 @@
 
 SoundSourceMp3::SoundSourceMp3(QString qFilename) : SoundSource(qFilename)
 {
-    QFile file( qFilename.latin1() );
+    QFile file( qFilename );
     if (!file.open(IO_ReadOnly))
-        qFatal("MAD: Open of %s failed.", qFilename.latin1());
+        qFatal("MAD: Open of %s failed.", qstrdup(qFilename.local8Bit()));
 
     // Read the whole file into inputbuf:
     inputbuf_len = file.size();
     inputbuf = new char[inputbuf_len];
     unsigned int tmp = file.readBlock(inputbuf, inputbuf_len);
     if (tmp != inputbuf_len)
-        qFatal("MAD: ERR reading mp3-file: %s\nRead only %d bytes, but wanted %d bytes.",qFilename.latin1() ,tmp,inputbuf_len);
+        qFatal("MAD: ERR reading mp3-file: %s\nRead only %d bytes, but wanted %d bytes.",qstrdup(qFilename.local8Bit()) ,tmp,inputbuf_len);
 
     // Transfer it to the mad stream-buffer:
     mad_stream_init(&Stream);
     mad_stream_options(&Stream, MAD_OPTION_IGNORECRC);
     mad_stream_buffer(&Stream, (unsigned char *) inputbuf, inputbuf_len);
-
+    
     /*
       Decode all the headers, and fill in stats:
     */
@@ -82,7 +82,6 @@
         bitrate += Header.bitrate;
         SRATE = Header.samplerate;
         m_iChannels = MAD_NCHANNELS(&Header);
-
     }
     //qDebug("channels %i",m_iChannels);
 
@@ -97,13 +96,12 @@
     framecount = currentframe;
     currentframe = 0;
 
-
-    /*
+/*
     qDebug("length  = %ld sec." , filelength.seconds);
     qDebug("frames  = %d" , framecount);
     qDebug("bitrate = %d" , bitrate/1000);
     qDebug("Size    = %d", length());
-    */
+*/
 
     Frame = new mad_frame;
 
@@ -125,8 +123,11 @@
 
 long SoundSourceMp3::seek(long filepos)
 {
-    //qDebug("SEEK %i",filepos);
+    // Ensure that we are seeking to an even filepos
+    Q_ASSERT(filepos%2==0);
 
+//     qDebug("SEEK %i",filepos);
+
     MadSeekFrameType *cur;
 
     if (filepos==0)
@@ -161,11 +162,11 @@
 
         int framePos = findFrame(filepos);
 
-        //qDebug("list length %i, list pos %i",m_qSeekList.count(), k);
+//         qDebug("list length %i",m_qSeekList.count());
 
         if (framePos==0 || framePos>filepos || m_qSeekList.at()<5)
         {
-            //qDebug("Problem finding good seek frame (wanted %i, got %i), starting from 0",filepos,framePos);
+//             qDebug("Problem finding good seek frame (wanted %i, got %i), starting from 0",filepos,framePos);
 
             // Re-init buffer:
             mad_stream_finish(&Stream);
@@ -179,7 +180,7 @@
         }
         else
         {
-//            qDebug("frame pos %i",cur->pos);
+//             qDebug("frame pos %i",cur->pos);
 
             // Start four frame before wanted frame to get in sync...
             m_qSeekList.prev();
@@ -191,7 +192,7 @@
             mad_stream_finish(&Stream);
             mad_stream_init(&Stream);
             mad_stream_options(&Stream, MAD_OPTION_IGNORECRC);
-        //qDebug("mp3 restore %p",cur->m_pStreamPos);
+//        qDebug("mp3 restore %p",cur->m_pStreamPos);
             mad_stream_buffer(&Stream, (const unsigned char*)cur->m_pStreamPos, inputbuf_len-(long int)(cur->m_pStreamPos-(unsigned char*)inputbuf));
             mad_synth_mute(&Synth);
             mad_frame_mute(Frame);
@@ -213,9 +214,9 @@
 
         // Synthesize the the samples from the frame which should be discard to reach the requested position
         SAMPLE *temp = new SAMPLE[READCHUNKSIZE];
-        int r = read(filepos-cur->pos, temp);
-        //qDebug("try read %i, got %i...frame pos %i, filepos %i",filepos-cur->pos,r,cur->pos,filepos);
-        //qDebug("ok");
+        read(filepos-cur->pos, temp);
+//         qDebug("try read %i,...frame pos %i, filepos %i",filepos-cur->pos,cur->pos,filepos);
+//         qDebug("ok");
         delete [] temp;
     }
 /*
@@ -277,7 +278,10 @@
 */
 unsigned SoundSourceMp3::read(unsigned long samples_wanted, const SAMPLE* _destination)
 {
-//    qDebug("frame list %i",m_qSeekList.count());
+    // Ensure that we are reading an even number of samples. Otherwise this function may
+    // go into an infinite loop
+    Q_ASSERT(samples_wanted%2==0);
+//     qDebug("frame list %i",m_qSeekList.count());
 
     SAMPLE *destination = (SAMPLE *)_destination;
     unsigned Total_samples_decoded = 0;
@@ -300,23 +304,23 @@
         Total_samples_decoded += 2*(Synth.pcm.length-rest);
     }
 
-    //qDebug("Decoding");
+//     qDebug("Decoding");
     int no = 0;
     int frames = 0;
     while (Total_samples_decoded < samples_wanted)
     {
-        //qDebug("no %i",Total_samples_decoded);
+//         qDebug("no %i",Total_samples_decoded);
         if(mad_frame_decode(Frame,&Stream))
         {
             if(MAD_RECOVERABLE(Stream.error))
             {
-                //qDebug("MAD: Recoverable frame level ERR (%s)",mad_stream_errorstr(&Stream));
+//                 qDebug("MAD: Recoverable frame level ERR (%s)",mad_stream_errorstr(&Stream));
                 continue;
             } else if(Stream.error==MAD_ERROR_BUFLEN) {
-                //qDebug("MAD: buflen ERR");
+//                 qDebug("MAD: buflen ERR");
                 break;
             } else {
-                //qDebug("MAD: Unrecoverable frame level ERR (%s).",mad_stream_errorstr(&Stream));
+//                 qDebug("MAD: Unrecoverable frame level ERR (%s).",mad_stream_errorstr(&Stream));
                 break;
             }
         }
@@ -338,8 +342,8 @@
          */
 
 
-        //qDebug("synthlen %i, remain %i",Synth.pcm.length,(samples_wanted-Total_samples_decoded));
-        no = min(Synth.pcm.length,(samples_wanted-Total_samples_decoded)/2);
+//         qDebug("synthlen %i, remain %i",Synth.pcm.length,(samples_wanted-Total_samples_decoded));
+        no = math_min(Synth.pcm.length,(samples_wanted-Total_samples_decoded)/2);
         for (int i=0; i<no; i++)
         {
             // Left channel
@@ -354,7 +358,7 @@
         }
         Total_samples_decoded += 2*no;
 
-        //qDebug("decoded: %i, wanted: %i",Total_samples_decoded,samples_wanted);
+//         qDebug("decoded: %i, wanted: %i",Total_samples_decoded,samples_wanted);
     }
 
     // If samples are still left in buffer, set rest to the index of the unused samples
@@ -363,7 +367,7 @@
     else
         rest = -1;
 
-    //qDebug("decoded %i samples in %i frames, rest: %i, chan %i", Total_samples_decoded, frames, rest, m_iChannels);
+//     qDebug("decoded %i samples in %i frames, rest: %i, chan %i", Total_samples_decoded, frames, rest, m_iChannels);
     return Total_samples_decoded;
 }
 
@@ -373,7 +377,7 @@
 
     Track->setType("mp3");
 
-    id3_file *fh = id3_file_open(location.latin1(), ID3_FILE_MODE_READONLY);
+    id3_file *fh = id3_file_open(qstrdup(location.local8Bit()), ID3_FILE_MODE_READONLY);
     if (fh!=0)
     {
         id3_tag *tag = id3_file_tag(fh);
@@ -414,15 +418,21 @@
     // Number of bytes to read from file to determine duration
     const unsigned int READLENGTH = 5000;
     mad_timer_t dur = mad_timer_zero;
-    QFile file(location.latin1());
+    QFile file(location);
     if (!file.open(IO_ReadOnly)) {
-        qDebug("MAD: Open of %s failed.", location.latin1());
+        qDebug("MAD: Open of %s failed.", qstrdup(location.local8Bit()));
         return ERR;
     }
+    
+    // On MP3 files that are not small (larger than 60000 bytes, seek to position 50000 to avoid
+    // Meta data stored in ID3 tags
+    if (file.size()>60000)
+        file.at(50000);  
+    
     char *inputbuf = new char[READLENGTH];
     unsigned int tmp = file.readBlock(inputbuf, READLENGTH);
     if (tmp != READLENGTH) {
-        qDebug("MAD: ERR reading mp3-file: %s\nRead only %d bytes, but wanted %d bytes.",location.latin1() ,tmp,READLENGTH);
+        qDebug("MAD: ERR reading mp3-file: %s\nRead only %d bytes, but wanted %d bytes.",qstrdup(location.local8Bit()) ,tmp,READLENGTH);
         return ERR;
     }
     mad_stream Stream;
@@ -456,18 +466,20 @@
     else
     {
         // Check if file has constant bit rate by examining the rest of the buffer
-        unsigned long bitrate;
-        int i=0;
+        unsigned long bitrate=0;
         bool constantbitrate = true;
         int frames = 0;
-        while ((Stream.bufend - Stream.this_frame) > 0)
+        while ((Stream.bufend - Stream.this_frame)>0)
         {
+            
             if (mad_header_decode (&Header, &Stream) == -1)
             {
                 if (!MAD_RECOVERABLE (Stream.error))
                     break;
+                else
+                    continue;
             }
-            if (i==0)
+            if (frames==0)
             {
                 bitrate = Header.bitrate;
                 dur = Header.duration;
@@ -487,6 +499,9 @@
 //            qDebug("MAD: Count frames to get file duration!");
     }
 
+    Track->setSampleRate(Header.samplerate);
+    Track->setChannels(MAD_NCHANNELS(&Header));
+    
     mad_stream_finish(&Stream);
     delete [] inputbuf;
     file.close();
@@ -513,7 +528,7 @@
 int SoundSourceMp3::findFrame(int pos)
 {
     // Guess position of frame in m_qSeekList based on average frame size
-    MadSeekFrameType *temp = m_qSeekList.at(min(m_qSeekList.count()-1, (unsigned int)(pos/m_iAvgFrameSize)));
+    MadSeekFrameType *temp = m_qSeekList.at(math_min(m_qSeekList.count()-1, (unsigned int)(pos/m_iAvgFrameSize)));
 
 /*
     if (temp!=0)
@@ -557,7 +572,7 @@
     }
 }
 
-inline signed int SoundSourceMp3::madScale (mad_fixed_t sample)
+inline signed int SoundSourceMp3::madScale(mad_fixed_t sample)
 {
     sample += (1L << (MAD_F_FRACBITS - 16));
 

Modified: mixxx/trunk/src/wvisualwaveform.cpp
===================================================================
--- mixxx/trunk/src/wvisualwaveform.cpp	2007-04-19 06:40:31 UTC (rev 1214)
+++ mixxx/trunk/src/wvisualwaveform.cpp	2007-04-19 06:47:48 UTC (rev 1215)
@@ -28,25 +28,30 @@
     installEventFilter(this);
 
 #ifdef __MACX__
-    // Hack to reduce load in GUI thread. This makes the system behave 
+    // Hack to reduce load in GUI thread. This makes the system behave
     // "correctly" on MacOS X, where it would otherwise stall the system
     // for some seconds now and then.
-    startTimer(100);
+    //m_iTimerID = startTimer(100);
+    
+    //The above hack makes Mixxx feel like it's running on a 386 on OS X Intel.
+    //I'm going to experiment a bit with the timings - Albert:
+    m_iTimerID = startTimer(30);
 #endif
 #ifdef __WIN__
-    startTimer(15);
+    m_iTimerID = startTimer(15);
 #endif
 #ifdef __LINUX__
-    startTimer(15);
+    m_iTimerID = startTimer(30);
 #endif
 
+	m_painting = false;
     m_qlList.setAutoDelete(false);
 }
 
 WVisualWaveform::~WVisualWaveform()
 {
     // Stop timer
-    killTimers();
+    killTimer(m_iTimerID);
 
     // Delete associated VisualChannels
     while (m_qlList.remove());
@@ -88,6 +93,7 @@
     m_pVisualController->setBackgroundColor(colorBack);
     colorSignal.setNamedColor(WWidget::selectNodeQString(node, "SignalColor"));
     colorHfc.setNamedColor(WWidget::selectNodeQString(node, "HfcColor"));
+    colorCue.setNamedColor(WWidget::selectNodeQString(node, "CueColor"));
     colorMarker.setNamedColor(WWidget::selectNodeQString(node, "MarkerColor"));
     colorBeat.setNamedColor(WWidget::selectNodeQString(node, "BeatColor"));
     colorFisheye.setNamedColor(WWidget::selectNodeQString(node, "FisheyeColor"));
@@ -103,8 +109,6 @@
     x = size.left(size.find(",")).toInt();
     y = size.mid(size.find(",")+1).toInt();
     setFixedSize(x,y);
-
-
 }
 
 bool WVisualWaveform::eventFilter(QObject *o, QEvent *e)
@@ -137,12 +141,12 @@
         if (m_iStartPosX!=-1)
         {
             QMouseEvent *m = (QMouseEvent *)e;
-            int v = 64+m->x()-m_iStartPosX;
-            if (v<0)
-                v = 0;
-            else if (v>127)
-                v= 127;
-            emit(valueChangedLeftDown((double)v));
+            double v = 64.+(double)(m->x()-m_iStartPosX)/10.;
+            if (v<0.)
+                v = 0.;
+            else if (v>127.)
+                v= 127.;
+            emit(valueChangedLeftDown(v));
         }
     }
     else if (e->type() == QEvent::MouseButtonRelease)
@@ -157,6 +161,14 @@
     return true;
 }
 
+void WVisualWaveform::slotNewTrack()
+{
+    // Call each channel associated
+    VisualChannel *c;
+    for (c=m_qlList.first(); c; c=m_qlList.next())
+        c->setupBuffer();
+}
+
 VisualChannel *WVisualWaveform::add(const char *group)
 {
     VisualChannel *c = new VisualChannel(m_pVisualController, group);
@@ -173,6 +185,7 @@
         c->setColorBack((float)colorBack.red()/255., (float)colorBack.green()/255., (float)colorBack.blue()/255.);
         c->setColorSignal((float)colorSignal.red()/255., (float)colorSignal.green()/255., (float)colorSignal.blue()/255.);
         c->setColorHfc((float)colorHfc.red()/255., (float)colorHfc.green()/255., (float)colorHfc.blue()/255.);
+        c->setColorCue((float)colorCue.red()/255., (float)colorCue.green()/255., (float)colorCue.blue()/255.);
         c->setColorMarker((float)colorMarker.red()/255., (float)colorMarker.green()/255., (float)colorMarker.blue()/255.);
         c->setColorBeat((float)colorBeat.red()/255., (float)colorBeat.green()/255., (float)colorBeat.blue()/255.);
         c->setColorFisheye((float)colorFisheye.red()/255., (float)colorFisheye.green()/255., (float)colorFisheye.blue()/255.);
@@ -200,6 +213,7 @@
 void WVisualWaveform::paintGL()
 {
     // Display stuff
+    makeCurrent();
     m_pVisualController->display();
 }
 
@@ -210,5 +224,10 @@
 
 void WVisualWaveform::timerEvent(QTimerEvent*)
 {
-    updateGL();
+	// FIXME: This should be done with a QMutex deal
+	if (!m_painting) {
+		m_painting = true;
+		updateGL();
+		m_painting = false;
+	}
 }




More information about the Demudi-commits mailing list