Commit Graph

3673 Commits

Author SHA1 Message Date
David Reid fe8f67d3da DirectSound: Capture bug fix.
This fixes a bug where the wrong position is being retrieved for the
capture device.
2019-03-01 17:51:21 +10:00
David Reid 01a7d375f1 Try fixing a warning on MinGW. 2019-02-27 20:09:39 +10:00
David Reid ce0850848d WASAPI: Fix some errors with automatic stream routing. 2019-02-27 19:15:39 +10:00
David Reid 957de48d80 Another potential fix for some full-duplex glitching.
This change makes it so reading and writing is done on the smaller of
the period sizes between capture and playback devices.
2019-02-27 18:18:01 +10:00
David Reid 997d8a8d9d WASAPI/ALSA: Fix automatic playback starting in full-duplex mode.
The new rule is to start playback when the entire buffer is filled
rather than when the first period is filled in duplex mode. Normal
playback mode will still start the device when the first period is
filled.
2019-02-26 20:41:42 +10:00
David Reid 1b957471d5 WASAPI: Fix errors with exclusive mode. 2019-02-26 19:54:07 +10:00
David Reid f35b705fd8 WASAPI: Add a missing "if" statement. 2019-02-26 19:37:00 +10:00
David Reid c7a17d65d5 Tweaks to the WASAPI backend.
This commit attempts to address a crackling issue in full-duplex mode.

* When the capture buffer becomes over-filled it will discard some
  frames to prevent it from straddling the capacity of the internal
  buffer and causing excessive overruns.
* A fix has been implemented to the function that retrieves the number
  of available frames in the device's internal buffer.
* Low-latency shared mode (IAudioClient3) forces small buffer sizes so
  a change has been implemented which bypasses low-latency shared mode
  when a large buffer is specified.
2019-02-26 19:33:38 +10:00
David Reid cf59525ef3 Experimental fix for full-duplex on WASAPI. 2019-02-25 18:25:19 +10:00
David Reid 008cb41617 API CHANGE: Reorder parameters for some APIs.
The APIs that have changed are those that take an output pointer and an
input count in the format of "some_read_function(handle, pBuf, count)".

The updated APIs include:
  * mal_decoder_read_pcm_frames()
  * mal_pcm_converter_read()

Some APIs are scheduled to be replaced in a future version so I have
decided not to replace this at this time since it will be a waste of
time to do so.
2019-02-25 18:15:00 +10:00
David Reid 9ed608a452 Update simple playback example. 2019-02-24 21:01:53 +10:00
David Reid 08e21aae05 Add LICENSE file. 2019-02-24 20:40:34 +10:00
David Reid 8f67ba93cf Simplify Win32 #include's. 2019-02-24 20:31:29 +10:00
David Reid 5b5d51cf68 Update project files. 2019-02-24 20:12:28 +10:00
David Reid 125383e9ea Fix some warnings. 2019-02-24 20:07:09 +10:00
David Reid 01f04b249e More full-duplex bug fixes. 2019-02-24 20:03:50 +10:00
David Reid 26a218c1af Fix some full-duplex errors. 2019-02-24 19:04:49 +10:00
David Reid 433b7e8ed6 Fix a bug in the ring buffer. 2019-02-24 17:47:08 +10:00
David Reid bd689c560e Fix Core Audio build. 2019-02-24 17:39:07 +10:00
David Reid 0cc126245e Work on full-duplex with Core Audio. 2019-02-24 16:43:37 +10:00
David Reid a9ac84dde2 Work on full-duplex for JACK. 2019-02-24 16:11:27 +10:00
David Reid 1e1e8c0ba1 More full-duplex work on OpenSL and AAudio. 2019-02-24 15:53:20 +10:00
David Reid 66412f8937 Add some notes for the new resampler. 2019-02-24 13:28:04 +10:00
David Reid 5b4b7fa266 More work on full-duplex with WebAudio. 2019-02-24 13:26:18 +10:00
David Reid 51ebb048be Work in progress for full-duplex for WebAudio. 2019-02-23 15:09:39 +10:00
David Reid 212cee5982 Integrate the ring buffer into mini_al.h 2019-02-21 18:06:32 +10:00
David Reid 198b844d8b Add mal_pcm_rb to the ring buffer research code.
This is the same as the normal ring buffer except everything is done in
terms of PCM frames instead of bytes. This is useful to simplify the
case of using the ring buffer for storing PCM audio data.
2019-02-21 17:55:35 +10:00
David Reid c78aadff9c Fix device initialization with audio(4) on OpenBSD. 2019-02-20 20:01:16 +10:00
David Reid d1f26b4d3b Fix bugs with sndio. 2019-02-19 20:40:22 +10:00
David Reid 7fba7e5c13 Fix OpenBSD build. 2019-02-19 20:08:23 +10:00
David Reid 99960dd706 Fix a bug on the audio(4) backend. 2018-08-25 07:54:35 +00:00
David Reid 725ce22b89 Fix compilation errors on BSD platforms. 2019-08-25 03:49:57 +10:00
David Reid c287fd4878 Refactoring work on BSB platforms. 2019-08-25 13:34:55 +10:00
David Reid 5276057dd5 Minor refactoring to the PulseAudio backend. 2019-08-25 11:00:45 +10:00
David Reid 34c9a4ea73 Update revision history. 2019-08-25 10:13:34 +10:00
David Reid 759dea54e3 Clean up some old code from the ALSA backend. 2019-08-25 09:59:58 +10:00
David Reid 3c614c7b67 Add some ALSA specific debugging. 2019-08-24 22:49:05 +00:00
David Reid ada7f6c8c6 Work on improvements to the ALSA backend. 2019-08-25 07:26:23 +10:00
David Reid 8b57a09fbb Update revision history. 2019-08-24 07:44:18 +10:00
David Reid 0fdbb01ae2 WASAPI: Fix a bug with automatic stream routing with loopback devices. 2019-08-24 07:29:15 +10:00
David Reid ea3f4f3ffd Add APIs for checking for loopback support. 2019-08-24 07:12:51 +10:00
David Reid 3c68046fd3 Remove a debugging line from the loopback example. 2019-08-21 11:03:30 +10:00
David Reid 4edc39acd0 Add loopback example. 2019-08-21 11:00:06 +10:00
David Reid af1edfa844 Initial implementation of loopback mode for WASAPI. 2019-08-21 10:59:45 +10:00
David Reid 060a030fb5 Add some loopback validation checks. 2019-08-21 08:40:10 +10:00
David Reid 2bd9726f64 Fix crash when an error occurs in ma_device_init(). 2019-08-21 08:38:54 +10:00
David Reid 25f723ba9c Merge branch 'dev' into loopback 2019-08-20 17:38:39 +10:00
David Reid 25dc16d09b Merge branch 'dev' of https://github.com/dr-soft/miniaudio into dev 2019-08-20 17:38:06 +10:00
David Reid 337838f701 Merge pull request #91 from raysan5/master
Corrected minor issue
2019-08-20 17:37:19 +10:00
Ray 39123f867a Corrected minor issue 2019-08-19 13:22:36 +02:00