Advertisement
Guest User

Untitled

a guest
Feb 24th, 2020
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. // determine which processor to use based on the extension
  2. $processor = "";
  3.  
  4. $allowed_sox = array('mp3','wav','ogg', 'aif', 'aiff', 'flac');
  5. $allowed_avconv = array('m4a','aac','wma');
  6.  
  7. if (in_array($ext, $allowed_sox)) {
  8. $processor = "sox";
  9. }
  10.  
  11. if (in_array($ext, $allowed_avconv)) {
  12. $processor = "avconv";
  13. }
  14.  
  15. // Check we have a valid processor
  16. if ($processor == "") {
  17. json_response(422, 'No processor support!');
  18. exit;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement