- 07 Jun, 2020 4 commits
-
-
David Reid authored
-
David Reid authored
* Implement the notion of a virtual file system (VFS) which is used by the resource manager for loading sound files. The idea is that the application can implement these to support loading from custom packages, archives, etc. * Add a helper API for decoding a file from a VFS and a file name. * Add some symbols representing allocation types. These are not currently used, but I've added them in preparation for changes to the allocation callbacks. The idea is that an allocation type will be passed to the callbacks to give the allocator better intel as to what it's allocating which will give it a chance to optimize. * Add some placeholders for flags for controlling how to load a data source. Currently only MA_DATA_SOURCE_FLAG_DECODE is implemented which is used to indicate to the resource manager that it should store the decoded contents of the sound file in memory rather than the raw (encoded) file data. * Support has been added to the resource manager to load audio data into memory rather than naively reading straight from disk. This eliminates file IO from the audio thread, but comes at the expense of extra memory usage. Support for streaming is not implemented as of this commit. Early (largely untested) work has been implemented to avoid loading sound files multiple times. This is a simple ref count system for now, with hashed files paths being used for the key into a binary search tree. The BST is not fully tested and likely has bugs which will be ironed out in future commits. * Support has been added for configuring the stereo pan effect. Most audio engines use a simple balancing technique to implement the pan effect, but a true pan should "move" one side to the other rather than just simply making one side quieter. With this commit, the ma_panner effect can support both modes. The default mode will be set to ma_pan_mode_balance which is just a simple balancing and is consistent with most other audio engines. A true pan can be used by setting the mode to ma_pan_mode_pan. -
David Reid authored
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.
-
David Reid authored
-
- 06 Jun, 2020 1 commit
-
-
David Reid authored
This changes makes ma_copy_pcm_frames() a no-op when the input and output buffers are both set to the same pointer. This is useful for some in-place no-ops for effects and filters.
-
- 03 Jun, 2020 5 commits
-
-
David Reid authored
-
David Reid authored
This may be changed back to a first order LPF later on.
-
David Reid authored
-
David Reid authored
This is required so we can do different spatialization logic depending on the channel count of the audio source.
-
David Reid authored
-
- 01 Jun, 2020 6 commits
-
-
David Reid authored
-
David Reid authored
-
David Reid authored
There is a bug that's causing glitches which appears to be something to do with the second order LPF.
-
David Reid authored
This was affecting the stability of the internal low pass filters.
-
David Reid authored
-
David Reid authored
This bug is happening due to the internal timer not being adjusted to match the new sample rate.
-
- 31 May, 2020 5 commits
-
-
David Reid authored
-
David Reid authored
-
David Reid authored
This currently only supports f32, but support for more formats will be coming soon.
-
David Reid authored
* 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. -
David Reid authored
-
- 30 May, 2020 7 commits
-
-
David Reid authored
* The engine will now auto-start by default. This can be changed in the config by setting `noAutoStart` to true. * Initial implementation of ma_engine_play_sound() which can be used for fire-and-forget playback of sounds. * Add ma_engine_sound_at_end() for querying whether or not a sound has reached the end. The at-end flag is set atomically and locklessly in the mixing thread. -
David Reid authored
-
David Reid authored
-
David Reid authored
-
David Reid authored
-
David Reid authored
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.
-
David Reid authored
-
- 29 May, 2020 6 commits
-
-
David Reid authored
-
David Reid authored
-
David Reid authored
Updated APIs: * ma_data_source_read_pcm_frames() * ma_data_source_seek_pcm_frames()
-
David Reid authored
-
David Reid authored
This commit also explicitly defines ma_data_source_read_pcm_frames() as supporting an output buffer of NULL in which case a forward seek should be performed.
-
David Reid authored
This will cause a forward seek to occur instead of a read when calling ma_decoder_read_pcm_frames() with the output buffer set to NULL.
-
- 28 May, 2020 3 commits
-
-
David Reid authored
-
David Reid authored
-
David Reid authored
-
- 27 May, 2020 3 commits
-
-
David Reid authored
* 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() -
David Reid authored
-
David Reid authored
-