Commit Graph

3262 Commits

Author SHA1 Message Date
David Reid 3d4ab9d9f0 iOS: Try to improve the default session category. 2022-08-20 09:33:42 +10:00
David Reid 334ed4fee6 iOS: Stop forcing AVAudioSessionCategoryOptionDefaultToSpeaker.
This is being forced when ma_ios_session_category_default is specified.
2022-08-18 11:13:31 +10:00
David Reid 8f7943d828 Have PulseAudio use the requested sample rate when initializing device. 2022-08-16 14:31:05 +10:00
David Reid deb0e53a15 Try fixing a bug where it's possible for old audio data to be output.
Public issue https://github.com/mackron/miniaudio/issues/506
2022-08-11 17:05:07 +10:00
David Reid a549754b37 Fix SDK version detection for the Android build and AAudio. 2022-08-11 17:03:32 +10:00
David Reid 14817aeb9d WASAPI: Fix a bug where the device is not drained when stopped. 2022-08-11 14:50:37 +10:00
David Reid 18601c0831 Properly set the mono expansion mode on the engine node. 2022-08-11 12:07:55 +10:00
David Reid 8e73283255 Fix default mono expansion mode for sounds. 2022-08-11 11:47:12 +10:00
David Reid 296f3f55dd Add support for per-sound mono expansion modes. 2022-08-11 11:43:35 +10:00
David Reid 26e429ff3b Fix a possible crash when initializing a channel converter. 2022-08-11 10:28:51 +10:00
David Reid d2153bc8e8 Remove an unnecessary function declaration. 2022-08-11 10:05:14 +10:00
David Reid c9fc9f5548 Formatting. 2022-08-11 09:56:31 +10:00
Steven Noonan 1022e1c08f wasapi: implement support for avrt.dll thread characteristics API
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
2022-08-11 09:54:35 +10:00
David Reid 721863605e Minor style change. 2022-08-11 09:53:29 +10:00
Steven Noonan 5aee5d656a channel mapping: treat "simple" mix mode as a 1:1 mapping only mode
We already map the in:out 1:1 mappings above the switch statement, but
the code for "simple" mapping stomps on the mappings.

Also, even before that loop was added, mix mode "simple" did not
necessarily map to the same channel types you'd expect. For example, if
you have a 6-channel input and 8-channel output, you would get something
like this with "simple":

  Correct:  CHANNEL_FRONT_LEFT -> CHANNEL_FRONT_LEFT
  Correct:  CHANNEL_FRONT_RIGHT -> CHANNEL_FRONT_RIGHT
  Correct:  CHANNEL_FRONT_CENTER -> CHANNEL_FRONT_CENTER
  Correct:  CHANNEL_LFE -> CHANNEL_LFE
  Wrong:    CHANNEL_SIDE_LEFT -> CHANNEL_BACK_LEFT
  Wrong:    CHANNEL_SIDE_RIGHT -> CHANNEL_BACK_RIGHT

Instead of just assuming the input channel map is a truncation of the
output channel map and has channels in the same order, just keep the
existing 1:1 mappings and hope that's sufficient.

Signed-off-by: Steven Noonan <steven@uplinklabs.net>
2022-08-11 09:52:43 +10:00
David Reid 1a1bd8129b Add configuration option for calculating the output LFE channel.
This is disabled by default for backwards compatibility. Use the
`calculateLFEFromSpatialChannels` config option to enable this.
2022-08-11 09:52:27 +10:00
David Reid 8517b10079 Minor style changes. 2022-08-11 09:34:05 +10:00
Steven Noonan e327450d95 channel mapping: assign LFE channel weight
If the LFE channel exists in the output channel map but not the input
channel map, we would previously just give it a weight of 0, which
caused it to not be filled.

This gives LFE a weight of 1.0f/$NumberOfSpatialChannels and basically
makes it omnidirectional.

Signed-off-by: Steven Noonan <steven@uplinklabs.net>
2022-08-11 09:23:51 +10:00
David Reid 8f919e2beb Fix a channel mapping error where weights are calculated incorrectly.
The error here is that exactly-matching channels were not having a
weight calculated which resulted in them being silenced.

Public issue https://github.com/mackron/miniaudio/issues/480
2022-08-11 07:57:42 +10:00
Clownacy 2f0d8a4fa8 Fix an ANSI C incompatibility. 2022-08-05 08:11:19 +10:00
Zvicii 2fde0c695e fix: build error under msvc
Cast from 'void*' to pointer to non-'void' requires explicit type cast error under msvc compiler
2022-08-01 08:53:29 +10:00
jongwoon-100 32ca32ebff Fix some compile warnings in iOS 2022-07-28 10:57:54 +10:00
jongwoon-100 e099d66d0f Check api level when using backends of Android 2022-07-28 10:53:08 +10:00
jongwoon-100 3f3629517e Fix mismatched attributes of aaudio 2022-07-27 08:36:55 +10:00
David Reid c3521aeaec Fix logging with the C++ build.
Public issue https://github.com/mackron/miniaudio/issues/500
2022-07-21 10:48:58 +10:00
David Reid 6acc98c909 Update changes. 2022-07-20 11:32:40 +10:00
David Reid 71d4667646 Fix an unaligned access error.
Public issue https://github.com/mackron/miniaudio/issues/499
2022-07-20 10:22:58 +10:00
David Reid fee921e802 Add debug output for device channel maps. 2022-07-16 08:13:57 +10:00
David Reid 15bbd4ac54 Fix compilation error when compiling with MA_NO_DEVICE_IO. 2022-07-16 07:28:36 +10:00
David Reid ad1171b2f3 Fix an error when the channel mask reported by Windows is all zero.
Public issue https://github.com/mackron/miniaudio/issues/493
2022-07-16 07:21:07 +10:00
David Reid 513c436b1a WASAPI: Fix an incorrect format detection error.
Public issue https://github.com/mackron/miniaudio/issues/494
2022-07-07 15:52:55 +10:00
David Reid c94cf44534 Fix an documentation error. 2022-06-25 19:41:22 +10:00
David Reid f6e5cf10ae Fix a crash when initializing a channel converter.
Public issue https://github.com/mackron/miniaudio/issues/482
2022-06-25 18:11:17 +10:00
David Reid 0788be818b verblib: Try fixing an issue in stereo mode. 2022-06-25 18:04:40 +10:00
David Reid 431bea6cfb Add a comment about default backend priorities. 2022-06-22 17:50:32 +10:00
David Reid 702c1cb37d Another documentation fix. 2022-06-21 16:28:55 +10:00
David Reid 0416e85745 Fix an error in the documentation for noFixedSizedCallback.
Public issue https://github.com/mackron/miniaudio/issues/485
2022-06-21 16:18:03 +10:00
David Reid eb2563d8c0 Add missing compile time options to documentation. 2022-06-21 09:08:12 +10:00
David Reid 02c02990b0 Remove unused link from readme. 2022-06-21 08:21:17 +10:00
David Reid b6b3fbfb55 Update revision history and version number. 2022-06-12 17:55:24 +10:00
iarwain b196098fda Added notificationCallback to ma_engine_config 2022-06-12 17:50:12 +10:00
David Reid 80b9fa63ee Update stb_vorbis.
Pubic issue https://github.com/mackron/miniaudio/issues/469
2022-05-15 07:20:21 +10:00
David Reid 772970ff6a Fix a typo. 2022-05-11 20:39:10 +10:00
David Reid 4d813cfe23 Update date on change history. 2022-04-20 20:20:41 +10:00
David Reid 4dfe7c4c31 Version 0.11.9 2022-04-20 20:14:51 +10:00
David Reid c2931a92cc Remove the unofficial bindings section from the readme.
These projects are not updated to the latest version.
2022-04-16 15:32:07 +10:00
David Reid e7dfd77a97 Update change history. 2022-04-10 21:53:04 +10:00
David Reid 4a1d9edff3 iOS: Fix build when ARC is not enabled. 2022-04-10 20:13:57 +10:00
David Reid ae066d57e9 Fix compilation error with older versions of GCC. 2022-04-10 20:00:05 +10:00
David Reid 804585ae2c Update dr_libs. 2022-04-10 19:56:51 +10:00