How to find an audio file's length (in seconds)
Posted
by
mIL3S
on Stack Overflow
See other posts from Stack Overflow
or by mIL3S
Published on 2011-01-07T20:51:37Z
Indexed on
2011/01/07
20:53 UTC
Read the original article
Hit count: 129
Hi all!
(Objective C) Just using simple AudioServicesPlaySystemSoundID and its counterparts, but I can't find in the documentation if there is already a way to find the length of an audio file.
I know there is AudioServicesGetPropertyInfo, but that seems to return a byte-buffer - do audio files embed their length in themselves and I can just extract it with this?
Or is there perhaps a formula based on bit-rate * fileSize to convert to length-of-time?
mIL3S
www.milkdrinkingcow.com
© Stack Overflow or respective owner