Skip to content

wav sample_rate appears limited to less than 65536 #1922

@kevinjwalters

Description

@kevinjwalters

I wanted to experiment with some non-audio sample playback and made some 8bit wavs to check playback. 64000 is ok but this one at 96000Hz plays slowly and inspecting sample_rate shows why:

>>> wave_file = open("Evillaugh.96000.8bit.mono.wav", "rb")
>>> wave = audioio.WaveFile(wave_file)
>>> wave.sample_rate
30464
>>> 30464+65536
96000

That's on 4.0.0-rc1 which happened to be on the CPX I was playing with. Also checked 4.0.1 which has same behaviour.

I had a very quick look and I saw a lot of 32bit values being used by args and variables I'm not sure where the 16bit 65536 limitation is coming from.

I'd also be interested in any bottlenecks I'll encounter as I try faster sample_rate. Will CPX be capable to playing 100000 or 350000 8bit (or 16bit?) samples per sec from a wav file on the built-in flash?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions