Login   Register  
PHP Classes
elePHPant
Icontem

File: test_fade.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Thi Dinh  >  WavEdit  >  test_fade.php  >  Download  
File: test_fade.php
Role: Example script
Content type: text/plain
Description: Sample sound fade
Class: WavEdit
Manipulate audio files in the WAV format
Author: By
Last change: Change option
Date: 2005-10-01 21:19
Size: 902 bytes
 

Contents

Class file image Download
<?
//== Sample of using Wavedit - Fading sound ==/
//== check demo at: http://www.pviet.com/wavedit/test_fade.php ==//

//load class
include("wavedit.class.php");
$wav = new wavEdit();

//load wav files
$wFiles = array("Gary Moore Still Got The Blue.wav");
$wData $wav->getFiles($wFiles);


//view wav images
$wav->drawImgWave();
$wav->viewImage("","viewheader");

$arrFadeIn = array(
             array(
'pos'=>"head",'val'=>1000),
             );
$arrFadeOut = array(
             array(
'pos'=>"tail",'val'=>'800'),
             );

//Fade Out
$wav->setFade($arrFadeIn);
$wav->drawImgWave("fadeIn");
$wav->viewImage("fadeIn","nofile");

//Fade In
$wav->setFade($arrFadeOut);
$wav->drawImgWave("fadeOut");
$wav->viewImage("fadeOut","nofile");


//Write out File
$wav->writeWavFile("fade");
$wav->drawImgWave("fade");
$wav->viewImage("fade","viewheader");

?>