Commit Graph

17 Commits

Author SHA1 Message Date
David Reid 83178a1dfc Fix a buffer overflow in the mixer. 2020-07-23 09:44:20 +10:00
David Reid 681d26a557 Fix bugs in the resource manager. 2020-07-22 20:22:44 +10:00
David Reid 4b6c8f555b Add support for configuring thread stack sizes and fix GCC errors.
The thread priority can be set via ma_thread_create() and can be set in
the context config along side the thread priority for configuring the
size of the stack for the audio thread.
2020-06-14 19:27:02 +10:00
David Reid 8734e8f578 Work in progress on the new high level API.
* Early work on asynchronously decoding into a memory buffer. This is
    just an early implementation - there are still issues needing to be
    figured out. In particular, sounds do not automatically start until
    the entire file has been decoded. It would be good if they could
    start as soon as the first second or so of data has been decoded.
2020-06-10 22:07:16 +10:00
David Reid 99fea233e8 Fix a bug when mixing a data source using mmap mode.
This was causing mmaped data sources to not loop if they coincidentally
reached the end at the same time as the final output frame was written.
2020-06-07 11:51:59 +10:00
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