OK, can anyone think of a legitimate reason why the Empeg player app needs to set Soft Audio Mute when the player pauses? I don't get it. The player app itself stops playing... Why bother muting the audio device?
To work around this, I have the EMPEG_MIXER_SET_SAM ioctl dummied up so it's basically a no-op. This allows PCM sounds to play (using the audio overlay patch) while the player is paused. This obviously isn't ideal if we ever want to use SAM for truly muting the player AND the PCM sounds.
If we ever want that, maybe we should ask the Empeg guys why they're setting SAM on pause in the first place, and request that they change it so that it just stops the player without sending the SAM ioctl...
In the meantime,
here's the audio overlay patch (prebuilt kernel
here) with the SETSAM ioctl dummied up, and with configurable min and max background volume when the PCM is playing, as well as configurable fadestep. The relevant config.ini options are:
overlay_bg_min (min 0, max 0x00010000, default 0x00004000)
overlay_bg_max (min 0, max 0x00010000, default 0x00010000)
overlay_bg_fadestep (min 0, max 0x00010000, default 0x00000AAA)
Unfortunately I have no idea how to convert the hex values to the normal 0-100 volumes we're used to. I tried to correlate them to things in the volume table, but they didn't seem to match any of those columns.
@TheAmigo: There's no real "design"... All you gotta do is comment out the audio_init. Without the audio_init, we shouldn't get the volume spike anymore. BTW, you planning on releasing ttsd source in addition to the diffs against flite?