- (let ((PCM (pack "Lu" 0)))
- (when (= (libasound:snd_pcm_open (address PCM) NAME STREAM-TYPE MODE))
- ((unpack "Lu" PCM) 0))))
+ (let ((DATA (pack "Lu" 0)))
+ (when (= (libasound:snd_pcm_open (address DATA) NAME STREAM-TYPE MODE))
+ ((unpack "LuLu" (address DATA)) 0))))
+
+;; Set the value of given path as given.
+(define (set_config_string PATH VALUE)
+ (let ((DATA (pack "Lu" 0)) (TREE (libasound:snd_config@)))
+ (when (= (libasound:snd_config_search TREE PATH (address DATA)))
+ (libasound:snd_config_set_string ((unpack "Lu" DATA) 0) VALUE))))