dwhinham / mt32-pi

🎹🎶 A baremetal kernel that turns your Raspberry Pi 3 or later into a Roland MT-32 emulator and SoundFont synthesizer based on Circle, Munt, and FluidSynth.
https://twitter.com/d0pefish
GNU General Public License v3.0
1.28k stars 81 forks source link

Poor quality PWM audio (headphone jack) #5

Closed dwhinham closed 3 years ago

dwhinham commented 4 years ago

When using the headphone jack for audio output, audio quality is poor - distortion is audible when playing quieter sounds.

It's not known whether this can be improved or not; we're currently just using Circle's PWMSoundBaseDevice.

Higher samplerates and using integer vs. float samples from mt32emu do not appear to make a difference.

It may be be possible to achieve better quality by using the firmware's audio driver (via CVCHIQSoundBaseDevice), which would also enable HDMI audio support, but the effects on latency are not currently known.

dwhinham commented 3 years ago

Closing this as a WONTFIX. Using VCHIQ sound introduces large amounts of latency and changes the timing behaviour of the system. It's easy enough to add and use an I2S DAC, so there's not much point in trying to improve the PWM output.