BridgesUNCC/bridgesAPI

Audio visualization does not seem to render correctly 8-bit wave forms

Closed this issue · 4 comments

I generated a simple clip using freqPlayer in 8-bit. The sound that plays seems correct, but the wave form visualization seems broken.

http://bridges-cs.herokuapp.com/assignments/4583/esaule

I don't know enough webGL and JS to debug the issue. Maybe @krs-world , @quaiquai , or @AlecGoncharow knows how to debug it?

Here is an encoding of the same clip but in 16 bits http://bridges-cs.herokuapp.com/assignments/4584/esaule
They sound about the same (despite the 8-bit one is definitely a 8 bit sound). But the wave form is quite different. The 16-bit waveform is consistent with exceptation, while the 8-bit one is not.

I just fixed the issue. It is fixed in master, not propagated to heroku yet.

It was a webclient problem.
The audio.js code reconstruct a wav file from the data in bridges. Bridges represent all PCM data signed, but Wav specifies 8-bit as unsigned. So there was a need to convert in webclient javascript.