Commit Graph

1989 Commits

Author SHA1 Message Date
David Reid 11e488e1cc Win32: Use better error detection for WaitForSingleObject(). 2020-08-01 08:21:05 +10:00
David Reid 1aac650c46 Core Audio: Fix build errors on macOS. 2020-07-30 17:30:52 +10:00
David Reid 63aef51bfc Fix a typo. 2020-07-29 19:24:10 +10:00
David Reid 7d055a44e5 Update revision history. 2020-07-29 18:30:50 +10:00
David Reid cb542d29f5 OpenSL: Fix a multithreading bug in context init/uninit.
This should fix the case where multiple context's are initialized and
uninitialized at the same time across multiple threads.
2020-07-29 18:28:40 +10:00
David Reid d2582f260e OpenSL: Use runtime linking for libOpenSLES.
Public issues:

  * https://github.com/dr-soft/miniaudio/issues/163
  * https://github.com/dr-soft/miniaudio/issues/183
2020-07-29 18:18:05 +10:00
David Reid 3e0ad8dd42 Reword a comment. 2020-07-27 18:08:56 +10:00
David Reid 0d8bf45dba Start some documentation for resource management. 2020-07-26 15:41:33 +10:00
David Reid 4fef753432 Resource Manager: Add public APIs for reading and seeking. 2020-07-25 19:49:20 +10:00
David Reid 5eb7761d8e Resource Manager: Rename some APIs for consistency. 2020-07-25 19:19:52 +10:00
David Reid 2a15044ff9 Update resource_manager example. 2020-07-25 18:27:59 +10:00
David Reid 3df4a9e860 Resource Manager: Decode synchronously on the calling thread.
This commit changes synchronous decoding so that the calling thread is
the one which performs the decoding. Previously, decoding was done on
the job threads which was then waited on by an event on the calling
thread. The rationale for this design was to keep decoding on a single
code path, however this creates a problem for programs that would
prefer not to have any asynchronous job threads. In this case, these
synchronously decoded sounds would never get decoded because there
would not be any threads available to actually perform the decoding.

This commit enables the resource manager to be able to be used without
a job thread so long as asynchronous decoding and streaming are not
used. This scenario could be useful for programs that want to pre-load
all of their sounds at load time and save some system resources by not
incurring the overhead of an additional unnecessary thread.
2020-07-25 18:06:48 +10:00
David Reid 7d8f054a73 Documentation fix. 2020-07-25 16:18:54 +10:00
David Reid 380a9fbf09 Punctuation. 2020-07-25 16:16:57 +10:00
David Reid 6438162119 Documentation fix. 2020-07-25 16:03:08 +10:00
David Reid b067926d6d Update FLAC, MP3 and WAV decoders. 2020-07-25 15:42:50 +10:00
David Reid 4f78581a92 Update wording in simple_duplex example. 2020-07-25 15:42:25 +10:00
David Reid 4ae9c891b1 Update order of links in readme. 2020-07-25 15:07:34 +10:00
David Reid 854c824d7e Update revision history. 2020-07-25 15:03:54 +10:00
David Reid 7ca0e6a1bb Merge branch 'dev' of https://github.com/dr-soft/miniaudio into dev 2020-07-25 15:03:14 +10:00
David Reid 6455d9ddc8 Update readme. 2020-07-25 15:02:58 +10:00
David Reid 917dc594e4 Core Audio: Improvements to device enumeration on iOS. 2020-07-25 14:31:33 +10:00
David Reid 21043fd62d Fix a compilation warning. 2020-07-25 12:51:17 +10:00
David Reid b1894532af Rewording to documentation. 2020-07-25 11:48:55 +10:00
David Reid 5bb15a8edc Update dr_mp3. 2020-07-23 18:57:53 +10:00
David Reid e6fb975c05 Update CONTRIBUTING. 2020-07-23 18:56:37 +10:00
David Reid a0f98cc7a5 Merge branch 'master' into dev 2020-07-23 17:50:01 +10:00
David Reid 5c985bd7f1 Stop version controlling some auto-generated website files. 2020-07-23 17:47:10 +10:00
David Reid 24a1108834 Minor updates to the resource_manager example. 2020-07-23 17:01:04 +10:00
David Reid 83178a1dfc Fix a buffer overflow in the mixer. 2020-07-23 09:44:20 +10:00
David Reid 5dda38d417 Add a clarifying comment to the resource_manager example. 2020-07-23 08:02:19 +10:00
David Reid 8800c3e763 Add miniaudio-rs as an unofficial binding. 2020-07-23 07:41:22 +10:00
David Reid 9972488bde Add some comments to the resource manager example for clarity. 2020-07-22 20:50:57 +10:00
David Reid 3bcdf3942d Add a resource manager example. 2020-07-22 20:35:34 +10:00
David Reid 681d26a557 Fix bugs in the resource manager. 2020-07-22 20:22:44 +10:00
David Reid 77057895a8 Set up some infrastructure for enabling multiple job threads. 2020-07-20 19:15:32 +10:00
David Reid 861f6a23c8 Initial work on a new job system for the high level API.
This new system is used for asynchronous decoding of sound data. The
main improvement with this one over the old one is the ability to do
multi-producer, multi-consumer lock-free posting of messages which
means multiple threads can be used to process jobs simultaneously
rather than a single thread processing all jobs serially.

Decoding is inherently serial which means multiple job threads is only
useful when decoding multiple sounds. Each individual sound will be
decoded serially.

Another change with this commit is the ability for applications to
control whether or not the resource manager manages it's own job
threads. This is useful if an application wants to manage the job queue
themselves if, for example, they want to integrate it more closely with
their existing job system.
2020-07-19 21:56:12 +10:00
David Reid cf14d0773e Experiment with some mitigation for the ABA problem. 2020-07-19 10:43:18 +10:00
David Reid 1a9675517a Fix some compilation warnings. 2020-07-18 11:01:53 +10:00
David Reid 9fb8a1d876 WASAPI: Fix a potential crash due to using an uninitialized variable. 2020-07-18 09:09:08 +10:00
David Reid 9d731a9bb5 Update readme. 2020-07-17 20:14:56 +10:00
David Reid bd7ed95d8c Updates to documentation. 2020-07-17 20:07:47 +10:00
David Reid 1b3f32c0a1 Language rewording. 2020-07-17 19:41:14 +10:00
David Reid 6f9da62cfa Experiment with a new readme layout. 2020-07-17 19:28:54 +10:00
David Reid 5f18131f57 Updates to documentation. 2020-07-17 19:06:14 +10:00
David Reid 7e1fbb7922 Updates to the website. 2020-07-17 19:05:16 +10:00
David Reid 8be8e3bb00 Update examples building readme. 2020-07-16 08:45:15 +10:00
David Reid e2d4d936df Stop version controlling some documentation templates for now. 2020-07-15 21:32:30 +10:00
David Reid a31ad4084d Minor styling updates for website. 2020-07-15 21:30:49 +10:00
David Reid 3d82237ee2 Update documentation for examples. 2020-07-15 21:29:16 +10:00