David Reid
6548f4e2f1
Set up some infrastructure for separate in/out device IDs.
2019-01-27 12:45:09 +10:00
David Reid
97c7c0a72d
API CHANGE: Remove the onLog parameter from mal_context_config_init().
...
This commit also renames the onLog member of mal_context_config to
logCallback for consistency with mal_device_config callback naming
convention.
2019-01-27 06:53:48 +10:00
David Reid
88b75fdbc1
Typos.
2019-01-14 20:10:17 +10:00
David Reid
2dd522b62e
Update documentation for mal_device_init().
2019-01-13 10:51:16 +10:00
David Reid
4d03928b74
Remove some unused backend functions.
2019-01-13 10:38:54 +10:00
David Reid
23c917516d
Rename more variables for consistency.
2019-01-13 10:26:22 +10:00
David Reid
54e82c74d0
Rename some variables for consistency.
2019-01-13 10:20:12 +10:00
David Reid
24167ba3c2
API CHANGE: Remove the device type and ID from mal_device_init/_ex().
2019-01-13 09:31:08 +10:00
David Reid
661115f130
API CHANGE: Simplify API for device config initialization.
...
There is now only a single API for initializing a device config which
is mal_device_config_init() and takes the device type as it's only
parameter. By default this will use the device's native configuration.
The device ID is also set in the device config. The next commits will
be changing mal_device_init() to remove the device type and ID from the
parameter list since they are now specified in the config.
2019-01-12 16:04:28 +10:00
David Reid
4980fcf3c5
Reorder parameters in the callback.
...
This swaps the order of the input and output pointers so that it's
consistent with the order used by memcpy().
2019-01-12 11:04:11 +10:00
David Reid
67db06350d
API CHANGE: Change the data callback in preparation for full-duplex.
...
This removes the two separate callbacks for sending and receiving data
to/from the device to a unified callback that's used for both input and
output. The new callback takes a pointer to both an input and output
buffer. When the device is opened in playback mode the input pointer
will be set to null. Likewise the output pointer will be set to null
for capture devices. Both input and output pointers will be non-null
for full-duplex devices.
2019-01-12 09:34:30 +10:00
David Reid
3badd55b32
Rename a parameter in mal_convert_frames/_ex().
2019-01-05 18:53:09 +10:00
David Reid
6d85a886a1
OSS: Remove some unnecessary state.
2018-07-30 10:44:01 +10:00
David Reid
f61634246c
audio(4): Work on the new blocking read/write API.
2018-08-25 04:24:06 +00:00
David Reid
0683b3990e
sndio: Work on blocking read/write API.
2018-07-30 23:46:30 +10:00
David Reid
6caa823ea2
OSS: Work on the blocking read/write API.
2018-07-30 10:34:09 +10:00
David Reid
af39fd06a2
ALSA: Work on the blocking read/write API.
2019-01-05 13:03:38 +10:00
David Reid
036cb46db2
ALSA: Rename a function in preparation for blocking read/write.
2019-01-05 10:04:12 +10:00
David Reid
7271b20d0e
Improvements to the Null backend.
...
This change makes a device run it's own loop with a timer to better
simulate an actual device.
2019-01-04 11:00:38 +10:00
David Reid
a9af26f79f
Simplify the blocking read/write APIs.
2019-01-03 11:08:09 +10:00
David Reid
9bf923d3d8
Clean up.
2019-01-03 10:59:44 +10:00
David Reid
749e58bd8b
Tweaks to default buffers sizes on DirectSound and WinMM.
2019-01-03 05:51:14 +10:00
David Reid
2fed9dd3ff
Clean up the WinMM and WASAPI backends.
2019-01-02 21:26:54 +10:00
David Reid
3091827308
Clean up the DirectSound backend.
2019-01-02 20:04:59 +10:00
David Reid
bb7556c647
DirectSound: Work on the blocking read and writes.
2019-01-02 19:45:05 +10:00
David Reid
fe0643886f
Comment out some unused code.
2019-01-01 14:23:04 +10:00
David Reid
e181c9317f
WinMM: Work on blocking read API.
2019-01-01 14:19:25 +10:00
David Reid
f960c12aa6
WinMM: Work on the blocking write API.
2019-01-01 12:31:00 +10:00
David Reid
e30bcb13dc
Fix re-routing on the WASAPI backend.
2019-01-01 07:08:24 +10:00
David Reid
7a3b008576
More work on the audio thread's new main loop.
...
Automatic device switching has not yet been tested with this.
2019-01-01 06:08:40 +10:00
David Reid
a08a376433
Experimental work on a blocking/synchronous API.
...
This work is isolated to WASAPI for now while I figure out requirements
and the API.
This will be the basis for an improved main loop in the audio thread.
2018-12-31 13:38:47 +10:00
David Reid
6a2c324f2b
Merge branch 'dev' into dev_0.9
...
# Conflicts:
# mini_al.h
2018-12-31 08:16:33 +10:00
David Reid
ef072c034f
Web Audio: Remove unnecessary include.
2018-12-31 08:07:56 +10:00
David Reid
4b1c70e4d2
Web Audio: Fix compiler errors when using the -std=c99 switch.
2018-12-31 08:07:14 +10:00
David Reid
c47e9d4913
Work on fixes to device stopping.
2018-12-30 19:57:57 +10:00
David Reid
9038abefbd
Work on making mal_device_stop() better defined regarding flushing.
2018-12-30 18:10:33 +10:00
David Reid
cdc49541a2
API CHANGE: Move pUserData from device_init() to device_config_init().
...
This change makes it consistent with mal_pcm_converter, mal_src, etc.
2018-12-30 17:29:03 +10:00
David Reid
e762208c43
API CHANGE: Rename mal_dsp to mal_pcm_converter.
...
All functions have been renamed from mal_dsp_*() to
mal_pcm_converter_*(). All structures have been renamed from mal_dsp*
to mal_pcm_converter*.
2018-12-30 16:56:54 +10:00
David Reid
161cfd2610
Remove a useless bit of state from mal_device.
2018-12-30 16:48:41 +10:00
David Reid
eb3a5d94b8
Add some documentation for exclusive mode.
2018-12-30 15:15:18 +10:00
David Reid
bbd1674de2
No exclusive mode for AAudio, OpenSL|ES and Web Audio.
2018-12-30 14:57:42 +10:00
David Reid
9b80030f00
Core Audio: Exclusive mode is not supported right now.
2018-12-30 14:48:14 +10:00
David Reid
46374763ca
JACK: Return an error when exclusive mode is requested.
2018-12-30 14:44:54 +10:00
David Reid
1cb4d9d12e
PulseAudio: Always fail if exclusive mode is requested.
2018-12-30 14:41:04 +10:00
David Reid
b756bd674e
DSound: Return error in get_device_info() if share mode not supported.
2018-12-30 14:20:59 +10:00
David Reid
c3556a5d4c
WinMM: Return error when exclusive mode is requested.
2018-12-30 14:18:09 +10:00
David Reid
931877e591
DirectSound: Updates to how shared mode is handled.
...
* Return MAL_SHARE_MODE_NOT_SUPPORTED if SetCooperativeLevel fails.
* Always fail with MAL_SHARE_MODE_NOT_SUPPORTED if exclusive mode is
requested for capture.
2018-12-30 14:14:13 +10:00
David Reid
deeeb4b713
WASAPI: Don't fall back to shared mode if exclusive mode fails.
2018-12-30 14:08:12 +10:00
David Reid
4afeda4b82
Remove the OpenAL backend.
2018-12-30 13:30:59 +10:00
David Reid
2e6c6e6655
Remove the SDL backend.
2018-12-30 13:27:18 +10:00