I have had to overcome quite a few challenges while trying to get my streaming MP3 sound working properly on my flash/widget.
Below are some of the lessons learned in the process, that someone may find useful:
- The MP3 encoding format (bit rates & frequency) is quite touch and go with the chumbyflashplayer and getting those wrong may get your sound to play like Donald Duck on caffeine. Experiment with the most standard combinations first. Another place you might be able to tweak this is through the chumbyflashplayer command line parameter '-p' (type 'chumbyflashplayer.x --help' on the SSH prompt to find out more)
- Make sure to set the streaming parameter as 'true' in the loadsound() function. Setting this 'false' should technically allow the sound to play in non-streaming mode, but in my experience the sound has been extremely jumpy and broken even on a wired LAN connection. I would highly not recommend using this mode.
- The most annoying problem I have had so far was a sound overlap issue, particularly prominent when running the flash movie directly (not as a widget). This occurs when you stop a sound mid-way and then load another sound into the same or a different sound object. When the new sound is accessed, it would play about 3 seconds of the old sound from some buffer and would loose the first 3 seconds or so from the beginning of the new sound. To resolve this, use the '-n' command line parameter to configure the sound buffer, when starting the movie with the chumbyflashplayer.x command. The default value for '-n' is 16, with recommended values being between 4 and 32, but in my experience setting the value to 2 has almost eliminated the overlap.
UNRESOLVED PROBLEM (please help if any one has faced a similar issue):
All sound functions on the Flash application consistently stop working after about 6-7 hours of leaving the application/widget running continuously on the Chumby, thus making it quite un-reliable for real world use. The application itself is still fully responsive. Sounds can still be played fine by using btplay through an SSH session. The only way to fix the sound in the application/widget is to reload/restart the app. The exact same flash application works fine for days together on a PC or through a web-browser without a problem? The application makes use of the loadsound() function to stream and play the MP3. The MP3 file itself is still accessible through the SSH session.
I have really hit a blank wall with the above issue and any help would be greatly appreciated!!