David Reid
d594b07e6d
API CHANGE: Remove ma_src.
...
Resampling is now done through the ma_resampler API.
Note that with this commit the old sinc resampler has been removed
because it never worked properly and is going to replaced with a better
solution in the future. If you were using ma_src_algorithm_sinc you
should consider using ma_src_algorithm_linear with the linear.lpfCount
config variable set to MA_MAX_RESAMPLER_LPF_FILTERS.
2020-02-02 13:29:03 +10:00
David Reid
d92681c4bb
Update project files.
2020-02-02 13:24:52 +10:00
David Reid
31f45081d0
Update emscripten tests build script.
2020-02-02 13:19:39 +10:00
David Reid
205e1b8725
API CHANGE: Remove ma_pcm_converter.
...
This has been replaced with ma_data_converter.
2020-02-02 13:19:10 +10:00
David Reid
64707cf432
API CHANGE: Refactor ma_convert_frames() and ma_convert_frames_ex().
...
For safety, ma_convert_frames() has an additional parameter called
frameCountOut which is the capacity of the output buffer. In addition,
the frameCountIn parameter has been moved next to the pIn parameter.
ma_convert_frames_ex() has been changed to take a pointer to a
ma_data_converter_config object. This provides more flexibility as to
the input and output formats. In addition, the frameCountOut parameter
has been added which has the same meaning as ma_convert_frames().
2020-02-02 13:16:14 +10:00
David Reid
6cdd4c81fb
Integrate the new data converter into capture devices.
2020-02-02 11:54:22 +10:00
David Reid
9b34e686d5
Integrate the new data converter into playback devices.
2020-02-01 20:58:12 +10:00
David Reid
b7efd842e1
Explicitly disable dynamic sample rate conversion for decoders.
2020-02-01 11:29:53 +10:00
David Reid
5974dd6375
Remove old research code.
...
This code has now been integrated into miniaudio.h.
2020-02-01 11:23:43 +10:00
David Reid
bbe7ff9e2b
Integrate the new data converter into the decoding API.
2020-02-01 11:22:03 +10:00
David Reid
e90a2a8216
Change parameter order of biquad coefficients.
...
This is more intuitive because it puts the numerator coefficients
before the denominator coefficients.
2020-02-01 07:52:32 +10:00
David Reid
74844074f8
Add code for the new data conversion pipeline.
...
With this commit, nothing is wired up with the new code. This will be
coming in the next commits.
2020-02-01 07:40:45 +10:00
David Reid
4b163e7c3e
Make a macro safer.
2020-02-01 07:03:18 +10:00
David Reid
826839eb33
HTTP to HTTPS.
2020-01-31 21:38:39 +10:00
David Reid
323d7a69a1
Hide a biquad implementation detail.
2020-01-31 21:33:35 +10:00
David Reid
48086c7081
Update dr_flac.
2020-01-31 18:40:09 +10:00
David Reid
ab518977ec
Remove unnecessary casts.
2020-01-30 21:25:50 +10:00
David Reid
96f747d3f3
Don't allow format and channels to change for biquad and LPF filters.
...
Previously this would result in a glitch, however in the interest of
avoiding as many sources of glitching as possible, changing the format
and/or channel count of a biquad filter (and by extension, anything
derived from it, such as low-pass filters) will now result in an error.
2020-01-30 21:23:21 +10:00
David Reid
cdb7bed14e
Fix a null pointer dereference.
2020-01-30 19:14:10 +10:00
David Reid
d0b82d3c3c
Try fixing a potential thread safety issue.
2020-01-30 19:08:56 +10:00
David Reid
9dbcc39c6e
Update biquad documentation.
2020-01-29 19:01:04 +10:00
David Reid
c8b6fdaf2c
Use fixed point arithmetic with s16 biquads.
2020-01-29 18:50:50 +10:00
David Reid
02df9b2e9a
Update dr_wav, dr_flac and dr_mp3.
2020-01-29 18:00:12 +10:00
David Reid
68b960215f
Update old comments.
2020-01-28 22:03:47 +10:00
David Reid
b9c2509d78
Fix an overflow bug in the s16 biquad pipeline.
2020-01-28 21:54:15 +10:00
David Reid
040dcf8d2c
Add documentation for low-pass filters.
2020-01-28 21:49:33 +10:00
David Reid
b97c6fd35b
Remove the old direct form 1 biquad code.
2020-01-28 21:19:14 +10:00
David Reid
8a44789840
Remove the unnecessary config member from ma_lpf.
...
This is never actually used internally and saves a bit of memory.
2020-01-28 20:42:59 +10:00
David Reid
42095a3e5a
Add documentation for biquads.
2020-01-28 20:41:41 +10:00
David Reid
e525d457c9
Change biquad filter to use transposed direct form 2.
...
This change reduces memory usage by removing half the number of delay
registers.
This commit also sets up some infrastructure for future work on a fixed
point implementation. Both the floating and fixed point implementations
will run on a 32-bit pipeline for now.
2020-01-28 20:14:55 +10:00
David Reid
eedb7d3200
Add some documentation for channel conversion.
2020-01-27 20:17:01 +10:00
David Reid
d37b23a729
Bug fixes to the new data converter.
2020-01-27 18:30:49 +10:00
David Reid
741edb82de
Add some new APIs.
...
* ma_convert_pcm_frames()
* ma_sine_wave_read_pcm_frames()
2020-01-27 18:18:24 +10:00
David Reid
5d3ed8687e
Bug fixes to the linear resampler.
...
This changes the the lpfCutoffFrequency config variable from a uint32
to a double. This is required because we simplify the sample rate
fraction which cant result in cases where the cutoff frequency is too
aggressively rounded down due to dividing tiny integers.
2020-01-27 18:12:25 +10:00
David Reid
4f5eb2f8a1
Finish initial work on the new data converter.
2020-01-27 09:08:15 +10:00
David Reid
b546607332
Begin work on integration of the new channel converter.
2020-01-26 19:01:43 +10:00
David Reid
cbcf6f6cf3
Early work on new channel converter.
2020-01-26 18:37:10 +10:00
David Reid
5aff4af6a7
Update gitignore.
2020-01-26 16:42:56 +10:00
David Reid
68dc797469
Add early work on new data converter.
2020-01-26 16:42:27 +10:00
David Reid
d27678a277
Fix bug in ma_linear_resampler_get_required_input_frame_count().
2020-01-26 11:53:12 +10:00
David Reid
4241b9f6ae
Add ma_linear_resampler_set_rate_ratio().
2020-01-26 11:28:33 +10:00
David Reid
ed6ad79e24
Don't use generic seeking with the linear resampler.
2020-01-26 11:24:02 +10:00
David Reid
f704b62767
Update resampling documentation.
2020-01-26 11:21:09 +10:00
David Reid
a633e0f51f
Remove unused functions.
2020-01-26 09:55:10 +10:00
David Reid
01c41ed329
Add support for passing in NULL for input frames for linear resampler.
...
This is equivalent to passing in zeroes.
2020-01-26 09:19:24 +10:00
David Reid
b092720bf3
Integrate the new linear resampler.
2020-01-26 09:05:50 +10:00
David Reid
13a5512879
Work in progress on the linear resampler.
2020-01-26 08:51:53 +10:00
David Reid
834a604df9
Remove some out of date documentation.
2020-01-23 22:06:06 +10:00
David Reid
fc9026eadf
Fix potential crash when ma_device not aligned to MA_SIMD_ALIGNMENT.
...
Public issue https://github.com/dr-soft/miniaudio/issues/128
2020-01-23 18:47:17 +10:00
David Reid
811e438d1b
Add support for reinitialization of low-pass and biquad filters.
2020-01-20 19:01:42 +10:00