PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > php.general > File Format
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
File Format

Réponse
 
LinkBack Outils de la discussion
Vieux 11/04/2008, 20h20   #1
admin@buskirkgraphics.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut File Format

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
  Réponse avec citation
Vieux 12/04/2008, 04h01   #2
Bojan Tesanovic
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] File Format

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

<?php

system(' wavconvert_to_CCITT.exe some_pcm.wave ') ;
?>




On Apr 11, 2008, at 9:20 PM, admin@buskirkgraphics.com 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/





  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 11h46.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 2,99304 seconds with 10 queries