Tecnologia do Blogger.
RSS

Re: [androidbrasil-dev] Converter de String para Wav ou Wave.

Meio estranho isso aí mas...

porque não usa isso:

Converte a string em byte[]:
generatedSnd = string.getbytes();

usa audiotrack para tocar:

public void playSound(byte[] generatedSnd){
        
  audioTrack = new AudioTrack(AudioManager.STREAM_MUSIC,
                sampleRate, AudioFormat.CHANNEL_OUT_DEFAULT,
                AudioFormat.ENCODING_PCM_16BIT, generatedSnd.length,
                AudioTrack.MODE_STATIC);

        audioTrack.write(generatedSnd, 0, generatedSnd.length);
        audioTrack.setStereoVolume(1, 1);
        audioTrack.play();
        
    }


--
Carlos Eduardo Simões Pelegrin


Em 2 de dezembro de 2013 20:57, Levi Saturnino <levisaturnino@gmail.com> escreveu:
Olá pessoal, gostaria de saber como eu pego uma variável String que recebe do servidor  os dados , esse dados é recebido pela String com as escritas do Wave  e eu quero t transformar em wav para ser tocado no Mediaplay do Android?.

Atenciosamente, 

--
------------------------------------------------------------
Levi José de S. S. Dias
Twitter/Skype: levisaturnino
Formado......: Informática para Internet - IFPE / Técnico em Informática - Leiaut
Cursando.....: Sistemas de Informação - UPE                     


--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 comentários:

Postar um comentário