[PHP] Re: Combining sound files

2007-03-03 Thread Manuel Lemos
Hello, on 02/25/2007 12:22 PM tedd said the following: > However, I can't do the same with .WAV files. Does anyone know a way to > combine .WAV files similar to the way shown above? This class can do exactly what you want and more: http://www.phpclasses.org/wavedit -- Regards, Manuel Lemos M

[PHP] Re: Combining sound files

2007-02-28 Thread Colin Guthrie
tedd wrote: > I'm not sure I can or need to run exec, nor do I actually know how. I'll > deal with that later in my life. Go on, it's easy! http://uk2.php.net/manual/en/function.exec.php That said, depending on your hosting, you may be banned from exec. > For the moment, I can use a HEX Editor

[PHP] Re: Combining sound files

2007-02-26 Thread Colin Guthrie
tedd wrote: > I'll investigate what you suggest. I definitely think it's the right way to go. sox can also convert from mp3 to wav etc. as per Clive's suggestions too, so if you can use lame from the command line via PHP, there is no reason not to just use sox instead. > It was by accident that I

[PHP] Re: Combining sound files

2007-02-26 Thread tedd
clive wrote: However, I can't do the same with .WAV files. Does anyone know a way to combine .WAV files similar to the way shown above? Can you not convert the wav files to mp3's then combine them? While I'm sure you could do this technically, the principle is wrong for so many reasons

[PHP] Re: Combining sound files

2007-02-26 Thread Colin Guthrie
clive wrote: >> However, I can't do the same with .WAV files. Does anyone know a way >> to combine .WAV files similar to the way shown above? > > Can you not convert the wav files to mp3's then combine them? While I'm sure you could do this technically, the principle is wrong for so many reasons.

[PHP] Re: Combining sound files

2007-02-25 Thread Colin Guthrie
tedd wrote: >> If you are using linux I'd just shell out to sox or similar. > > I don't know how to do that. http://uk.php.net/manual/en/ref.exec.php sox is a command line program that you can experiment with on the command line. >From it's man page: NAME SoX - Sound eXchange - The Swis

[PHP] Re: Combining sound files

2007-02-25 Thread tedd
At 9:49 PM + 2/25/07, Colin Guthrie wrote: tedd wrote: Hi gang: I can combine two mp3 sound files together by simply: // load first $file = "a.mp3"; $handle = fopen($file, "rb"); $size = filesize($file); $load = fread($handle, $size); fclose($handle); // load second $file = "

[PHP] Re: Combining sound files

2007-02-25 Thread Colin Guthrie
tedd wrote: > Hi gang: > > I can combine two mp3 sound files together by simply: > > // load first > > $file = "a.mp3"; > $handle = fopen($file, "rb"); > $size = filesize($file); > $load = fread($handle, $size); > fclose($handle); > > // load second > > $file = "b.mp3"; > $handle = fopen($fil