Commit Graph

2611 Commits

Author SHA1 Message Date
David Reid e3c9975e88 Merge pull request #282 from tycho/pr/wasapi-backend-fallback-fix
wasapi: ensure that wasapi context structure is zeroed before filling it
2021-03-11 17:30:59 +10:00
Steven Noonan e4ff49d558 wasapi: ensure that wasapi context structure is zeroed before filling it
I had a situation where I was doing:

    ma_backend backends[] = {
	ma_backend_jack,
	ma_backend_wasapi,
    };
    ma_context_init(backends, sizeof(backends)/sizeof(backends[0]),
	&contextConfig, &context);

And since JACK was unavailable, it fell back to WASAPI. When this
happened, the WASAPI commandIndex and commandCount variables were
already stomped on by the JACK backend initialization, but the WASAPI
backend assumes they are zero-initialized.

Signed-off-by: Steven Noonan <steven@uplinklabs.net>
2021-03-10 07:48:26 -08:00
David Reid 0a7207d5db Merge pull request #281 from morlad/fix-engine-no-resman-1
Fix linker error when MA_NO_RESOURCE_MANAGER is defined
2021-03-10 17:39:43 +10:00
David Reid de1219158d Merge pull request #280 from morlad/fix-warning-1
Fix -Wcast-qual by using correct ma_offset_pcm_frames_ptr()
2021-03-10 17:38:11 +10:00
David Reid feae709042 Update revision history. 2021-03-10 17:34:41 +10:00
David Reid 551ce040ae Merge pull request #279 from morlad/fix-audio-latency-1
Fix CoreAudio's performanceProfile for playback not being set
2021-03-10 17:35:35 +10:00
David Reid d9016e2036 Merge branch 'dev' of https://github.com/mackron/miniaudio into dev 2021-03-10 17:31:49 +10:00
David Reid cd65ffe939 Merge pull request #278 from morlad/fix-memory-leak-1
Fix memory leak (macOS)
2021-03-10 17:32:36 +10:00
David Reid ecffc00ccf Update revision history. 2021-03-10 17:31:42 +10:00
David Reid b1e1798771 Merge pull request #276 from tycho/pr/engine-atomic-fixes
engine: use atomics for setting live pitch and spatialization variables
2021-03-10 17:29:23 +10:00
David Reid c12730bcab Update c89atomic. 2021-03-10 17:23:38 +10:00
morlad (iLeitgeb) c2fd23c983 Fix CoreAudio's performanceProfile for playback not being set 2021-03-10 06:45:21 +00:00
morlad (iLeitgeb) 3a31faf8f0 Fix linker error when MA_NO_RESOURCE_MANAGER is defined 2021-03-10 06:43:57 +00:00
morlad (iLeitgeb) eadd717397 Fix -Wcast-qual by using correct ma_offset_pcm_frames_ptr() 2021-03-10 06:42:46 +00:00
morlad (iLeitgeb) 6f22b36eb7 Fix memory leak (macOS) 2021-03-10 06:39:10 +00:00
Steven Noonan 7a1cc44170 atomics: use "const" pointers for the load-only atomics on MSVC
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
2021-03-09 10:53:33 -08:00
Steven Noonan 6c4937f495 engine: use atomics for setting live pitch and spatialization variables
Thread Sanitizer was unhappy about these variables being modified on one
thread and read on another (data race).

Signed-off-by: Steven Noonan <steven@uplinklabs.net>
2021-03-09 04:46:47 -08:00
David Reid 53eed5b5f2 Silence some -Wmaybe-uninitialized warnings. 2021-03-09 20:51:31 +10:00
David Reid 9c761921ab Try fixing an infinite loop. 2021-03-09 19:28:13 +10:00
David Reid 61f5d4e027 Fix a typo. 2021-03-06 18:55:47 +10:00
Steven Noonan a5db7b6574 resource manager: fix tree hierarchy when removing nodes
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
2021-03-06 08:49:10 +10:00
David Reid 91b4b62bf5 Minor clean up. 2021-03-06 08:42:25 +10:00
Steven Noonan 22414f8c01 miniaudio_engine: fix sample rate conversion for sounds
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
2021-03-06 08:40:39 +10:00
David Reid 062f150dc4 Fix a typo. 2021-03-05 17:39:46 +10:00
David Reid a06ca7ee04 Prevent a division by zero. 2021-03-04 17:19:23 +10:00
David Reid f8dd3780a2 Fix a typo. 2021-03-04 17:12:58 +10:00
David Reid 55e4e59bfa Add support for configuring rolloff. 2021-03-03 17:29:46 +10:00
David Reid c2c32ed1d7 Fix a typo. 2021-03-01 17:39:03 +10:00
David Reid 85cd9c1848 Fix a bug with ma_resource_manager_data_stream relating to seeking. 2021-02-28 06:49:36 +10:00
David Reid d5ba84605c Fix a typo in the date for the previous version in revision history. 2021-02-26 17:09:29 +10:00
David Reid d06d4983d3 Version 0.10.32 2021-02-23 18:09:47 +10:00
David Reid 2290c10704 Fix build on older versions of MSVC. 2021-02-23 17:46:45 +10:00
David Reid dd319dc92a WASAPI: Attempt to fix some bugs with device uninitialization. 2021-02-22 20:30:47 +10:00
David Reid 25938c8197 Update dr_libs. 2021-02-21 08:50:46 +10:00
David Reid dc343d37d8 Fix a warning due to referencing _MSC_VER when it is undefined. 2021-02-21 08:26:13 +10:00
David Reid fc8f50457d Fixes to the C89 build. 2021-02-20 08:30:08 +10:00
David Reid 0271f1424b Merge branch 'dev' of https://github.com/mackron/miniaudio into dev 2021-02-20 07:09:25 +10:00
David Reid eb9b2f8250 Merge pull request #272 from eliasku/dev
fix iOS deadlocks
2021-02-20 07:10:46 +10:00
ilyak 3750211e6d fix iOS NSNotificationCenter removeObserver name which leads to NC deadlock for another operations 2021-02-17 15:12:21 +03:00
David Reid 83dd65938d Update revision history. 2021-02-16 17:44:46 +10:00
David Reid 729b55be97 Merge pull request #270 from eliasku/dev
WebAudio: add unlock audio context, fix default buffer size
2021-02-10 17:28:06 +10:00
ilyak ac1a161c5a webaudio: audio context resume only for started devices 2021-02-09 22:01:10 +03:00
ilyak 5e8534cfec webaudio: unlock audio context on user interaction 2021-02-08 20:48:35 +03:00
ilyak 2f29cdb5dc webaudio: fix default sampleRate buffer size configuration 2021-02-08 20:47:46 +03:00
David Reid f27a330a32 Experiment with improving async decoding on the Emscripten build. 2021-02-07 08:10:41 +10:00
David Reid b8f00dc4f9 Disable threading on the Emscripten build when init-ing the engine. 2021-02-07 07:51:43 +10:00
David Reid 8767422fb9 WASAPI: Fix a typo and some formatting changes. 2021-02-06 08:14:58 +10:00
David Reid 1e0ccd6201 Fix a bug with start and stop times. 2021-02-05 22:11:12 +10:00
David Reid 2e32eca6dd Ensure the engine device uses ma_format_f32 for it's format. 2021-02-05 20:54:23 +10:00
David Reid 577123762b Fix a double release bug. 2021-02-05 20:34:07 +10:00