libretro / prosystem-libretro

Port of ProSystem to the libretro API.
GNU General Public License v2.0
14 stars 39 forks source link

Add optional low pass audio filter + remove unnecessary audio resampling #58

Closed jdgleaver closed 3 years ago

jdgleaver commented 3 years ago

The Atari 7800's TIA chip produces rather 'harsh' sounding audio. This PR adds an optional low pass filter which softens and improves the generated output. The filter can be configured via new Audio Filter and Audio Filter Level options.

In addition: The core at present resamples the emulated audio to 48 kHz, and it does so using a very crude algorithm. This is unnecessary (since it is the frontend's job to resample audio), and it greatly reduces sound quality. This PR removes the internal resampling entirely, and passes audio at the native sample rate to the frontend.

Finally, the PR replaces the retro_audio_sample function call with the recommended retro_audio_sample_batch, for improved performance.