but it sounds like what we want.
Nein.. that's the rub. audio_overlay_bg_volume does, indeed, come from config.ini. But it's the volume of the MUSIC, not the PCM samples being written to the overlay buffer (from flite, in this case.) If I'm understanding your request correctly (and please tell me if I'm not) your claim is the TTS voices are too loud, and the music is "just as loud" until the speech is complete. Well I couldn't explain why the music was so loud, since the default for audio_overlay_bg_min is 0x00004000, but I don't know whether that number is relative to the player's existing volume, or absolute. So I suggested you take a look at tweaking the bg_min and bg_max values, which govern the range in which the audio_overlay_bg_volume (register 1 above) fades between when the overlay buffer is in use.

So in the assembly code above, the lines commented with "scale destination sample down by fixed-point multiplier" are using the value of audio_overlay_bg_volume to make the music quieter. What is absent from the above code is something that scales the contents of pSrcSample (r4) by some other factor. I had tried to hack something in quick to do it based on what's being done with the bg music, but what I tried wasn't working, and I didn't fully understand each step of the scaling code enough to debug it.

No luck finding a volume option in flite, either?


Attachments
188710-empeg_audio3.c (198 downloads)

_________________________
- Tony C
my empeg stuff