make
to compile.
This will create a statically linked library file libsoundctrl.so
in bin/
as well as /usr/lib/
-
Get system volume range (in dB):
get_range(int *min, int *max)
-
Get current system volume level
get_volume()
-
Set system volume:
set_volume(int dB_value)
[DllImport("libsoundctrl.so", EntryPoint = "set_volume", CallingConvention = CallingConvention.Cdecl)]
static extern void set_volume(int dB_value);
[DllImport("libsoundctrl.so", EntryPoint = "get_volume", CallingConvention = CallingConvention.Cdecl)]
static extern int get_volume();
[DllImport("libsoundctrl.so", EntryPoint = "get_range", CallingConvention = CallingConvention.Cdecl)]
static extern int get_range(ref int min, ref int max);