@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.
Well, that makes it easy on my end
BTW, you planning on releasing ttsd source in addition to the diffs against flite?
As of 1.0a3, ttsd is a shell script that runs flite and sleep. So the only 2 things in the src dir (included in the archive) are sleep.c (extremely trivial) and cst_wave_io.c which is the only file I've modified in flite's source. The sample rate conversion and 4608 byte buffering are both done at the same time in the pcmplay() function so it doesn't have to copy all the samples around in memory more than once.
In the next version, I'll have to modify more than just one .c file in flite. My goal is to cut down on the number of processes so I'm trying to put all the ttsd code directly into flite. I haven't tested any real memory usage, but I'm guessing that putting the extra code in flite (rather than seperate binaries and/or shell scripts) will allow more of it be swapped out when not in use (leaving more real ram for other apps).
I don't get it. The player app itself stops playing... Why bother muting the audio device?
Having disabled EMPEG_MIXER_SET_SAM, if you're listening to mp3s and press pause, is there any delay before it actually pauses? Maybe the ioctl mutes it so you don't hear it playing what's left in the buffer after you press pause. Even if there is a delay, I'm in favor of your change.