0
0

In the doucumentation "Buffer" appars in different contexts,

  1. record buffer
  2. (stream) decode buffer
  3. double buffer
  4. callback buffer
  5. stream buffer
  6. "all streams are pre-buffered"
  7. "reflush of a buffer"
  8. to prebuffer

Can anyone help me understanding meanings of the buffer concept in eight cirumstances listed above?

With best regards
ZoranK

  • You must to post comments
0
0

buffer is just a chunk of memory

  • You must to post comments
0
0

Thanks for reply! I realize from your reply that I was not clear about what I am after. In FMOD there are various scenarios how buffers are used. I was intersted in making a catalogue of these scenarios. In documentation I found eight ways of talking about buffer. I have changed title of the topic to emphasize what I am after.

In brief, I am really interested in understanding how buffer is used in various scenarios in FMOD architecture.

  • You must to post comments
0
0

[quote="zorank":3bvajy2f]
1. record buffer
2. (stream) decode buffer
3. double buffer
4. callback buffer
5. stream buffer
6. "all streams are pre-buffered"
7. "reflush of a buffer"
8. to prebuffer
[/quote:3bvajy2f]

i presume you understand terms such as asynchronous operations, streaming etc…?

  1. a chunk of memory where captured data is written
  2. a chunk of memory where parts (also buffers) of stream are decoded into, ie: if a stream is mp3, it can be decoded (into pcm for example) chunk by chunk and the fed to output device
  3. two chunks of memory, which are being swapped, while one is being read, other can be written, this is basically an optimization
  4. this one can be pretty much anything
  5. a chunk of memory, where the data from file is being read into, presumably and async reading operation, ie: you read 256kb of data, play for X seconds and when it is nearing the end, read another 256kb (can use double buffer here)
  6. if you know that some data is going to be used, and you want this data to be read in a an async way, you can prebuffer (pre-read) the first part of it. this way, when you say play, it starts playing immediately
  7. when wrong data is being streamed, you have to flush the buffers, so that new data can start with a clean slate
  8. can apply to any kind of read operation, pretty much same as point 6

pretty much all this is handled by the fmod itself, you do have some control on how large the streaming buffers are for example. just give fmod a pre-allocated chunk of memory (a buffer ;)) and it will do its magic, hopefully 8)

  • You must to post comments
0
0

Oh boy, many thanks for clarifications. Really appreciate it!

I start to be nervous since it seems that only "old foxes" (experienced developers) venture into this forum. Please bear with me… I found the FMOD documentation very hard to use (probably taylored to experienced developers) so in pure desperation I turned to this forum.

Many tanks again. I will study your reply carefully. By the way, could I kindly ask you too look into following post:

[url:22dv448k]http://www.fmod.org/forum/viewtopic.php?t=10569[/url:22dv448k]

it is about locking the buffer by sound::lock. Hope you could scratch some time to help me there.

With best regards
ZoranK

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.