summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2013-04-20 19:19:53 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2013-04-20 19:19:53 +0200
commit180d70312335d7274eff605e3ec4c1af5879daa4 (patch)
treec87d3c736a6e916985d89f106ff4a0c1898698e2
parent83cb289fdce76dfe0b5c1913fb68d1649367daa8 (diff)
Add libao dependency check. Fix redeclaration compile error.
-rw-r--r--configure.in5
-rw-r--r--dgedit/Makefile.am5
-rw-r--r--dgedit/samplesorter.cc10
3 files changed, 13 insertions, 7 deletions
diff --git a/configure.in b/configure.in
index ed1ff25..f3b32bf 100644
--- a/configure.in
+++ b/configure.in
@@ -243,6 +243,11 @@ if test "x$enable_editor" = "xyes"; then
if (test "$QT_UIC" = ""); then
AC_MSG_ERROR([QT4 uic is required.])
fi
+
+ dnl ======================
+ dnl Check for libao
+ dnl ======================
+ PKG_CHECK_MODULES(AO, ao >= 1.1.0)
else
AC_MSG_RESULT([*** Qt Drumkit Editor disabled per user request ***])
have_editor=no
diff --git a/dgedit/Makefile.am b/dgedit/Makefile.am
index 1df3c7c..2ebd304 100644
--- a/dgedit/Makefile.am
+++ b/dgedit/Makefile.am
@@ -2,9 +2,10 @@ if HAVE_EDITOR
bin_PROGRAMS = dgedit
-dgedit_LDADD = $(SNDFILE_LIBS) $(QT_LIBS) $(shell ../tools/MocList o ) -lao
+dgedit_LDADD = $(SNDFILE_LIBS) $(QT_LIBS) $(shell ../tools/MocList o ) \
+ $(AO_LIBS)
-dgedit_CXXFLAGS = $(SNDFILE_CXXFLAGS) $(QT_CFLAGS)
+dgedit_CXXFLAGS = $(SNDFILE_CXXFLAGS) $(QT_CFLAGS) $(AO_CFLAGS)
AM_CXXFLAGS = $(QT_CFLAGS)
dgedit_SOURCES = $(shell ../tools/MocList cc ) \
diff --git a/dgedit/samplesorter.cc b/dgedit/samplesorter.cc
index 0338bd7..5958354 100644
--- a/dgedit/samplesorter.cc
+++ b/dgedit/samplesorter.cc
@@ -112,13 +112,13 @@ Levels SampleSorter::levels()
if(i == threshold.size() - 1) next = 1.0;
else next = threshold[i+1];
- QMap<float, Selection>::iterator i = sorted.begin();
- while(i != sorted.end()) {
- float val = (i.key()/max);
+ QMap<float, Selection>::iterator si = sorted.begin();
+ while(si != sorted.end()) {
+ float val = (si.key()/max);
if(val >= lvl.velocity && val <= next) {
- lvl.selections[i.key()] = i.value();
+ lvl.selections[si.key()] = si.value();
}
- i++;
+ si++;
}
lvls.push_back(lvl);