Poster of Linux kernelThe best gift for a Linux geek
YSetMixerChannel

YSetMixerChannel

Section: Y Version 2 (3) Updated: Release 14
Local index Up
 

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);


        if(YSetMixerChannel(

                con, YMixerCodeVolume, 0.45, 0.7)

        )

                printf("Failed.\n");

        else

                printf("Success.\n");


        YCloseConnection(con, False);


        return(0);
}  

SEE ALSO

YGetMixerChannel(3) YGetMixerChannelQuad(3)


 

Index

NAME
SYNTAX
ARGUMENTS
DESCRIPTION
RETURN VALUE
EXAMPLE
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 21:59:21 GMT, April 16, 2011