FS#11052 - SID playback in stereo
Opened by Stefan Waigand (Stefan Waigand) - Tuesday, 23 February 2010, 21:40 GMT
|
DetailsThis patch adds pseudo stereo output to the TinySID sid codec by splitting the three sid voices to the right and left audio channels.
Sid playback sounds much better then, especially with headphones. Famous sid players (e.g. sidplay2/w) also do that to enhance sid sound. Note: this is not an implementation of a stereo sid because that needs a complete emulation of a 2nd sid chip. I think any further efforts should concentrate on porting the sidplay engine to rockbox. The function synth_render() computes the sid internal voices and maps them to the pcm buffer for a given count of pcm samples. I extended the function arguments by one more pcm buffer pointer for the second channel. Voice 1 and 3 are then written to the right and voice 2 to the left channel (I assume it is not standardized which voice goes to which channel). I also mixed 1/16th of every channel to the respectively other channel because this will give a more natural sound compared with the very hard panning if the voices are completely seperated. Overflow of the variables outf and outo should not happen because before they carried three voices, now only max. 2.0625. And please have a look at the additional 2k memory for the second pcm buffer, imho no problem, at least it compiles :) |
btw: the by far best Pseudo-Stereo-SID I ever heard was in Pulse Player, but i dunno how they did it:
http://download.chip.eu/de/Pulse-Player-0.91_21982.html