wav 파일 구조를 파악하여 생성하는 코드 변경

This commit is contained in:
gnuboard
2013-01-04 14:54:46 +09:00
parent fd7097cde3
commit 7fb3a13922
3 changed files with 33 additions and 4 deletions

17
plugin/captcha/info.php Normal file
View File

@ -0,0 +1,17 @@
<?php
include_once("./_common.php");
// prepare an array of wavfiles
$lc ='/home/tmp/g4s/plugin/captcha/wavs/';
$wav = $lc.'captcha.wav';
$fields = join('/',array( 'H8ChunkID', 'VChunkSize', 'H8Format',
'H8Subchunk1ID', 'VSubchunk1Size',
'vAudioFormat', 'vNumChannels', 'VSampleRate',
'VByteRate', 'vBlockAlign', 'vBitsPerSample' ));
$fp = fopen($wav,'rb');
$header = fread($fp,36);
$info = unpack($fields,$header);
print_r2($info);
?>