428 Commits

Author SHA1 Message Date
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
Chris Robinson
a9610b3607 Use separate enums for the ambisonic channel order and normalization 2017-02-27 16:11:45 -08:00
Chris Robinson
2e1f1449bc Don't remove a period from the OSS buffer
Since we're now waiting for space to be available before mixing, the mixing
buffer isn't adding another period.
2017-02-22 15:44:47 -08:00
Chris Robinson
e720faf2d4 Fix OpenSL latency calculation 2017-02-22 15:00:41 -08:00
Chris Robinson
e0e6efbfea Print warnings about missing libraries and functions 2017-02-21 10:17:48 -08:00
Chris Robinson
247f56249a Always lock the device backend before calling aluMixData 2017-02-18 17:32:07 -08:00
Chris Robinson
2448f88e70 Return some device latency by default
A device will never have 0 latency. OpenAL Soft itself uses a sample buffer
length of UpdateSize*NumUpdates, and during playback will have about
(NumUpdates-1) periods filled, more or less. Without a more accurate
measurement from the playback system, this is better than reporting 0.
2017-02-18 16:55:48 -08:00
Chris Robinson
d8c42918f4 Use select() to wait for audio with OSS and Solaris 2017-02-18 15:58:15 -08:00
Chris Robinson
c771b82a39 Use the correct IID for the opensl buffer queue 2017-02-07 10:55:36 -08:00
Chris Robinson
9f10ae466c Convert the OpenSL backend to the new backend API
This also removes the buffer queue callback's call to aluMixData, which could
potentially block on a mutex.
2017-02-07 07:06:41 -08:00
Chris Robinson
af362c2d05 Fix for NULL JNIEnv
Which can happen with native-only apps
2017-02-05 14:25:17 -08:00
Chris Robinson
428cde5dc2 Call getSystemService as a non-static function 2017-02-03 09:41:21 -08:00
Chris Robinson
2c1791752a Android's AudioManager.getProperty(String) returns a String 2017-02-02 06:14:01 -08:00
Chris Robinson
6b2297b508 Add more traces for the Java calls being made 2017-01-27 15:42:06 -08:00
Chris Robinson
19e96c6fef Round and clamp the scaled update count with opensl 2017-01-27 01:46:44 -08:00
Chris Robinson
67ffdf7a78 Try to use the system sample rate with Android 2017-01-26 18:23:29 -08:00
Chris Robinson
d2e5aa79dd Use ALsizei in more places 2017-01-18 07:13:23 -08:00