This class allows to make some convertion and it is used as an utility by other classes of the library. For example, this class allows to convert an hex string into a decimal one and viceversa.

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.

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

 Methods

Converts a string composed of hex chars into a string of decimal chars

hexToString(string $Hex) : string

Parameters

$Hex

string

A string of hex chars

Returns

string

Converts a number expressed in megabyte into one expressed in bytes

megabyteToByte(float $Megabyte) : int

Parameters

$Megabyte

float

Returns

int

Converts a number expressed in milliseconds into the corresponding number of bytes which is dependent by the data rate of the wav current file.

millisecondsToByte(int $Milliseconds, int $DataRate) : int

Parameters

$Milliseconds

int

The number of milliseconds to convert

$DataRate

int

The data rate of the current wav file

Returns

intThe corrisponding number of bytes

Converts a string composed of decimal chars into a string of hex chars

stringToHex(string $String) : string

Parameters

$String

string

A string of decimal chars

Returns

string