mirror of
https://github.com/ggerganov/ggwave.git
synced 2026-04-21 05:36:33 +08:00
ggwave-to-gui : go back to .wav
ultrasound does not work with .mp3
This commit is contained in:
@@ -33,20 +33,20 @@ if (is_resource($process)) {
|
|||||||
|
|
||||||
$return_value = proc_close($process);
|
$return_value = proc_close($process);
|
||||||
|
|
||||||
exec("ffmpeg -i ".$path_wav." ".$path_mp3);
|
//exec("ffmpeg -i ".$path_wav." ".$path_wav);
|
||||||
|
|
||||||
$result = file_get_contents($path_mp3);
|
$result = file_get_contents($path_wav);
|
||||||
$size = filesize($path_mp3);
|
$size = filesize($path_wav);
|
||||||
|
|
||||||
if ($size == 0) {
|
if ($size == 0) {
|
||||||
header('Content-type: text/plain');
|
header('Content-type: text/plain');
|
||||||
echo $log;
|
echo $log;
|
||||||
} else {
|
} else {
|
||||||
//header("Content-Type: audio/wav");
|
//header("Content-Type: audio/wav");
|
||||||
header("Content-Type: ". mime_content_type($path_mp3));
|
header("Content-Type: ". mime_content_type($path_wav));
|
||||||
header("Content-Length: $size");
|
header("Content-Length: $size");
|
||||||
header("Accept-Ranges: bytes");
|
header("Accept-Ranges: bytes");
|
||||||
header('Content-Disposition: inline; filename="output.wav"');
|
header('Content-Disposition: attachment; filename="output.wav"');
|
||||||
header("Content-Transfer-Encoding: binary");
|
header("Content-Transfer-Encoding: binary");
|
||||||
header("Content-Range: bytes 0-".$size."/".$size);
|
header("Content-Range: bytes 0-".$size."/".$size);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user