Commit Graph

12 Commits

Author SHA1 Message Date
David Reid 54adbc3dfc Fix a possible infinite loop. 2020-06-01 18:03:43 +10:00
David Reid 32e240d4ec Fix a bug when mixing a data source. 2020-06-01 01:05:01 +10:00
David Reid f4b0b271cd More work on the new engine API.
* Initial work on infrastructure for spatialization, panning and
    pitch shifting.
  * Add ma_engine_sound_set_pitch()

Spatialization and panning is not yet implemented, but pitch shifting
should now be working.
2020-05-31 23:14:59 +10:00
David Reid 3a62d44959 Work on changes to the effect API. 2020-05-31 07:03:14 +10:00
David Reid e2b37b5d6d Fix some warnings reported by GCC. 2020-05-30 13:40:02 +10:00
David Reid fda0c07626 Update ma_mixer_mix_data_source() return value.
This change makes it so MA_AT_END is returned when a non-looping data
source reaches the end. This is how the caller can know to do clean up
or whatnot.
2020-05-30 13:01:56 +10:00
David Reid 0d691012d6 Add support for effects when mixing memory mapped data sources. 2020-05-28 16:18:16 +10:00
David Reid 783aef728e Updates to the mixer API.
* Add support for volume control to ma_mixer_mix_*().
  * Add support for specifying an effect to apply before mixing.
  * Add optimized pipeline for memory mappable data sources.
  * Remove some unnecessary functions:
    - ma_mixer_mix_pcm_frames_ex()
    - ma_mixer_mix_callbacks()
    - ma_mixer_mix_decoder()
    - ma_mixer_mix_audio_buffer()
    - ma_mixer_mix_waveform()
    - ma_mixer_mix_noise()
    - ma_mixer_mix_rb_ex()
2020-05-27 22:58:22 +10:00
David Reid 51fea1b1bd Fix some warnings in ma_mixing.h. 2020-05-27 17:43:08 +10:00
David Reid c530416acc Minor update to ma_mixer. 2020-05-25 22:45:40 +10:00
David Reid ea3f7f511e Add ma_audio_buffer API.
The ma_audio_buffer object is used for storing raw audio data in memory
and reading from it like any other data source. It supports flexible
memory management, reading, seeking, memory mapping and looping.

See documentation under "Audio Buffers" for a detailed description.
2020-05-23 17:07:19 +10:00
David Reid 6d574e25b2 Initial commit of the new mixing API. 2020-05-10 20:55:08 +10:00