Commit Graph

447 Commits

Author SHA1 Message Date
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
David Reid 069a436f3a Fix a compilation error in the C++ build. 2020-05-24 16:12:44 +10:00
David Reid 3f96bdf8a7 Version 0.10.6 2020-05-24 11:39:40 +10:00
David Reid ea3f7f511e Add ma_audio_buffer API.
The ma_audio_buffer object is used for storing raw audio data in memory
and reading from it like any other data source. It supports flexible
memory management, reading, seeking, memory mapping and looping.

See documentation under "Audio Buffers" for a detailed description.
2020-05-23 17:07:19 +10:00
David Reid 329f184004 PulseAudio: Fix compilation errors with C89 and MA_NO_RUNTIME_LINKING. 2020-05-22 20:04:59 +10:00
David Reid f8c63d9ce0 Fix MA_NO_RUNTIME_LINKING for ALSA. 2020-05-22 18:57:51 +10:00
David Reid 70350d2a86 ALSA: Fix some compilation warnings. 2020-05-22 18:51:00 +10:00
David Reid 9339a8a068 Change unclipped s24 to be represented as 64-bit rather than 32-bit.
This addresses some clipping issues when accumulating.
2020-05-10 13:43:01 +10:00
David Reid b15dcb691c Update revision history. 2020-05-10 12:40:41 +10:00
David Reid 509f746e66 Add ma_silence_pcm_frames() and deprecate ma_zero_pcm_frames().
ma_zero_pcm_frames() will be removed in version 0.11.
2020-05-10 12:39:38 +10:00
David Reid e64d1ecd6e Add support for u8 to the channel converter. 2020-05-10 10:14:04 +10:00
David Reid a66c0355cb Add support for s24 to the channel converter. 2020-05-10 09:03:55 +10:00
David Reid 3e097a6087 Add support for s32 to the channel converter. 2020-05-10 07:43:56 +10:00
David Reid 493b2ec9c3 Prep work adding support for extra formats to the channel converter. 2020-05-10 07:35:18 +10:00
David Reid e03d7985b7 Add compile-time and run-time version querying.
This adds the following:
  * MA_VERSION_MINOR
  * MA_VERSION_MAJOR
  * MA_VERSION_REVISION
  * MA_VERSION_STRING
  * ma_version()
  * ma_version_string()

Public issue https://github.com/dr-soft/miniaudio/issues/156
2020-05-07 15:10:58 +10:00
David Reid d429df4ed8 Change ma_clip_samples/frames_f32 to take a 64-bit count. 2020-05-07 14:58:14 +10:00
David Reid 369b476b37 Version 0.10.5 2020-05-05 06:52:44 +10:00
David Reid cb9505acb2 Fix a crash in the linear resampler when LPF order is 0.
Public issue https://github.com/dr-soft/miniaudio/issues/155
2020-05-04 07:02:39 +10:00
David Reid 90550c9e8a Change ma_zero_pcm_frames() to take a 64-bit frame count. 2020-05-02 15:41:15 +10:00
David Reid d20430210a Update revision history. 2020-05-01 19:43:01 +10:00
David Reid 342199847c Fix level 4 warnings on VC6. 2020-05-01 18:58:58 +10:00
David Reid dae1a040b3 Silence some warnings. 2020-05-01 18:23:58 +10:00
David Reid 135b098526 Improve VC6 compatibility for formatted logging.
Public issue https://github.com/dr-soft/miniaudio/issues/153
2020-05-01 18:01:36 +10:00
David Reid 07730e7a16 Fix a typo. 2020-04-29 07:34:50 +10:00
David Reid e1f39d97a7 Fix compilation errors on older versions of Visual Studio.
Public issue https://github.com/dr-soft/miniaudio/issues/153
2020-04-28 13:16:59 +10:00
David Reid 0608fb1b0a Minor documentation fixes. 2020-04-26 11:10:49 +10:00
David Reid 845ca22710 Update documentation for ma_decoder.
Public issue https://github.com/dr-soft/miniaudio/issues/152
2020-04-26 09:16:47 +10:00
David Reid 1ca969601f Update revision history. 2020-04-26 08:47:21 +10:00
David Reid 6b375b3a02 Add MA_NO_GENERATION build option. 2020-04-26 08:42:18 +10:00
David Reid 2a765d6311 Move struct ma_lcg to a more appropriate location. 2020-04-26 08:39:57 +10:00
David Reid 5e8a299aa8 Add MA_NO_ENCODING to the Build Options section in documentation.
Public issue https://github.com/dr-soft/miniaudio/issues/151
2020-04-20 10:01:55 +10:00
Marco Lizza 66fad49e20 Fixing nanosleep() call on POSIX, wrongly converting milliseconds. 2020-04-12 22:53:36 +02:00