Re: [PHP] File Format

2008-04-11 Thread Bojan Tesanovic
I bet there is no native PHP methods for that kind of file, but you  
can easily check the headers of wave file , you need to have a  
specification or at least have 3 wave files of PCM  and CCITT  ,  
compare the first 100 characters of that file, and you will get the clue

and logic how to recognize one from the other.
in PHP open a file read 100++ bytes and apply a logic to distinguish  
formats.


After that you can use some external program to convert from one  
format to other  eg







On Apr 11, 2008, at 9:20 PM, [EMAIL PROTECTED] wrote:


Wave editor?
Here is my dilemma.

In php I have written a script to upload a wave file to the server  
for the C Sharp application to use. No problems on upload or  
streaming from the file to the web. My issue comes when the format  
of the wave file is PCM and not CCITT u-Law. The device cannot play  
a PCM formatted wave file. Problem comes in when the end user just  
picks a wave file to use for this option and does not have the  
format correct.


Is there a wave format change option in php?
Has or does anyone know of a solution in php for this?
Is there a way I can check the format of the wave file before  
uploading?




Richard L. Buskirk

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Igor Jocic
http://www.carster.us/






[PHP] File Format

2008-04-11 Thread admin
Wave editor?
Here is my dilemma.

In php I have written a script to upload a wave file to the server for the C 
Sharp application to use. No problems on upload or streaming from the file to 
the web. My issue comes when the format of the wave file is PCM and not CCITT 
u-Law. The device cannot play a PCM formatted wave file. Problem comes in when 
the end user just picks a wave file to use for this option and does not have 
the format correct.

Is there a wave format change option in php? 
Has or does anyone know of a solution in php for this?
Is there a way I can check the format of the wave file before uploading?



Richard L. Buskirk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php