Como gravar um som .wav usando j2me?

0 respostas
zehdopulo

Galera, estou tentando gravar em arquivo, mas tá difícil, tá gerando uma mediaexception, olha o código ae:

try {

Player p = Manager.createPlayer(“capture://audio);

p.realize();

RecordControl rc = (RecordControl)p.getControl(“RecordControl”);

rc.setRecordLocation(“file:/tmp/audio.wav);//cai aqui

rc.startRecord();

p.start();

Thread.currentThread().sleep(5000);

p.stop();

rc.stopRecord();

rc.commit();

} catch (IOException ioe) {

} catch (MediaException me) {

} catch (InterruptedException e) { }

depois de debugar vi q é na linha q tem comentário

já tentei colocar o caminho inteiro… ou colocar somenet o nome do arquivo, mas não deu

tô usando netbeans 5.0

valeu!

Criado 27 de agosto de 2006
Respostas 0
Participantes 1