---
name: "YSetMixerChannelQuad"
section: "3"
platform: "linux"
package: "liby-dev"
version: "2.14.5-7"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/YSetMixerChannelQuad"
---

# YSetMixerChannelQuad(3)

Y mixer channel setting

## NAME

YSetMixerChannel - Y mixer channel setting

## SYNTAX

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

int YSetMixerChannel(\
\
         YConnection \**connection*,\
\
         int *mixer\_channel\_code*,\
\
         Coefficient *value1*,\
\
         Coefficient *value2*\
 )

int YSetMixerChannelQuad(\
\
         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, from 0.0 to 1.0.

- *value2*

  Specifies the "right" value, from 0.0 to 1.0.

- *value3*

  Specifies the "back left" value, from 0.0 to 1.0.

- *value4*

  Specifies the "back right" value, from 0.0 to 1.0.

## DESCRIPTION

The YSetMixerChannel and YSetMixerChannelQuad functions sets the specified mixer channel by the given *mixer\_channel\_code* to the specified values.

If successful a YMixerChannel event will be received by all Y clients including the one that called YSetMixerChannel or YSetMixerChannelQuad

## 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\[\])\
 {\
\
         YConnection \*con = YOpenConnection(\
\
                 "/usr/sbin/starty",\
\
                 "127.0.0.1:9433"\
\
         );\
\
         if(con == NULL)\
\
                 [return(1)](/return/1.md);

        if(YSetMixerChannel(\
\
                 con, YMixerCodeVolume, 0.45, 0.7)\
\
         )\
\
                 printf("Failed.\\n");\
\
         else\
\
                 printf("Success.\\n");

        YCloseConnection(con, False);

        return(0);\
 }

## SEE ALSO

[YGetMixerChannel(3)](/YGetMixerChannel/3.md) [YGetMixerChannelQuad(3)](/YGetMixerChannelQuad/3.md)
