Chris Robinson
d4fc87fc9c
Avoid calling SDL_GetNumAudioDevices multiple times
2018-03-08 18:07:49 -08:00
Jan Niklas Hasse
2eb29d538b
SDL2 backend: Reset device parameters
2018-03-08 20:42:47 +01:00
Jan Niklas Hasse
0af075b5ff
SDL2 backend: Allow changes to channels and format
2018-03-08 20:27:02 +01:00
Jan Niklas Hasse
ef2b813776
SDL2 backend: Allow frequency changes
2018-03-08 10:17:02 +01:00
Jan Niklas Hasse
a6f93a501a
Handle passing NULL to SDL_OpenAudioDevice as a special device
...
https://discourse.libsdl.org/t/changing-audio-output-when-the-default-audio-playback-device-changes/22399/2
2018-03-08 10:07:22 +01:00
Jan Niklas Hasse
767807cd22
SDL2 backend: Use callback instead of a timing loop
...
The system clock and audio clock aren't necessarily synchronized.
2018-03-08 09:51:44 +01:00
Jan Niklas Hasse
86319127e3
Add SDL2 backend for playback, fix #173
2018-03-07 20:57:53 +01:00
Chris Robinson
03274a5b95
Ensure at least the specified ringbuffer size is writable
...
Previously, all but one of the specified size could be written (so for a size
of n, only n-1 was guaranteed writable). All users pretty much compensated for
this, but it makes more sense to fix it at the source.
2018-03-02 13:01:11 -08:00
Chris Robinson
6f62fed65c
Add an option to limit the write size of the ringbuffer
2018-03-01 21:23:13 -08:00
Chris Robinson
9b878c64f9
Make the Connected state atomic
...
Also don't send the Disconnected event more than once.
2018-02-04 00:01:12 -08:00
Chris Robinson
1f61472e77
Avoid potentially writing partial samples
2018-02-03 14:02:47 -08:00
Chris Robinson
b99e64a0e3
Provide more descriptive messages to disconnection events
2018-02-03 13:54:42 -08:00
Chris Robinson
ec14c98f2d
Use an atomic instead of volatile to tell a thread to quit
2018-02-01 18:59:32 -08:00
Chris Robinson
975c682ec3
Use semaphores to signal for more samples with JACK and OpenSL
2018-02-01 18:54:13 -08:00
Chris Robinson
e7217760f3
Don't bother with an explicit stop backend method
2018-01-29 01:00:53 -08:00
Chris Robinson
a042dbf305
Call the backend close method in the destructor
2018-01-28 23:32:28 -08:00
Chris Robinson
273dca2fa0
Avoid using alloca in the CoreAudio backend
2018-01-16 12:54:20 -08:00
Chris Robinson
8c19497340
Properly cast some parameters for MSVC
2018-01-16 09:40:34 -08:00
Chris Robinson
bbc4ebecab
Use GetProcBinary to get the executable name for PulseAudio
2018-01-13 03:41:56 -08:00
Chris Robinson
e634564b26
Make a couple functions inline
2018-01-12 02:37:48 -08:00
Chris Robinson
dae5faedb0
Use atomic variables in place of volatile
2018-01-11 23:28:15 -08:00
Chris Robinson
1f236d8f20
Define a function where it's used
2018-01-11 22:42:25 -08:00
Chris Robinson
2873abcbc0
Fix up some types for MSVC
2018-01-11 10:55:35 -08:00
Chris Robinson
3832b25f30
Move the ringbuffer declarations to a separate header
...
And rename alcRing.c to ringbuffer.c for consistency.
2018-01-11 09:16:28 -08:00
Chris Robinson
8aa9e35f8c
Move the config function declarations to their own header
...
And rename alcConfig.c to alconfig.c for consistency.
2018-01-11 07:56:54 -08:00
Chris Robinson
c5a917b401
Restore the original JACK message callback when possible
2017-09-23 03:56:45 -07:00
Chris Robinson
82a990e08e
Downgrade some ERRs to TRACEs
...
These don't exist outside OSSv4, e.g. with OSS/Free, padsp, or aoss, so no need
to be concerned.
2017-07-23 16:43:39 -07:00
Chris Robinson
5ab4e584ee
Make sure OSS device files exist before adding them
2017-07-23 16:38:54 -07:00
Chris Robinson
ff696bc1fe
Set the float PCM GUID for wave files only when outputting float
2017-07-15 01:45:48 -07:00
Chris Robinson
8a0d1e5191
Store the QSA backend's ExtraData in the wrapper struct
2017-06-29 17:38:38 -07:00
Chris Robinson
ec13cf6c9c
Add casts to silence MSVC
2017-06-29 10:28:22 -07:00
Chris Robinson
2f2d941edb
Trace the message name in the message handler loop
2017-06-26 08:57:29 -07:00
Chris Robinson
55c329b462
Clean up some messy rounding code
2017-06-26 06:54:45 -07:00
Chris Robinson
5d5eff7502
Ensure the mmdevapi capture buffer is at least 100ms
2017-06-26 06:14:11 -07:00
Chris Robinson
d1bb04d588
Improve traces for the mmdevapi capture conversions
2017-06-23 09:54:26 -07:00
Chris Robinson
31b02e044f
Trace the capture converter formats for mmdevapi
2017-06-22 13:58:32 -07:00
Chris Robinson
0a361fa9e2
"Convert" the QSA backend to the new API
...
I say "convert" because it takes the lazy way and essentially just embeds the
wrappers into the backend. It's done this way because I lack the means to check
any changes, even syntactically. This also means the device's ExtraData field
is still needed.
However, this does mean all the backends are now using the new API. Code
related to the old interface can now be removed.
2017-06-18 03:07:02 -07:00
Chris Robinson
d4f3490a88
Limit device buffer based on PulseAudio's tlength
...
Unfortunately PulseAudio has a habit of limiting tlength, and trying to
calculate the device's buffer length to write regardless of tlength could
result in some amount always being writable.
2017-06-15 21:39:09 -07:00
Chris Robinson
2266fb76b9
Add a config option to specify custom ALSA devices
2017-05-23 18:12:45 -07:00
Chris Robinson
a49e2ebbc5
Add an env var to specify a default pulse device
...
Some apps don't allow selecting an audio device, and due to problems with KDE,
PulseAudio isn't allowed to move the stream after being created by default.
2017-05-16 16:50:43 -07:00
Chris Robinson
45d52f7124
Remove unnecessary functions in the JACK backend
2017-04-17 21:31:20 -07:00
Chris Robinson
fca83263f4
Implement capture support in the OpenSL backend
2017-04-15 18:08:52 -07:00
Chris Robinson
f94fa5d5cf
Use separate atomic macros for pointers
2017-04-14 17:47:55 -07:00
Chris Robinson
901804d724
Store the ambisonic order separate from the channel enum
2017-04-12 18:26:07 -07:00
Chris Robinson
78d5492d2c
Use the converters to enable mmdevapi capture
2017-04-11 09:41:23 -07:00
Chris Robinson
81527cdbdd
Convert the CoreAudio backend to the updated backend API
2017-04-09 11:21:02 -07:00
Chris Robinson
5ef7d8fe62
Clean up some formatting
2017-04-08 12:27:30 -07:00
Chris Robinson
1f64f9d016
Try to write the full configured buffer length with PulseAudio
...
This basically ignores tlength even if it's smaller than what was requested. It
keeps up-to-date with minreq changes too now, in case that happens.
2017-04-08 10:01:04 -07:00
Chris Robinson
26144ca9df
Rename al_string_* functions to alstr_*
2017-04-04 06:58:53 -07:00
Chris Robinson
1cd6617ff6
Don't use the mutex in the base getClockLatency implementation
2017-02-28 03:50:42 -08:00