gamercade-io / gamercade_console

A Neo-Retro Fantasy Console. Make WASM-powered, networked multiplayer games.
https://gamercade.io
Apache License 2.0
166 stars 10 forks source link

Stereo Sound Support #52

Open RobDavenport opened 1 year ago

RobDavenport commented 1 year ago

Currently, the sound_engine is single channel mono only. We need to support stereo at least. This might have some relation to the effects issue #51 but I think left/right panning shouldn't be limited to only effects.

This change would affect a few different areas, both in how Oscilloscope displays channels, how sounds are rendered through cpal, and also even how SampleData is stored on the data type. Do we store samples as stereo? Or keep them mono? Theres many ways to do it and currently I don't know what the best approach is, so I'm open to ideas here.

VegaDeftwing commented 1 year ago

If you add in effects that can setero-ize a sample - reverb, ping-pong delay, widening, etc. I think keeping samples themselves mono is a reasonable limitation. Worst case, someone can just load in two samples and pan each hard left and right. Not saying this is a route you should go, just that it's not unreasonable.