From bf58cff5f18f5378b5fbed06eb8378279e896f51 Mon Sep 17 00:00:00 2001 From: Ralph Ronnquist Date: Wed, 26 Apr 2023 22:43:21 +1000 Subject: [PATCH] Include snd_config_search and snd_config_set_string --- lsp-alsa/libasound-config.lsp | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/lsp-alsa/libasound-config.lsp b/lsp-alsa/libasound-config.lsp index 5183f05..80006fa 100644 --- a/lsp-alsa/libasound-config.lsp +++ b/lsp-alsa/libasound-config.lsp @@ -93,6 +93,21 @@ "void*" ;snd_config_t **result ) +;; Function: int snd_config_search +;; [in] snd_config_t *config = root of the configuration (sub)tree to search +;; [in] const char *key = one or more node ids, separated with dots +;; [out] snd_config_t **result +; This function searches for a child node of config that is identified +; by key, which contains either the id of a direct child node of +; config, or a series of ids, separated with dots, where each id +; specifies a node that is contained in the previous compound node. +;; Returns 0 on success. +(import LIB "snd_config_search" + "int" ; int snd_config_search + "void*" ; snd_config_t *config + "char*" ; const char *key + "void*" ; snd_config_t **result + ) ;; Term: (snd_config_get_id NODE) ; Returns the id string for a configuration node. @@ -157,8 +172,8 @@ ("lf") ; double *value ) -; Returns the value of a real or integer configuration node as double. More... -;; API function to return the double as such, or (negative) error code. +; Returns the value of a real or integer configuration node as double. +; API function to return the double as such, or (negative) error code. (import** LIB "snd_config_get_ireal" "int" ; int snd_config_get_real "void*" ; const snd_config_t *config, @@ -178,13 +193,21 @@ (get-string) ; const char **value) ) +; Changes the value of a string configuration node. function deletes +; the old string in the node and stores a copy of value string in the +; node. Returns 0 if successful, otherwise a negative error code. +(import LIB "snd_config_set_string" + "int" ; int snd_config_set_string( + "void*" ; snd_config_t *config, + "char*" ; const char *value ) + ) + ;; int snd_config_get_ascii (const snd_config_t *config, char **value) ; Returns the value of a configuration node as a string. This function ; dynamically allocates the returned string. The application is ; responsible for deleting it with free() when it is no longer used. ; For a string node with NULL value, the returned string is NULL. - ; Returns the value of a pointer configuration node. ; ;; API function to return the pointer (value), or (negative) error. @@ -239,6 +262,8 @@ "void*" ; const snd_config_iterator_t iterator ) +;; + ;;====================================================================== ; Extended API @@ -272,6 +297,4 @@ (1024 (iterate NODE)) (true (list 'unknown NODE TYPE)))))) - - "libasound-config.lsp" -- 2.39.2