justin = { main feed , music , code , askjf , pubkey };
Ask Justin Frankel
No reasonable question unanswered since 2009!

Suggested topics: programming, music, sleep, coffee, etc.

Note: please do not ask questions about REAPER features, bugs or scheduling, use the forums instead.

Name: Ask: Human (enter yes):
[back to index] | [unreplied] | [replied] | [recent comments] | [all]

Question: I want to write a toy daw. I think it might be fun. Mind if I drop a bunch of general questions every once in a while in here? To start off, how does the timing of the audio callbacks work at a high level? At some point the hardware/asio/whatever will ask us for a buffer to fill. Do we do the computing then, or do we want to already have a buffer filled to give to the driver?
Asked by eubn (79.40.196.x) on December 10 2019, 7:59pm
Reply on December 10 2019, 10:07pm:
    Right, the audio thread will ask for a buffer periodically. If you _can_ precalculate that buffer, e.g. it is not dependent on any of the inputs (and not on user interaction that need to happen with low latency), then sure, precalculate it. If not, you'll have to do some on-the-fly. And at some level, some stuff can be done ahead of time, others not so much.

  • Posted by eubn (79.40.196.x) on December 11 2019, 11:57am:
    Sweet! That clears up all the confusion. Thanks.

    Your Name:   -- Site Owner's Name:  (for human-verification)


[back to index] | [unreplied] | [replied] | [recent comments] | [all]
Copyright 2020 Justin Frankel. | RSS