W3C home > Mailing lists > Public > public-audio@w3.org > July to September 2013

Re: Sample Rate Conversion

From: Robert O'Callahan <robert@ocallahan.org>
Date: Mon, 22 Jul 2013 10:48:19 +1200
Message-ID: <CAOp6jLZ+xBDRiVU5oAh9v-wCnekEMEmZr+7HitkGnLR7GuH_Tw@mail.gmail.com>
To: phi2x@free.fr
Cc: "public-audio@w3.org" <public-audio@w3.org>
On Sat, Jul 20, 2013 at 8:14 PM, <phi2x@free.fr> wrote:

> I'm the author of CPCBox ( http://cpcbox.com ), a Javascript emulator of
> the Amstrad CPC 8-bit computer.
> The soundchip used by the Amstrad is a GI AY-3-8910 @ 1MHz. It outputs
> sound at a 125kHz sample rate.
>
> For now, I'm using Mozilla's Audio Data API to render sound.
> I'm looking to migrate it to the Web Audio API, and I'm concerned with how
> to make it happen.
>
> I've skimmed through the spec hunting for a sample rate converter module
> and didn't found any.
> So, the question is: how can I output to the speakers the 125kHz sound
> stream that I generate?
>
> I really hope that use case won't be neglected, because it's key for
> emulators.
>

Web Audio doesn't support this use-case right now.

You can generate a sequence of 125KHz AudioBuffers, but they'll be
resampled individually so there are artifacts at the boundaries.

We need new Web Audio API to handle this. One approach would be to allow
creating an AudioContext with a specific sample rate.

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 Sunday, 21 July 2013 22:48:46 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:03:23 UTC