Adobe's "SWF File Format Specification v10" says that Speex encoded data can be used for streaming sound (a little clarification of the "streaming sound" definition here: "The SWF file format supports a streaming sound mode where sound data is played and downloaded in tight synchronization with the timeline. In this mode, sound packets are stored with each frame." - this has nothing to do with any FMS streaming, no ActionScript needed - just plain SWF).
This should be accomplished by using a single SoundStreamHead2 tag with StreamSoundCompression set to 11 (which means "Speex", as stated in the abovementioned Specification) and then N pairs of ShowFrame and SoundStreamBlock tags. However, this does not work - Flash Player plays no sound when playing the SWF generated by me this way. Please note, that I am capable of generating such SWFs containing streamed MP3 or PCM data, which then play perfectly. Just not Speex...
I strictly conform to the Specification:
"Starting with SWF 10, a SWF file can store audio samples that have been compressed using
the free, open source Speex voice codec (see speex.org). Speex audio is stored as format 11 in a
DefineSound tag. While Speex supports a range of sample rates, Speex audio encoded in SWF
is always encoded at 16 kHz; the SoundRate field of the DefineSound tag is disregarded. The
SoundType and SoundSize fields are also ingored in the case of Speex. Speex in SWF is always
mono and always decodes to 16-bit audio samples internally.
Speex 1.2 beta 3 is compiled into the Flash Player as of version 10 (10.0.12)."
I tried the streaming sound approach as well as the event sound - both do not work.
Moreover, I was not able to find (anywhere on the Internet) any sample SWF with streaming sound (nor event sound) encoded in Speex. Do they even exist? Anyway, Flash CS5.5 is not capable of generating them...
I would just like to know whether Speex support for SWF streaming sound can be found anywhere else than in the Specification. (I know that FLV can contain Speex and that Flash Player can stream Speex from a microphone and that FMS can stream Speex to its clients, but this is not what I am asking for)