Ryan C. Gordon
48a00a93bc
sndio: Fix for some platforms (Linux, for example) that don't define INFTIM.
...
Fixes Bugzilla #3712 .
2017-08-07 00:25:18 -04:00
Ryan C. Gordon
4d858f8133
psp: Force audio channels to stereo if > 2 channels requested (thanks, Solra!).
...
Fixes Bugzilla #3726 .
2017-08-04 16:18:34 -04:00
Philipp Wiesemann
283a3f2a7c
qnx: Fixed error message.
2017-07-29 23:00:45 +02:00
Philipp Wiesemann
b6cc147dd6
aix: Removed unused local variable.
...
Found by Cppcheck.
2017-07-29 23:00:34 +02:00
Sam Lantinga
bf6118beef
Fixed crash if the WASAPI audio device couldn't be recovered
2017-07-27 22:55:18 -07:00
Sam Lantinga
434301d015
Fixed infinite recursion if the WASAPI audio device couldn't be recovered
2017-07-27 22:52:19 -07:00
Sam Lantinga
3f96aded35
Fixed typo in WASAPI shutdown code
2017-07-27 02:41:58 -07:00
Ryan C. Gordon
f7fc23f2d4
Fixed compiler warnings on QNX.
2017-07-23 19:25:16 -04:00
Ryan C. Gordon
a497c7a2c9
sndio: fixed poll() call (thanks, kdrakehp!).
...
Fixes Bugzilla #3705 .
2017-07-20 20:40:17 -04:00
Ryan C. Gordon
4e48ba2c8a
sndio: More improvements to the OpenBSD audio target (thanks, kdrakehp!).
...
Fixes Bugzilla #3705 .
2017-07-20 18:16:02 -04:00
Sam Lantinga
6d7be209c2
Fixed bug 3705 - Add capture support to the sndio backend
...
kdrakehp
The attached patch adds capture support to the sndio backend.
The patch also allows the `OpenDevice' function to accept arbitrary device names.
2017-07-20 10:39:47 -07:00
Philipp Wiesemann
85bbc5bb9f
qnx: Fixed setting a field twice.
2017-07-07 23:00:10 +02:00
Ryan C. Gordon
2159208980
audio: trying to pacify static analysis.
2017-07-05 12:04:37 -04:00
Philipp Wiesemann
049249a260
aix: Fixed audio debug output.
...
DEBUG_AUDIO is checked with #ifdef not #if.
2017-07-02 22:46:49 +02:00
Philipp Wiesemann
ca89b15ca9
qnx: Removed unused bootstrap declaration.
...
QNX_bootstrap is the VideoBootStrap. QSAAUDIO_bootstrap is still there.
2017-07-02 22:46:00 +02:00
Ryan C. Gordon
b1e646da0f
Support for QNX 7.0 (thanks, Elad!).
...
Fixes Bugzilla #3686 .
2017-07-01 17:50:47 -04:00
Philipp Wiesemann
ede3361bb4
aix: Fixed compile error.
2017-07-01 23:01:49 +02:00
Philipp Wiesemann
912b542e43
netbsd: Fixed comment.
2017-07-01 23:00:07 +02:00
Philipp Wiesemann
8bbf97bb45
netbsd: Removed unused field.
2017-06-29 23:00:18 +02:00
Philipp Wiesemann
6ac222255d
netbsd: Fixed compile error.
2017-06-29 23:00:09 +02:00
Ryan C. Gordon
d8d586ba1a
audio: Converter now checks a strict list of channels and formats we support.
2017-06-12 21:35:24 -04:00
Sam Lantinga
ba66a89116
Fixed bug 3668 - Overflow of SDL_AudioCVT.filters with some downmixes
...
Simon Hug
There's a chance that an audio conversion from many channels to a few can use more than 9 audio filters. SDL_AudioCVT has 10 SDL_AudioFilter pointers of which one has to be the terminating NULL pointer. The SDL code has no checks for this limit. If it overflows there can be stack or heap corruption or a call to 0xa.
Attached patch adds a function that checks for this limit and throws an error if it is reached. Also adds some documentation.
Test parameters that trigger this issue:
AUDIO_U16MSB with 224 channels at 46359 Hz
V
AUDIO_S16MSB with 6 channels at 27463 Hz
The fuzzer program I uploaded in bug 3667 has more of them.
2017-06-12 16:39:15 -07:00
Ryan C. Gordon
836a1618d0
jack: removed accidental copy/paste.
2017-06-09 17:37:43 -04:00
Ryan C. Gordon
455e5a6342
jack: added capture support.
2017-06-09 00:47:47 -04:00
Ryan C. Gordon
edd657177c
jack: Move jack_client_t into the audio device instead a global variable.
2017-06-09 00:14:50 -04:00
Ryan C. Gordon
50e33490b6
jack: Remove BROKEN_MULTI_DEVICE code.
2017-06-08 22:20:49 -04:00
Ryan C. Gordon
c05d420351
jack: Initial shot at a JACK audio target.
...
http://jackaudio.org/
Fixes Bugzilla #2163 .
(with several more commits following to improve this code.)
2017-06-08 13:27:58 -04:00
Philipp Wiesemann
7b4f8688ad
Corrected names of header file guards.
2017-06-03 23:00:15 +02:00
Philipp Wiesemann
ef90c17686
nacl: Fixed crash if allocating memory for audio device failed.
2017-05-28 21:50:47 +02:00
Philipp Wiesemann
22e6082d39
qnx: Removed unnecessary check for available audio devices.
2017-05-28 21:50:37 +02:00
Philipp Wiesemann
ec1c016ea0
qnx: Removed unnecessary call to SDL_zerop() after SDL_calloc().
2017-05-28 21:50:27 +02:00
Ryan C. Gordon
a60238d3e0
wasapi: properly report init failure if on pre-Vista version of Windows.
...
We really should change the Init interface to return 0 on success and -1 on
error, like everything else, to avoid this sort of confusion.
2017-05-28 00:41:55 -04:00
Philipp Wiesemann
28aebb4bb8
Removed unused errno includes.
2017-05-27 23:30:07 +02:00
Philipp Wiesemann
a632226fbe
emscripten: Fixed compiling on C89 compilers.
2017-05-26 22:45:40 +02:00
Ryan C. Gordon
632becceb1
audio: rename bsd target to netbsd.
...
Apparently this is no longer a generic BSD audio target, and hasn't been for
years, so rename it for NetBSD.
2017-05-24 19:56:59 -04:00
Ryan C. Gordon
11c7c95872
coreaudio: we don't need to track number of allocated audio buffers anymore.
...
CoreAudio takes care of iterating through the buffers and freeing them now,
so we don't have to manage this ourselves.
2017-05-24 13:28:13 -04:00
Ryan C. Gordon
1e0aa57252
coreaudio: Better handling of audio buffer queue management.
...
We don't fill buffers just to throw them away during shutdown now, we let the
AudioQueue free its own buffers during disposal (which fixes possible warnings
getting printed to stderr by CoreAudio), and we stop the queue after running
any queued audio during shutdown, which prevents dropping the end of the
audio playback if you opened the device with an enormous sample buffer.
Fixes Bugzilla #3555 .
2017-05-24 13:25:31 -04:00
Ryan C. Gordon
3814517cb2
coreaudio: looks like we need more like a 10ms buffer minimum, not 50ms.
2017-05-24 01:28:03 -04:00
Ryan C. Gordon
139f3d0491
coreaudio: dynamically allocate AudioQueueBuffers.
...
We need more than two buffers to flip between if they are small, or CoreAudio
won't make any sound; apparently it needs X milliseconds of audio queued when
it needs to play more or it drops any queued buffers. We are currently
guessing 50 milliseconds as a minimum, but there's probably a more proper
way to get the minimum time period from the system.
Fixes Bugzilla #3656 .
2017-05-24 00:12:22 -04:00
Ryan C. Gordon
986ec1cebb
wasapi: don't mark capture devices as failed for AUDCLNT_S_BUFFER_EMPTY.
...
Fixes Bugzilla #3633 .
2017-05-19 12:40:55 -04:00
Ryan C. Gordon
df488f3bc7
Patched to compile on Windows.
2017-05-18 16:27:36 -04:00
Ryan C. Gordon
58ea188693
wasapi: Replace tabs with strings in source code.
2017-05-18 15:46:06 -04:00
Ryan C. Gordon
a93bb485cd
wasapi: Deal with AUDCLNT_S_BUFFER_EMPTY when flushing audio device.
2017-05-18 15:43:51 -04:00
Ryan C. Gordon
0dd1b088c1
audio: One more callbackspec fix (thanks, Simon!).
2017-05-18 15:33:17 -04:00
Ryan C. Gordon
513ca33128
audio: fixed more "spec" references that should have been "callbackspec".
...
This should catch all the ones for audio targets that have provided their
own audio threads.
2017-05-10 16:18:43 -04:00
Alex Szpakowski
8e4704c2d4
iOS: Only mark interrupted audio devices as non-interrupted if AudioQueueStart is successful.
2017-05-03 18:05:29 -03:00
Ryan C. Gordon
634a894eb3
audio: another wrong struct that causes NULL pointer crash (thanks, Simon!).
...
Fixes Bugzilla #3632 .
2017-04-26 01:43:40 -04:00
Juha Kuikka
77edf4a468
audio: Fix audio queue functions to use new spec structure.
...
Using the old spec structure causes the audio queueing functions to fail
due to bad callback pointers being checked.
2017-04-20 21:25:29 -04:00
Sam Lantinga
8ef833a85b
Fix crash in SDL audio thread, by Juha Kuikka
...
Wrong audio spec structure was populated with the internal callback, causing the audio thread to call a NULL pointer.
2017-04-18 22:17:40 -07:00
Ryan C. Gordon
f97b4d1dde
wasapi: deal with default device changes, and more robust failure recovery.
2017-03-30 16:33:47 -04:00