Re: Sample Rate Conversion

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