Commit Graph

1928 Commits

Author SHA1 Message Date
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
David Reid b80f7f9491 Version 0.10.15 2020-07-15 18:39:35 +10:00
David Reid 99d99680ef Update dr_wav. 2020-07-15 18:33:48 +10:00
David Reid 868a153d01 Another fix for converting bit-masked channel maps to miniaudio format.
Public issue: https://github.com/dr-soft/miniaudio/issues/177
2020-07-15 13:46:26 +10:00
David Reid b16ff11e4c Fix a bug when converting bit-masked channel maps to miniaudio format.
Public issue: https://github.com/dr-soft/miniaudio/issues/177
2020-07-15 09:11:13 +10:00
David Reid b9362d8fa4 Version 0.10.14 2020-07-14 17:34:18 +10:00
David Reid 6c67ba62c3 Minor website changes in preparation for documentation. 2020-07-13 23:24:57 +10:00
David Reid 07bc119a1f Try fixing compilation errors with -march=armv6.
Public issue https://github.com/dr-soft/miniaudio/issues/176
2020-07-13 15:12:51 +10:00
David Reid b4f490a1e8 Fix compilation errors on Android. 2020-07-13 07:51:21 +10:00
David Reid 23b792b588 Update revision history. 2020-07-12 22:34:46 +10:00
David Reid 8bcf979241 Updates to documentation. 2020-07-12 22:33:29 +10:00
David Reid 2e836e3e6a Minor website template changes in preparation for documentation. 2020-07-12 17:39:33 +10:00