The class of the Riff 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

Retrieves the size of the current chunk

getChunkSize() : int
Inherited
inherited_from \Audero\WavExtractor\Wav\Chunk::getChunkSize()

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 format of the wav file

getFormat() : \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
Inherited
inherited_from \Audero\WavExtractor\Wav\Chunk::readData()

Parameters

$handle

resource

The handle of the managed file

Returns

intThe amount of bytes read

Set the format of the wav file

setFormat(\Audero\WavExtractor\Wav\ChunkField $format) : \Audero\WavExtractor\Wav\Chunk\Riff

Parameters

$format

\Audero\WavExtractor\Wav\ChunkField

The format of 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
Inherited
inherited_from \Audero\WavExtractor\Wav\Chunk::toString()

Returns

string

 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
 

$format : \Audero\WavExtractor\Wav\ChunkField

This property should always contains as value the string "WAVE"

 Constants

 

BYTES_NOT_COUNTED

BYTES_NOT_COUNTED 
 

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