My idea here is to make it easier to for the compiler to SIMD-ify some
of the interpolation code. I have not confirmed that it is actually
being SIMD-ified by the compiler, but it is still significantly faster
in both debug and release builds.
There is a mono specialization here which further improves performance.
I have not yet experimented with a stereo specialization, but if it
works it'll be added in a future commit.
This applies only to the f32 no-LPF code path. Other paths will come
later once I'm done with this round of experiments.
These functions are not reliably implemented by all backends and as such
I'd rather not encourage these use of these. These might be removed in
the future.
This should close a hole that could possibly result in the audio thread
getting stuck if the `MA_DEVICE_OP_UNINIT` operation posted from
`ma_device_uninit()` fails.
This information is already stored in the data converter and can be
retrieved with `ma_device_get_channel_map()` and
`ma_device_get_internal_channel_map()`.
This reduces the size of the `ma_device` struct by ~1KB.
This changes the way backends update the internal data format in
response to a device reroute. With this change we'll be able to remove
the `channelMap` and `internalChannel` map members from the `ma_device`
struct which should reduce its size by ~1KB.
This changes `write_pcm_frames()` so that when `pFramesWritten` is null,
the write is treated as all or nothing. If the entire write cannot be
performed, nothing at all will be written and `MA_NO_SPACE` will be
returned. The same applies with `read_pcm_frames()` and `pFramesRead` in
which case `MA_NO_DATA_AVAILABLE` will be returned.
The reason for this change is that if the called passes in null for
these values, they'll have no way to know how many frames were actually
written or read. Therefore the most practical way to treat it is as all
or nothing.
This is a wrapper around `ma_ring_buffer` and is more specialized
towards audio. It is a data source and replaces `ma_pcm_rb` which will
be removed in a future commit.
Public issue https://github.com/mackron/miniaudio/issues/671
This improves on the old ring buffer by having a much simpler
implementation and a much simpler API that does not require the caller
to do reading and writing in a loop.
Future commits will be removing the old ring buffer.
Public issue https://github.com/mackron/miniaudio/issues/671
This uses `getDisplayMedia()`. Support for this is extremely browser and
system specific so I'm not advertising support for this documentation.
Public issue https://github.com/mackron/miniaudio/issues/967