Commit Graph

3956 Commits

Author SHA1 Message Date
David Reid 8e6283aa31 Fix a warning. 2026-01-17 09:34:34 +10:00
David Reid d0b98eee6b Update change history. 2026-01-17 09:25:06 +10:00
David Reid 74912d525b Add SECURITY.md 2026-01-17 08:58:02 +10:00
Richard Keller a551f0e70b Free pa_context if connecting to PulseAudio fails. 2026-01-17 08:50:10 +10:00
David Reid 7dae981ad5 Add some helpers for resetting a sound after a fade and stop.
Public issue https://github.com/mackron/miniaudio/issues/714
2026-01-17 07:32:18 +10:00
David Reid 88776cedb7 Whitespace. 2026-01-10 08:49:12 +10:00
spevnev e00cee2af1 Cast tv_sec to 64-bit int before converting 2026-01-10 08:47:03 +10:00
David Reid 5ef2e1ec57 Update fs. 2026-01-07 18:19:59 +10:00
David Reid ee8a65bed9 Update dr_libs. 2026-01-07 18:13:08 +10:00
David Reid 44b847fbf8 Update fs. 2026-01-07 18:10:39 +10:00
David Reid 5f3de510b2 Make ma_is_spatial_channel_position() a bit more robust.
This makes it less error prone when new channel positions are added to
the enum.
2026-01-07 12:36:18 +10:00
David Reid 53116ad6da Minor change to an enum to make it less error prone. 2026-01-07 12:31:03 +10:00
David Reid b83869eb09 Update the spatializer to require a listener when processing. 2026-01-07 12:24:30 +10:00
David Reid bedfd053cb Fix a bug in the gainer where a null pointer can be offset. 2026-01-07 12:13:18 +10:00
David Reid 32cc6d53cd Fix a possible null pointer dereference. 2026-01-07 12:08:20 +10:00
David Reid bd26454c26 Fix a possible null pointer dereference. 2026-01-07 12:07:25 +10:00
David Reid d791c16d8d Remove some redundant error checks. 2026-01-07 12:05:57 +10:00
David Reid 8c4535c6c5 Fix a bug with sound node processing. 2026-01-07 10:33:13 +10:00
David Reid 27d2d6ac87 Add support for custom resamplers to sounds.
Public issue https://github.com/mackron/miniaudio/issues/965
2026-01-06 19:25:32 +10:00
David Reid 919a01ae4a Use ma_resampler instead of ma_linear_resampler for sound nodes.
This is infrastructure work for supporting custom resamplers for the
pitching and Doppler effects for sounds.

Public issue https://github.com/mackron/miniaudio/issues/965
2026-01-06 18:37:05 +10:00
David Reid 065e6eadb5 Minor code rearrangement. 2026-01-06 18:18:16 +10:00
caturria 962d11b4ce Resource manager can now have a custom resampler. 2026-01-06 18:13:57 +10:00
David Reid b62249ceaf Fix an infinite loop bug. 2026-01-06 16:29:42 +10:00
David Reid 525b04db04 Make ma_sound node processing a bit more robust.
This removes the dependency on querying the required input frame count
from the resampler. This should in turn enable future work to support
custom resamplers.

Public issue https://github.com/mackron/miniaudio/issues/965
2026-01-06 16:11:35 +10:00
David Reid e93e1dbba1 Set up some infrastructure for improvements to ma_sound processing. 2026-01-06 15:15:43 +10:00
David Reid 111d620c63 Fix some node timing errors.
This commit fixes a bug relating to nodes with a scheduled start/stop
time. Whether or not the node is considered started or stopped is being
incorrectly reported by `ma_node_get_state_by_time_range()`.

Another issue is fixed in `ma_node_read_pcm_frames()`, which is related
to the fix above, where the frame count can underflow thereby resulting
in a crash.

Public issue https://github.com/mackron/miniaudio/issues/969
2026-01-06 13:05:40 +10:00
David Reid 3b4e87848b Fix a typo. 2026-01-06 10:11:16 +10:00
David Reid 35acd7a65b Relocate the sound end callback to after the sound is stopped.
Public issue https://github.com/mackron/miniaudio/issues/1013
2026-01-06 10:05:36 +10:00
David Reid 92fb865387 Update some comments. 2026-01-06 08:06:49 +10:00
François Hautier c44ec3f46a Better comment 2026-01-06 07:56:41 +10:00
François Hautier 8c3b213a7c WebAudio: Try to fix a startup noise 2026-01-06 07:56:41 +10:00
David Reid 88797e9dee Fix a double-uninit error with decoders.
Public issue https://github.com/mackron/miniaudio/issues/1080
2026-01-04 15:03:47 +10:00
David Reid ad85d0c3c4 Update dr_libs. 2026-01-04 14:37:14 +10:00
David Reid 364844231d Fix an bug with error recovery when failing to initialize a decoder.
Public issue https://github.com/mackron/miniaudio/issues/1080
2025-12-23 19:04:53 +10:00
David Reid 9ea38e9f3a Update dr_wav and dr_flac. 2025-12-14 06:38:32 +10:00
David Reid af19bdb6ff Fix a bug where MA_NO_DECODING would disable the WAV encoder.
Public issue https://github.com/mackron/miniaudio/issues/1076
2025-12-13 17:26:06 +10:00
Marty f513f462df cmake: add public include directories for extra decoders
It seems that when linking, for example, `miniaudio_libvorbis`, it doesn't add the necessary include directories for use in the project. This is because the include directories were not being added to the target at all.

Here, I fix that by adding them with PUBLIC scope.
2025-12-12 19:12:13 +10:00
David Reid 8c1dc255db Remove Cosmopolitan pre-processing checks.
https://github.com/mackron/miniaudio/pull/1070
2025-11-30 05:39:49 +10:00
David Delassus dbf8e114f9 CMake: make install directives optional 2025-11-29 14:42:38 +10:00
Louis du Verdier 6d65be5e0e Do not set POSIX thread scheduler policy on systems reporting that they do not support it 2025-11-29 14:20:45 +10:00
Kjetil Berg 6a895501cf Fix: exclude Emscripten from ALSA support check on Linux 2025-11-29 08:58:30 +10:00
David Reid 787318fd8f Update dr_wav and dr_mp3. 2025-11-29 08:36:33 +10:00
David Reid 4a8467852a Fix a shadow declaration warning.
Public issue https://github.com/mackron/miniaudio/issues/1059
2025-11-29 08:34:40 +10:00
David Reid 80cf7b2deb Update dr_flac.
Public issue https://github.com/mackron/miniaudio/issues/1050
2025-09-28 08:10:20 +10:00
David Reid 2db0984566 Fix a possible crash in the resource manager.
This code was prematurely freeing a data buffer node which was resulting
in a dereference of an invalid pointer.
2025-09-27 12:34:21 +10:00
David Reid 669ed3e844 Update dr_mp3. 2025-09-24 16:04:56 +10:00
David Reid 81410769ae Update c89atomic.
There was a stray line continuation in a macro which was resulting in an
error with MSVC.
2025-09-19 13:03:10 +10:00
David Reid ffe558437f Update change history. 2025-09-19 12:47:58 +10:00
David Reid 089f041120 Update c89atomic.
Public issue https://github.com/mackron/miniaudio/issues/1045
2025-09-19 12:46:50 +10:00
David Reid 2e02046c6d Update dr_libs. 2025-09-19 12:45:59 +10:00