> I would have to devote months to really understand it, I guess, and "cure" this "superficialitis" (tendency to think everything is 50 lines of code)
You wouldn’t have to spend months understanding it, but you also wouldn’t be able to glance at the code for 5 minutes and understand everything that needs to happen.
Anything that handles driver or system level operations and deals with audio will get complex quickly. What happens when the input device gets unplugged? The output device disconnects? User changes from speakers to AirPods?
How do you handle situations where the input and output sample rate are different? What about when something backs up and a buffer overflows? Or underflows? What mechanism do you use for handling user setting changes?
The list of situations you have to handle goes on and on. The core concept is simple, but there are so many things to do that the code base will naturally become bigger than the 50 lines of code you’re imagining.
You wouldn’t have to spend months understanding it, but you also wouldn’t be able to glance at the code for 5 minutes and understand everything that needs to happen.
Anything that handles driver or system level operations and deals with audio will get complex quickly. What happens when the input device gets unplugged? The output device disconnects? User changes from speakers to AirPods?
How do you handle situations where the input and output sample rate are different? What about when something backs up and a buffer overflows? Or underflows? What mechanism do you use for handling user setting changes?
The list of situations you have to handle goes on and on. The core concept is simple, but there are so many things to do that the code base will naturally become bigger than the 50 lines of code you’re imagining.