Man Linux: Main Page and Category List

NAME

       YGetMixerChannel - Y mixer channel getting

SYNTAX

       #include <Y2/Y.h>
       #include <Y2/Ylib.h>
       #include <Y2/Ymixercodes.h>

       int YGetMixerChannel(
               YConnection *connection,
               int mixer_channel_code,
               Coefficient *value1,
               Coefficient *value2
       )

       int YGetMixerChannelQuad(
               YConnection *connection,
               int mixer_channel_code,
               Coefficient *value1,
               Coefficient *value2,
               Coefficient *value3,
               Coefficient *value4
       )

ARGUMENTS

       connection
              Specifies  the connection to the Y server, obtained by a call to
              YOpenConnection.

       mixer_channel_code
              Specifies  the  mixer  channel  code,  which  can  be   one   of
              YMixerCode*.

       value1 Specifies the "left" value return.

       value2 Specifies the "right" value return.

       value3 Specifies the "back left" value return.

       value4 Specifies the "back right" value return.

DESCRIPTION

       The YGetMixerChannel and  YGetMixerChannelQuad functions gets the mixer
       channel values from the mixer channel specified by  mixer_channel_code.

RETURN VALUE

       The  YSetMixerChannel  and  YSetMixerChannelQuad functions returns 0 on
       success and -1 on failure.

EXAMPLE

       #include <stdio.h>
       #include <Y2/Y.h>
       #include <Y2/Ylib.h>
       #include <Y2/Ymixercodes.h>

       int main(int argc, char *argv[])
       {
               Coefficient value1, value2;
               YConnection *con = YOpenConnection(
                       "/usr/sbin/starty",
                       "127.0.0.1:9433"
               );
               if(con == NULL)
                       return(1);

               if(YGetMixerChannel(
                       con, YMixerCodeVolume,
                       &value1, &value2
               ))
                       printf("Failed.\n");
               else
                       printf("Success %f %f.\n", value1, value2);

               YCloseConnection(con, False);

               return(0);
       }

SEE ALSO

       YSetMixerChannel(3) YSetMixerChannelQuad(3)