summaryrefslogtreecommitdiff
path: root/noncore/multimedia/powerchord
authormickeyl <mickeyl>2004-01-20 15:51:03 (UTC)
committer mickeyl <mickeyl>2004-01-20 15:51:03 (UTC)
commit996826e77a8f96ada424814716178e65caba9287 (patch) (side-by-side diff)
tree09c60dcc4437dba1838c086b7eeb5480800716d5 /noncore/multimedia/powerchord
parent557eb6a25f2cfc6e350c1731ead4df0e07861f25 (diff)
downloadopie-996826e77a8f96ada424814716178e65caba9287.zip
opie-996826e77a8f96ada424814716178e65caba9287.tar.gz
opie-996826e77a8f96ada424814716178e65caba9287.tar.bz2
package the guitar sample
fix reading from share/powerchord/
Diffstat (limited to 'noncore/multimedia/powerchord') (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
3 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
@@ -20,2 +20,3 @@
#include <qmessagebox.h>
+#include <qstring.h>
@@ -68,3 +69,3 @@ gs::gs()
- // load sampled 'E' string
+ // load sampled 'E' string
int samplen = 25000;
@@ -75,4 +76,8 @@ 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){
@@ -84,3 +89,3 @@ gs::gs()
int i;
-
+
while (totread < samplen*2){
@@ -92,6 +97,6 @@ gs::gs()
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
@@ -10,3 +10,2 @@
#define NUMCHANS 7
-#define ACGUITAR_PATH_S "/usr/local/projects/opie-head/noncore/multimedia/powerchord/acguitar.raw"
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,8 +1,8 @@
-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