언어 설정

Menu
Sites
Language
Tizen wearable audio

Hi, I'm trying to use webkitAudioContext for create audio at runtime, but It don't work. 

var context = new audioContext(),//webkit browsers only

oscillator = context.createOscillator();

oscillator.type = 0; // sine wave

oscillator.frequency.value = 2000;

oscillator.connect(context.destination);

oscillator.noteOn && oscillator.noteOn(0);

Javascript doesn't give me any error, but my Gear2 don't emit any sounds.

 

Thanks a lot

Edited by: Michael Sanelli on 20 6월, 2014

Responses

1 댓글
Tom Street

Did you ever figure out how to get this working? I'm having the same problem. My Code:

var ctx = new webkitAudioContext();
var osc = ctx.createOscillator();

osc.frequency.value = 440;

osc.connect(ctx.destination);

osc.noteOn(0);   // also tried osc.start(0);

I get no errors but also no sound.