---
name: "YGetAudioStats"
section: "3"
platform: "linux"
package: "liby-dev"
version: "2.14.5-7"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/YGetAudioStats"
---

# YGetAudioStats(3)

current Audio values retrieving

## NAME

YGetAudioStats - current Audio values retrieving

## SYNTAX

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

int YGetAudioStats(\
\
         YConnection \**connection*,\
\
         YEventAudioStats \**buf*\
 )

## ARGUMENTS

- *connection*

  Specifies the connection to the Y server, obtained by a call to YOpenConnection.

- *buf*

  Specifies a pointer to the buffer to hold the retrieved Audio stats. See YEventAudioStats for information about this structure.

## DESCRIPTION

The YGetAudioStats function fetches the current Audio values from the Y server and stores them into the pointer buf.

## RETURN VALUE

The YGetAudioStats 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\[\])\
 {\
\
         YEventAudioStats buf;\
\
         YConnection \*con = YOpenConnection(\
\
                 "/usr/sbin/starty",\
\
                 "127.0.0.1:9433"\
\
         );\
\
         if(con == NULL)\
\
                 [return(1)](/return/1.md);

        if(YGetAudioStats(con, &buf))\
\
             printf("Failed.\\n");\
\
         else\
\
             printf("Success.\\n");

        YCloseConnection(con, False);

        return(0);\
 }

## SEE ALSO

[YEventAudioStats(3)](/YEventAudioStats/3.md) [YChangeAudioModePreset(3)](/YChangeAudioModePreset/3.md) [YSetAudioModeValues(3)](/YSetAudioModeValues/3.md)
