0
0

I am using the File Callbacks to feed data into FMOD from a custom stream. The listing below shows what happens for a typical file (112kbps, 441kHz, ID3v1 tag, no other non-audio data). Can anybody shed a little more light on what exactly FMOD is doing?

In STATE_0 It’s obviously seeking to the end of the file to determine filesize. In STATE_1 It’s reading in the last 128 bytes of the file to get the ID3v1 tag.

What is happening in STATE_2? Is it looking for an ID3v2 footer? A lyrics tag?

More importantly, what is going on in STATE_3? The read(16) i guess is reading the first header and optionally the CRC, why then do a read (24), read(8), read(4), read(4) read(12) afterwards?

Lastly – is there any way of exercising more control over how FMOD requests data – I notice that the read requests don’t necessarily start at frame sync points?

Any comments on what’s happening would be much appreciated

Julian
[code:33cdfwat]
FileOpen <?>

// STATE 0 //////////////////////////////////////////////////////////////////
FileSeek <0,2>
FileTell <1580007>
FileSeek <0,0>
FileSeek <0,0>

// STATE 1 //////////////////////////////////////////////////////////////////
FileSeek <-128,2>
FileRead <3>
[ 54 41 47 ]
FileRead <30>
[ 4D 79 20 54 69 74 6C 65 20 20 20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ]
FileRead <30>
[ 4D 79 20 41 72 74 69 73 74 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ]
FileRead <30>
[ 4D 79 20 41 6C 62 75 6D 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ]
FileRead <4>
[ 31 39 38 39 ]
FileRead <30>
[ 4E 6F 20 43 6F 6D 6D 65 6E 74 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 ]
FileRead <1>
[ 75 ]

// STATE 2 /////////////////////////////////////////////////////////////////
FileSeek <-256,2>
FileRead <3>
[ B1 C7 79 ]

FileSeek <-138,2>
FileRead <3>
[ B7 E6 AA ]

// STATE 3 /////////////////////////////////////////////////////////////////
FileSeek <0,0>
FileRead <16>
[ FF FB 82 44 FF 80 A 50 0 4B 0 0 0 0 0 0 ]

FileSeek <0,0>
FileTell <0>
FileSeek <0,0>

FileSeek <0,0>
FileRead <24>
[ FF FB 82 44 FF 80 A 50 0 4B 0 0 0 0 0 0 9 60 0 0 0 0 0 1 ]

FileSeek <0,0>
FileTell <0>
FileRead <8>
[ FF FB 82 44 FF 80 A 50 ]
FileRead <4>
[ 0 4B 0 0 ]

FileSeek <0,0>
FileRead <4>
[ FF FB 82 44 ]

FileSeek <0,0>
FileTell <0>
FileRead <12>
[ FF FB 82 44 FF 80 A 50 0 4B 0 0 ]

FileSeek <0,0>
FileTell <0>
FileRead <12>
[ FF FB 82 44 FF 80 A 50 0 4B 0 0 ]

// STATE 4 /////////////////////////////////////////////////////////////////
FileSeek <0,2>
FileTell <1580007>
FileSeek <0,0>
FileRead <4>
[ FF FB 82 44 ]

FileSeek <362,1>
FileRead <4>
[ FF FB 80 44 ]

FileSeek <0,0>
FileRead <730>
[ FF FB 82 44 FF 80 A 50 0 4B 0 0 0 0 0 0 9 60 0 0 0 0 0 1 2C 0 0 0 0 0 0 25 80 0 0 0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF

FF FB 80 44 FF 80 A 48 0 4B 0 0 0 0 0 0 9 60 0 0 0 0 0 1 2C 0 0 0 0 0 0 25 80 0 0 0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ]

// STATE X /////////////////////////////////////////////////////////////////
FileSeek <0,0>
FileRead <5000>
[ FF FB 82 44 FF 80 A 50 0 4B 0 0 0 0 0 0 9 60 0 0 0 0 0 1 2C 0 0 0 0 0 0 25 80 0 0 0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF

FF FB 80 44 FF 80 A 48 0 4B 0 0 0 0 0 0 9 60 0 0 0 0 0 1 2C 0 0 0 0 0 0 25 80 0 0 0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF[/code:33cdfwat]

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.