Commit Graph

3399 Commits

Author SHA1 Message Date
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
David Reid 4da843bab6 Remove a dependency on a system header and change alignas to _Alignas. 2023-03-17 15:38:07 +10:00
David Reid f06a75787b Fix a typo. 2023-03-17 12:35:24 +10:00
David Reid 8489a86e26 Update documentation. 2023-03-17 12:15:35 +10:00
David Reid 695e750c34 Add support for callback notifications when a sound reaches the end. 2023-03-17 12:05:56 +10:00
David Reid 6f5c86070e Add a configuration option to spatializers. 2023-03-17 10:53:28 +10:00
David Reid 6d9379f6f5 Try getting sample exact seeking working with stb_vorbis. 2023-03-17 10:11:17 +10:00
David Reid a8682c3602 Add support for configuring the stack size of resource manager threads. 2023-03-16 21:56:19 +10:00
David Reid 6132b5d4fe Update tests readme regarding the Emscripten build. 2023-03-16 12:29:15 +10:00
David Reid 7460d986f9 Merge branch 'dev' of https://github.com/mackron/miniaudio into dev 2023-03-11 09:14:01 +10:00
David Reid dc77ad0148 Fix compilation error when the resource manager is disabled. 2023-03-11 09:13:04 +10:00
Rizhen Zhang 25925a307a If a device a loopback device, consider dataflow as capture dataflow 2023-03-11 10:11:55 +11:00
Johan Mattsson 9ead8c2913 Fix potential index out of bounds 2023-03-06 10:15:47 +11:00
David Reid 750e83fbc1 Add support for callback notifications to ma_sound_init_ex().
Public issue https://github.com/mackron/miniaudio/discussions/637
2023-02-28 11:26:52 +10:00
David Reid dfcff26a26 Clean up some of the AudioWorklets code. 2023-02-28 11:26:18 +10:00
David Reid bfd66ab4d2 Add a very simple Emscripten-specific test.
This will be expanded on later to be a lot more complete.
2023-02-28 11:24:58 +10:00
David Reid 1f37940923 Minor improvement to the simple_playback_sine example. 2023-02-28 11:23:24 +10:00
David Reid a54b5eb04d Remove an invalid item from the change history. 2023-02-28 11:22:44 +10:00
David Reid b4deb4fce2 WebAudio: Clean up uninitialization. 2023-02-25 21:29:24 +10:00
David Reid 25885e4163 WebAudio: Add early experimental support for AudioWorklets.
Public issue https://github.com/mackron/miniaudio/issues/597.
2023-02-25 20:37:26 +10:00
David Reid a1b0ab98fd WebAudio: Fix error about missing _malloc() and _free() functions. 2023-02-25 08:19:04 +10:00
David Reid e2db423078 Fix a memcpy error. 2023-02-24 08:12:52 +10:00
David Reid bc393dbba8 Experimental workaround for an Android bug in AAudio. 2023-02-01 13:27:43 +10:00
David Reid 6720b51194 Merge branch 'dev' of https://github.com/mackron/miniaudio into dev 2023-01-23 12:56:47 +10:00
David Reid 2d998e37a4 Experimental support for passthrough nodes with zero inputs. 2023-01-23 12:56:32 +10:00
Kaisei Sunaga 49e69ac0ee fix tab 2023-01-21 08:31:58 +11:00
Kaisei Sunaga a3b6797da3 fix compilation error 2023-01-21 08:31:58 +11:00
kaisei.sunaga 7c6366d9c2 add AAudioStreamBuilder_setAllowedCapturePolicy 2023-01-21 08:31:58 +11:00
cdigit 6de98570f6 Update duplex_effect.c 2023-01-14 10:33:24 +11:00
David Reid 981e1ddac7 Fix an error in the documentation. 2023-01-12 14:31:09 +10:00
David Reid 324ebe2500 Update documentation. 2023-01-07 20:11:44 +10:00
David Reid e0a9bf1b69 Fix some invalid code in example. 2023-01-06 11:03:46 +10:00
David Reid 31e139668d Update readme. 2023-01-06 10:54:43 +10:00
David Reid 7ff8505d3b Update backends table. 2023-01-06 10:51:23 +10:00
David Reid 293d7a68c2 Minor code rearrangement. 2023-01-06 10:36:31 +10:00
SeanTolstoyevski d89717216e revert public api for ma_apply_volume_unclipped_f32 2023-01-06 11:31:39 +11:00
SeanTolstoyevski 512d7c6660 change to public api for ma_mix_pcm_frames_f32 & ma_apply_volume_unclipped_f32 2023-01-06 11:31:39 +11:00
David Reid 4bb8808bfb Remove an unnecessary restriction on splitters. 2023-01-05 09:37:39 +10:00
David Reid c371291510 Update change history. 2023-01-03 19:16:09 +10:00
David Reid 78897b3e95 Don't try using the DirectSound backend if not all APIs are available.
This affects Windows 95. It does not appear to have at least one of
these functions. This is convenient because the function
IDirectSound::CreateSoundBuffer() is failing in my tests and I wasn't
able to figure out what was going on. Simply failing context
initialization outright is an acceptable solution for now since
Windows 95 is such an uncommon target and it can always fall back to
WinMM which works.
2023-01-03 19:10:14 +10:00
David Reid fcdd14cd61 Fix crash when running on Windows 95.
It looks like CoInitializeEx() is not available on Windows 95. This
commit changes it so that if CoInitializeEx() cannot be found, such as
the case with Windows 95, it falls back to CoInitialize().

As of this commit, a crash still occurs when trying to initialize the
DirectSound backend. The WinMM backend works, however.
2023-01-03 18:28:25 +10:00
David Reid f648c9b298 Get playback working on Windows 98 with the DirectSound backend.
This change adds a fallback for when setting the format of the primary
buffer fails. I have observed this happening with floating point
formats so I've forced the use of integer PCM formats in the fallback
case. I've also restricted it to 44100 because when I tried 4800 on
my Windows 98 machine it resulted in incorrect output.
2023-01-03 16:16:39 +10:00