YSetMixerChannel - Y mixer channel setting
#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
)
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
The YSetMixerChannel and YSetMixerChannelQuad functions returns 0 on success and -1 on failure.
#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);
YGetMixerChannel(3) YGetMixerChannelQuad(3)