Commit Graph

1755 Commits

Author SHA1 Message Date
David Reid 69773353db API CHANGE: Remove MA_LOG_LEVEL_VERBOSE.
This has been replaced with MA_LOG_LEVEL_DEBUG.
2021-07-04 16:41:19 +10:00
David Reid ba0b70e56e API CHANGE: Remove the old logging callback.
This was specific to devices, but now that miniaudio has expanded it's
no longer useful. The new logging system is more generic and useable by
parts outside of devices and contexts.
2021-07-04 16:40:09 +10:00
David Reid 1a4742e262 API CHANGE: Remove mapping from data sources.
This has proven to be exceptionally un-useful in practice and the
maintenance cost just isn't worth it.
2021-07-04 16:34:47 +10:00
David Reid e679602a56 Abandon the allocation type idea.
This might come back later, but for now this is no longer a thing.
2021-07-04 16:27:45 +10:00
David Reid 2bad69ace2 API CHANGE: Switch data sources over to the new vtable system. 2021-07-04 16:23:08 +10:00
David Reid 3e5e10d31a API CHANGE: Update ma_clip_pcm_frames_f32().
This now takes an input and output buffer rather than performing the
clipping in-place.
2021-07-04 16:11:46 +10:00
David Reid fb9716d9d1 API CHANGE: Update ma_clip_samples_f32() to take an input and output.
The previous version only allowed in-place clipping, whereas the new
one supports clipping into a separate buffer. The input and output
buffers can point to the same buffer in which case the clip will be
performed in-place.
2021-07-04 16:10:30 +10:00
David Reid b0927a4439 API CHANGE: Remove ma_zero_pcm_frames().
This has been replaced with ma_silence_pcm_frames().
2021-07-04 16:05:38 +10:00
David Reid 82f3b0eb7a API CHANGE: Remove unnecessary parameter from ring buffers.
This removes the `pBufferOut` parameter from the following APIs:

  * ma_rb_commit_read
  * ma_rb_commit_write
  * ma_pcm_rb_commit_read
  * ma_pcm_rb_commit_write
2021-07-04 16:03:52 +10:00
David Reid f9c496a014 API CHANGE: Rename noPreZeroedOutputBuffer to noPreSilencedOutputBuffer 2021-07-04 16:00:24 +10:00
David Reid 57bc1a285a API CHANGE: Remove shareMode parameter from ma_context_get_device_info. 2021-07-04 15:57:49 +10:00
David Reid 01c8b8d953 API CHANGE: Remove old device config variables. 2021-07-04 15:55:28 +10:00
David Reid 7025da51ab API CHANGE: Remove MA_MIN/MAX_SAMPLE_RATE.
These are replaced with ma_standard_sample_rate_min/max.
2021-07-04 15:46:55 +10:00
David Reid 77586a8a43 API CHANGE: Remove unused channel mixing mode. 2021-07-04 15:44:58 +10:00
David Reid 9cabd06494 Remove AVX-512 placeholders. 2021-07-04 15:44:26 +10:00
David Reid 5f145039b1 Fix build when compiling with MA_NO_THREADING. 2021-07-04 15:41:55 +10:00
David Reid ecc9c6e5e7 Fix build when compiling with MA_NO_THREADING. 2021-07-04 15:40:20 +10:00
David Reid cff3398af4 Move some macros over to the main library. 2021-07-04 13:48:11 +10:00
David Reid 2d8b0633a4 Fix some channel mapping bugs. 2021-07-04 13:35:29 +10:00
David Reid 072efc6f8b Minor updates to channel mapping. 2021-07-04 11:36:24 +10:00
David Reid 81d720e09f Version 0.10.36 2021-07-03 20:29:03 +10:00
David Reid 204169285b Revert an earlier change. 2021-07-03 20:24:17 +10:00
David Reid 5af250cfea Add support for passing in a NULL channel map to the converter. 2021-07-03 17:34:21 +10:00
David Reid f568dd8a79 Fix an infinite loop with the Vorbis decoder. 2021-07-02 21:54:50 +10:00
David Reid 479718d86d Fix a log formatting bug. 2021-07-02 21:31:19 +10:00
David Reid f940118fd8 Fix some logging bugs. 2021-07-02 20:30:13 +10:00
David Reid 591d340343 Improvements to logging.
* The old logging callback has been deprecated and will be removed in
    version 0.11.
  * MA_LOG_LEVEL_DEBUG has been added and MA_LOG_LEVEL_VERBOSE
    deprecated.
  * The MA_LOG_LEVEL option has been deprecated. All log levels are now
    posted to the logging callbacks, except for MA_LOG_LEVEL_DEBUG
    which is only posted if MA_DEBUG_OUTPUT is enabled.

The new logging system works by creating a `ma_log` object. You then
register callbacks that will be fired when a log message is posted. You
can register up to 4 callbacks. You the specify a pointer to this log
object in the context config. This replaces the `logCallback` variable.

The old logging system was specific to context's and device's, however
with the introduction of new APIs this is no longer appropriate. The
new logging system is completely generic with a simple user-data
pointer being used for application-specific data.

This commit adds some helper APIs for retrieving a pointer to the
context's log object:

  * ma_context_get_log()
  * ma_device_get_log()
  * ma_device_get_context()

The MA_DEBUG_OUTPUT option has been improved for Android builds. With
the new system, __android_log_print() will be used instead of printf().
2021-07-02 20:10:23 +10:00
David Reid 1ad55ca9ad OpenSL: Fix a copy/paste bug. 2021-07-02 15:52:50 +10:00
David Reid 410bdaa6bf Fix some bugs with recent commits. 2021-07-01 19:51:17 +10:00
David Reid 210d2db9a3 Deprecate some decoder initialization functions. 2021-07-01 19:25:10 +10:00
David Reid acb7aba85e PulseAudio: Another attempt at fixing a division by zero.
Public issue https://github.com/mackron/miniaudio/issues/323
2021-07-01 18:43:45 +10:00
David Reid f340578d76 Update revision history. 2021-07-01 17:43:49 +10:00
David Reid 00baf2f622 Remove some unnecessary members from ma_decoder. 2021-07-01 17:42:20 +10:00
David Reid fd0c441423 Remove unused variables from the ma_decoder structure. 2021-07-01 17:14:47 +10:00
David Reid e312ac5411 Remove the old "raw" decoder.
This is no longer used. New code should use `ma_audio_buffer`.
2021-07-01 17:11:56 +10:00
David Reid 11a774c9ff Update dr_wav. 2021-07-01 17:05:17 +10:00
David Reid ead7373925 Update the WAV decoder to use the new backend infrastructure. 2021-07-01 16:20:27 +10:00
David Reid ea4453377a Update the FLAC decoder to use the new backend infrastructure. 2021-07-01 16:12:44 +10:00
David Reid 13252284e5 Update the MP3 decoder to use the new backend infrastructure. 2021-07-01 16:01:08 +10:00
David Reid 956701fcdd Update the Vorbis decoder to use the new backend infrastructure. 2021-07-01 15:31:39 +10:00
David Reid e0bfc59bc0 Restructuring in preparation for future work. 2021-07-01 15:22:13 +10:00
David Reid c54bb96964 Rename some config variables. 2021-07-01 14:58:05 +10:00
David Reid 52f471ae43 Try to standardize the use of MA_AT_END.
With this change, MA_AT_END should only ever be returned the number of
bytes or frames returned is equal to 0.
2021-06-30 20:58:07 +10:00
David Reid 4559253587 Remove the MA_END_OF_FILE result code.
Use MA_AT_END instead. Use of MA_END_OF_FILE is too easily confused
with MA_AT_END, and MA_AT_END is a more generally applicable.
2021-06-30 12:30:31 +10:00
David Reid 1c179fb475 Try fixing an infinite loop. 2021-06-30 12:17:21 +10:00
David Reid 38f2754edb Fix compilation errors on 32-bit. 2021-06-30 06:10:44 +10:00
David Reid dad754b745 Add support for custom decoding backends.
Public issue https://github.com/mackron/miniaudio/issues/311
2021-06-27 21:43:31 +10:00
David Reid cf2c9f2533 PulseAudio: Attempt to fix a division by zero error.
Public issue https://github.com/mackron/miniaudio/issues/323
2021-06-22 17:41:41 +10:00
David Reid a95c066218 Add alternate names for some structs.
This is in preparation for some work in the high level API.
2021-06-20 10:20:12 +10:00
David Reid f24967f952 Comment out some code to try and fix an error on iOS.
Public issue https://github.com/mackron/miniaudio/issues/101
2021-06-17 18:05:06 +10:00