Class AuderoWavExtractor

Description

Located in /src/AuderoWavExtractor.php (line 66)


	
			
Class Constant Summary
AUDIO_FORMAT = 'AudioFormat'
BITS_PER_SAMPLE = 'BitsPerSample'
BLOCK_SIZE = 'BlockSize'
CHANNELS_NUMBER = 'ChannelsNumber'
CHUNK_FORMAT = 'ChunkFormat'
CHUNK_ID = 'ChunkId'
CHUNK_SIZE = 'ChunkSize'
DATA = 'Data'
DATA_CHUNK = 0x64617461
DATA_RATE = 'DataRate'
FACT_CHUNK = 0x66616374
FMT_CHUNK = 0x666D7420
RIFF_CHUNK = 0x52494646
SAMPLE_RATE = 'SampleRate'
Method Summary
AuderoWavExtractor __construct (string $FilePath)
string extractChunk (int $Start, int $End, [int $Destination = 1], [string &$Filename = ''])
int getDuration ()
void getFilename ([ $IncludeExtention = TRUE])
void getFilePath ()
array getHeaders ()
bool isEnoughMemory (int $Start, int $End)
int millisecondsToByte (int $Milliseconds, [int $DataRate = NULL])
void setFilePath (type $FilePath)
Methods
Strict standards: Only variables should be passed by reference in C:\php\pear\PhpDocumentor\phpDocumentor\Smarty-2.6.0\libs\Smarty_Compiler.class.php on line 712 Call Stack: 0.0002 322504 1. {main}() C:\php\phpdoc:0 0.0029 333480 2. require('C:\php\pear\PhpDocumentor\phpDocumentor\phpdoc.inc') C:\php\phpdoc:40 0.4580 10503688 3. phpDocumentor_setup->createDocs() C:\php\pear\PhpDocumentor\phpDocumentor\phpdoc.inc:65 1.9087 12672128 4. phpDocumentor_IntermediateParser->Output() C:\php\pear\PhpDocumentor\phpDocumentor\Setup.inc.php:763 1.9646 12753408 5. phpDocumentor_IntermediateParser->Convert() C:\php\pear\PhpDocumentor\phpDocumentor\IntermediateParser.inc:1867 1.9646 12753528 6. Converter->walk() C:\php\pear\PhpDocumentor\phpDocumentor\IntermediateParser.inc:1654 2.4590 13850832 7. HTMLframesConverter->endClass() C:\php\pear\PhpDocumentor\phpDocumentor\Converter.inc:1936 2.4593 13852360 8. Smarty->fetch() C:\php\pear\PhpDocumentor\phpDocumentor\Converters\HTML\frames\HTMLframesConverter.inc:347 2.5173 14465976 9. include('C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\auderowavextractor\doc\26d3399f63abd43a7d72f8c21440dcb0\%%165^%%1653142046^class.tpl.php') C:\php\pear\PhpDocumentor\phpDocumentor\Smarty-2.6.0\libs\Smarty.class.php:1298 2.5347 14472200 10. Smarty->_smarty_include() C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\auderowavextractor\doc\26d3399f63abd43a7d72f8c21440dcb0\%%165^%%1653142046^class.tpl.php:684 2.5348 14474992 11. Smarty->_compile_resource() C:\php\pear\PhpDocumentor\phpDocumentor\Smarty-2.6.0\libs\Smarty.class.php:1935 2.5408 14488352 12. Smarty->_compile_source() C:\php\pear\PhpDocumentor\phpDocumentor\Smarty-2.6.0\libs\Smarty.class.php:1458 2.5412 14515232 13. Smarty_Compiler->_compile_file() C:\php\pear\PhpDocumentor\phpDocumentor\Smarty-2.6.0\libs\Smarty.class.php:1523 2.5437 14581200 14. Smarty_Compiler->_compile_tag() C:\php\pear\PhpDocumentor\phpDocumentor\Smarty-2.6.0\libs\Smarty_Compiler.class.php:316 2.5443 14581888 15. Smarty_Compiler->_compile_custom_tag() C:\php\pear\PhpDocumentor\phpDocumentor\Smarty-2.6.0\libs\Smarty_Compiler.class.php:537 Strict standards: Only variables should be passed by reference in C:\php\pear\PhpDocumentor\phpDocumentor\Smarty-2.6.0\libs\Smarty_Compiler.class.php on line 712 Call Stack: 0.0002 322504 1. {main}() C:\php\phpdoc:0 0.0029 333480 2. require('C:\php\pear\PhpDocumentor\phpDocumentor\phpdoc.inc') C:\php\phpdoc:40 0.4580 10503688 3. phpDocumentor_setup->createDocs() C:\php\pear\PhpDocumentor\phpDocumentor\phpdoc.inc:65 1.9087 12672128 4. phpDocumentor_IntermediateParser->Output() C:\php\pear\PhpDocumentor\phpDocumentor\Setup.inc.php:763 1.9646 12753408 5. phpDocumentor_IntermediateParser->Convert() C:\php\pear\PhpDocumentor\phpDocumentor\IntermediateParser.inc:1867 1.9646 12753528 6. Converter->walk() C:\php\pear\PhpDocumentor\phpDocumentor\IntermediateParser.inc:1654 2.4590 13850832 7. HTMLframesConverter->endClass() C:\php\pear\PhpDocumentor\phpDocumentor\Converter.inc:1936 2.4593 13852360 8. Smarty->fetch() C:\php\pear\PhpDocumentor\phpDocumentor\Converters\HTML\frames\HTMLframesConverter.inc:347 2.5173 14465976 9. include('C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\auderowavextractor\doc\26d3399f63abd43a7d72f8c21440dcb0\%%165^%%1653142046^class.tpl.php') C:\php\pear\PhpDocumentor\phpDocumentor\Smarty-2.6.0\libs\Smarty.class.php:1298 2.5347 14472200 10. Smarty->_smarty_include() C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\auderowavextractor\doc\26d3399f63abd43a7d72f8c21440dcb0\%%165^%%1653142046^class.tpl.php:684 2.5348 14474992 11. Smarty->_compile_resource() C:\php\pear\PhpDocumentor\phpDocumentor\Smarty-2.6.0\libs\Smarty.class.php:1935 2.5408 14488352 12. Smarty->_compile_source() C:\php\pear\PhpDocumentor\phpDocumentor\Smarty-2.6.0\libs\Smarty.class.php:1458 2.5412 14515232 13. Smarty_Compiler->_compile_file() C:\php\pear\PhpDocumentor\phpDocumentor\Smarty-2.6.0\libs\Smarty.class.php:1523 2.5543 14601968 14. Smarty_Compiler->_compile_tag() C:\php\pear\PhpDocumentor\phpDocumentor\Smarty-2.6.0\libs\Smarty_Compiler.class.php:316 2.5549 14602656 15. Smarty_Compiler->_compile_custom_tag() C:\php\pear\PhpDocumentor\phpDocumentor\Smarty-2.6.0\libs\Smarty_Compiler.class.php:537
Constructor __construct (line 102)

Sets the filename

AuderoWavExtractor __construct (string $FilePath)
  • string $FilePath: The filename, including the path, of the managed file wav
extractChunk (line 243)

Extract a portion of the current, from the $Start to $End. The chunk will be saved, with name $Filename, in the local server, the browser or the user and so on based on the value of $Destination.

The possible value of $Destination are:

  • 1: send the file to the browser and force the download with the name given by $Filename.
  • 2: save into the local disk the file with the name given by $Filename.
  • 3: return the wav as a string. In this case $Filename is ignored.
  • 4: both 2 and 3

  • return: The chunk to extract, including the headers
  • access: public
string extractChunk (int $Start, int $End, [int $Destination = 1], [string &$Filename = ''])
  • int $Start: The start time, in milliseconds, of the portion to extract
  • int $End: The end time, in milliseconds, of the portion to extract
  • int $Destination: Where to save the extracted chunk
  • string &$Filename: The name to assing to the chunk. If no name is provided the method generate one using this rule: "InputFilename-Start-End.wav"
getDuration (line 199)

This method get the current file duration

  • return: The duration of the file in milliseconds
  • access: public
int getDuration ()
getFilename (line 112)
  • access: public
void getFilename ([ $IncludeExtention = TRUE])
  • $IncludeExtention
getFilePath (line 107)
  • access: public
void getFilePath ()
getHeaders (line 161)

Get the headers of the current wav file

  • return: The array that contains the metadata
  • access: public
array getHeaders ()
isEnoughMemory (line 518)

Try to check if the available memory is enough to extract the chunk

  • access: public
bool isEnoughMemory (int $Start, int $End)
  • int $Start
  • int $End
millisecondsToByte (line 308)
  • access: public
int millisecondsToByte (int $Milliseconds, [int $DataRate = NULL])
  • int $Milliseconds
  • int $DataRate
setFilePath (line 133)
  • access: public
void setFilePath (type $FilePath)
  • type $FilePath
Class Constants
Strict standards: Only variables should be passed by reference in C:\php\pear\PhpDocumentor\phpDocumentor\Smarty-2.6.0\libs\Smarty_Compiler.class.php on line 712 Call Stack: 0.0002 322504 1. {main}() C:\php\phpdoc:0 0.0029 333480 2. require('C:\php\pear\PhpDocumentor\phpDocumentor\phpdoc.inc') C:\php\phpdoc:40 0.4580 10503688 3. phpDocumentor_setup->createDocs() C:\php\pear\PhpDocumentor\phpDocumentor\phpdoc.inc:65 1.9087 12672128 4. phpDocumentor_IntermediateParser->Output() C:\php\pear\PhpDocumentor\phpDocumentor\Setup.inc.php:763 1.9646 12753408 5. phpDocumentor_IntermediateParser->Convert() C:\php\pear\PhpDocumentor\phpDocumentor\IntermediateParser.inc:1867 1.9646 12753528 6. Converter->walk() C:\php\pear\PhpDocumentor\phpDocumentor\IntermediateParser.inc:1654 2.4590 13850832 7. HTMLframesConverter->endClass() C:\php\pear\PhpDocumentor\phpDocumentor\Converter.inc:1936 2.4593 13852360 8. Smarty->fetch() C:\php\pear\PhpDocumentor\phpDocumentor\Converters\HTML\frames\HTMLframesConverter.inc:347 2.5173 14465976 9. include('C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\auderowavextractor\doc\26d3399f63abd43a7d72f8c21440dcb0\%%165^%%1653142046^class.tpl.php') C:\php\pear\PhpDocumentor\phpDocumentor\Smarty-2.6.0\libs\Smarty.class.php:1298 2.5874 14496880 10. Smarty->_smarty_include() C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\auderowavextractor\doc\26d3399f63abd43a7d72f8c21440dcb0\%%165^%%1653142046^class.tpl.php:786 2.5876 14499504 11. Smarty->_compile_resource() C:\php\pear\PhpDocumentor\phpDocumentor\Smarty-2.6.0\libs\Smarty.class.php:1935 2.5882 14501680 12. Smarty->_compile_source() C:\php\pear\PhpDocumentor\phpDocumentor\Smarty-2.6.0\libs\Smarty.class.php:1458 2.5884 14522968 13. Smarty_Compiler->_compile_file() C:\php\pear\PhpDocumentor\phpDocumentor\Smarty-2.6.0\libs\Smarty.class.php:1523 2.5893 14533264 14. Smarty_Compiler->_compile_tag() C:\php\pear\PhpDocumentor\phpDocumentor\Smarty-2.6.0\libs\Smarty_Compiler.class.php:316 2.5898 14533952 15. Smarty_Compiler->_compile_custom_tag() C:\php\pear\PhpDocumentor\phpDocumentor\Smarty-2.6.0\libs\Smarty_Compiler.class.php:537
AUDIO_FORMAT = 'AudioFormat' (line 74)
BITS_PER_SAMPLE = 'BitsPerSample' (line 79)
BLOCK_SIZE = 'BlockSize' (line 78)
BYTES_NOT_COUNTED = 8 (line 87)
CHANNELS_NUMBER = 'ChannelsNumber' (line 75)
CHUNK_FORMAT = 'ChunkFormat' (line 73)
CHUNK_ID = 'ChunkId' (line 71)

A set of constant to define the metadata in the wav format.

CHUNK_ID_FORMAT = 'H8' (line 88)
CHUNK_ID_SIZE = 4 (line 89)
CHUNK_SIZE = 'ChunkSize' (line 72)
DATA = 'Data' (line 80)
DATA_CHUNK = 0x64617461 (line 84)
DATA_RATE = 'DataRate' (line 77)
FACT_CHUNK = 0x66616374 (line 85)
FMT_CHUNK = 0x666D7420 (line 83)
RIFF_CHUNK = 0x52494646 (line 82)
SAMPLE_RATE = 'SampleRate' (line 76)

Documentation generated on Sun, 25 Dec 2011 07:59:35 +0100 by phpDocumentor 1.4.4