Commit Graph

2100 Commits

Author SHA1 Message Date
David Reid bda207bc87 Merge branch 'dev' of https://github.com/dr-soft/mini_al into dev 2020-11-04 20:05:31 +10:00
David Reid 61541f7e6d Core Audio: Add support for default device detection. 2020-11-04 20:05:23 +10:00
David Reid 704750269b Fix some compilation errors with MA_NO_RUNTIME_LINKING. 2020-11-03 20:26:00 +10:00
David Reid 0d0f7e4f92 Update revision history. 2020-11-03 19:12:04 +10:00
David Reid 9d180b540a Fix a build error when ALSA and JACK are disabled on Linux builds. 2020-11-03 19:07:48 +10:00
David Reid 99c96c958e PulseAudio: Remove some unnecessary code. 2020-11-03 19:05:30 +10:00
David Reid d8536197c4 PulseAudio: Minor code restructure. 2020-11-03 19:01:56 +10:00
David Reid 2dc604ecde PulseAudio: Always use the PA_STREAM_ADJUST_LATENCY flag on streams.
This should fix the following puplic issues:

  * https://github.com/mackron/miniaudio/issues/106
  * https://github.com/mackron/miniaudio/issues/187
2020-11-03 18:51:31 +10:00
David Reid 27a7fea804 Update dr_flac. 2020-11-01 21:49:01 +10:00
David Reid 89e5ae2144 Update dr_libs. 2020-11-01 21:43:34 +10:00
David Reid f6800b423a Minor change to the deviceio test. 2020-11-01 21:11:23 +10:00
David Reid c10e21c119 Fix a const warning. 2020-11-01 21:04:16 +10:00
David Reid eda3dcc866 Fix some warnings in the Speex resampler. 2020-11-01 21:00:22 +10:00
David Reid 12c7babea1 Fix compilation warnings. 2020-11-01 20:53:16 +10:00
David Reid a5612b4f9c Update c89atomic. 2020-11-01 20:50:59 +10:00
David Reid ab2fd23beb Improve compiler support for older versions of GCC. 2020-11-01 20:40:59 +10:00
David Reid 704dccf65f Fix compilation errors on BSD. 2020-11-01 20:18:43 +10:00
David Reid b61ea2461e WebAudio: Add support for default device detection.
Public issue https://github.com/mackron/miniaudio/issues/126
2020-11-01 18:50:47 +10:00
David Reid a1052923b0 WinMM, DirectSound: Add support for default device detection.
Public issue https://github.com/mackron/miniaudio/issues/126
2020-11-01 18:46:23 +10:00
David Reid 9b4e524b3f JACK: Add support for default device detection.
Public issue https://github.com/mackron/miniaudio/issues/126
2020-11-01 18:29:14 +10:00
David Reid 7c937c491e ALSA: Add basic support for detecting default devices.
Public issue https://github.com/mackron/miniaudio/issues/126
2020-11-01 17:55:43 +10:00
David Reid edfc9bbcaf ALSA: Fix a bug in ma_context_get_device_info(). 2020-11-01 17:29:48 +10:00
David Reid c4099c86c6 PulseAudio: Add support for detecting default devices.
Public issue https://github.com/mackron/miniaudio/issues/126
2020-11-01 17:09:36 +10:00
David Reid c844455059 Fix bugs with ma_decoder_init_file*().
Public issue https://github.com/mackron/miniaudio/issues/213
2020-11-01 15:19:35 +10:00
David Reid e808a67777 Refactor to the PulseAudio backend.
* The main loop is now handled properly by pa_threaded_mainloop.
  * Rather than waiting for operations to complete inline, the main
    loop is now iterated on a separate thread.
  * Data is now written and read to and from the relevant stream via
    callbacks rather than a hacky loop.
  * Code overall has been simplified.
  * Includes a rant about bad API design in PulseAudio.

This should hopefully address these public issues:

  * https://github.com/mackron/miniaudio/issues/106
  * https://github.com/mackron/miniaudio/issues/187
2020-11-01 14:30:06 +10:00
David Reid 3018ba3ee5 Some refactoring to the PulseAudio backend.
The PulseAudio mainloop and context objects have been moved out of the
device and into the context.
2020-10-31 16:43:25 +10:00
David Reid ae88112e4f Version 0.10.21 2020-10-30 20:23:21 +10:00
David Reid 447e22e09f Update dr_libs. 2020-10-30 20:20:29 +10:00
David Reid d2a663a9aa Update revision history. 2020-10-30 20:05:08 +10:00
David Reid 25bd2576bf Core Audio: Improvements to data format selection.
Public issue https://github.com/mackron/miniaudio/issues/201
2020-10-30 19:56:36 +10:00
David Reid cd1a3decfa Reduce some stack usage. 2020-10-28 18:30:14 +10:00
David Reid 62a7c6a805 Check the result of ReadFile() to silence some static analysis warnings 2020-10-28 18:24:28 +10:00
David Reid e67953d6f2 Fix some bugs due to null pointer dereferences.
Public issue https://github.com/mackron/miniaudio/issues/209
2020-10-28 18:17:53 +10:00
David Reid 64a1941f8e Reduce some stack allocation space. 2020-10-28 18:16:23 +10:00
David Reid 11e1be7887 Use a consistently sized stack allocated buffer. 2020-10-28 18:03:43 +10:00
David Reid 069549254d Rename some APIs from previous commit.
This uses the "enabled" notion rather than "available" as I think it's
a bit clearer in terms of enabled at compile time rather than available
at run time.

Public issue https://github.com/mackron/miniaudio/issues/211
2020-10-25 09:54:58 +10:00
David Reid e59ee1e773 Add support for retrieving available backends at run-time.
The following APIs have been added:

  * ma_is_backend_available()
  * ma_get_avaialable_backends()

Public issue https://github.com/mackron/miniaudio/issues/211
2020-10-25 09:06:57 +10:00
David Reid 52e45237ac Fix some typos. 2020-10-13 17:29:31 +10:00
David Reid 7090c1b773 Core Audio: Fix an error from an earlier commit.
Public issue https://github.com/mackron/miniaudio/issues/201
2020-10-11 21:51:09 +10:00
David Reid 3c68efb333 Fix a bug in the stereo panner effect. 2020-10-11 15:40:58 +10:00
David Reid d8aa619250 Add some experimental fading APIs to the engine API.
This is a simplified and somewhat more intuitive way of handling fades.
With these APIs, fades are applied immediately, whereas with the old
fading APIs the fades were scheduled. The old APIs still exist, but may
be removed.

The ma_sound_set_fade_in_frames/milliseconds() API sets the fade which
will be applied immediately. If the starting volume is negative, the
fade will start from the current fade volume. This will also overwrite
any existing fade that is already happening.

The ma_sound_get_current_fade_volume() API allows you to retrieve the
current volume of the fade.

The fade is layered on top of the normal volume parameter. I.e. they
are configured and applied to the signal interdependently.

Currently, all fades are applied linearly.
2020-10-11 14:41:08 +10:00
David Reid f6beb7993c Update revision history. 2020-10-11 11:46:47 +10:00
David Reid 016eed9698 Tabs to spaces. 2020-10-11 11:38:46 +10:00
David Reid e972a03b3f Core Audio: Add notes regarding the Apple notarization process. 2020-10-11 11:36:57 +10:00
David Reid 6ecb728326 Core Audio: Fix a bug when using multiple contexts. 2020-10-11 10:56:53 +10:00
David Reid 0ae8adc1c0 Core Audio: Remove logic that forces the device's original sample rate. 2020-10-11 10:27:09 +10:00
David Reid 5a20743a03 Core Audio: Fix a compilation warning. 2020-10-11 10:08:03 +10:00
David Reid 4f63069984 Engine: Fix a bug where sounds groups are not initialized properly.
This is happening due to the hierarchy not being constructed properly.
2020-10-11 09:40:57 +10:00
David Reid ea82457317 Update revision history. 2020-10-08 18:56:54 +10:00
David Reid 6fda59f4e9 Merge pull request #202 from gooderist/dev
Fix loopback typo
2020-10-08 18:54:11 +10:00