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

# YSyncAll(3)

sync Y server execution

## NAME

YSyncAll - sync Y server execution

## SYNTAX

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

void YSyncAll(\
\
         YConnection \**connection*,\
\
         Boolean *block*\
 )

## ARGUMENTS

- *connection*

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

- *block*

  This value must always be True.

## DESCRIPTION

The YSyncAll function blocks client execution untill the Y server has caught up. It gaurantees that sound play timming will be up to date with resolution (margin of error) as much as the current buffer fragment size of the Y server's current Audio (but never earlier).

The blockage duration of this call can be any time length, and the Y client application should be prepared for that.

Note that calling this function is an extreme performance load on the Y client application, in most cases you can get through without calling this function at all.

## 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)](/return/1.md);

        printf("Syncing...\\n");\
\
         YSyncAll(con, True);\
\
         printf("Sync done!\\n");

        YCloseConnection(con, False);

        return(0);\
 }

## SEE ALSO

[YCalculateCycle(3)](/YCalculateCycle/3.md) [YSetCycle(3)](/YSetCycle/3.md) [YGetServerStats(3)](/YGetServerStats/3.md) [YChangeAudioModePreset(3)](/YChangeAudioModePreset/3.md) [YSetAudioModeValues(3)](/YSetAudioModeValues/3.md)
