YChangeAudioModePreset(3) Audio mode changing

SYNTAX

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

int YChangeAudioModePreset(

        YConnection *connection,

        const char *mode_name
)

ARGUMENTS

connection
Specifies the connection to the Y server, obtained by a call to YOpenConnection.
mode_name
Specifies the new preset Audio mode name. A list of available Audio mode names can be obtained by YGetAudioModes.

DESCRIPTION

The YChangeAudioModePreset function changes the Audio mode to preset values stored on preset Audio modes. A list of preset Audio mode names can be obtained by using YGetAudioModes.

RETURN VALUE

The YChangeAudioModePreset function returns 0 on success and -1 on error.

EXAMPLE

#include <stdio.h>
#include <Y2/Y.h>
#include <Y2/Ylib.h>

int main(int argc, char *argv[])
{

        YConnection *con = YOpenConnection(

                "/usr/sbin/starty",

                "127.0.0.1:9433"

        );

        if(con == NULL)

                return(1);


        if(YChangeAudioModePreset(con, "Default"))

                printf("Error.\n");

        else

                printf("Success!\n");


        YCloseConnection(con, False);


        return(0);
}