[CM] troubles with ladspa menu

Jonathan Murphy typetosmurky@yahoo.com.au
Tue, 03 Jan 2006 22:32:38 -0500

Hi folks,

I'm trying to get the ladspa menu working in snd, but there seems to be 
a bracket missing in ladspa.scm:

    Unbound variable: call-with-new-thread
    In unknown file:
       ?: 0* [primitive-load-path "ladspa.scm"]
    In /opt/common/snd-7/ladspa.scm:
     838: 1* (call-with-new-thread (lambda () (if # # ...))
    (install-ladspa-menues) ...)

I've been going through the file, but I'm new to lisp and dialects and I 
can't find it. It's somewhere in here (I think):

     (lambda ()

       (if (and (provided? 'snd-lrdf)
            (not lrdf-is-inited))
         (eval-c "-llrdf"
             "#include <lrdf.h>"
              "void lrdf_init();"
              "void lrdf_cleanup();"
              "int lrdf_read_file(const char *uri);"
              "char* lrdf_add_preset(const char *source, const char
    *label, unsigned long id, lrdf_defaults *vals);"
              "void lrdf_remove_matches(lrdf_statement *pattern);"
              "void lrdf_remove_uri_matches(const char *uri);"
              "void lrdf_rebuild_caches();"
              "int lrdf_export_by_source(const char *src, const char
              "lrdf_uris *lrdf_match_multi(lrdf_statement *patterns);"
              "lrdf_statement *lrdf_matches(lrdf_statement *pattern);"
              "lrdf_statement *lrdf_one_match(lrdf_statement *pattern);"
              "int lrdf_exists_match(lrdf_statement *pattern);"
              "lrdf_uris *lrdf_get_all_superclasses(const char *uri);"
              "lrdf_uris *lrdf_get_subclasses(const char *uri);"
              "lrdf_uris *lrdf_get_all_subclasses(const char *uri);"
              "lrdf_uris *lrdf_get_instances(const char *uri);"
              "lrdf_uris *lrdf_get_all_instances(const char *uri);"
              "lrdf_statement *lrdf_all_statements();"
              "void lrdf_free_uris(lrdf_uris *u);"
              "void lrdf_free_statements(lrdf_statement *s);"
              "char *lrdf_get_setting_metadata(const char *uri, const
    char *element);"
              "char *lrdf_get_default_uri(unsigned long id);"
              "lrdf_uris *lrdf_get_setting_uris(unsigned long id);"
              "unsigned long lrdf_get_uid(const char *uri);"
              "lrdf_defaults *lrdf_get_setting_values(const char *uri);"
              "lrdf_defaults *lrdf_get_scale_values(unsigned long id,
    unsigned long port);"
              "void lrdf_free_setting_values(lrdf_defaults *def);"
              "char *lrdf_get_label(const char *uri);")
              (<int> lrdf_defaults_count (lambda ((<lrdf_defaults*> defs))
                               (return defs->count)))
              (<int> lrdf_defaults_pid (lambda ((<lrdf_defaults*> defs)
                                (<int> n))
                             (return defs->items[n].pid)))
              (<float> lrdf_defaults_value (lambda ((<lrdf_defaults*> defs)
                                (<int> n))
                             (return defs->items[n].value)))
              (<int> lrdf_uris_count (lambda ((<lrdf_uris*> uris))
                           (return uris->count)))
              (<char*> lrdf_uris_get_item (lambda ((<lrdf_uris*> uris)
                                   (<int> n))
                            (return uris->items[n])))
              (<char*> LADSPA-BASE (lambda ()
                         (return LADSPA_BASE)))))
         (for-each (lambda (path)
                 (catch #t
                    (lambda ()
                      (let* ((dir (opendir path))
                         (entry (readdir dir)))
                    (while (not (eof-object? entry))
                           (if (and (not (string=? "." entry))
                            (not (string=? ".." entry)))
                           (lrdf_read_file (string-append "file://" path
    "/" entry)))
                           (set! entry (readdir dir)))
                    (closedir dir)))
                    (lambda (key . args)
               (string-split    (if (getenv "LADSPA_RDF_PATH")
                            (getenv "LADSPA_RDF_PATH")
         (set! lrdf-is-inited #t)))

       (set! ladspa-not-initialized #f))
     (lambda ai
       (c-display "Thread-error2: " ai)))

If anyone can help me with this I'd really appreciate it.