revert between 56095 -> 55830 in arch
[AROS.git] / workbench / libs / realtime / externalsync.c
blob2307aefb1f188bf077bbc374e651de90aa746c62
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: English
7 */
9 #include <proto/exec.h>
11 /*****************************************************************************
13 NAME */
15 #include <libraries/realtime.h>
17 AROS_LH3(BOOL, ExternalSync,
19 /* SYNOPSIS */
21 AROS_LHA(struct Player *, player , A0),
22 AROS_LHA(LONG , minTime, D0),
23 AROS_LHA(LONG , maxTime, D1),
25 /* LOCATION */
27 struct Library *, RealTimeBase, 11, RealTime)
29 /* FUNCTION
31 Constrain conductor time between 'minTime' and 'maxTime' (however, time
32 can never run backwards). If the specified player isn't the current
33 external synchronizing source, this function does nothing.
35 INPUTS
37 player -- The player in question
38 minTime -- Lower time bound
39 maxTime -- Upper time bound
41 RESULT
43 A BOOL specifying if the success of this function; FALSE means that the
44 player was not the external source or that no conductor was found for
45 the player.
47 NOTES
49 EXAMPLE
51 BUGS
53 SEE ALSO
55 INTERNALS
57 HISTORY
59 27.7.99 SDuvan implemented
61 ******************************************************************************/
64 AROS_LIBFUNC_INIT
66 if ((player == NULL) || (player->pl_Source == NULL) ||
67 !(player->pl_Flags & PLAYERF_EXTSYNC))
69 return FALSE;
72 player->pl_Source->cdt_ExternalTime = minTime;
73 player->pl_Source->cdt_MaxExternalTime = maxTime;
74 player->pl_Source->cdt_Flags |= CONDUCTF_GOTTICK;
76 return TRUE;
78 AROS_LIBFUNC_EXIT
79 } /* ExternalSync */