The class of the Cue chunk.

More info here: http://www.sonicspot.com/guide/wavefiles.html

LICENSE: "Audero Wav Extractor" (from now on "The software") is released under the CC BY-NC 3.0 ("Creative Commons Attribution NonCommercial 3.0") license. More details can be found here: http://creativecommons.org/licenses/by-nc/3.0/

WARRANTY: The software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.

package Audero\Audero\Wav\Chunk
author Aurelio De Rosa
license CC BY-NC 3.0
link https://bitbucket.org/AurelioDeRosa/audero-wav-extractor

 Methods

The default constructor

__construct() 

Magic method to execute the getter associated to the property name given

__get(string $name) : mixed
Inherited
inherited_from \Audero\WavExtractor\Wav\Chunk::__get()

Parameters

$name

string

The name of the property

Exceptions

\Exception If the method doesn't exists

Returns

mixedThe result of the invoked method

Push a new CuePoint into the current set of Cue points

addCuePoint(\Audero\WavExtractor\Wav\Chunk\CuePoint $cuePoint) : void

Parameters

$cuePoint

\Audero\WavExtractor\Wav\Chunk\CuePoint

The Cue point to add

Calculate the size of the chunk

getChunkSize() : int

Returns

int

Retrieves the chunk type based on the given id

getChunkType(string $id) : \Audero\WavExtractor\Wav\Chunk
InheritedStatic
inherited_from \Audero\WavExtractor\Wav\Chunk::getChunkType()

Parameters

$id

string

The id of the chunk

Returns

Get the cue points

getCuePoints() : array

Returns

array

Get the number of Cue Points in the wav file

getCuePointsNumber() : \Audero\WavExtractor\Wav\ChunkField

Get the id of the chunk

getId() : \Audero\WavExtractor\Wav\ChunkField
Inherited
inherited_from \Audero\WavExtractor\Wav\Chunk::getId()

Returns

Get the size of the chunk

getSize() : \Audero\WavExtractor\Wav\ChunkField
Inherited
inherited_from \Audero\WavExtractor\Wav\Chunk::getSize()

Returns

Read the data inside the managed file to fill the properties of the current chunk.

readData(resource $handle) : int

Parameters

$handle

resource

The handle of the managed file

Returns

intThe amount of bytes read

Set the cue points

setCuePoints(array $cuePoints) : \Audero\WavExtractor\Wav\Chunk\Cue

Parameters

$cuePoints

array

The cue points

Returns

Set the number of Cue Points in the wav file

setCuePointsNumber(\Audero\WavExtractor\Wav\ChunkField $cuePointsNumber) : \Audero\WavExtractor\Wav\Chunk\Cue

Parameters

$cuePointsNumber

\Audero\WavExtractor\Wav\ChunkField

The number of Cue Points in the wav file

Returns

Set the id of the chunk

setId(\Audero\WavExtractor\Wav\ChunkField $id) : \Audero\WavExtractor\Wav\Chunk
Inherited
inherited_from \Audero\WavExtractor\Wav\Chunk::setId()

Parameters

$id

\Audero\WavExtractor\Wav\ChunkField

The id of the chunk

Returns

Set the size of the chunk

setSize(\Audero\WavExtractor\Wav\ChunkField $size) : \Audero\WavExtractor\Wav\Chunk
Inherited
inherited_from \Audero\WavExtractor\Wav\Chunk::setSize()

Parameters

$size

\Audero\WavExtractor\Wav\ChunkField

The size of the chunk

Returns

Converts the current chunk into a string based on the values of its properties

toString() : string

Returns

string

Retrieves the actual number of cue points

calculateCuePointsNumber(int $cueSize) : int

Parameters

$cueSize

int

The size of the cue points chunk in bytes

Returns

int

 Properties

 

$id : \Audero\WavExtractor\Wav\ChunkField
Inherited
inherited_from \Audero\WavExtractor\Wav\Chunk::$$id
 

$size : \Audero\WavExtractor\Wav\ChunkField
Inherited
inherited_from \Audero\WavExtractor\Wav\Chunk::$$size
 

$cuePoints : array
 

 Constants

 

ID

ID 
 

ID_FORMAT

ID_FORMAT 
Inherited
inherited_from \Audero\WavExtractor\Wav\Chunk::ID_FORMAT
 

ID_SIZE

ID_SIZE 
Inherited
inherited_from \Audero\WavExtractor\Wav\Chunk::ID_SIZE