… is measured in samples. Not bytes or mils.
So if you want to know how it relates to the ByteArray you’re working with, you need to multiply it by 4 (as each floating point sample requires 4 bytes). And if you want to convert it to mils, you need to divide by 44.1, the number of samples per millisecond.
I just thought I’d point it out because it doesn’t seem to be mentioned in the AS3 docs. Or the Flex docs. I checked this time 🙂
I expect you’re wondering why I’m discovering all this stuff. Watch this space 🙂
One reply on “ActionScript SoundDataEvent.position”
[…] either playing a dynamically generated sound or when you’re recording microphone input. In an earlier post I explained that this was in samples. Now I’ve checked this again, I can’t actually […]