summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/powerchord/gs.cpp17
-rw-r--r--noncore/multimedia/powerchord/gs.h1
-rw-r--r--noncore/multimedia/powerchord/opie-powerchord.control8
-rw-r--r--share/powerchord/acguitar.rawbin0 -> 50000 bytes
4 files changed, 15 insertions, 11 deletions
diff --git a/noncore/multimedia/powerchord/gs.cpp b/noncore/multimedia/powerchord/gs.cpp
index a3e85c9..fdcfb74 100644
--- a/noncore/multimedia/powerchord/gs.cpp
+++ b/noncore/multimedia/powerchord/gs.cpp
@@ -19,4 +19,5 @@
//#include <qpainter.h>
#include <qmessagebox.h>
+#include <qstring.h>
@@ -67,5 +68,5 @@ gs::gs()
reverb_max = 1024;
- // load sampled 'E' string
+ // load sampled 'E' string
int samplen = 25000;
@@ -74,6 +75,10 @@ gs::gs()
int raw_fd;
- raw_fd = open(ACGUITAR_PATH_S, O_RDONLY);
-
+
+ QString path = getenv( "OPIEDIR" );
+ path.append( "/share/powerchord/acguitar.raw" );
+
+ raw_fd = open( (const char*) path, O_RDONLY);
+
if (raw_fd < 0){
fprintf(stderr, "Failed to open raw file (%s)\n", strerror(errno));
@@ -83,5 +88,5 @@ gs::gs()
int totread = 0;
int i;
-
+
while (totread < samplen*2){
int want = samplen*2 - totread;
@@ -91,8 +96,8 @@ gs::gs()
totread += numread;
dsp_buf_ptr += numread/2;
-
+
if (numread == 0){
fprintf(stderr, "failed to read bytes\n");
- exit(-1);
+ exit(-1);
}
}
diff --git a/noncore/multimedia/powerchord/gs.h b/noncore/multimedia/powerchord/gs.h
index 3e4c04d..f2b309f 100644
--- a/noncore/multimedia/powerchord/gs.h
+++ b/noncore/multimedia/powerchord/gs.h
@@ -9,5 +9,4 @@
#define BUFSIZE 256
#define NUMCHANS 7
-#define ACGUITAR_PATH_S "/usr/local/projects/opie-head/noncore/multimedia/powerchord/acguitar.raw"
class gs : public QObject {
diff --git a/noncore/multimedia/powerchord/opie-powerchord.control b/noncore/multimedia/powerchord/opie-powerchord.control
index 7f45999..d295031 100644
--- a/noncore/multimedia/powerchord/opie-powerchord.control
+++ b/noncore/multimedia/powerchord/opie-powerchord.control
@@ -1,9 +1,9 @@
-Files: bin/powerchord apps/Applications/powerchord.desktop pics/powerchord sounds/powerchord
+Files: bin/powerchord apps/Applications/powerchord.desktop pics/powerchord share/powerchord
Priority: optional
-Section: qpe/applications
+Section: Applications
Maintainer: Camilo Mesias <camilo@mesias.co.uk>
Architecture: arm
-Version: 0.0.7
-Depends: qpe-base ($QPE_VERSION)
+Version: 0.0.8
+Depends: task-opie-minimal
Description: Guitar Chord generator application
Allows naming of chords using base note and key. Fretboard diagrams are
diff --git a/share/powerchord/acguitar.raw b/share/powerchord/acguitar.raw
new file mode 100644
index 0000000..1452147
--- a/dev/null
+++ b/share/powerchord/acguitar.raw
Binary files differ