AgsFrameClock

AgsFrameClock — frame_clock unix and alike

Stability Level

Stable, unless otherwise indicated

Functions

Types and Values

Object Hierarchy

    GFlags
    ╰── AgsFrameClockFlags
    GObject
    ╰── AgsFrameClock

Includes

#include <ags/thread/ags_frame_clock.h>

Description

AgsFrameClock measure of time.

Functions

AGS_FRAME_CLOCK_GET_OBJ_MUTEX()

#define AGS_FRAME_CLOCK_GET_OBJ_MUTEX(obj) (&(((AgsFrameClock *) obj)->obj_mutex))

ags_frame_clock_test_flags ()

gboolean
ags_frame_clock_test_flags (AgsFrameClock *frame_clock,
                            AgsFrameClockFlags flags);

Test flags to be set.

Parameters

frame_clock

the AgsFrameClock

 

flags

the flags

 

Returns

if flags set returning TRUE otherwise FALSE

Since: 9.0.0


ags_frame_clock_set_flags ()

void
ags_frame_clock_set_flags (AgsFrameClock *frame_clock,
                           AgsFrameClockFlags flags);

Set flags of frame_clock .

Parameters

frame_clock

the AgsFrameClock

 

flags

the flags

 

Since: 9.0.0


ags_frame_clock_unset_flags ()

void
ags_frame_clock_unset_flags (AgsFrameClock *frame_clock,
                             AgsFrameClockFlags flags);

Unset flags of frame_clock .

Parameters

frame_clock

the AgsFrameClock

 

flags

the flags

 

Since: 9.0.0


ags_frame_clock_get_buffer_size ()

guint
ags_frame_clock_get_buffer_size (AgsFrameClock *frame_clock);

Get buffer size of frame_clock .

Parameters

frame_clock

the AgsFrameClock

 

Returns

the buffer size

Since: 9.0.0


ags_frame_clock_set_buffer_size ()

void
ags_frame_clock_set_buffer_size (AgsFrameClock *frame_clock,
                                 guint buffer_size);

Set buffer size of frame_clock .

Parameters

frame_clock

the AgsFrameClock

 

buffer_size

the buffer size

 

Since: 9.0.0


ags_frame_clock_get_samplerate ()

guint
ags_frame_clock_get_samplerate (AgsFrameClock *frame_clock);

Get samplerate of frame_clock .

Parameters

frame_clock

the AgsFrameClock

 

Returns

the samplerate

Since: 9.0.0


ags_frame_clock_set_samplerate ()

void
ags_frame_clock_set_samplerate (AgsFrameClock *frame_clock,
                                guint samplerate);

Set samplerate of frame_clock .

Parameters

frame_clock

the AgsFrameClock

 

samplerate

the samplerate

 

Since: 9.0.0


ags_frame_clock_get_bpm ()

gdouble
ags_frame_clock_get_bpm (AgsFrameClock *frame_clock);

Get bpm of frame_clock .

Parameters

frame_clock

the AgsFrameClock

 

Returns

the bpm

Since: 9.0.0


ags_frame_clock_set_bpm ()

void
ags_frame_clock_set_bpm (AgsFrameClock *frame_clock,
                         gdouble bpm);

Set bpm of frame_clock .

Parameters

frame_clock

the AgsFrameClock

 

bpm

the bpm

 

Since: 9.0.0


ags_frame_clock_set_start_note_offset ()

void
ags_frame_clock_set_start_note_offset (AgsFrameClock *frame_clock,
                                       guint64 start_note_offset);

Set start note offset of frame_clock .

Parameters

frame_clock

the AgsFrameClock

 

start_note_offset

the start note offset

 

Since: 9.0.0


ags_frame_clock_get_start_note_offset ()

guint64
ags_frame_clock_get_start_note_offset (AgsFrameClock *frame_clock);

Get start note offset of frame_clock .

Parameters

frame_clock

the AgsFrameClock

 

Returns

the start note offset

Since: 9.0.0


ags_frame_clock_get_absolute_frame_offset ()

guint64
ags_frame_clock_get_absolute_frame_offset
                               (AgsFrameClock *frame_clock);

Get absolute frame offset of frame_clock .

Parameters

frame_clock

the AgsFrameClock

 

Returns

the absolute frame offset

Since: 9.0.0


ags_frame_clock_get_frame_offset ()

guint64
ags_frame_clock_get_frame_offset (AgsFrameClock *frame_clock);

Get frame offset of frame_clock .

Parameters

frame_clock

the AgsFrameClock

 

Returns

the frame offset

Since: 9.0.0


ags_frame_clock_get_has_16th_pulse ()

gboolean
ags_frame_clock_get_has_16th_pulse (AgsFrameClock *frame_clock);

Get has 16th pulse of frame_clock .

Parameters

frame_clock

the AgsFrameClock

 

Returns

TRUE if has 16th pulse, otherwise FALSE

Since: 9.0.0


ags_frame_clock_get_has_256th_pulse ()

gboolean
ags_frame_clock_get_has_256th_pulse (AgsFrameClock *frame_clock);

Get has 256th pulse of frame_clock .

Parameters

frame_clock

the AgsFrameClock

 

Returns

TRUE if has 256th pulse, otherwise FALSE

Since: 9.0.0


ags_frame_clock_get_loop ()

gboolean
ags_frame_clock_get_loop (AgsFrameClock *frame_clock,
                          guint64 *loop_left,
                          guint64 *loop_right);

Get loop of frame_clock .

Parameters

frame_clock

the AgsFrameClock

 

loop_left

return location of loop left.

[out]

loop_right

return location of loop right.

[out]

Returns

TRUE if do loop, otherwise FALSE

Since: 9.0.0


ags_frame_clock_set_loop ()

void
ags_frame_clock_set_loop (AgsFrameClock *frame_clock,
                          gboolean do_loop,
                          guint64 loop_left,
                          guint64 loop_right);

Get loop of frame_clock .

Parameters

frame_clock

the AgsFrameClock

 

do_loop

do loop if TRUE, otherwise FALSE

 

loop_left

loop left

 

loop_right

loop right

 

Returns

TRUE if do loop, otherwise FALSE

Since: 9.0.0


ags_frame_clock_get_absolute_note_offset ()

guint64
ags_frame_clock_get_absolute_note_offset
                               (AgsFrameClock *frame_clock);

Get absolute note offset of frame_clock .

Parameters

frame_clock

the AgsFrameClock

 

Returns

the absolute note offset

Since: 9.0.0


ags_frame_clock_get_note_offset ()

guint64
ags_frame_clock_get_note_offset (AgsFrameClock *frame_clock);

Get note offset of frame_clock .

Parameters

frame_clock

the AgsFrameClock

 

Returns

the note offset

Since: 9.0.0


ags_frame_clock_set_note_offset ()

void
ags_frame_clock_set_note_offset (AgsFrameClock *frame_clock,
                                 guint64 note_offset);

Set note offset of frame_clock .

Parameters

frame_clock

the AgsFrameClock

 

note_offset

the note offset

 

Since: 9.0.0


ags_frame_clock_get_note_frame_offset ()

guint64
ags_frame_clock_get_note_frame_offset (AgsFrameClock *frame_clock);

Get note frame offset of frame_clock .

Parameters

frame_clock

the AgsFrameClock

 

Returns

the note frame offset

Since: 9.0.0


ags_frame_clock_get_absolute_note_256th_offset ()

void
ags_frame_clock_get_absolute_note_256th_offset
                               (AgsFrameClock *frame_clock,
                                guint64 *absolute_note_256th_offset,
                                guint *length);

Get absolute note 256th offset of frame_clock .

Parameters

frame_clock

the AgsFrameClock

 

absolute_note_256th_offset

return location of note 256th offset, maximum length 16.

[out]

length

return location of length.

[out]

Since: 9.0.0


ags_frame_clock_get_note_256th_offset ()

void
ags_frame_clock_get_note_256th_offset (AgsFrameClock *frame_clock,
                                       guint64 *note_256th_offset,
                                       guint *length);

Get note 256th offset of frame_clock .

Parameters

frame_clock

the AgsFrameClock

 

note_256th_offset

return location of note 256th offset, maximum length 16.

[out]

length

return location of length.

[out]

Since: 9.0.0


ags_frame_clock_get_note_256th_frame_offset ()

void
ags_frame_clock_get_note_256th_frame_offset
                               (AgsFrameClock *frame_clock,
                                guint64 *note_256th_frame_offset,
                                guint *length);

Get note 256th frame offset of frame_clock .

Parameters

frame_clock

the AgsFrameClock

 

note_256th_frame_offset

return location of note 256th frame offset.

[out]

length

return location of array length, maximum 16 items.

[out]

Since: 9.0.0


ags_frame_clock_copy_time ()

void
ags_frame_clock_copy_time (AgsFrameClock *destination,
                           AgsFrameClock *source);

Copy time of source to destination .

Parameters

destination

the destination AgsFrameClock

 

source

the source AgsFrameClock

 

Since: 9.0.0


ags_frame_clock_start ()

void
ags_frame_clock_start (AgsFrameClock *frame_clock);

Start frame_clock .

Parameters

frame_clock

the AgsFrameClock

 

Since: 9.0.0


ags_frame_clock_stop ()

void
ags_frame_clock_stop (AgsFrameClock *frame_clock);

Stop frame_clock .

Parameters

frame_clock

the AgsFrameClock

 

Since: 9.0.0


ags_frame_clock_increment_counter ()

void
ags_frame_clock_increment_counter (AgsFrameClock *frame_clock);

Increment counter of frame_clock .

Parameters

frame_clock

the AgsFrameClock

 

Since: 9.0.0


ags_frame_clock_from_string ()

void
ags_frame_clock_from_string (AgsFrameClock *frame_clock,
                             gchar *str);

Frame clock from string.

Parameters

frame_clock

the AgsFrameClock

 

str

the string

 

Since: 9.0.0


ags_frame_clock_to_string ()

gchar *
ags_frame_clock_to_string (AgsFrameClock *frame_clock);

Frame clock to string.

Parameters

frame_clock

the AgsFrameClock

 

Returns

the serialized string.

[transfer full]

Since: 9.0.0


ags_frame_clock_to_time_string ()

gchar *
ags_frame_clock_to_time_string (AgsFrameClock *frame_clock);

Frame clock to time string.

Parameters

frame_clock

the AgsFrameClock

 

Returns

the time string.

[transfer full]

Since: 9.0.0


ags_frame_clock_get_instance ()

AgsFrameClock *
ags_frame_clock_get_instance ();

Singleton frame clock.

Returns

the singleton AgsFrameClock.

[transfer none]

Since: 9.0.0


ags_frame_clock_new ()

AgsFrameClock *
ags_frame_clock_new ();

Creates an AgsFrameClock

Returns

a new AgsFrameClock

Since: 9.0.0

Types and Values

AGS_FRAME_CLOCK_DEFAULT_SYNC_POINT_ARRAY_LENGTH

#define AGS_FRAME_CLOCK_DEFAULT_SYNC_POINT_ARRAY_LENGTH (2048.0)

AGS_FRAME_CLOCK_DEFAULT_SYNC_POINT_ARRAY_LIST_LENGTH

#define AGS_FRAME_CLOCK_DEFAULT_SYNC_POINT_ARRAY_LIST_LENGTH (8192.0)

AGS_FRAME_CLOCK_DEFAULT_PERIOD

#define AGS_FRAME_CLOCK_DEFAULT_PERIOD (AGS_FRAME_CLOCK_DEFAULT_SYNC_POINT_ARRAY_LIST_LENGTH * AGS_FRAME_CLOCK_DEFAULT_SYNC_POINT_ARRAY_LENGTH)

AGS_FRAME_CLOCK_DEFAULT_PERIOD_256TH

#define AGS_FRAME_CLOCK_DEFAULT_PERIOD_256TH (16.0 * AGS_FRAME_CLOCK_DEFAULT_SYNC_POINT_ARRAY_LIST_LENGTH * AGS_FRAME_CLOCK_DEFAULT_SYNC_POINT_ARRAY_LENGTH)

enum AgsFrameClockFlags

Enum values to control the behavior or indicate internal state of AgsFrameClock by enable/disable as sync_flags.

Members

AGS_FRAME_CLOCK_STARTED

frame clock has started

 

AGS_FRAME_CLOCK_RUNNING

frame clock is running