Re: mp3's - 48kHz bad, 44kHz good?
In my experience, in flash 9, anything other than 44.1kHz won't work properly
with the sound APIs, because the playback positioning assumes the bitrate is
44.1kHz. For example, if you are playing back a 22kHz file and you attempt to
set the position to 20 seconds, it actually seems to work by setting the
position to the (20*44.1k)th sample, meaning you end up at 40 seconds.
However, this is not entirely consistent, as the "position" property on the
SoundChannel still says "20".
This was consistently broken with regard to other sample rates, and the amount
of error in positioning was directly connected the the amount your sample rate
differed from 44.1kHz. If your sample rate was 48kHz, then setting your
position to 20 seconds would result in hearing samples that are supposed to be
at 20 * 48 / 44.1 = 18.4 seconds. As you seeked further and further into the
stream, your positioning got further off.
I'm not sure how this changed in Flash 10, if at all, but I would be
interested in someone from Adobe commenting. The reason I found this thread is
that I just got a new bug report from a user that indicates something related
to this behavior is happening again on Flash10+Vista with 44.1kHz streams:
seeks are exactly double what they're supposed to be, so if you attempt to seek
to a spot just under halfway into a song, you hear the end of the song and then
playback stops.
Unfortunately, I don't think Adobe comes in and answers our questions in here
very frequently. It makes for a pretty lousy development experience to have
such little support from the platform, in my opinion.
|