David Reid
e386435af9
WASAPI: Fix a possible memory access bug.
...
The issue here is that it's possible for miniaudio to attempt to access
data from a WAVEFORMATEXTENSIBLE structure when the object is actually
only a WAVEFORMATEX structure which is smaller which can therefore
result in trying to access unallocated memory.
Public issue https://github.com/mackron/miniaudio/issues/660
2023-04-20 08:23:02 +10:00
David Reid
0d78b28f56
Update change history.
2023-04-19 08:35:07 +10:00
David Reid
12fa73db2a
Fix an error when initializing a duplex device on some backends.
...
Public issue https://github.com/mackron/miniaudio/issues/659
2023-04-19 08:16:33 +10:00
David Reid
f068a7934c
Have ma_sound_init_copy() inherit volume smoothing settings.
2023-04-08 09:28:58 +10:00
David Reid
713093d67d
Add support for setting the default volume smooth time for sounds.
...
This is set via the engine config.
2023-04-08 09:26:57 +10:00
David Reid
3769393b85
Update change history.
2023-04-07 18:09:38 +10:00
David Reid
23345b47e8
Add support for volume smoothing to sounds.
...
Smoothing is disabled by default. To enable it, you must use
ma_sound_init_ex() and configure it via the volumeSmoothTimeInPCMFrames
member of ma_sound_config.
This commit also fixes a bug where ma_gainer is not properly applying
smoothing.
2023-04-07 17:34:33 +10:00
David Reid
9a7663496f
Version 0.11.14
2023-03-29 07:52:40 +10:00
David Reid
249c7386ae
PulseAudio: Use the channel map used when initializing the PA stream.
...
This is an attempt to work around an issue with PipeWire.
2023-03-28 19:53:21 +10:00
David Reid
2ce573d0d6
Try fixing a channel mapping related error with PipeWire.
2023-03-28 18:07:46 +10:00
David Reid
21cf0e38a8
Simply some platform detection macros.
2023-03-28 13:30:50 +10:00
David Reid
2944461a88
Fix compilation on Haiku.
2023-03-28 12:50:40 +10:00
David Reid
6ada2501e8
Update some flags to prevent some conflicts.
2023-03-27 09:52:25 +10:00
David Reid
bf90b04a3f
Try fixing a compilation error with MA_NO_DEVICE_IO.
...
Public issue https://github.com/mackron/miniaudio/issues/652
2023-03-26 19:23:28 +10:00
David Reid
15aa776955
Minor code rearrangement in preparation for some updates.
2023-03-26 18:42:50 +10:00
David Reid
4cd066807b
Add an example for high- and low-level interop.
...
This example captures data from the microphone using the low-level API
and then plays back the data through the engine. The intermediary data
source is a ring buffer.
2023-03-25 12:08:11 +10:00
David Reid
8ce4857bcd
Add support for using ma_pcm_rb as a data source.
2023-03-25 12:05:28 +10:00
David Reid
025afa464a
Update dr_wav and c89atomic.
2023-03-25 10:23:49 +10:00
David Reid
58855d3d34
Fix some pedantic warnings when compiling with GCC.
2023-03-25 09:10:28 +10:00
David Reid
315087be30
Add MA_THREAD_DEFAULT_STACK_SIZE for threads.
2023-03-25 08:16:20 +10:00
David Reid
5fc5c4d4ed
Add new functions for getting and setting the engine's global time.
...
* ma_engine_get_time_in_pcm_frames() (replaces ma_engine_get_time())
* ma_engine_get_time_in_milliseconds()
* ma_engine_set_time_in_pcm_frames() (replaces ma_engine_set_time())
* ma_engine_set_time_in_milliseconds()
These changes are consistent with the naming of other time based
functions, eliminates ambiguity and just makes it clearer as to what
you're working with.
ma_engine_get_time() and ma_engine_set_time() have been deprecated.
2023-03-24 13:19:03 +10:00
David Reid
d63a3894ad
Typo.
2023-03-23 20:11:57 +10:00
David Reid
6b4f356b02
Update change history.
2023-03-23 10:46:15 +10:00
David Reid
e1a3abe9e7
Fix a bug with ma_vfs_read().
...
This is not pre-initializing the variable that receives the number of
bytes read to 0 which can result in custom VFS implementations
returning an invalid value if they return early from an error or
whatnot.
2023-03-23 10:43:56 +10:00
David Reid
fb9c18c705
Version 0.11.13
2023-03-23 07:33:23 +10:00
David Reid
7f077a1cd7
Update revision history.
2023-03-21 17:32:45 +10:00
David Reid
4c199f9164
Fix some compilation errors with the C++ build.
2023-03-21 13:56:43 +10:00
David Reid
c5f47fe7f1
Fix a compilation error when WASAPI is disabled.
2023-03-21 11:01:41 +10:00
David Reid
206be60612
Update revision history.
2023-03-21 09:58:32 +10:00
David Reid
6d71ce4121
Fix compilation errors with WIN32_LEAN_AND_MEAN.
...
Public issue https://github.com/mackron/miniaudio/discussions/647
2023-03-21 09:53:24 +10:00
David Reid
0433ac9eca
Fix some warnings.
2023-03-21 09:25:26 +10:00
David Reid
0a19c74417
Version 0.11.12
2023-03-19 20:58:13 +10:00
David Reid
17744f69c2
audio4: Try improving default channel and sample rate detection.
2023-03-19 20:07:05 +10:00
David Reid
f9807bee71
Fix a bug with the DirectSound backend.
2023-03-18 21:41:07 +10:00
David Reid
d027845659
Update copyright dates.
2023-03-18 16:29:38 +10:00
David Reid
0b9b382a53
Get DirectSound and WinMM backends compiling with Cosmopolitan.
...
Note that this does not currently work at runtime.
2023-03-18 12:39:56 +10:00
David Reid
9d3b59f0a9
Fix compilation errors with the WASAPI backend for Cosmopolitan.
2023-03-18 11:54:44 +10:00
David Reid
18b4ac2433
Fix Windows/Cosmopolitan build.
2023-03-18 10:03:54 +10:00
David Reid
f192b25eb7
Remove some code duplication.
2023-03-18 09:56:29 +10:00
David Reid
ef0aa3c949
Rearrange some code.
2023-03-18 09:52:09 +10:00
David Reid
9bb3467b74
Revert an accidental change.
2023-03-18 09:30:13 +10:00
David Reid
a65191f418
Code cleanup.
...
The Cosmopolitan-specific windows.h stuff has now been moved to an
external file in the extras folder:
extras/cosmopolitan/include/windows.h
To compile with Cosmpolitan it is now required that you add the above
path to the command line when compiling.
2023-03-18 09:28:55 +10:00
David Reid
ff6592be45
Remove the Windows-specific default memcpy(), malloc(), etc.
2023-03-18 08:58:55 +10:00
David Reid
ba58c9bf47
Some code cleanup.
2023-03-18 08:53:16 +10:00
David Reid
90dff7fd1d
More Windows/Cosmopolitan work.
2023-03-18 08:33:11 +10:00
David Reid
774583c90e
More work on the Windows Cosmopolitan build.
...
The Windows build now compilers with this commit.
2023-03-18 07:42:23 +10:00
David Reid
644f731285
Some experimental work with Cosmopolitan for the Windows build.
...
This is just an experiment. Cosmopolitan is not officially being
supported.
The Windows build does not compile with this commit.
2023-03-18 07:24:08 +10:00
David Reid
3edaebf507
Fix a padding related error with WAVEFORMATEX.
2023-03-17 17:31:15 +10:00
David Reid
44735d4501
Just some placeholder Cosmopolitan stuff.
2023-03-17 16:53:21 +10:00
David Reid
1f4dc5c251
Add early experimental support for Cosmopolitan.
...
Public issue https://github.com/mackron/miniaudio/issues/495
2023-03-17 16:09:06 +10:00