man YSyncAll (Fonctions bibliothèques) - 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);

printf("Syncing...\n");

YSyncAll(con, True);

printf("Sync done!\n");

YCloseConnection(con, False);

return(0);

}

SEE ALSO