YGetMixerChannel - Y mixer channel getting
#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
)
The YGetMixerChannel and YGetMixerChannelQuad functions gets the mixer channel values from the mixer channel specified by mixer_channel_code.
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[])
{
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);
YSetMixerChannel(3) YSetMixerChannelQuad(3)