csound (1:5.14.2~dfsg-2) 2013-no-rawwave-defined.diff

Summary

 Opcodes/stk/stkOpcodes.cpp |   18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

    
download this patch

Patch contents

Description: Do not print error message when RAWwAVE_PATH is undefined
 In Debian, we know where they are.
--- a/Opcodes/stk/stkOpcodes.cpp
+++ b/Opcodes/stk/stkOpcodes.cpp
@@ -681,19 +681,13 @@
       const char *path = csound->GetEnv(csound, "RAWWAVE_PATH");
     if(!path)
       {
-        csound->ErrorMsg(csound,
-                         Str("Error: define environment variable RAWWAVE_PATH\n"
-                             "(points to rawwaves directory) to use STK opcodes."));
-        return 0;
-      }
-    else
-      {
-        csound_global_mutex_lock();
-        Stk::setRawwavePath(path);
-        csound_global_mutex_unlock();
-        csound->Message(csound,
-                        Str("RAWWAVE_PATH: %s\n"), Stk::rawwavePath().c_str());
+        path = "/usr/share/stk/rawwaves";
       }
+    csound_global_mutex_lock();
+    Stk::setRawwavePath(path);
+    csound_global_mutex_unlock();
+    csound->Message(csound,
+                    Str("RAWWAVE_PATH: %s\n"), Stk::rawwavePath().c_str());
     int status = 0;
     for(OENTRY *oentry = &oentries[0]; oentry->opname; oentry++)
       {