Hi,

I am trying to play a sound which would be sent through a remote cgi-bin
executable which reads a wav file and writes it to stdout. When I access
that cgi-bin executable through IE, I can save the wav file (even if it
saves it as the same name as cgi-bin executable). However, when I connect to
it using Sound.load(URLRequest("http://xxx/cgi-bin/exec";), I don't hear any
sound despite a progress event saying that bytes are being loaded.

There could be several things going wrong, and I am not able to debug what's
up.

- I want to start playing to sound as soon as a sufficient amount is loaded,
that's why my progress event handler checks if number of bytes loaded is
more than 1MB and if so, it issues Sound.play. Is that correct? Do I need
something special for 'streaming'?

- The cgi-bin executable writes the Content-type: audio/x-wav\n\n first and
then the wav file. That works fine with a browser. Does that mess up
Sound.load though? Should the cgi-bin just send the wav file over? Will
URLRequest or load be smart enough to check the header (RIFF) and know it is
wav?

Any other clues why I may not be able to play the sound? Any place in
FlexBuilder where I can actually see the buffer that has been loaded by
Sound.load()?

Thank you

Reply via email to