Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Thomas Schmidt  >  .wav Creator  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Some example script, without the .wav files
Class: .wav Creator
Create .wav file from multiple audio files
Author: By
Last change:
Date: 2012-05-09 10:28
Size: 703 bytes
 

Contents

Class file image Download
<?
error_reporting
(0); // Disable Error Reporting
ini_set('memory_limit''256M'); // Set a Memory Limit

include("wav.audio.php");
$wav = new wavcreation;

$wav->setSamplerate(44100); // 8000, 16000, 22050, 44100, 48000
$wav->setSamplesize(16); // 8bit, 12bit, 16bit, 24bit, 32bit ...
$wav->setChannels(2); // 1 - mono // 2 - stereo


$array = array("starttime" => 0); // Starts the audiofile at sample 0.
$wav->addfile("A/r1.wav"$array); // Files to read - only wav at the moment

$array["starttime"] = $wav->timetosample(2); // timetosample() -> time in samples
$wav->addfile("A/1.wav"$array); // Files to read


$wav->generate("output.wav"); // Generates the .wav - File

?>