ILIAS
Release_4_4_x_branch Revision 61816
|
Public Member Functions | |
__construct ($numChannelsOrFileName=null, $sampleRateOrReadData=null, $bitsPerSample=null) | |
WavFile Constructor. | |
__destruct () | |
__clone () | |
__toString () | |
Output the wav file headers and data. | |
getActualSize () | |
getChunkSize () | |
getFmtChunkSize () | |
getFmtExtendedSize () | |
getFactChunkSize () | |
getDataSize () | |
getDataOffset () | |
getAudioFormat () | |
getAudioSubFormat () | |
getNumChannels () | |
setNumChannels ($numChannels) | |
getChannelMask () | |
setChannelMask ($channelMask=self::SPEAKER_DEFAULT) | |
getSampleRate () | |
setSampleRate ($sampleRate) | |
getBitsPerSample () | |
setBitsPerSample ($bitsPerSample) | |
getValidBitsPerSample () | |
getBlockAlign () | |
getNumBlocks () | |
getByteRate () | |
getSamples () | |
setSamples (&$samples= '') | |
getMinAmplitude () | |
getZeroAmplitude () | |
getMaxAmplitude () | |
makeHeader () | |
Construct a wav header from this object. | |
getDataSubchunk () | |
Construct wav DATA chunk. | |
save ($filename) | |
Save the wav data to a file. | |
openWav ($filename, $readData=true) | |
Reads a wav header and data from a file. | |
closeWav () | |
Close a with openWav() previously opened wav file or free the buffer of setWavData(). | |
setWavData (&$data, $free=true) | |
Set the wav file data and properties from a wav file in a string. | |
readWavData ($dataOffset=0, $dataSize=null) | |
Read the wav data from the file into the buffer. | |
getSampleBlock ($blockNum) | |
Return a single sample block from the file. | |
setSampleBlock ($sampleBlock, $blockNum) | |
Set a single sample block. | |
getSampleValue ($blockNum, $channelNum) | |
Get a float sample value for a specific sample block and channel number. | |
setSampleValue ($sampleFloat, $blockNum, $channelNum) | |
Sets a float sample value for a specific sample block number and channel. | |
filter ($filters, $blockOffset=0, $numBlocks=null) | |
Run samples through audio processing filters. | |
appendWav (WavFile $wav) | |
Append a wav file to the current wav. | |
mergeWav (WavFile $wav, $normalizeThreshold=null) | |
Mix 2 wav files together. | |
insertSilence ($duration=1.0) | |
Add silence to the wav file. | |
degrade ($quality=1.0) | |
Degrade the quality of the wav file by introducing random noise. | |
generateNoise ($duration=1.0, $percent=100) | |
Generate noise at the end of the wav for the specified duration and volume. | |
convertBitsPerSample ($bitsPerSample) | |
Convert sample data to different bits per sample. | |
displayInfo () | |
Output information about the wav object. |
Static Public Member Functions | |
static | unpackSample ($sampleBinary, $bitDepth=null) |
Unpacks a single binary sample to numeric value. | |
static | packSample ($sample, $bitDepth) |
Packs a single numeric sample to binary. | |
static | unpackSampleBlock ($sampleBlock, $bitDepth, $numChannels=null) |
Unpacks a binary sample block to numeric values. | |
static | packSampleBlock ($samples, $bitDepth) |
Packs an array of numeric channel samples to a binary sample block. | |
static | normalizeSample ($sampleFloat, $threshold) |
Normalizes a float audio sample. |
Data Fields | |
const | FILTER_MIX = 0x01 |
const | FILTER_NORMALIZE = 0x02 |
const | FILTER_DEGRADE = 0x04 |
const | MAX_CHANNEL = 18 |
const | MAX_SAMPLERATE = 192000 |
const | SPEAKER_DEFAULT = 0x000000 |
Channel Locations for ChannelMask. | |
const | SPEAKER_FRONT_LEFT = 0x000001 |
const | SPEAKER_FRONT_RIGHT = 0x000002 |
const | SPEAKER_FRONT_CENTER = 0x000004 |
const | SPEAKER_LOW_FREQUENCY = 0x000008 |
const | SPEAKER_BACK_LEFT = 0x000010 |
const | SPEAKER_BACK_RIGHT = 0x000020 |
const | SPEAKER_FRONT_LEFT_OF_CENTER = 0x000040 |
const | SPEAKER_FRONT_RIGHT_OF_CENTER = 0x000080 |
const | SPEAKER_BACK_CENTER = 0x000100 |
const | SPEAKER_SIDE_LEFT = 0x000200 |
const | SPEAKER_SIDE_RIGHT = 0x000400 |
const | SPEAKER_TOP_CENTER = 0x000800 |
const | SPEAKER_TOP_FRONT_LEFT = 0x001000 |
const | SPEAKER_TOP_FRONT_CENTER = 0x002000 |
const | SPEAKER_TOP_FRONT_RIGHT = 0x004000 |
const | SPEAKER_TOP_BACK_LEFT = 0x008000 |
const | SPEAKER_TOP_BACK_CENTER = 0x010000 |
const | SPEAKER_TOP_BACK_RIGHT = 0x020000 |
const | SPEAKER_ALL = 0x03FFFF |
const | WAVE_FORMAT_PCM = 0x0001 |
const | WAVE_FORMAT_IEEE_FLOAT = 0x0003 |
const | WAVE_FORMAT_EXTENSIBLE = 0xFFFE |
const | WAVE_SUBFORMAT_PCM = "0100000000001000800000aa00389b71" |
const | WAVE_SUBFORMAT_IEEE_FLOAT = "0300000000001000800000aa00389b71" |
Protected Member Functions | |
setActualSize ($actualSize=null) | |
setChunkSize ($chunkSize=null) | |
setFmtChunkSize ($fmtChunkSize=null) | |
setFmtExtendedSize ($fmtExtendedSize=null) | |
setFactChunkSize ($factChunkSize=null) | |
setDataSize ($dataSize=null) | |
setDataOffset ($dataOffset=null) | |
setAudioFormat ($audioFormat=null) | |
setAudioSubFormat ($audioSubFormat=null) | |
setValidBitsPerSample ($validBitsPerSample=null) | |
setBlockAlign ($blockAlign=null) | |
setNumBlocks ($numBlocks=null) | |
setByteRate ($byteRate=null) | |
readWav ($readData=true) | |
Read wav file from a stream. | |
readWavHeader () | |
Parse a wav header. |
Static Protected Attributes | |
static | $LOOKUP_LOGBASE |
Definition at line 69 of file WavFile.php.
WavFile::__construct | ( | $numChannelsOrFileName = null , |
|
$sampleRateOrReadData = null , |
|||
$bitsPerSample = null |
|||
) |
WavFile Constructor.
$wav1 = new WavFile(2, 44100, 16); // new wav with 2 channels, at 44100 samples/sec and 16 bits per sample $wav2 = new WavFile('./audio/sound.wav'); // open and read wav file
string | int | $numChannelsOrFileName | (Optional) If string, the filename of the wav file to open. The number of channels otherwise. Defaults to 1. |
int | bool | $sampleRateOrReadData | (Optional) If opening a file and boolean, decides whether to read the data chunk or not. Defaults to true. The sample rate in samples per second otherwise. 8000 = standard telephone, 16000 = wideband telephone, 32000 = FM radio and 44100 = CD quality. Defaults to 8000. |
int | $bitsPerSample | (Optional) The number of bits per sample. Has to be 8, 16 or 24 for PCM audio or 32 for IEEE FLOAT audio. 8 = telephone, 16 = CD and 24 or 32 = studio quality. Defaults to 8. |
WavFormatException | |
WavFileException |
Definition at line 221 of file WavFile.php.
References openWav(), setNumChannels(), SPEAKER_DEFAULT, and WAVE_FORMAT_PCM.
WavFile::__destruct | ( | ) |
Definition at line 256 of file WavFile.php.
References closeWav().
WavFile::__clone | ( | ) |
Definition at line 260 of file WavFile.php.
WavFile::__toString | ( | ) |
Output the wav file headers and data.
Definition at line 269 of file WavFile.php.
References getDataSubchunk(), and makeHeader().
WavFile::appendWav | ( | WavFile | $wav | ) |
Append a wav file to the current wav.
The wav files must have the same sample rate, number of bits per sample, and number of channels.
WavFile | $wav | (Required) The wav file to append. |
WavFileException |
Definition at line 1678 of file WavFile.php.
References getBitsPerSample(), getNumChannels(), getSampleRate(), and setDataSize().
WavFile::closeWav | ( | ) |
Close a with openWav() previously opened wav file or free the buffer of setWavData().
Not necessary if the data has been read (readData = true) already.
Definition at line 953 of file WavFile.php.
Referenced by __destruct(), openWav(), readWav(), readWavData(), and setWavData().
WavFile::convertBitsPerSample | ( | $bitsPerSample | ) |
Convert sample data to different bits per sample.
int | $bitsPerSample | (Required) The new number of bits per sample; |
WavFileException |
Definition at line 1779 of file WavFile.php.
References getBitsPerSample(), getNumBlocks(), getNumChannels(), getSampleRate(), setDataSize(), and setSamples().
WavFile::degrade | ( | $quality = 1.0 | ) |
Degrade the quality of the wav file by introducing random noise.
float | quality (Optional) The quality relative to the amplitude. 1 = no noise, 0 = max. noise. |
Definition at line 1736 of file WavFile.php.
References filter(), and FILTER_DEGRADE.
WavFile::displayInfo | ( | ) |
Output information about the wav object.
Definition at line 1806 of file WavFile.php.
References getActualSize(), getAudioFormat(), getAudioSubFormat(), getBitsPerSample(), getBlockAlign(), getByteRate(), getChannelMask(), getChunkSize(), getDataOffset(), getDataSize(), getFactChunkSize(), getFmtChunkSize(), getFmtExtendedSize(), getNumBlocks(), getNumChannels(), getSampleRate(), and getValidBitsPerSample().
WavFile::filter | ( | $filters, | |
$blockOffset = 0 , |
|||
$numBlocks = null |
|||
) |
Run samples through audio processing filters.
$wav->filter( array( WavFile::FILTER_MIX => array( // Filter for mixing 2 WavFile instances. 'wav' => $wav2, // (Required) The WavFile to mix into this WhavFile. If no optional arguments are given, can be passed without the array. 'loop' => true, // (Optional) Loop the selected portion (with warping to the beginning at the end). 'blockOffset' => 0, // (Optional) Block number to start mixing from. 'numBlocks' => null // (Optional) Number of blocks to mix in or to select for looping. Defaults to the end or all data for looping. ), WavFile::FILTER_NORMALIZE => 0.6, // (Required) Normalization of (mixed) audio samples - see threshold parameter for normalizeSample(). WavFile::FILTER_DEGRADE => 0.9 // (Required) Introduce random noise. The quality relative to the amplitude. 1 = no noise, 0 = max. noise. ), 0, // (Optional) The block number of this WavFile to start with. null // (Optional) The number of blocks to process. );
array | $filters | (Required) An array of 1 or more audio processing filters. |
int | $blockOffset | (Optional) The block number to start precessing from. |
int | $numBlocks | (Optional) The maximum number of blocks to process. |
WavFileException |
Definition at line 1571 of file WavFile.php.
References FILTER_DEGRADE, FILTER_MIX, FILTER_NORMALIZE, getNumBlocks(), getNumChannels(), getSampleRate(), getSampleValue(), normalizeSample(), and setSampleValue().
Referenced by degrade(), and mergeWav().
WavFile::generateNoise | ( | $duration = 1.0 , |
|
$percent = 100 |
|||
) |
Generate noise at the end of the wav for the specified duration and volume.
float | $duration | (Optional) Number of seconds of noise to generate. |
float | $percent | (Optional) The percentage of the maximum amplitude to use. 100 = full amplitude. |
Definition at line 1749 of file WavFile.php.
References getBitsPerSample(), getMaxAmplitude(), getMinAmplitude(), getNumChannels(), getSampleRate(), and setDataSize().
WavFile::getActualSize | ( | ) |
Definition at line 453 of file WavFile.php.
References $_actualSize.
Referenced by displayInfo().
WavFile::getAudioFormat | ( | ) |
Definition at line 583 of file WavFile.php.
References $_audioFormat.
Referenced by displayInfo(), and makeHeader().
WavFile::getAudioSubFormat | ( | ) |
Definition at line 612 of file WavFile.php.
References $_audioSubFormat.
Referenced by displayInfo(), and makeHeader().
WavFile::getBitsPerSample | ( | ) |
Definition at line 693 of file WavFile.php.
References $_bitsPerSample.
Referenced by appendWav(), convertBitsPerSample(), displayInfo(), generateNoise(), insertSilence(), and makeHeader().
WavFile::getBlockAlign | ( | ) |
Definition at line 732 of file WavFile.php.
References $_blockAlign.
Referenced by displayInfo(), makeHeader(), and readWavData().
WavFile::getByteRate | ( | ) |
Definition at line 763 of file WavFile.php.
References $_byteRate.
Referenced by displayInfo(), and makeHeader().
WavFile::getChannelMask | ( | ) |
Definition at line 650 of file WavFile.php.
References $_channelMask.
Referenced by displayInfo(), and makeHeader().
WavFile::getChunkSize | ( | ) |
Definition at line 467 of file WavFile.php.
References $_chunkSize.
Referenced by displayInfo(), and makeHeader().
WavFile::getDataOffset | ( | ) |
Definition at line 565 of file WavFile.php.
References $_dataOffset.
Referenced by displayInfo().
WavFile::getDataSize | ( | ) |
Definition at line 547 of file WavFile.php.
References $_dataSize.
Referenced by displayInfo(), and getDataSubchunk().
WavFile::getDataSubchunk | ( | ) |
Construct wav DATA chunk.
Definition at line 884 of file WavFile.php.
References getDataSize(), and setDataSize().
Referenced by __toString(), and save().
WavFile::getFactChunkSize | ( | ) |
Definition at line 526 of file WavFile.php.
References $_factChunkSize.
Referenced by displayInfo(), and makeHeader().
WavFile::getFmtChunkSize | ( | ) |
Definition at line 487 of file WavFile.php.
References $_fmtChunkSize.
Referenced by displayInfo(), and makeHeader().
WavFile::getFmtExtendedSize | ( | ) |
Definition at line 504 of file WavFile.php.
References $_fmtExtendedSize.
Referenced by displayInfo(), and makeHeader().
WavFile::getMaxAmplitude | ( | ) |
Definition at line 819 of file WavFile.php.
Referenced by generateNoise().
WavFile::getMinAmplitude | ( | ) |
Definition at line 797 of file WavFile.php.
Referenced by generateNoise().
WavFile::getNumBlocks | ( | ) |
Definition at line 748 of file WavFile.php.
References $_numBlocks.
Referenced by convertBitsPerSample(), displayInfo(), filter(), and makeHeader().
WavFile::getNumChannels | ( | ) |
Definition at line 630 of file WavFile.php.
References $_numChannels.
Referenced by appendWav(), convertBitsPerSample(), displayInfo(), filter(), generateNoise(), insertSilence(), and makeHeader().
WavFile::getSampleBlock | ( | $blockNum | ) |
Return a single sample block from the file.
int | $blockNum | (Required) The sample block number. Zero based. |
Definition at line 1319 of file WavFile.php.
References $_blockAlign, and setDataSize().
WavFile::getSampleRate | ( | ) |
Definition at line 675 of file WavFile.php.
References $_sampleRate.
Referenced by appendWav(), convertBitsPerSample(), displayInfo(), filter(), generateNoise(), insertSilence(), and makeHeader().
WavFile::getSamples | ( | ) |
WavFile::getSampleValue | ( | $blockNum, | |
$channelNum | |||
) |
Get a float sample value for a specific sample block and channel number.
int | $blockNum | (Required) The sample block number to fetch. Zero based. |
int | $channelNum | (Required) The channel number within the sample block to fetch. First channel is 1. |
WavFileException |
Definition at line 1389 of file WavFile.php.
References setDataSize().
Referenced by filter().
WavFile::getValidBitsPerSample | ( | ) |
Definition at line 713 of file WavFile.php.
References $_validBitsPerSample.
Referenced by displayInfo(), and makeHeader().
WavFile::getZeroAmplitude | ( | ) |
Definition at line 808 of file WavFile.php.
Referenced by insertSilence().
WavFile::insertSilence | ( | $duration = 1.0 | ) |
Add silence to the wav file.
float | $duration | (Optional) How many seconds of silence. If negative, add to the beginning of the file. Defaults to 1s. |
Definition at line 1714 of file WavFile.php.
References $_samples, getBitsPerSample(), getNumChannels(), getSampleRate(), getZeroAmplitude(), and setDataSize().
WavFile::makeHeader | ( | ) |
Construct a wav header from this object.
Includes "fact" chunk in necessary. http://www-mmsp.ece.mcgill.ca/documents/audioformats/wave/wave.html
Definition at line 840 of file WavFile.php.
References getAudioFormat(), getAudioSubFormat(), getBitsPerSample(), getBlockAlign(), getByteRate(), getChannelMask(), getChunkSize(), getFactChunkSize(), getFmtChunkSize(), getFmtExtendedSize(), getNumBlocks(), getNumChannels(), getSampleRate(), getValidBitsPerSample(), setAudioFormat(), and setNumBlocks().
Referenced by __toString(), and save().
WavFile::mergeWav | ( | WavFile | $wav, |
$normalizeThreshold = null |
|||
) |
Mix 2 wav files together.
Both wavs must have the same sample rate and same number of channels.
WavFile | $wav | (Required) The WavFile to mix. |
float | $normalizeThreshold | (Optional) See normalizeSample for an explanation. |
WavFileException |
Definition at line 1702 of file WavFile.php.
References filter(), FILTER_MIX, and FILTER_NORMALIZE.
|
static |
Normalizes a float audio sample.
Maximum input range assumed for compression is [-2, 2]. See http://www.voegler.eu/pub/audio/ for more information.
float | $sampleFloat | (Required) The float sample to normalize. |
float | $threshold | (Required) The threshold or gain factor for normalizing the amplitude.
|
Definition at line 419 of file WavFile.php.
Referenced by filter().
WavFile::openWav | ( | $filename, | |
$readData = true |
|||
) |
Reads a wav header and data from a file.
string | $filename | (Required) The path to the wav file to read. |
bool | $readData | (Optional) If true, also read the data chunk. |
WavFormatException | |
WavFileException |
Definition at line 927 of file WavFile.php.
References $filename, closeWav(), and readWav().
Referenced by __construct().
|
static |
Packs a single numeric sample to binary.
int | float | $sample | (Required) The sample to encode. Has to be within valid range for $bitDepth. Float values only for 32 bits. |
int | $bitDepth | (Required) The bits per sample to encode with. |
Definition at line 332 of file WavFile.php.
Referenced by packSampleBlock().
|
static |
Packs an array of numeric channel samples to a binary sample block.
array | $samples | (Required) The array of channel sample values. Expects float values for 32 bits and integer otherwise. |
int | $bitDepth | (Required) The bits per sample to encode with. |
Definition at line 392 of file WavFile.php.
References packSample().
|
protected |
Read wav file from a stream.
$readData | (Optional) If true, also read the data chunk. |
WavFormatException | |
WavFileException |
Definition at line 997 of file WavFile.php.
References closeWav(), readWavData(), and readWavHeader().
Referenced by openWav(), and setWavData().
WavFile::readWavData | ( | $dataOffset = 0 , |
|
$dataSize = null |
|||
) |
Read the wav data from the file into the buffer.
$dataOffset | (Optional) The byte offset to skip before starting to read. Must be a multiple of BlockAlign. |
$dataSize | (Optional) The size of the data to read in bytes. Must be a multiple of BlockAlign. Defaults to all data. |
WavFileException |
Definition at line 1278 of file WavFile.php.
References closeWav(), getBlockAlign(), and setDataSize().
Referenced by readWav().
|
protected |
Parse a wav header.
http://www-mmsp.ece.mcgill.ca/documents/audioformats/wave/wave.html
WavFormatException | |
WavFileException |
Definition at line 1022 of file WavFile.php.
References $n.
Referenced by readWav().
WavFile::save | ( | $filename | ) |
Save the wav data to a file.
string | $filename | (Required) The file path to save the wav to. |
WavFileException |
Definition at line 905 of file WavFile.php.
References $filename, getDataSubchunk(), and makeHeader().
|
protected |
Definition at line 457 of file WavFile.php.
References $_chunkSize.
Referenced by setChunkSize().
|
protected |
Definition at line 587 of file WavFile.php.
References setAudioSubFormat(), WAVE_FORMAT_EXTENSIBLE, WAVE_FORMAT_IEEE_FLOAT, and WAVE_FORMAT_PCM.
Referenced by makeHeader(), setChannelMask(), setNumChannels(), and setValidBitsPerSample().
|
protected |
Definition at line 616 of file WavFile.php.
References WAVE_SUBFORMAT_IEEE_FLOAT, and WAVE_SUBFORMAT_PCM.
Referenced by setAudioFormat().
WavFile::setBitsPerSample | ( | $bitsPerSample | ) |
Definition at line 697 of file WavFile.php.
References setValidBitsPerSample().
|
protected |
Definition at line 736 of file WavFile.php.
References setNumBlocks().
|
protected |
Definition at line 767 of file WavFile.php.
Referenced by setSampleRate().
WavFile::setChannelMask | ( | $channelMask = self::SPEAKER_DEFAULT | ) |
Definition at line 654 of file WavFile.php.
References $n, and setAudioFormat().
|
protected |
Definition at line 471 of file WavFile.php.
References setActualSize().
Referenced by setDataSize(), setFactChunkSize(), and setFmtChunkSize().
|
protected |
Definition at line 569 of file WavFile.php.
|
protected |
Definition at line 551 of file WavFile.php.
References setChunkSize().
Referenced by appendWav(), convertBitsPerSample(), generateNoise(), getDataSubchunk(), getSampleBlock(), getSampleValue(), insertSilence(), readWavData(), setSampleBlock(), setSamples(), and setSampleValue().
|
protected |
Definition at line 530 of file WavFile.php.
References setChunkSize().
|
protected |
Definition at line 491 of file WavFile.php.
References $_fmtExtendedSize, and setChunkSize().
Referenced by setFmtExtendedSize().
|
protected |
Definition at line 508 of file WavFile.php.
References setFmtChunkSize().
|
protected |
Definition at line 753 of file WavFile.php.
Referenced by makeHeader(), and setBlockAlign().
WavFile::setNumChannels | ( | $numChannels | ) |
Definition at line 634 of file WavFile.php.
References setAudioFormat().
Referenced by __construct().
WavFile::setSampleBlock | ( | $sampleBlock, | |
$blockNum | |||
) |
Set a single sample block.
Allows to append a sample block.
string | $sampleBlock | (Required) The binary sample block (all channels). |
int | $blockNum | (Required) The sample block number. Zero based. |
WavFileException |
Definition at line 1344 of file WavFile.php.
References $_blockAlign, and setDataSize().
WavFile::setSampleRate | ( | $sampleRate | ) |
Definition at line 679 of file WavFile.php.
References setByteRate().
WavFile::setSamples | ( | & | $samples = '' | ) |
Definition at line 781 of file WavFile.php.
References setDataSize().
Referenced by convertBitsPerSample().
WavFile::setSampleValue | ( | $sampleFloat, | |
$blockNum, | |||
$channelNum | |||
) |
Sets a float sample value for a specific sample block number and channel.
Converts float values to appropriate integer values and clips properly.
Allows to append samples (in order).
float | $sampleFloat | (Required) The float sample value to set. Converts float values and clips if necessary. |
int | $blockNum | (Required) The sample block number to set or append. Zero based. |
int | $channelNum | (Required) The channel number within the sample block to set or append. First channel is 1. |
WavFileException |
Definition at line 1453 of file WavFile.php.
References $_bitsPerSample, $_dataSize, and setDataSize().
Referenced by filter().
|
protected |
Definition at line 717 of file WavFile.php.
References $_bitsPerSample, and setAudioFormat().
Referenced by setBitsPerSample().
WavFile::setWavData | ( | & | $data, |
$free = true |
|||
) |
Set the wav file data and properties from a wav file in a string.
string | $data | (Required) The wav file data. Passed by reference. |
bool | $free | (Optional) True to free the passed $data after copying. |
WavFormatException | |
WavFileException |
Definition at line 967 of file WavFile.php.
References closeWav(), and readWav().
|
static |
Unpacks a single binary sample to numeric value.
string | $sampleBinary | (Required) The sample to decode. |
int | $bitDepth | (Optional) The bits per sample to decode. If omitted, derives it from the length of $sampleBinary. |
Definition at line 286 of file WavFile.php.
Referenced by unpackSampleBlock().
|
static |
Unpacks a binary sample block to numeric values.
string | $sampleBlock | (Required) The binary sample block (all channels). |
int | $bitDepth | (Required) The bits per sample to decode. |
int | $numChannels | (Optional) The number of channels to decode. If omitted, derives it from the length of $sampleBlock and $bitDepth. |
Definition at line 370 of file WavFile.php.
References unpackSample().
|
protected |
Definition at line 141 of file WavFile.php.
Referenced by getActualSize().
|
protected |
Definition at line 168 of file WavFile.php.
Referenced by getAudioFormat().
|
protected |
Definition at line 171 of file WavFile.php.
Referenced by getAudioSubFormat().
|
protected |
Definition at line 183 of file WavFile.php.
Referenced by getBitsPerSample(), setSampleValue(), and setValidBitsPerSample().
|
protected |
Definition at line 189 of file WavFile.php.
Referenced by getBlockAlign(), getSampleBlock(), and setSampleBlock().
|
protected |
Definition at line 195 of file WavFile.php.
Referenced by getByteRate().
|
protected |
Definition at line 177 of file WavFile.php.
Referenced by getChannelMask().
|
protected |
Definition at line 144 of file WavFile.php.
Referenced by getChunkSize(), and setActualSize().
|
protected |
Definition at line 165 of file WavFile.php.
Referenced by getDataOffset().
|
protected |
Definition at line 156 of file WavFile.php.
Referenced by getDataSize(), and setSampleValue().
|
protected |
Definition at line 159 of file WavFile.php.
|
protected |
Definition at line 162 of file WavFile.php.
|
protected |
Definition at line 153 of file WavFile.php.
Referenced by getFactChunkSize().
|
protected |
Definition at line 147 of file WavFile.php.
Referenced by getFmtChunkSize().
|
protected |
Definition at line 150 of file WavFile.php.
Referenced by getFmtExtendedSize(), and setFmtChunkSize().
|
protected |
Definition at line 201 of file WavFile.php.
|
protected |
Definition at line 192 of file WavFile.php.
Referenced by getNumBlocks().
|
protected |
Definition at line 174 of file WavFile.php.
Referenced by getNumChannels().
|
protected |
Definition at line 180 of file WavFile.php.
Referenced by getSampleRate().
|
protected |
Definition at line 198 of file WavFile.php.
Referenced by getSamples(), and insertSilence().
|
protected |
Definition at line 186 of file WavFile.php.
Referenced by getValidBitsPerSample().
|
staticprotected |
Definition at line 133 of file WavFile.php.
const WavFile::FILTER_DEGRADE = 0x04 |
Definition at line 81 of file WavFile.php.
Referenced by degrade(), filter(), and Securimage\generateWAV().
const WavFile::FILTER_MIX = 0x01 |
Definition at line 75 of file WavFile.php.
Referenced by filter(), Securimage\generateWAV(), and mergeWav().
const WavFile::FILTER_NORMALIZE = 0x02 |
Definition at line 78 of file WavFile.php.
Referenced by filter(), Securimage\generateWAV(), and mergeWav().
const WavFile::MAX_CHANNEL = 18 |
Definition at line 84 of file WavFile.php.
const WavFile::MAX_SAMPLERATE = 192000 |
Definition at line 87 of file WavFile.php.
const WavFile::SPEAKER_ALL = 0x03FFFF |
Definition at line 109 of file WavFile.php.
const WavFile::SPEAKER_BACK_CENTER = 0x000100 |
Definition at line 99 of file WavFile.php.
const WavFile::SPEAKER_BACK_LEFT = 0x000010 |
Definition at line 95 of file WavFile.php.
const WavFile::SPEAKER_BACK_RIGHT = 0x000020 |
Definition at line 96 of file WavFile.php.
const WavFile::SPEAKER_DEFAULT = 0x000000 |
Channel Locations for ChannelMask.
Definition at line 90 of file WavFile.php.
Referenced by __construct().
const WavFile::SPEAKER_FRONT_CENTER = 0x000004 |
Definition at line 93 of file WavFile.php.
const WavFile::SPEAKER_FRONT_LEFT = 0x000001 |
Definition at line 91 of file WavFile.php.
const WavFile::SPEAKER_FRONT_LEFT_OF_CENTER = 0x000040 |
Definition at line 97 of file WavFile.php.
const WavFile::SPEAKER_FRONT_RIGHT = 0x000002 |
Definition at line 92 of file WavFile.php.
const WavFile::SPEAKER_FRONT_RIGHT_OF_CENTER = 0x000080 |
Definition at line 98 of file WavFile.php.
const WavFile::SPEAKER_LOW_FREQUENCY = 0x000008 |
Definition at line 94 of file WavFile.php.
const WavFile::SPEAKER_SIDE_LEFT = 0x000200 |
Definition at line 100 of file WavFile.php.
const WavFile::SPEAKER_SIDE_RIGHT = 0x000400 |
Definition at line 101 of file WavFile.php.
const WavFile::SPEAKER_TOP_BACK_CENTER = 0x010000 |
Definition at line 107 of file WavFile.php.
const WavFile::SPEAKER_TOP_BACK_LEFT = 0x008000 |
Definition at line 106 of file WavFile.php.
const WavFile::SPEAKER_TOP_BACK_RIGHT = 0x020000 |
Definition at line 108 of file WavFile.php.
const WavFile::SPEAKER_TOP_CENTER = 0x000800 |
Definition at line 102 of file WavFile.php.
const WavFile::SPEAKER_TOP_FRONT_CENTER = 0x002000 |
Definition at line 104 of file WavFile.php.
const WavFile::SPEAKER_TOP_FRONT_LEFT = 0x001000 |
Definition at line 103 of file WavFile.php.
const WavFile::SPEAKER_TOP_FRONT_RIGHT = 0x004000 |
Definition at line 105 of file WavFile.php.
const WavFile::WAVE_FORMAT_EXTENSIBLE = 0xFFFE |
Definition at line 118 of file WavFile.php.
Referenced by setAudioFormat().
const WavFile::WAVE_FORMAT_IEEE_FLOAT = 0x0003 |
Definition at line 115 of file WavFile.php.
Referenced by setAudioFormat().
const WavFile::WAVE_FORMAT_PCM = 0x0001 |
Definition at line 112 of file WavFile.php.
Referenced by __construct(), and setAudioFormat().
const WavFile::WAVE_SUBFORMAT_IEEE_FLOAT = "0300000000001000800000aa00389b71" |
Definition at line 124 of file WavFile.php.
Referenced by setAudioSubFormat().
const WavFile::WAVE_SUBFORMAT_PCM = "0100000000001000800000aa00389b71" |
Definition at line 121 of file WavFile.php.
Referenced by setAudioSubFormat().