Commit Graph

1755 Commits

Author SHA1 Message Date
David Reid 9be681b848 Return MA_AT_END from ma_(pcm_)rb_commit_read/write(). 2021-06-13 18:04:57 +10:00
David Reid 7858e098f5 Add some helper functions to ma_audio_buffer/_ref. 2021-06-13 12:42:06 +10:00
David Reid 7a9ce3d0d3 Fix a bug where MA_AT_END is not getting returned by audio buffers. 2021-06-13 07:17:26 +10:00
David Reid 73e1589afa Update dr_wav.
Public issue https://github.com/mackron/miniaudio/issues/320
2021-06-11 19:50:42 +10:00
David Reid 8234df87c9 Fix a possible double file close when decoder initialization fails.
Public issue https://github.com/mackron/miniaudio/issues/319
2021-06-11 19:03:01 +10:00
David Reid f0a8ea3a76 Merge branch 'gh-301' into dev 2021-06-02 17:28:13 +10:00
David Reid 57a107db20 Add support for loop points to ma_data_source.
The loop points are specified relative to the range, and will be
clamped as such.
2021-05-29 15:27:06 +10:00
David Reid 3542cd26e9 Update c89atomic. 2021-05-27 19:39:46 +10:00
David Reid a5159bd297 Fix an infinite loop when reading from a data source with no data. 2021-05-25 18:28:53 +10:00
David Reid 63955a65a9 Update c89atomic. 2021-05-23 20:25:18 +10:00
David Reid 46a033b43a Initial work on custom loop points and chaining for data sources.
This is locked behind the following compile time macro for now since
it'll involve breaking changes to custom data sources. This will be
removed in version 0.11:

  MA_EXPERIMENTAL__DATA_LOOPING_AND_CHAINING

Public issue https://github.com/mackron/miniaudio/issues/290
2021-05-16 15:36:20 +10:00
David Reid c6b44df8f4 Add support for running custom code on thread entry and exit.
To use this, define `MA_ON_THREAD_ENTRY` and `MA_ON_THREAD_EXIT` before
the implementation of miniaudio.

Public issue https://github.com/mackron/miniaudio/issues/301
2021-05-14 18:09:49 +10:00
David Reid 2eb792b719 Fix some typos. 2021-05-14 17:54:21 +10:00
David Reid 2d11a3542c PulseAudio: Fix a bug with channel mapping. 2021-05-09 16:16:03 +10:00
David Reid c3636a45b9 PulseAudio: Try fixing a divide by zero error.
Public issue https://github.com/mackron/miniaudio/pull/308
2021-05-09 10:30:50 +10:00
David Reid 964e352e24 Fix a copy/paste error. 2021-05-03 16:28:09 +10:00
David Reid 8973469186 Simplify the data source config. 2021-05-03 16:07:19 +10:00
David Reid 11acb0caa5 Prep work in preparation for some changes to data sources.
Public issue https://github.com/mackron/miniaudio/issues/290
2021-05-03 15:35:07 +10:00
David Reid 236da866eb Silence some warnings when compiling with MA_DEBUG_OUTPUT. 2021-05-02 09:44:50 +10:00
David Reid 199d6a7875 Version 0.10.35 2021-04-27 17:31:19 +10:00
David Reid 3c80311743 Fix the C++ build. 2021-04-27 17:25:46 +10:00
David Reid 994cda44b5 Version 0.10.34 2021-04-26 16:32:00 +10:00
David Reid 16a605eebd Cleanup. 2021-04-26 16:28:57 +10:00
David Reid 24a8d433ac Clean up some debug output. 2021-04-26 16:22:02 +10:00
David Reid 50786617a8 ALSA: Add some debug output. 2021-04-26 13:15:13 +10:00
David Reid 8dc54984ec ALSA: Improvements to reading and writing logic.
Public issue https://github.com/mackron/miniaudio/issues/291
2021-04-26 12:36:25 +10:00
David Reid db53bdfc17 Fix a memory leak. 2021-04-26 12:07:54 +10:00
David Reid 403e9f7a74 ALSA: Fix a deadlock when stopping devices.
Public issue https://github.com/mackron/miniaudio/issues/291
2021-04-26 11:54:52 +10:00
David Reid 95bd7fb53b Update revision history. 2021-04-20 18:49:04 +10:00
David Reid 41b72f660c WASAPI: Attempt to fix a bug with loopback mode.
Public issue https://github.com/mackron/miniaudio/issues/298
2021-04-20 17:43:36 +10:00
David Reid 7ecd1e5b40 Fix a bug when using default data formats in loopback mode.
Public issue https://github.com/mackron/miniaudio/issues/298
2021-04-19 19:38:53 +10:00
David Reid 2f9f618434 Fix a bug in ma_encoder_init_file_w().
Public issue https://github.com/mackron/miniaudio/issues/297
2021-04-19 18:46:43 +10:00
David Reid f31bdb15fc Fix an error in some documentation. 2021-04-18 12:25:53 +10:00
Giovanni Petrantoni b00175209d Merge branch 'dev' of git://github.com/mackron/miniaudio 2021-04-18 09:12:51 +09:00
Giovanni Petrantoni 1c09a5d7b8 Merge branch 'master' of git://github.com/mackron/miniaudio 2021-04-18 09:05:28 +09:00
Giovanni Petrantoni 32d28747a8 Attempt to fix ubsan issue under macOS #295 2021-04-18 08:56:54 +09:00
David Reid a7e9b5dd5e Update revision history. 2021-04-08 09:11:51 +10:00
David Reid 821c057daa WASAPI: Fix a bug where a result code is not getting checked.
This was not propagating the result code when retrieving the render or
capture client from an audio client.
2021-04-08 09:08:58 +10:00
David Reid f28d61e493 Mark devices as default on the null backend. 2021-04-05 13:09:31 +10:00
David Reid fca829edef Version 0.10.33 2021-04-04 08:04:50 +10:00
David Reid 881fa6063e Update dr_flac. 2021-04-02 08:52:00 +10:00
David Reid eef66940c2 Fix a bug when calculating buffer sizes.
This fixes the following APIs:

  * ma_calculate_buffer_size_in_milliseconds_from_frames()
  * ma_calculate_buffer_size_in_frames_from_milliseconds()

Public issue https://github.com/mackron/miniaudio/issues/283
2021-03-21 08:07:57 +10:00
David Reid ba3e73cb22 Update revision history. 2021-03-21 07:57:53 +10:00
David Reid 64749431dd Update c89atomic. 2021-03-21 07:56:29 +10:00
David Reid f57673d861 Merge pull request #284 from tycho/pr/clang-optimizations
Clang auto-vectorization hints
2021-03-21 07:51:37 +10:00
David Reid a02f559581 JACK: Add support for loading JACK from libjack64.dll. 2021-03-16 18:20:14 +10:00
Steven Noonan 8a1858eba6 use MA_ASSUME for channel counts before loops
The range of the value isn't obvious to any compiler, as it could go for
one iteration or 4 billion iterations. Adding MA_ASSUME in these places
helps the compiler understand the range of possible values, and know how
heavily to vectorize (or not vectorize) these loops.

Signed-off-by: Steven Noonan <steven@uplinklabs.net>
2021-03-15 04:10:10 -07:00
Steven Noonan c1451b30a4 apply MA_RESTRICT to linear resampler interpolation functions
This tells the compiler that pFrameOut does not alias to pointers used
within the function, and teaches Clang that the loop is vectorizable.

Signed-off-by: Steven Noonan <steven@uplinklabs.net>
2021-03-15 04:10:09 -07:00
Steven Noonan c88bb8ccd2 extract channel count constants from loops
These values are constant, but Clang has some trouble noticing that,
especially if the loop body is complex enough. This prevents it from
noticing places where vectorization is possible (and desirable).

Signed-off-by: Steven Noonan <steven@uplinklabs.net>
2021-03-15 04:10:08 -07:00
Steven Noonan 2dcce6d53b introduce MA_RESTRICT macro
This allows us to use the __restrict keyword in places where we know
that pointers do not alias.

Signed-off-by: Steven Noonan <steven@uplinklabs.net>
2021-03-13 22:33:54 -08:00