Clownacy
f56ea20470
Restructure ma_log_postv to be more consistent
...
The `__STDC_VERSION__ >= 199901L` and the `_MSC_VER >= 1200` code
had different styles for handling errors, so I've made them match.
2021-07-13 23:35:41 +01:00
Clownacy
b65a117132
Fix function not returning anything
...
MSVC 6 was printing a warning about this.
2021-07-13 23:33:15 +01:00
David Reid
643c9c0860
Add support for disabling denormals on the audio thread.
...
This is configurable on a per-device basis. Denormals will be disabled
by default.
2021-07-13 20:27:17 +10:00
David Reid
b961cdf9be
API CHANGE: Standardize decoder read/seek callbacks.
2021-07-11 17:23:39 +10:00
David Reid
7bb96d8a3c
Fix a crash when initializing a decoder without a config.
2021-07-11 17:04:29 +10:00
David Reid
56202ced66
Fix a crash when initializing a decoder without a config.
2021-07-11 17:04:07 +10:00
David Reid
655c087651
Avoid some superfluous decoder backend initialization.
2021-07-11 17:01:25 +10:00
David Reid
8d47a9307f
Avoid some superfluous decoder backend initialization.
2021-07-11 17:00:56 +10:00
David Reid
7d6320ffe1
Fix bugs with duplex mode introduced with the previous commit.
2021-07-11 16:45:10 +10:00
David Reid
31b692642c
Improvements to data conversion.
...
This makes devices and decoders more robust when the resampler does not
support retrieval of required input frame counts from a given output
frame count, which can happen with custom resamplers.
2021-07-11 15:52:15 +10:00
David Reid
ea7b99cfd9
Update the data converter to handle resampling better.
2021-07-11 10:24:38 +10:00
David Reid
3fd7af7274
Fix some issues with resampling in the engine.
2021-07-11 08:49:55 +10:00
David Reid
562b0ffeb3
Updates to the resampler API.
...
This changes ma_resampler_get_required_input_frame_count() and
ma_resampler_get_expected_output_frame_count() to return a result code
so that MA_NOT_IMPLEMENTED can be checked and an alternative code path
can be run for dealing with caching of data.
2021-07-11 07:29:31 +10:00
David Reid
fcb405883d
Update ma_calculate_frame_count_after_resampling()
...
This removes the dependency on the ma_resampler object.
2021-07-11 07:11:26 +10:00
David Reid
d8314ba3af
Propagate errors from ma_data_source_read_pcm_frames().
2021-07-10 20:08:30 +10:00
David Reid
3c825d6a55
Fix some bugs introduced with recent changes to the resampler.
2021-07-10 20:00:51 +10:00
David Reid
bd53d105d3
Properly propagate errors from ma_decoder_read_pcm_frames().
2021-07-10 19:15:19 +10:00
David Reid
6dec8c0736
Have ma_decoder_read_pcm_frames() return MA_AT_END.
2021-07-10 18:45:31 +10:00
David Reid
46238b0ea5
Rename ma_device_callback_proc to ma_device_data_proc.
2021-07-10 18:29:09 +10:00
David Reid
3ab413a866
Rename some functions.
2021-07-10 18:26:19 +10:00
David Reid
47cfe17ebd
Add support for custom resampling backends.
...
Public issue https://github.com/mackron/miniaudio/issues/162
2021-07-10 18:23:55 +10:00
David Reid
3dc522e19b
Remove the Speex resampler.
2021-07-10 15:54:52 +10:00
David Reid
b2ed5ab028
Merge branch 'dev' into dev-0.11
2021-07-10 12:23:20 +10:00
David Reid
dcec55f7b8
OpenSL: Fix a bug with setting of stream types and recording presets.
2021-07-10 12:21:42 +10:00
David Reid
66b5ccb577
Update issue template.
2021-07-10 11:58:54 +10:00
David Reid
1b38b6901d
Update issue template.
2021-07-10 11:58:17 +10:00
David Reid
fff5ad353c
Merge branch 'dev' into dev-0.11
2021-07-10 11:57:40 +10:00
David Reid
b8599906b7
Fix some bugs when playing inlined sounds.
...
Public issue https://github.com/mackron/miniaudio/issues/340
2021-07-10 11:57:29 +10:00
David Reid
2aa7016c76
Standardize the use of logging.
2021-07-10 11:53:51 +10:00
David Reid
81216af373
Update issue template.
2021-07-08 20:44:50 +10:00
David Reid
49b9fa5109
Merge branch 'master' into dev-0.11
2021-07-06 17:41:05 +10:00
David Reid
90c7eef4f4
Version 0.10.37
2021-07-06 17:40:38 +10:00
David Reid
564d27413c
Merge branch 'dev' into dev-0.11
2021-07-05 17:27:11 +10:00
David Reid
486bd7939c
Merge pull request #332 from Clownacy/dev
...
Fix invalid vsnprintf buffer size
2021-07-05 17:20:46 +10:00
Clownacy
72c1a74c86
Fix invalid vsnprintf buffer size
...
Was performing a `sizeof` on a pointer, which causes a warning to be
generated.
2021-07-04 12:30:44 +01:00
David Reid
bc619957ca
Remove an unnecessary function.
2021-07-04 20:02:34 +10:00
David Reid
33aae652fe
API CHANGE: Update ma_get_standard_channel_map().
...
This adds a capacity parameter for added safety. It also changes the
order of parameters to make it a bit more consistent.
2021-07-04 19:46:00 +10:00
David Reid
3fad6cad86
API CHANGE: Add channel maps to ma_data_source_get_data_format().
...
This commit also removes the onGetChannelMap callback from the decoding
backend vtable.
2021-07-04 18:21:36 +10:00
David Reid
def3140425
Clean up memory allocation routines.
2021-07-04 17:51:19 +10:00
David Reid
071291b848
API CHANGE: Update rules on realloc and allocation callbacks.
...
Allocation callbacks must now implement onRealloc() themselves. This is
no longer emulated by miniaudio.
2021-07-04 17:38:16 +10:00
David Reid
bfe8358d9f
Add ma_decoder_get_data_format().
...
With this change, ma_decoder should now be fully consistent with other
data sources.
2021-07-04 17:32:24 +10:00
David Reid
3ec737d83d
Rearrange some code.
2021-07-04 17:26:01 +10:00
David Reid
29ef420ee1
API CHANGE: Update ma_decoder_read_pcm_frames().
...
This makes ma_decoder_read_pcm_frames() consistent with other data
sources. It now returns a result code and outputs the number of frames
read via an output parameter.
2021-07-04 17:23:53 +10:00
David Reid
2399359089
API CHANGE: Update ma_decoder_get_length_in_pcm_frames().
...
This is now consistent with all other data sources:
* Returns a result code
* Length is returned via an output parameter
2021-07-04 17:03:46 +10:00
David Reid
619822e1fe
API CHANGE: Remove encoding-specific init APIs for decoders.
...
Use the `encodingFormat` variable in the config instead.
2021-07-04 16:55:54 +10:00
David Reid
e327e22458
API CHANGE: Replace ma_resource_format with ma_encoding_format.
...
This also renames the `resourceFormat` variables used by the encoder to
`encodingFormat`.
2021-07-04 16:52:56 +10:00
David Reid
605429ef2a
Update some logging to use the new system.
2021-07-04 16:49:52 +10:00
David Reid
468b412a5e
API CHANGE: Remove MA_LOG_LEVEL.
...
This was used with the old logging level system which is no longer
being used.
2021-07-04 16:42:19 +10:00
David Reid
69773353db
API CHANGE: Remove MA_LOG_LEVEL_VERBOSE.
...
This has been replaced with MA_LOG_LEVEL_DEBUG.
2021-07-04 16:41:19 +10:00
David Reid
ba0b70e56e
API CHANGE: Remove the old logging callback.
...
This was specific to devices, but now that miniaudio has expanded it's
no longer useful. The new logging system is more generic and useable by
parts outside of devices and contexts.
2021-07-04 16:40:09 +10:00