Convert an array of 8-bit values to wav file in PHP -
i have array of 8-bit values have received microprocessor.
looking turn values wav file using php.
i found examples, like this or this, work in java , c# seem leverage existing classes. know of php library can this? if not, can explain how create wav file in php?
you can use pack function, first must discover values used: signed or unsigned
function pack_array($v,$a) { return call_user_func_array(pack,array_merge(array($v),(array)$a)); } $wav = pack_array('c*', $array); // 'c*' unsigned
Comments
Post a Comment