How are files (especially audio files) organized internally?

I’m trying to understand that: Apple talks about “packages” in audio files, and there is a fancy feature called AudioFileReadPackets that takes a lot of arguments. One of them indicates the "starter package", and the other indicates the number of packages you want to read.

So, I imagine how the sound file looks like this inside: it consists of many packages. If it is an audio file that has a variable bit rate format, then each packet may have a different size. If the file has a constant bit rate format, then each packet has the same size. Thus, the audio file is similar to a truck with boxes, and each box contains interesting materials.

It is right? Does this apply to any file? Is this how the files actually look?

+3
source share
5 answers

The question (even with the qualification “especially audio files”) is too broad; different file formats, well, different!

So, to answer the question, you first need to specify a specific file type; then the answer to the question will invariably look at its specification. Native formats may not have a public specification.

Specifications for many files (official and reverse engineers) can be found on the vibrant Wotsit Format .

AAC, Apple iTunes , ISO/IEC 13818-7: 2006. 252 ( 233 )! () , AAC.

"" - , , , , "" "", , , , , , ! , ( ), , . , , , , , .

+1

"" , Apple. WAV MP3, , "".

+1

, , . . - , . , .

, , , . .

+1

: . AudioFileReadPacketData AudioFileReadPackets , , ( WAV , MP3 , MP3 ).

, API .

0

MP3 ( MP1, MP2) . , - VBR . WAV , ( / 11 ).

0

Source: https://habr.com/ru/post/1743623/


All Articles