5 This libasound (ALSA) configuration plugin provides "getprogname" @func function.
6 It enables you to have eg. a softvolume control channel for each program.
7 When a new control is created, the client program have to stop+play or restart,
8 otherwise the control's volume level can not be changed. Tough, it works great at
10 The created control stays there after the program exists.
30 lib "/usr/src/alsa-lib-1.0.25/libasound-getprogname.so"
31 func "snd_func_getprogname"
36 Compile against alsa-lib-1.0.25
38 if libtool acts weirdly, it may forgot that $ECHO is $echo ... or the other way around...
42 #gcc -Iinclude/ -lbsd libasound-getprogname.c -o libasound-getprogname.so -shared -fPIC -Wl,--version-script=libasound-getprogname.ver
44 # less wrong? it worked anyway...
46 ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -Wall -g -I./include/ \
47 -D_GNU_SOURCE -g -O2 -MD -MP -c -o libasound-getprogname.lo libasound-getprogname.c
48 gcc -shared -lbsd -lasound .libs/libasound-getprogname.o -o libasound-getprogname.so
51 #include <bsd/stdlib.h>
53 #include "include/local.h"
55 int snd_func_getprogname(snd_config_t
**dst
, snd_config_t
*root ATTRIBUTE_UNUSED
,
56 snd_config_t
*src
, snd_config_t
*private_data ATTRIBUTE_UNUSED
)
59 int err
= snd_config_get_id(src
, &id
);
60 if (err
< 0) return err
;
62 char *progname
= getprogname();
63 return snd_config_imake_string(dst
, id
, progname
);
66 SND_DLSYM_BUILD_VERSION(snd_func_getprogname
, SND_CONFIG_DLSYM_VERSION_EVALUATE
);