Commit Graph

1077 Commits

Author SHA1 Message Date
David Reid a6168a16c7 Remove some unused experimental code. 2019-03-05 17:50:19 +10:00
David Reid 180621a0f4 Remove some redundant TODOs. 2019-03-05 17:48:31 +10:00
David Reid 10f13312bf DirectSound: Revert an earlier commit.
The change this commit is reverting causes glitching with smaller
buffers for some reason. More investigation into this is required.
2019-03-05 17:27:49 +10:00
David Reid e0c7af2966 DirectSound: Force a minimum latency of 20 milliseconds. 2019-03-04 20:28:59 +10:00
David Reid 944b5aca72 Clean up the WASAPI backend. 2019-03-04 19:29:43 +10:00
David Reid 413be80e2f WASAPI: Get playback-only mode working again. 2019-03-04 19:14:42 +10:00
David Reid dd15fb4515 WASAPI: Get capture-only mode working again. 2019-03-04 18:49:35 +10:00
David Reid e8d390925f DirectSound: Small latency tweak to make consistent with WASAPI. 2019-03-04 18:14:09 +10:00
David Reid 1f65090c32 DirectSound: Silence a verbose debug output message. 2019-03-04 17:42:48 +10:00
David Reid fd3e0e2a43 WASAPI: Fix a possible infinite loop when stopping the playback device. 2019-03-04 17:39:20 +10:00
David Reid c56205ff11 WASAPI: Fix some errors when stopping the device. 2019-03-03 22:01:29 +10:00
David Reid c95afa6b18 WASAPI: Work in progress on refactoring.
Playback-only and capture-only modes are broken with this commit.
2019-03-03 21:26:48 +10:00
David Reid 2f7eef3a41 DirectSound: Fix a bug in playback-only mode. 2019-03-03 17:35:48 +10:00
David Reid 286b301739 Rearrange some code. 2019-03-03 17:20:45 +10:00
David Reid e00f3ddefa DirectSound: Drain the playback buffer when stopping the device. 2019-03-03 17:18:45 +10:00
David Reid 2e1c34e678 DirectSound: Full-duplex experiment for handling desyncs. 2019-03-03 14:57:09 +10:00
David Reid 679f450099 DirectSound: Clean up unused code. 2019-03-03 14:21:23 +10:00
David Reid 3b1555ae5d Clean up. 2019-03-03 13:26:26 +10:00
David Reid 2660dd5fcb DirectSound: Refactor the playback-only implementation. 2019-03-03 12:50:33 +10:00
David Reid 74c22ad77f DirectSound: Refactor the capture-only implementation. 2019-03-03 12:20:52 +10:00
David Reid 349abe5ac8 DirectSound: Add some verbose debug output.
This commit also experiments with a fix for glitching in full-duplex
mode.
2019-03-03 08:37:43 +10:00
David Reid be780d2558 Work in progress on refactoring the DirectSound backend.
Playback-only and capture-only modes are broken with this commit for
DirectSound.
2019-03-02 21:13:37 +10:00
David Reid b0a1c92599 WASAPI: Experiment with some improvements to full-duplex. 2019-03-02 11:09:38 +10:00
David Reid 595dd1fb9e Merge pull request #49 from kayabe/dev_0.9
Fix vorbis playback
2019-03-02 06:50:34 +10:00
Kayabe 17f0adcce4 Fix vorbis playback 2019-03-01 18:13:27 +02:00
David Reid 5aa63802ae Update test_0. 2019-03-01 17:51:32 +10:00
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