wav 파일 구조를 파악하여 생성하는 코드 변경
This commit is contained in:
1 parent
fd7097cde3
commit
7fb3a13922
3 files changed
+33
-4
No files matched your search
@@ -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);
|
||||
?>
|
||||
Reference in new issue
Block a user