Commit Graph

496 Commits

Author SHA1 Message Date
David Reid 6894d10d78 Warning fixes. 2020-01-19 11:18:22 +10:00
David Reid 31086c5de9 Fix bugs in ma_resampler_get_required_input_frame_count(). 2020-01-19 11:12:35 +10:00
David Reid 5df3c0ce15 SRC: Add APIs for querying required input and expected output frames.
* ma_resampler_get_required_input_frame_count()
  * ma_resampler_get_expected_output_frame_count()

These have not yet been implemented for the Speex backend.

This commit also adds an APIs for setting changing the rate:

  * ma_resampler_set_rate()
  * ma_resampler_set_rate_ratio()
2020-01-19 08:15:47 +10:00
David Reid 8fabcc44d8 Add support for passing in null for the input buffer to the resampler. 2020-01-18 18:44:35 +10:00
David Reid 6817dc84f8 Rearrange some function parameters. 2020-01-18 17:46:51 +10:00
David Reid f22ad84986 Add ma_resampler_uninit(). 2020-01-18 17:37:55 +10:00
David Reid 7b27cda74a Add support for s16 format to biquad and low-pass filters. 2020-01-18 17:23:36 +10:00
David Reid 705e54c69a Add support for s16 format to the linear resampler. 2020-01-18 17:12:30 +10:00
David Reid 1449edf49f Add support for the Speex resampler. 2020-01-18 16:38:22 +10:00
David Reid 7d37789418 Resampling and LPF work. 2020-01-18 14:36:12 +10:00
David Reid 11d752ad78 Untested work in progress on the improved resampler. 2020-01-14 21:50:01 +10:00
David Reid 2b526f6945 Add experimental code for biquad and low-pass filters. 2020-01-09 11:27:57 +10:00
David Reid e8e048c965 Random resampler WIP experiments. 2019-12-01 08:45:22 +10:00
David Reid 98792caeaa Resampling testing. 2019-10-19 07:40:46 +10:00
David Reid 3e825396c1 Random resampler work. 2019-08-17 11:01:53 +10:00
David Reid d289e5cf6f Sketch out an API idea for the new resampler. 2019-05-09 19:10:28 +10:00
David Reid ceb81f60e4 Rename files from "mal" to "ma". 2019-03-06 21:01:51 +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 3a58e3a1d0 Fix resampling tests. 2019-03-06 19:29:57 +10:00
David Reid 66412f8937 Add some notes for the new resampler. 2019-02-24 13:28:04 +10:00
David Reid 198b844d8b Add mal_pcm_rb to the ring buffer research code.
This is the same as the normal ring buffer except everything is done in
terms of PCM frames instead of bytes. This is useful to simplify the
case of using the ring buffer for storing PCM audio data.
2019-02-21 17:55:35 +10:00
David Reid 7a2a2a404b Misc. updates to the new resampler. 2018-12-22 10:29:21 +10:00
David Reid 666f39c93f Initial work on a basic test program for the resampler.
This test will be replaced later with something better.
2018-12-10 20:56:30 +10:00
David Reid c8ba70cc35 Bug fixes for the new resampler. 2018-12-10 20:50:21 +10:00
David Reid 3fd31f29c1 Add quick and dirty s16 read implementations for the resampler. 2018-12-09 10:11:20 +10:00
David Reid 1a2445e887 Bug fixes for the new resampler. 2018-12-09 09:36:59 +10:00
David Reid b390ef9826 Add untested support for interleaved streams to the new resampler. 2018-12-09 08:04:01 +10:00
David Reid 54ee487972 Minor tweaks to the resampler. 2018-12-08 10:44:02 +10:00
David Reid 621b68a2a6 Inline a few APIs for the new resampler. 2018-12-08 09:52:19 +10:00
David Reid 24c059acaf Finish initial untested work on mal_resampler_read().
This does not yet implement the filter backends. It only does the data
retrieval and buffer management part of it.
2018-12-08 09:44:51 +10:00
David Reid 4d58137e31 Miscellaneous work on the new resampler.
The requirement for pointers to be aligned to MAL_SIMD_ALIGNMENT has
been dropped because it is adding too many complications to the
implementation.
2018-12-08 07:07:43 +10:00
David Reid 6e72abd445 Restrict resampling ratio to reasonable limits. 2018-11-25 10:07:27 +10:00
David Reid 34d88af652 Remove the passthrough algorithm from the resampler.
The rationale for this is that it's just useless - just not do
resampling at all if you don't need to!
2018-11-25 09:52:05 +10:00
David Reid e84283803b More prototyping work on the new resampler. 2018-11-25 09:48:24 +10:00
David Reid ad488a10f8 Fix warnings with the new resampler. 2018-11-24 15:33:42 +10:00
David Reid 5969348d44 Misc. work on the resampler. 2018-11-24 15:05:05 +10:00
David Reid cdd36c674f Rename a define. 2018-11-21 21:19:56 +10:00
David Reid 86a021bf5d Resampler: Make a distinction between frame counts and time.
This commit also simplifies a few APIs with respect to how the
fractional component is handled.
2018-11-21 20:30:15 +10:00
David Reid 26e9721077 Add early work on a new experimental resampler. 2018-11-18 14:33:23 +10:00
David Reid e511458e33 Inline some functions and clean up. 2018-08-28 18:50:23 +10:00
David Reid a2954dc13d Remove unnecessary volatile qualifiers. 2018-08-28 18:22:05 +10:00
David Reid ce5ab2c17e Thread safety experiments. 2018-08-26 19:00:36 +10:00
David Reid 36ec24cda6 Add experimental ring buffer implementation. 2018-08-26 18:25:25 +10:00