I'm a bit confused now as my formula is giving me different results when compared to what I hear from the device. I have a file that holds raw audio data recorded with CMdaAudioInputStream (8kHz, mono). As far as I understand CMdaAudioInputStream will record in 16 bit.
The formula that I'm using is as follows:
File size = (Sample Rate) x (Number of Tracks) x (Word Length/8) x (Song Length in Seconds)
word lengths are typically 16, 20 or 24 bits. And I know that in Symbian it's 4 bytes.
So, if my file holds 33600 bytes, then according to that formula the sound should last for 1,125 secods when streamed using CMdaAudioOutputStream. However this is not even close, as it lasts more like 3 seconds.
How do you calculate in Symbian how long some file will play, so that you can set e.g. progress bar's right.