Commit Graph

35 Commits

Author SHA1 Message Date
David Reid 3d82237ee2 Update documentation for examples. 2020-07-15 21:29:16 +10:00
David Reid 6f748942e6 Update examples and tests. 2020-06-24 19:37:46 +10:00
David Reid 971eb610c0 Update examples to C89. 2019-05-05 19:03:26 +10:00
David Reid c74c91d0fb Work in progress on C89 support. 2019-05-05 18:24:57 +10:00
David Reid e00fe077f4 "mal_" to "ma_". 2019-03-06 20:55:51 +10:00
David Reid f1bf58d0f8 "MAL_" to "MA_". 2019-03-06 20:51:38 +10:00
David Reid b93faa46e5 MINI_AL_IMPLEMENTATION to MINIAUDIO_IMPLEMENTATION. 2019-03-06 20:49:18 +10:00
David Reid d72e7b1fce "mini_al" to "miniaudio". 2019-03-06 20:42:48 +10:00
David Reid 2e23db7d1a Small tweak to the playback example. 2019-03-05 18:46:39 +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 bd689c560e Fix Core Audio build. 2019-02-24 17:39:07 +10:00
David Reid 8adce03d72 Core Audio: Refactoring in preparation for full-duplex. 2019-02-03 12:35:23 +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 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 d0e29698fd Update simple playback example. 2018-12-30 09:19:36 +10:00
David Reid 59726df2c2 MAL_IMPLEMENTATION to MINI_AL_IMPLEMENTATION 2018-05-21 20:03:11 +10:00
David Reid dfcaf178f9 Update playback example so it fits nicely on github's main page. 2018-03-05 22:17:27 +10:00
David Reid a321e6a543 Update the simple playback example.
This makes the multi playback example obsolete and has thus been
removed.
2018-02-25 18:25:18 +10:00
David Reid 35af204e21 Clean up whitespace. 2017-12-03 17:09:23 +10:00
David Reid 5d0705b34e Check the return value of mal_device_start() in examples. 2017-12-03 17:02:30 +10:00
David Reid 91822633c3 Simplify the simple playback example. 2017-11-11 17:01:27 +10:00
David Reid 9f97cc6943 Whitespace. 2017-11-05 19:59:52 +10:00
David Reid 5c31a4b6d1 Move dr_wav.h into the extras folder. 2017-11-01 19:19:15 +10:00
David Reid a69279bc74 Update playback example to include logging. 2017-10-28 16:36:02 +10:00
David Reid 8d5c715ec2 Fix examples. 2017-10-28 12:56:01 +10:00
David Reid ac158cd049 Add early support for OSS. 2017-06-24 19:08:26 +10:00
David Reid 0f21153ffe Add helper APIs for initializing device configs.
* mal_device_config_init()
 * mal_device_config_init_capture()
 * mal_device_config_init_playback()
2017-06-18 21:25:01 +10:00
David Reid acb5ce1595 Tabs to spaces. 2017-06-18 20:08:56 +10:00
David Reid 3348fc0a3c Update examples. 2016-12-29 20:43:31 +10:00
David Reid 1d9ccdec51 Update examples. 2016-11-14 20:02:41 +10:00
David Reid 7afcede3bd API CHANGE: Add device callbacks to mal_device_config.
Rationale:
1) It allows the callbacks to be set at initialization time which feels
   a bit more intuitive to me.
2) It avoids the need to call mal_device_set_send_callback(), etc.
3) It's a bit more consistent with the onLog callback. Previously,
   onLog would be passed to mal_device_init(), whereas onSend, etc were
   set with mal_device_set_send_callback(), etc. which feels needlessly
   inconsistent.
2016-10-26 22:20:16 +10:00
David Reid cba66e9bae API CHANGE: Pass config properties to mal_device_init() via a structure.
Rationale:
1) The number of parameters is just getting too much.
2) It makes it a bit easier to add new configuration properties in the
   future. In particular, there's a chance there will be support added
   for backend-specific properties.
2016-10-26 10:40:27 +10:00
David Reid 26ccabc834 Add examples. 2016-10-21 12:53:38 +10:00