Codigo del webservice:
prueba1.php
<?php
$receive=file_get_contents('php://input');
$p = json_decode($receive);
$pp[0]["prueba0"] = $p["parametro1"];
$pp[0]["prueba1"] = "abc";
$pp[0]["ss"] = "zzz";
$p = json_encode($pp);
echo $p;
?>
Codigo JS:
function invocarAjax(url_ws, param_ws, funcion_ws, async_ws)
{
if(async_ws===undefined)
async_ws = false;
jQuery.ajax({
type: "POST",
timeout: 5000,
url: url_ws + "?" + "random=" + Math.floor(Math.random()*9999999999),
data: param_ws,
contentType: "application/json; charset=utf-8",
dataType: "json",
cache: false,
async: async_ws,
success: function(response) {
window[funcion_ws](response, null);
},
error: function(xhr, ajaxOptions, thrownError) {
window[funcion_ws](null, xhr.responseText );
}
});
}
function getJSON(data_obj)
{
if (data_obj.d)
data_ok = data_obj.d;
else
data_ok = data_obj;
evalJson = eval("var varJSON = " + data_ok + ";");
return varJSON;
}
Código que invoca al webservice:
<script>
$(document).ready(function() {
$("#setear").click(function() {
url_ws = "prueba1.php";
param_ws = '{"parametro1": "5555", "enviar_todos": "S"}';
invocarAjax(url_ws, param_ws, "callbackConfigEmails", true);
});
});
function callbackConfigEmails(v, err)
{
if (err == null)
{
if (v[0].prueba1 != "")
{
alert("prueba0: " + v[0].prueba0);
alert("prueba1: " + v[0].prueba1);
}
} else
alert("ERROR: " + err);
}
</script>
OJO!!!!!
El codigo json_decode de jsonwrapper NO funciona, en su lugar, utilizar este:
function json_decode($json)
{
$comment = false;
$out = '$x=';
for ($i=0; $i<strlen($json); $i++)
{
if (!$comment)
{
if (($json[$i] == '{') || ($json[$i] == '['))
$out .= ' array(';
else if (($json[$i] == '}') || ($json[$i] == ']'))
$out .= ')';
else if ($json[$i] == ':')
$out .= '=>';
else
$out .= $json[$i];
} else
$out .= $json[$i];
if ($json[$i] == '"' && $json[($i-1)]!="\\")
$comment = !$comment;
}
eval($out . ';');
return $x;
}
Configuración de EZdrummer
ABRIR LIVE COMO ADMINISTRADOR! SINO EL EZDRUMMER DA ERROR DICIENDO QUE NO ENCUENTRA LOS ARCHIVOS DE SONIDO.
ATENCION!!!!! Si no sale el sonido utilizando los drivers ASIO, conectar auriculares!!! no sale por los parlantes, sale por los auriculares!!!!
(Otra opcion es ir a las propiedades del dispositivo de salida, y en la ficha Avanzadas, desmarcar "Allow applications to take exclusive control of this device")
1. Instalar EZDrummer
2. Instalar ASIO4ALL y configurarlo:
3. Instalar Ableton Live y configurarlo:
ATENCION!!!!! Si no sale el sonido utilizando los drivers ASIO, conectar auriculares!!! no sale por los parlantes, sale por los auriculares!!!!
(Otra opcion es ir a las propiedades del dispositivo de salida, y en la ficha Avanzadas, desmarcar "Allow applications to take exclusive control of this device")
1. Instalar EZDrummer
2. Instalar ASIO4ALL y configurarlo:
3. Instalar Ableton Live y configurarlo:
5. Agregar plugin de EZDrummer en Ableton:
Para que aparezca en la lista de plugins, es necesario poner en On la opcion marcada a continuación:
6. Solucionar el problema de la latencia (configurar sonido en windows):
7. Aumentar el volumen:
8. Si se cierra la pantalla del EZDrummer, se abre de nuevo así:
Suscribirse a:
Comentarios (Atom)












