David Reid
97d1f445fd
Update revision history.
2020-06-19 11:53:01 +10:00
David Reid
966aeb07a0
Update linear resampler expected output frame count calculations.
...
This updates ma_linear_resampler_get_expected_output_frame_count() to
calculate the expected output frame count in constant time rather than
linear time. This should improve performances of anything using
ma_calculate_frame_count_after_resampling() which includes
ma_decoder_get_length_in_pcm_frames().
2020-06-19 09:12:46 +10:00
David Reid
f9b7c64c05
Add ma_compare_and_swap_16().
2020-06-15 21:14:23 +10:00
David Reid
0ae21d0415
Update revision history.
2020-06-14 20:10:56 +10:00
David Reid
cd4e5314ed
Make the ma_event API public in preparation for some future work.
2020-06-14 19:45:54 +10:00
David Reid
318f4500f4
Optimization to file type specific loading routines.
...
When a decoding backend is not present, initialization should abort
immediately with MA_NO_BACKEND, however it is including code for no
reason. This commit excludes that useless code from the build.
2020-06-14 19:43:21 +10:00
David Reid
4b6c8f555b
Add support for configuring thread stack sizes and fix GCC errors.
...
The thread priority can be set via ma_thread_create() and can be set in
the context config along side the thread priority for configuring the
size of the stack for the audio thread.
2020-06-14 19:27:02 +10:00
David Reid
50eb67f946
Update revision history.
2020-06-14 16:39:34 +10:00
David Reid
8bc153069a
Clean up some formatting warnings with GCC and -Wall and -Wpedantic.
2020-06-14 15:29:30 +10:00
David Reid
3a54f2b6a4
Add a Win32 specific VFS.
...
This addresses some 64-bit issues with stdio with older versions of VC.
2020-06-14 15:20:00 +10:00
David Reid
18a70db5a9
Make MA_MAX_CHANNELS configurable.
...
This needs to be #define-d before the header *and* implementation
because it affects the size of publicly visible structures.
2020-06-14 13:33:14 +10:00
David Reid
dedb843814
Fix ma_compare_and_swap_*() on non-MSVC builds.
2020-06-14 13:02:50 +10:00
David Reid
78aeabfa41
Update ma_yield().
2020-06-14 12:30:14 +10:00
David Reid
103574f108
Fix a bug where ma_default_vfs_open_w() is not being used.
2020-06-14 10:40:49 +10:00
David Reid
eb27826749
Fixes for the VC6 build.
2020-06-14 10:32:23 +10:00
David Reid
005e19f783
Use ma_result instead of ma_bool32 for some internal sync primitives.
2020-06-13 09:43:33 +10:00
David Reid
96da8dd4bd
Add ma_swap_endian_uint32() in preparation for future work.
2020-06-13 09:19:36 +10:00
David Reid
373234255a
Add ma_decode_from_vfs().
2020-06-13 09:15:47 +10:00
David Reid
7f49fca227
Add support for initializing decoders from a VFS.
2020-06-12 21:28:08 +10:00
David Reid
37669bcc8c
Fix with Vorbis decoding.
2020-06-11 08:39:29 +10:00
David Reid
86181dfac8
Updates to data sources.
...
* ma_data_source_read_pcm_frames and ma_data_source_seek_pcm_frames
now return a result code and output the frames read/seeked as an
output parameter.
* These return MA_AT_END if the end of the data source has been
reached. This should never be returned if the loop parameter is set
to true.
2020-06-10 22:01:55 +10:00
David Reid
5f766acf8e
Update revision history.
2020-06-08 17:15:35 +10:00
David Reid
13c7a0389f
Add custom semaphore implementation for POSIX platforms.
...
This is needing to be done manually because Apple has decided to
deprecate anonymous semaphores from semaphore.h which we're going to
need.
2020-06-08 17:10:44 +10:00
David Reid
ebf0826b17
Simplify the ma_thread structure.
2020-06-08 16:58:31 +10:00
David Reid
66e7518ef3
Simplify the ma_event structure.
2020-06-08 16:47:38 +10:00
David Reid
ad7084030e
Remove dependency on ma_context from the event API.
2020-06-08 16:42:06 +10:00
David Reid
fc1a6930d3
Remove dependency on ma_context from the thread API.
2020-06-08 16:31:17 +10:00
David Reid
d54b9efc07
Remove the dependency on ma_context from the semaphore API.
2020-06-08 16:24:01 +10:00
David Reid
b819a0800f
Rearrange some threading code to decouple it from device IO.
2020-06-08 16:18:38 +10:00
David Reid
2efe1ab81a
Simplify mutex API by removing the ma_context parameter.
2020-06-08 16:06:13 +10:00
David Reid
0be72c02dd
Add ma_seek_origin_end in preparation for future work.
2020-06-07 11:50:42 +10:00
David Reid
bc23d565e7
Minor optimization to ma_copy_pcm_frames() and update to documentation.
...
This changes makes ma_copy_pcm_frames() a no-op when the input and
output buffers are both set to the same pointer. This is useful for
some in-place no-ops for effects and filters.
2020-06-06 18:16:45 +10:00
David Reid
5b1b160c62
Fix compilation errors with MA_NO_DEVICE_IO.
2020-06-03 20:01:36 +10:00
David Reid
766420eb2b
Update revision history.
2020-06-01 21:20:36 +10:00
David Reid
fefde682e3
Don't support such extreme resampling ratios.
...
This was affecting the stability of the internal low pass filters.
2020-06-01 20:20:43 +10:00
David Reid
352a776b52
Fix a bug in the linear resampler when changing rates.
...
This bug is happening due to the internal timer not being adjusted to
match the new sample rate.
2020-06-01 17:11:23 +10:00
David Reid
bf63ed17b9
Enable mmap mode for ma_audio_buffer data sources.
2020-06-01 00:09:03 +10:00
David Reid
8254324a5e
Update release notes.
2020-05-30 13:40:30 +10:00
David Reid
9718ac2d64
Fix some warnings with GCC and -std=c89.
2020-05-30 13:34:23 +10:00
David Reid
3fcef2fc7e
Add atomic compare and swap.
2020-05-30 13:25:02 +10:00
David Reid
29641e08dc
Add documentation for log levels.
2020-05-30 09:49:01 +10:00
David Reid
8de49326d4
Add support for looping when reading data from data sources.
...
Updated APIs:
* ma_data_source_read_pcm_frames()
* ma_data_source_seek_pcm_frames()
2020-05-29 19:49:38 +10:00
David Reid
1cec172623
Add ma_data_source_seek_pcm_frames().
...
This commit also explicitly defines ma_data_source_read_pcm_frames() as
supporting an output buffer of NULL in which case a forward seek should
be performed.
2020-05-29 18:00:48 +10:00
David Reid
aec20ea98c
Add support for passing in NULL for output buffer when decoding.
...
This will cause a forward seek to occur instead of a read when calling
ma_decoder_read_pcm_frames() with the output buffer set to NULL.
2020-05-29 17:57:01 +10:00
David Reid
c2aa044335
Have ma_audio_buffer_unmap to return MA_AT_END when the end is reached.
2020-05-27 21:19:16 +10:00
David Reid
df9906a11e
Add support for memory mapping to ma_data_source.
2020-05-27 21:13:06 +10:00
David Reid
f572ac8709
Change pDeviceID to constant pointers in ma_device_config.
2020-05-27 17:44:41 +10:00
David Reid
f333a5efc5
Version 0.10.7
2020-05-25 16:09:22 +10:00
David Reid
e90aaccbb8
Silence a warning.
2020-05-24 16:14:23 +10:00
David Reid
8f5e64a15a
Update revision history.
2020-05-24 16:13:33 +10:00