0
0

Hi to all,
I really don’t understand.
I called [code:1xayb42h]sound->getLength( &len, FMOD_TIMEUNIT_PCMBYTES ) );[/code:1xayb42h] that gave to me the value of 52254720 ( cout << len ).
I think the flag FMOD_TIMEUNIT_PCMBYTES return in len the size in bytes of the audio file (from fmod documentation) [quote:1xayb42h]FMOD_TIMEUNIT_PCMBYTES

Bytes, related to PCM samples * channels * datawidth (ie 16bit = 2 bytes). [/quote:1xayb42h]

so I converted the value stored in len in MB and the result is more or less 50 ( = 52254720 / 1024 / 1024 ) but the really size of the audio file is 5.
So I’m a bit confused.
Can someone help me to understand where I’m wrong please?

Best Regards,
Franco

  • You must to post comments
0
0

I have responded in the original thread:
http://52.88.2.202/forum/viewtopic.php?p=43324#43324

[quote:2qdekzys]I converted the value stored in len in MB and the result is more or less 50 ( = 52254720 / 1024 / 1024 ) but the really size of the audio file is 5. [/quote:2qdekzys]
That is because the file contains (MP3) compressed data and your FMOD::Sound object contains uncompressed data.

From wiki:
[quote:2qdekzys]uncompressed audio as stored on an audio-CD has a bit rate of 1,411.2 kbit/s, so the bitrates 128, 160 and 192 kbit/s represent compression ratios of approximately 11:1, 9:1 and 7:1 respectively.[/quote:2qdekzys]
http://en.wikipedia.org/wiki/MP3

So a compression ratio of 10:1 seems well within expected values.

-Pete

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.