YSyncAll(3) sync Y server execution


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

void YSyncAll(

        YConnection *connection,

        Boolean block


Specifies the connection to the Y server, obtained by a call to YOpenConnection.
This value must always be True.


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.


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

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

        YConnection *con = YOpenConnection(




        if(con == NULL)



        YSyncAll(con, True);

        printf("Sync done!\n");

        YCloseConnection(con, False);