VOGONS


First post, by superfury

User metadata
Rank l33t++
Rank
l33t++

When I'm emulating a Disney Sound Source on a LPT, do I need to protect the outgoing sound samples against direct current (e.g. a value of 65535 of a duration of ~1 second)? Is SDL or Windows protected against these cases? Will it blow up the speakers in a PC (or PSP)?

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 1 of 1, by Jepael

User metadata
Rank Oldbie
Rank
Oldbie

Analog audio outputs should be AC coupled anyway, so regardless of what your software or OS does, so no matter what your emulator outputs, it should not blow up anything.
Even if you used digital output connection to amplifier, it most likely also has AC coupling inside it after the DAC, or even something digital to protect speakers from DC.

While you are not going to break anything, it can sound like a nasty pop. So basically you could use a digital DC blocking filter in your emulator (basically a high pass filter with very low cutoff frequency). If you are anyway doing some signal processing to resample the audio properly (DSS uses 7kHz) to sound card friendly rates, you could use a filter that emulates properties of the original sound device (for example DSS most likely has a low pass filter of some kind to block frequencies over 3.5kHz).

I bet you did not worry about this with Adlib, Soundblaster or PC speaker emulation either. PC speaker emulating is difficult anyway regarding DC, because it only has two states, on and off, 1 and 0, or +1 and -1 no matter what way you look at it, so you always have some DC offset. Same thing with other 1-bit sources like C/MS (GameBlaster).

Fortunately with other sources like DSS, Covox etc you have the luxury of having one state with zero DC.