Advertisement
Guest User

Untitled

a guest
Feb 8th, 2013
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.68 KB | None | 0 0
  1.                                                                                         #include <alsa/asoundlib.h>
  2.  
  3.  
  4. int main()
  5. {
  6.     snd_mixer_t *handle;
  7.     snd_mixer_selem_id_t *sid;
  8.  
  9.     snd_mixer_open(&handle, 0);
  10.     snd_mixer_attach(handle, "default");
  11.     snd_mixer_selem_register(handle, NULL, NULL);
  12.     snd_mixer_load(handle);
  13.  
  14.     snd_mixer_selem_id_alloca(&sid);
  15.     snd_mixer_selem_id_set_index(sid, 0);
  16.     snd_mixer_selem_id_set_name(sid, "Capture");
  17.     snd_mixer_elem_t* elem = snd_mixer_find_selem(handle, sid);
  18.  
  19.     snd_mixer_selem_set_capture_switch_all(elem, 0);
  20.     snd_mixer_selem_set_capture_dB_all(elem, 0, 0);
  21.  
  22.     snd_mixer_close(handle);
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement