This will be caught by new test cases: when the initial chunk is empty,
a dereference before calling operator++ on the iterator will crash as
the initial chunk's size is never checked.
Previously, although we were taking a moved chunk, we still copied it
into our chunk list. This makes DisjointChunk compatible with containers
that don't have a copy constructor but a move constructor.
The Qemu AC'97 device stops its PCM channel's DMA engine when it is
running and the sample rate is changed. We now make sure the DMA engine
is restarted after changing the sample rate, allowing you to e.g. run
`asctl set r 22050` during `aplay` playback.
We use the environment variable SERENITY_SOURCE_DIR to resolve and check
icon links. This is a bit inconvenient as SERENITY_SOURCE_DIR needs to
be set correctly before invoking the markdown checker, but as we use it
through the check-markdown script anyways, I think it's not a problem.
This should be much more robust against weirdly-formatted links that are
still valid URLs, additionally, future URL checkers can immediately
take advantage of the already-existing URL object.
Note that not all markdown links are valid URLs or paths, and that that
is intentional (e.g. only fragments, relative links etc.). We don't just
fail when something is not a URL.
CRC32 table is generated at compile-time and put into a static
variable in the header file. This can be moved to be a function
instead of a class, be moved to the `.cpp` file` and generated as an
array instead of a class which only implements `operator[]`.
Of course, Buffer is going to be removed very soon, but much of the
WavLoader behavior still depends on it. Therefore, this intermediary
API will allow adopting the Loader infrastructure without digging too
deep into the WavLoader legacy code. That's for later :^)
The Buffer files had contained both the ResampleHelper and the
sample format utilities. Because the Buffer class (and its file) is
going to be deleted soon, this commit separates those two things into
their own files.
The data is taken straight from the ISO/IEC 11172-3 standard. For
decoding efficiency the tables are transformed into trees at compile
time using a constexpr approach. That way no runtime initialization is
necessary and decoding can be faster than searching through tables.
The primary benefit of this is that it's unsigned, as you can't have a
negative amount of children. Plus, all the users of child_count expect
it to be size_t.