SDL_AudioStreamCallback what is total_amount?

In the docs for SDL_AudioStreamCallback this is the description of total amount:
total_amount: the total amount of data requested, in bytes, that is requested or available.

I don’t understand what is meant by this. Like should the requested amount not always be the same value, depending on the format, and what does it mean that it is either that or the available amount. Like are those two not completely different things, and can you not calculate the available amount as requested_amount - additional_amount? I guess i am just a bit confused :frowning:

Could someone explain in detail with some examples how those parameters work and what they represent?

1 Like