Commit Graph

1018 Commits

Author SHA1 Message Date
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 a19a858351 Update test_0. 2018-12-30 13:33:17 +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
David Reid f17428de47 Remove an unnecessary global array. 2018-12-30 13:22:15 +10:00
David Reid 6a60208c6a API CHANGE: Change the order of the mal_backend enums to priority order. 2018-12-30 13:05:31 +10:00
David Reid 795e0fc829 Add a BUILDING section to the documentation section. 2018-12-30 11:52:41 +10:00
David Reid 68da610f4f Add definitions for common terms. 2018-12-30 11:46:16 +10:00
David Reid bebf17264c API CHANGE: Simplify result codes.
This commit rearranges result codes, changes their constants and
removes unused codes. If you're a binding maintainer you will need to
update your result code constants.

Future commits may change these further.
2018-12-30 11:11:41 +10:00
David Reid 17be86aa4c Updates profiling and dithering tests. 2018-12-30 11:04:10 +10:00
David Reid 1acb96ed22 Update test_0 for changes to the log callback. 2018-12-30 11:02:20 +10:00
David Reid c1c422d3ea Update dr_mp3. 2018-12-30 11:01:35 +10:00
David Reid 4f9f19c3d2 Change licensing to a choice of public domain or MIT-0 (No Attribution) 2018-12-30 09:49:36 +10:00
David Reid 3372de7db0 API CHANGE: Add log level to the log callback. 2018-12-30 09:45:30 +10:00
David Reid 0b8101e150 API CHANGE: Remove deprecated APIs.
Removed APIs:
 * mal_device_set_recv_callback()
 * mal_device_set_send_callback()
 * mal_src_set_input_sample_rate()
 * mal_src_set_output_sample_rate()
2018-12-30 09:41:20 +10:00
David Reid 183d839865 Simplify sized types declarations. 2018-12-30 09:32:35 +10:00
David Reid fe1bc9807a Use block comments for major sections. 2018-12-30 09:28:44 +10:00
David Reid f223ea498b Update test_0. 2018-12-30 09:23:12 +10:00
David Reid 08f9cb21b5 API CHANGE: Rename sine wave reading APIs to f32 convention.
Renamed APIs:
 * mal_sine_wave_read()    -> mal_sine_wave_read_f32()
 * mal_sine_wave_read_ex() -> mal_sine_wave_read_f32_ex()
2018-12-30 09:22:59 +10:00
David Reid d0e29698fd Update simple playback example. 2018-12-30 09:19:36 +10:00
David Reid 76e3267c78 API CHANGE: Rename decoding APIs to "pcm_frames" convention.
Renamed APIs:
 * mal_decoder_read()          -> mal_decoder_read_pcm_frames()
 * mal_decoder_seek_to_frame() -> mal_decoder_seek_to_pcm_frame()
2018-12-30 09:16:17 +10:00
David Reid 2aa05be5c6 Disable SDL on Emscripten to avoid compiler errors. 2018-12-29 16:24:40 +10:00
David Reid 36bd13742b Make FLAC decoding a bit more efficient for s16 and f32. 2018-12-29 16:01:28 +10:00
David Reid d8a0fd09c9 AAudio: Set the performance mode based on mini_al's performance profile 2018-12-29 15:48:17 +10:00
David Reid feccdedba5 Add AAudio to the readme and remove OpenAL and SDL. 2018-12-29 15:41:15 +10:00
David Reid 40b848113c Rename some functions. 2018-12-29 15:07:22 +10:00
David Reid 7e5c604863 Update documentation. 2018-12-29 14:55:27 +10:00
David Reid ec188f57c1 Merge branch 'aaudio' into dev 2018-12-29 14:22:40 +10:00
David Reid 76ca09c52f Web Audio: Call the onStop callback when the device is stopped. 2018-12-29 14:22:32 +10:00
David Reid 2ad6f67ba5 AAudio: Put the onStop callback in the right spot... 2018-12-29 13:53:28 +10:00
David Reid bfb1f07d72 AAudio: Call the onStop callback when the device is stopped. 2018-12-29 13:51:21 +10:00
David Reid 2c2c4c64bb AAudio: Remove dependency on AAudio.h. 2018-12-29 13:45:06 +10:00