Changeset 7317
- Timestamp:
- 12/15/08 10:55:17 (2 years ago)
- Files:
-
- modules/branches/2.6/music/page.music.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.6/music/page.music.php
r7261 r7317 157 157 $pattern = ''; 158 158 $handle=opendir($path_to_dir) ; 159 $extensions = array('mp3',' wav'); // list of extensions to match159 $extensions = array('mp3','MP3','wav','WAV'); // list of extensions to match 160 160 161 161 //generate the pattern to look for. … … 205 205 206 206 // If we are dealing with an MP3, we need to decode it to a wav file 207 if (strpos($origmohfile,'.mp3') !== false) {207 if (strpos($origmohfile,'.mp3') | strpos($origmohfile,'.MP3') !== false) { 208 208 $mpg123cmd = "mpg123 -w \"".substr($origmohfile,0,strrpos($origmohfile,".")).".wav\" \"".$origmohfile."\" 2>&1 "; 209 209 exec($mpg123cmd, $output, $returncode); … … 211 211 $newmohfile = $path_to_dir."/wav_".$newname.".wav"; 212 212 //asdf 213 $soxcmd = "sox \"". substr($origmohfile,0,strrpos($origmohfile,".")).".wav\"";213 $soxcmd = "sox \"".$origmohfile."\""; 214 214 $soxcmd .= " -r 8000 -c 1 \"".$newmohfile."\""; 215 215 if($volume){ … … 260 260 // so we have two "original" files to delete 261 261 // 262 if (strpos($origmohfile,'.mp3') !== false) {262 if (strpos($origmohfile,'.mp3') | strpos($origmohfile,'.MP3') !== false) { 263 263 $rmcmd="rm -f \"". substr($origmohfile,0,strrpos($origmohfile,".")).".wav\""; 264 264 exec($rmcmd);
