mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-02 09:01:48 -05:00
New docs..
This commit is contained in:
parent
2ae16fb30d
commit
82fc81e31e
3 changed files with 11 additions and 11 deletions
|
|
@ -228,11 +228,11 @@ void *handle;
|
|||
snd_mixer_info_t info;
|
||||
snd_mixer_channel_t channel;
|
||||
|
||||
if ( (err = snd_mixer_open( &handle, card, device )) < 0 ) {
|
||||
if ( (err = snd_mixer_open( &handle, card, device )) < 0 ) {
|
||||
fprintf( stderr, "open failed: %s\n", snd_strerror( err ) );
|
||||
return;
|
||||
}
|
||||
if ( (err = snd_mixer_info( handle, &info )) < 0 ) {
|
||||
if ( (err = snd_mixer_info( handle, &info )) < 0 ) {
|
||||
fprintf( stderr, "info failed: %s\n", snd_strerror( err ) );
|
||||
snd_mixer_close( handle );
|
||||
return;
|
||||
|
|
@ -241,13 +241,13 @@ printf( "Installed MIXER channels for card #i and device %i: %i\n",
|
|||
card + 1, device, info.channels );
|
||||
master = snd_mixer_channel( handle, SND_MIXER_ID_MASTER );
|
||||
if ( master >= 0 ) {
|
||||
if ( (err = snd_mixer_read( handle, master, &channel )) < 0 ) {
|
||||
if ( (err = snd_mixer_read( handle, master, &channel )) < 0 ) {
|
||||
fprintf( stderr, "master read failed: %s\n", snd_strerror( err ) );
|
||||
snd_mixer_close( handle );
|
||||
return;
|
||||
}
|
||||
channel -> left = channel -> right = 50;
|
||||
if ( (err = snd_mixer_write( handle, master, &channel )) < 0 ) {
|
||||
if ( (err = snd_mixer_write( handle, master, &channel )) < 0 ) {
|
||||
fprintf( stderr, "master write failed: %s\n", snd_strerror( err ) );
|
||||
snd_mixer_close( handle );
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue