Diffstat (limited to 'noncore/multimedia/powerchord/gs.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/powerchord/gs.cpp | 17 |
1 files changed, 11 insertions, 6 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); } |