projects
/
mw_sourceml
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
titre du site par defaut
[mw_sourceml]
/
app
/
data
/
modules
/
share
/
sml_data_waveforms.php
diff --git
a/app/data/modules/share/sml_data_waveforms.php
b/app/data/modules/share/sml_data_waveforms.php
index
91a3011
..
306cb8b
100644
(file)
--- a/
app/data/modules/share/sml_data_waveforms.php
+++ b/
app/data/modules/share/sml_data_waveforms.php
@@
-2,9
+2,9
@@
class sml_data_waveforms extends mw_data{
class sml_data_waveforms extends mw_data{
-
var
$SOX_EXISTS;
+
public
$SOX_EXISTS;
- function init_waveform_dirs(){
+
public
function init_waveform_dirs(){
$env = $this->env();
$dir = $env->path("content")."tmp";
if(!is_dir($dir)) @mkdir($dir);
$env = $this->env();
$dir = $env->path("content")."tmp";
if(!is_dir($dir)) @mkdir($dir);
@@
-15,7
+15,7
@@
return true;
}
return true;
}
- function audio_to_png($params = array()){
+
public
function audio_to_png($params = array()){
$env = $this->env();
$audio_file = $params["audio_file"];
if(!$audio_file) return false;
$env = $this->env();
$audio_file = $params["audio_file"];
if(!$audio_file) return false;
@@
-91,11
+91,11
@@
// utilitaires
//
// utilitaires
//
- function sox_command($audio_file, $wav_file){
+
public
function sox_command($audio_file, $wav_file){
return "sox -V \"".$audio_file."\" -b 16 -r 8000 -c 1 \"".$wav_file."\"";
}
return "sox -V \"".$audio_file."\" -b 16 -r 8000 -c 1 \"".$wav_file."\"";
}
- function sox_exists(){
+
public
function sox_exists(){
if(isset($this->SOX_EXISTS)){
return $this->SOX_EXISTS;
}
if(isset($this->SOX_EXISTS)){
return $this->SOX_EXISTS;
}
@@
-127,7
+127,7
@@
return $this->SOX_EXISTS;
}
return $this->SOX_EXISTS;
}
- function audio_to_wav($audio_file, $wav_file){
+
public
function audio_to_wav($audio_file, $wav_file){
if(!$this->sox_exists()){
return false;
}
if(!$this->sox_exists()){
return false;
}
@@
-135,7
+135,7
@@
return file_exists($wav_file);
}
return file_exists($wav_file);
}
- function wav_to_img($wav_file, $params = array()){
+
public
function wav_to_img($wav_file, $params = array()){
$width = isset($params["width"]) ? $params["width"] : "650";
$height = isset($params["height"]) ? $params["height"] : "100";
$width = isset($params["width"]) ? $params["width"] : "650";
$height = isset($params["height"]) ? $params["height"] : "100";
@@
-244,11
+244,11
@@
return $img;
}
return $img;
}
- function findValues($byte1, $byte2){
+
public
function findValues($byte1, $byte2){
return hexdec(bin2hex($byte1)) + (hexdec(bin2hex($byte2)) * 256);
}
return hexdec(bin2hex($byte1)) + (hexdec(bin2hex($byte2)) * 256);
}
- function html2rgb($input){
+
public
function html2rgb($input){
$input = $input[0] == "#" ? substr($input, 1, 6) : substr($input, 0, 6);
return array(
hexdec(substr($input, 0, 2)),
$input = $input[0] == "#" ? substr($input, 1, 6) : substr($input, 0, 6);
return array(
hexdec(substr($input, 0, 2)),
@@
-258,5
+258,3
@@
}
}
}
}
-
-?>
\ No newline at end of file