Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // determine which processor to use based on the extension
- $processor = "";
- $allowed_sox = array('mp3','wav','ogg', 'aif', 'aiff', 'flac');
- $allowed_avconv = array('m4a','aac','wma');
- if (in_array($ext, $allowed_sox)) {
- $processor = "sox";
- }
- if (in_array($ext, $allowed_avconv)) {
- $processor = "avconv";
- }
- // Check we have a valid processor
- if ($processor == "") {
- json_response(422, 'No processor support!');
- exit;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement