Bånder

ETCO extends Frame
in package

ETCO frame - Event timing codes.

The 'Event timing codes' frame allows synchronization with key events in the audio. It contains a time format byte and a list of events with their timestamps.

Table of Contents

Constants

EVENT_END_OF_INITIAL_SILENCE  = 0x1
EVENT_INTERLUDE_START  = 0x8
EVENT_INTRO_END  = 0x10
EVENT_INTRO_START  = 0x2
EVENT_KEY_CHANGE  = 0xb
EVENT_MAIN_PART_END  = 0x11
EVENT_MAIN_PART_START  = 0x3
EVENT_MOMENTARY_UNWANTED_NOISE  = 0xd
EVENT_OUTRO_END  = 0x5
EVENT_OUTRO_START  = 0x4
EVENT_PADDING  = 0x0
Event type constants.
EVENT_PROFANITY  = 0x15
EVENT_PROFANITY_END  = 0x16
EVENT_REFRAIN_END  = 0x13
EVENT_REFRAIN_START  = 0x7
EVENT_SUSTAINED_NOISE  = 0xe
EVENT_SUSTAINED_NOISE_END  = 0xf
EVENT_THEME_END  = 0x14
EVENT_THEME_START  = 0x9
EVENT_TIME_CHANGE  = 0xc
EVENT_VARIATION_START  = 0xa
EVENT_VERSE_END  = 0x12
EVENT_VERSE_START  = 0x6
FORMAT_MILLISECONDS  = 2
FORMAT_MPEG_FRAMES  = 1
Time format constants.

Properties

$encoding  : int
$events  : array<string|int, mixed>
$format  : int
$frameId  : string

Methods

__construct()  : mixed
Constructs the ETCO frame with given parameters.
addEvent()  : self
Adds an event with its timestamp.
getEncoding()  : int
Returns the text encoding.
getEvents()  : array<string|int, mixed>
Returns the events with their timestamps.
getFormat()  : int
Returns the time format.
parse()  : self
Parses the frame data.
setEncoding()  : self
Sets the text encoding.
setEvents()  : self
Sets the events with their timestamps.
setFormat()  : self
Sets the time format.
toBytes()  : string
Converts the frame to binary data.

Constants

EVENT_END_OF_INITIAL_SILENCE

public mixed EVENT_END_OF_INITIAL_SILENCE = 0x1

EVENT_INTERLUDE_START

public mixed EVENT_INTERLUDE_START = 0x8

EVENT_INTRO_END

public mixed EVENT_INTRO_END = 0x10

EVENT_INTRO_START

public mixed EVENT_INTRO_START = 0x2

EVENT_KEY_CHANGE

public mixed EVENT_KEY_CHANGE = 0xb

EVENT_MAIN_PART_END

public mixed EVENT_MAIN_PART_END = 0x11

EVENT_MAIN_PART_START

public mixed EVENT_MAIN_PART_START = 0x3

EVENT_MOMENTARY_UNWANTED_NOISE

public mixed EVENT_MOMENTARY_UNWANTED_NOISE = 0xd

EVENT_OUTRO_END

public mixed EVENT_OUTRO_END = 0x5

EVENT_OUTRO_START

public mixed EVENT_OUTRO_START = 0x4

EVENT_PADDING

Event type constants.

public mixed EVENT_PADDING = 0x0

EVENT_PROFANITY

public mixed EVENT_PROFANITY = 0x15

EVENT_PROFANITY_END

public mixed EVENT_PROFANITY_END = 0x16

EVENT_REFRAIN_END

public mixed EVENT_REFRAIN_END = 0x13

EVENT_REFRAIN_START

public mixed EVENT_REFRAIN_START = 0x7

EVENT_SUSTAINED_NOISE

public mixed EVENT_SUSTAINED_NOISE = 0xe

EVENT_SUSTAINED_NOISE_END

public mixed EVENT_SUSTAINED_NOISE_END = 0xf

EVENT_THEME_END

public mixed EVENT_THEME_END = 0x14

EVENT_THEME_START

public mixed EVENT_THEME_START = 0x9

EVENT_TIME_CHANGE

public mixed EVENT_TIME_CHANGE = 0xc

EVENT_VARIATION_START

public mixed EVENT_VARIATION_START = 0xa

EVENT_VERSE_END

public mixed EVENT_VERSE_END = 0x12

EVENT_VERSE_START

public mixed EVENT_VERSE_START = 0x6

FORMAT_MILLISECONDS

public mixed FORMAT_MILLISECONDS = 2

FORMAT_MPEG_FRAMES

Time format constants.

public mixed FORMAT_MPEG_FRAMES = 1

Properties

$encoding

protected int $encoding = Encoding::UTF8

$events

protected array<string|int, mixed> $events = []

$format

protected int $format = self::FORMAT_MILLISECONDS

$frameId

protected string $frameId
Hooks
protected string get

Methods

__construct()

Constructs the ETCO frame with given parameters.

public __construct([array<string|int, mixed> $events = [] ][, int $format = self::FORMAT_MILLISECONDS ]) : mixed
Parameters
$events : array<string|int, mixed> = []
$format : int = self::FORMAT_MILLISECONDS

addEvent()

Adds an event with its timestamp.

public addEvent(int $timestamp, int $eventType) : self
Parameters
$timestamp : int
$eventType : int
Return values
self

getEncoding()

Returns the text encoding.

public getEncoding() : int
Return values
int

getEvents()

Returns the events with their timestamps.

public getEvents() : array<string|int, mixed>
Return values
array<string|int, mixed>

getFormat()

Returns the time format.

public getFormat() : int
Return values
int

parse()

Parses the frame data.

public parse(string $frameData) : self
Parameters
$frameData : string
Return values
self

setEncoding()

Sets the text encoding.

public setEncoding(int $encoding) : self
Parameters
$encoding : int
Return values
self

setEvents()

Sets the events with their timestamps.

public setEvents(array<string|int, mixed> $events) : self
Parameters
$events : array<string|int, mixed>
Return values
self

setFormat()

Sets the time format.

public setFormat(int $format) : self
Parameters
$format : int
Return values
self

toBytes()

Converts the frame to binary data.

public toBytes() : string
Return values
string

        
On this page

Search results