Re: Foobar event/push mode
Reply #33 – 2016-03-01 19:28:42
Nonsense. You still have to design your loop to poll based on the worst case clock speed. If you actually tried to design a push system where you literally had no idea what the clock speeds were you'd likely fail and get dropouts. No, what I wrote is not "nonsense" and such a reply is just as weak as your previous "no". Clock speed is actually pretty irrelevant to what I tried to explain to you. It doesn't matter if a simple polling loop does 1k or 1 trillion cycles until the buffer has emptied far enough. If the system is too slow to even finish a single cycle then it would also fail with WASAPI event style, so yeah... but I've told you that before.Actually, in rockbox we also (usually) have variable clocks just like on Windows. We just design the busy loops appropriately. I don't see how this relates to your argument though. You're still counting time, its just slightly more complex. No, as I said it's not counting time.while (!quit) { TryToFillAudioBuffer(); } Where does this loop count anything let alone time?Yes necessarily. Tight loop is a timer in that it measures the passage of time and produces an action at predictable intervals (specifically, the action must happen at least as often as the minimum buffer period). No it's not necessary. Sigh. Go back and read again what I wrote. Your response here also misses the point.I don't see why people keep getting mixed up in the details here. "Push" is an algorithm, not an implementation. It defines a series of actions, not any specific way of doing them. No matter how you implement it, its still the same algorithm, and it still depends critically on being able to measure time. Think up any crazy implementation you want. Does it work for push? Then it incorporates a timer. No, you don't need to measure any time. The only requirement for a tight loop would be the users' system: for example it needs to be fast enough to read some chunk of a file and decode it and fill the audio buffer with it before there is an underrun. That's also why buffer sizes are usually not hardcoded but user configurable to fit the user's system/requirements.