YGetMixerChannel3
Y mixer channel getting
Usage
#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. |
Overview
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.
Examples
#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);
}
Releases
5 releases since Debian 3.0 (Woody); the text changed 1 time.