[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Traverso-commit] traverso/src base.pri core/ProjectManager.cpp e...
From: |
Remon Sijrier |
Subject: |
[Traverso-commit] traverso/src base.pri core/ProjectManager.cpp e... |
Date: |
Tue, 08 May 2007 16:44:32 +0000 |
CVSROOT: /sources/traverso
Module name: traverso
Changes by: Remon Sijrier <r_sijrier> 07/05/08 16:44:31
Modified files:
src : base.pri
src/core : ProjectManager.cpp
src/engine : AudioDeviceThread.cpp
src/traverso : BusMonitor.cpp BusMonitor.h Interface.cpp
Interface.h
Log message:
* Disable Song menu if no project is loaded
* runtime detection for cpu affinity support
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/src/base.pri?cvsroot=traverso&r1=1.31&r2=1.32
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/ProjectManager.cpp?cvsroot=traverso&r1=1.31&r2=1.32
http://cvs.savannah.gnu.org/viewcvs/traverso/src/engine/AudioDeviceThread.cpp?cvsroot=traverso&r1=1.17&r2=1.18
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/BusMonitor.cpp?cvsroot=traverso&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/BusMonitor.h?cvsroot=traverso&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/Interface.cpp?cvsroot=traverso&r1=1.77&r2=1.78
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/Interface.h?cvsroot=traverso&r1=1.34&r2=1.35
Patches:
Index: base.pri
===================================================================
RCS file: /sources/traverso/traverso/src/base.pri,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- base.pri 8 May 2007 14:50:47 -0000 1.31
+++ base.pri 8 May 2007 16:44:31 -0000 1.32
@@ -78,8 +78,6 @@
unix {
- DEFINES += USE_CPU_AFFINITY
-
QMAKE_CXXFLAGS += $$system(pkg-config --cflags glib-2.0)
release {
Index: core/ProjectManager.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/ProjectManager.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- core/ProjectManager.cpp 3 May 2007 14:05:00 -0000 1.31
+++ core/ProjectManager.cpp 8 May 2007 16:44:31 -0000 1.32
@@ -301,6 +301,8 @@
}
}
+ } else {
+ set_current_project(0);
}
}
Index: engine/AudioDeviceThread.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/engine/AudioDeviceThread.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- engine/AudioDeviceThread.cpp 8 May 2007 14:48:31 -0000 1.17
+++ engine/AudioDeviceThread.cpp 8 May 2007 16:44:31 -0000 1.18
@@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-$Id: AudioDeviceThread.cpp,v 1.17 2007/05/08 14:48:31 r_sijrier Exp $
+$Id: AudioDeviceThread.cpp,v 1.18 2007/05/08 16:44:31 r_sijrier Exp $
*/
#include "AudioDeviceThread.h"
@@ -27,6 +27,7 @@
#include <Information.h>
#if defined (Q_WS_X11)
+#include <dlfcn.h>
#include <sys/resource.h>
#include <sched.h>
#endif
@@ -146,16 +147,31 @@
return -1;
}
+
+#if defined (Q_WS_X11)
+typedef int* (*setaffinity_func_type)(pid_t,unsigned int,cpu_set_t *);
+#endif
+
void AudioDeviceThread::run_on_cpu( int cpu )
{
-#if defined (USE_CPU_AFFINITY)
+#if defined (Q_WS_X11)
+ void *setaffinity_handle = dlopen(NULL, RTLD_LAZY);// NULL might not be
portable to platforms other than linux - address@hidden
+
+ setaffinity_func_type setaffinity_func;
+ setaffinity_func = (setaffinity_func_type) dlsym(setaffinity_handle,
"sched_setaffinity");
+
+ if (setaffinity_func != NULL) {
cpu_set_t mask;
CPU_ZERO(&mask);
CPU_SET(cpu, &mask);
- if (sched_setaffinity(0, sizeof(mask), &mask)) {
- PWARN("Unable to set CPU affinity");
+ if (setaffinity_func(0, sizeof(mask), &mask)) {
+ PWARN("Unable to set CPU affinity\n");
} else {
- PMESG("Running AudioDeviceThread on CPU %d", cpu);
+ PMESG("Running AudioDeviceThread on CPU %d\n", cpu);
+ }
+ }
+ else {
+ PWARN("Unable to set CPU affinity (glibc is too old)\n");
}
#endif
}
Index: traverso/BusMonitor.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/BusMonitor.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- traverso/BusMonitor.cpp 7 May 2007 20:48:01 -0000 1.9
+++ traverso/BusMonitor.cpp 8 May 2007 16:44:31 -0000 1.10
@@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-$Id: BusMonitor.cpp,v 1.9 2007/05/07 20:48:01 r_sijrier Exp $
+$Id: BusMonitor.cpp,v 1.10 2007/05/08 16:44:31 r_sijrier Exp $
*/
#include <libtraverso.h>
@@ -52,12 +52,6 @@
PENTERDES;
}
-void BusMonitor::resizeEvent( QResizeEvent* e)
-{
- QWidget::resizeEvent(e);
- PENTER2;
-}
-
QSize BusMonitor::sizeHint() const
{
return QSize( (inMeters.size() + outMeters.size()) * 50, 140);
Index: traverso/BusMonitor.h
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/BusMonitor.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- traverso/BusMonitor.h 7 May 2007 20:48:01 -0000 1.6
+++ traverso/BusMonitor.h 8 May 2007 16:44:31 -0000 1.7
@@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-$Id: BusMonitor.h,v 1.6 2007/05/07 20:48:01 r_sijrier Exp $
+$Id: BusMonitor.h,v 1.7 2007/05/08 16:44:31 r_sijrier Exp $
*/
#ifndef BUSMONITOR_H
@@ -38,7 +38,6 @@
~BusMonitor();
protected:
- void resizeEvent( QResizeEvent* e);
QSize sizeHint () const;
QSize minimumSizeHint () const;
Index: traverso/Interface.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/Interface.cpp,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -b -r1.77 -r1.78
--- traverso/Interface.cpp 7 May 2007 22:21:08 -0000 1.77
+++ traverso/Interface.cpp 8 May 2007 16:44:31 -0000 1.78
@@ -217,6 +217,7 @@
m_projectSaveAction->setEnabled(true);
m_projectSongManagerAction->setEnabled(true);
m_projectExportAction->setEnabled(true);
+ m_songMenuAction->setEnabled(true);
// the project's songs will be deleted _after_
// the project has been deleted, which will happen after this
@@ -235,6 +236,7 @@
m_projectSaveAction->setEnabled(false);
m_projectSongManagerAction->setEnabled(false);
m_projectExportAction->setEnabled(false);
+ m_songMenuAction->setEnabled(false);
setWindowTitle("Traverso");
// No project loaded, the currently loaded project will be
deleted after this
// function returns, if the songcanvas is still painting (due
playback e.g.) we
@@ -371,6 +373,7 @@
menu = menuBar()->addMenu(tr("&Song"));
+ m_songMenuAction = menu->menuAction();
action = menu->addAction(tr("New &Track(s)..."));
connect(action, SIGNAL(triggered()), this,
SLOT(show_newtrack_dialog()));
Index: traverso/Interface.h
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/Interface.h,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -b -r1.34 -r1.35
--- traverso/Interface.h 7 May 2007 18:15:30 -0000 1.34
+++ traverso/Interface.h 8 May 2007 16:44:31 -0000 1.35
@@ -131,6 +131,7 @@
QAction* m_projectSaveAction;
QAction* m_projectSongManagerAction;
QAction* m_projectExportAction;
+ QAction* m_songMenuAction;
ResourcesInfoWidget* resourcesInfo;
DriverInfoWidget* driverInfo;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Traverso-commit] traverso/src base.pri core/ProjectManager.cpp e...,
Remon Sijrier <=