- From: Jukka Jylänki <jujjyl@gmail.com>
- Date: Mon, 17 Jun 2013 22:25:55 +0300
- To: robert@ocallahan.org
- Cc: "public-audio@w3.org" <public-audio@w3.org>
- Message-ID: <CA+6sJ-1un+HkrQMu7utpR_s=h0u+7n2CpCSoiRL-taMRcWjUDQ@mail.gmail.com>
If the Web Audio API had an explicit support for buffer queueing/stitching with AudioBufferSourceNodes, and the user could give that contract to the Web Audio impl with the 'startImmediatelyAfter' function, then the implementation could perform audio resampling on the stream as a whole, and not to discontinuous source nodes individually. If it was possible to specify the playback frequency in ScriptProcessorNode, I guess I would be satisfied, although being able to queue sourcenodes as back-to-back buffers would be a more flexible feature due to variable-rate decoding and playback opportunities. 2013/6/17 Robert O'Callahan <robert@ocallahan.org> > On Tue, Jun 18, 2013 at 1:36 AM, Jukka Jylänki <jujjyl@gmail.com> wrote: > >> With the start()-scheduled approach, In Firefox nightly, the audio >> stutters on all sampling rates. In Chrome, audio does not give glitches on >> 48kHz or 96kHz. This sample >> https://dl.dropboxusercontent.com/u/40949268/emcc/bugs/webaudio_only_sdl_beep.htmlruns through the various sampling rates to allow you to test as well. >> > > OK. Thanks for the testcase. Obviously we (Firefox) have a general > scheduling bug. The resampling issue is deeper, however. Perhaps it's not > surprising that if we resample a fixed-duration tone and then repeat it > using a series of separate AudioBufferSourceNodes, you don't get a > continuous tone. > > Two approaches here might work: > 1) specify a sample rate for ScriptProcessorNode and resample its inputs > and outputs automatically > 2) allow specifying a sample rate for an entire AudioContext at creation > time and use either ScriptProcessorNode or AudioBufferSourceNode. > > Rob > -- > Jtehsauts tshaei dS,o n" Wohfy Mdaon yhoaus eanuttehrotraiitny eovni le > atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o Whhei csha iids teoa > stiheer :p atroa lsyazye,d 'mYaonu,r "sGients uapr,e tfaokreg iyvoeunr, 'm > aotr atnod sgaoy ,h o'mGee.t" uTph eann dt hwea lmka'n? gBoutt uIp waanndt > wyeonut thoo mken.o w >
Received on Monday, 17 June 2013 19:26:23 UTC