It's causing massive problems on windows, and sleeping for zero ms
is good enough to relinquish CPU time to the OS. VR APIs also do
their own sleeping.
Previous code would wastefully reallocate memory for every time a buffer is too big to fit. New code just uses an index into the next buffer at which to start reading, requiring no extra allocation.
Instead of having a bogus samples ivar in AudioStream when it's raw, use it to denote the amount of audio data enqueued.
This means `stream:getDuration()` gets the same meaning as `stream:getQueueLength()` (except in seconds instead of samples), so we can remove the latter.
Before, streams were rewound when they stopped, so that next time they're played they're played from the start.
Instead, rewind on play instead, so that it's done when it's needed. This gets us a good point to make sure we're not rewinding raw streams too.
- Teach CMake how to compile binary resources to C headers, like xxd.
- Note: tup is already using xxd to do this.
- gitignore binary resource headers to reduce git noise and avoid problematic
interactions between git and build systems.
- Add config folder that contains tup config files. There is a default
config added to source control, but everything else in that folder is
gitignored so you can add your own custom configurations.
- Remove and gitignore tup.config.
- This results in the following setup:
- You can now create a tup.config symlink that points at the config
you want to use.
- Or, you can use the `tup variant` command to manage multiple build
configurations at the same time (e.g. debug, release, wasm).
I haven't been getting much value out of the emscripten CI, and having
two CI systems is kind of awkward. Also, travis doesn't let you change
the location of .travis.yml and it's cluttering up the root folder. It
is possible to add this back in the future if there's a need for it,
preferably using appveyor or some other system.
The OpenXR headset driver is not enabled by default, and it doesn't
seem like this will change soon, so let's omit the submodule
dependency to save the bytes/time.