Chris Robinson
6fc8cd3b29
Convert the PortAudio backend to the new backend API
2015-10-22 10:46:36 -07:00
Chris Robinson
70fbc2b1ff
Add a function to get a list of data files
...
The method takes a marked-up filename (e.g. may include %r for a sample rate,
%% for %, etc), and returns a vector of strings of found filenames that match.
It will search the CWD, the local, and global data directories, in that order.
2015-10-03 20:41:18 -07:00
Chris Robinson
30d88cf547
Use the macros to allocate the wrapper backends
2015-09-24 15:54:32 -07:00
Chris Robinson
46bbf95bae
Disable mmdevapi capture and update changelog
...
Unfortunately mmdevapi does not do channel remixing or resampling, even for
capture, so the device can only be opened in the mode it's configured for.
For now, fallback to dsound or winmm to get the conversion until we can do it
ourselves.
2015-09-18 03:19:16 -07:00
Chris Robinson
87f3babe2c
Append "on OpenAL Soft" to mmdevapi, dsound, and winmm device names
...
Would be nicer to have a more backend-agnostic method of doing this, Perhaps
even also only when the router is being used.
2015-09-10 22:15:40 -07:00
Chris Robinson
703f1fdec2
Specify the pa_channel_map directly instead of through a string
2015-09-04 23:59:24 -07:00
Chris Robinson
ce487d1e43
Use the correct device name for PulseAudio too
...
Like mmdevapi. duplicate device names will have a '#2 ' or such appended, so the
device's reported name may be incorrect.
2015-09-03 14:59:59 -07:00
Chris Robinson
23729c2083
Replace another vector loop with VECTOR_FIND_IF
2015-09-03 14:53:46 -07:00
Chris Robinson
87e4ec6620
Use the correct device name when opening a device by name
...
Duplicate device names will have a '#2 ' or such appended, so the device's
reported name may be incorrect.
2015-09-03 11:56:46 -07:00
Chris Robinson
e5fa4ee25d
Allow for device-specific config values
2015-08-28 14:10:39 -07:00
Chris Robinson
53f6590b17
Set the WAVEFORMATEX cbSize field for mmdevapi capture
2015-08-18 00:19:22 -07:00
Chris Robinson
f6e52debb5
Fix handling of PulseAudio devices that have the same description
2015-08-14 19:05:16 -07:00
Chris Robinson
7d4e3688e1
Wait for the OpenSL buffer queue to empty when stopping
2015-08-13 16:01:31 -07:00
Chris Robinson
d90dfc8d1f
Check for duplicate device names in the mmdevapi backend
2015-06-30 07:44:56 -07:00
Chris Robinson
c24f4f230f
Use the lockless ringbuffer for mmdevapi capture
...
The backend's capture funcs are already called while under a lock, so multiple
threads shouldn't be able to read from it at once.
2015-06-30 07:42:09 -07:00
Chris Robinson
e5964d6dc4
Double check the mmdevapi capture format
...
This isn't a real solution, but it should get IAudioClient_IsFormatSupported to
stop failing.
2015-06-07 13:05:07 -07:00
Chris Robinson
9f49ac0fda
Add a macro to simplify allocating and constructing an object
2015-05-18 16:39:44 -07:00
Chris Robinson
9479ea656b
Convert the solaris backend to the new API
2015-05-17 04:18:38 -07:00
Chris Robinson
c297b51a6e
Add a note to the JACK backend about a (minor) race condition
2015-02-07 10:09:01 -08:00
Chris Robinson
4a5daa2e91
Clean up another vector iterator loop
2015-02-07 04:47:02 -08:00
Chris Robinson
e6f4648924
Signal the mixer thread outside of the mutex lock
2015-02-03 02:40:22 -08:00
Chris Robinson
12e443d61d
Don't try to spawn a JACK server by default
...
And don't print an error if one couldn't be started when not requested.
2015-02-03 01:23:19 -08:00
Chris Robinson
e53861bfb9
Always use the JACK server buffer size as the update size
...
The buffer-size config option now only specifies an additional mix ahead to
keep ready for audio requests, rather than a pretend period size.
2015-02-03 01:08:38 -08:00
Chris Robinson
290badea95
Ensure PulseAudio's mixing loop is signaled when stopping
2015-01-21 22:02:02 -08:00
Chris Robinson
5cbafaa014
Remove a couple unused variables
2015-01-20 16:44:47 -08:00
Chris Robinson
199646ac2b
Fix X7DOT1_NARROW name to X7DOT1_WIDE
2015-01-15 09:27:37 -08:00
Chris Robinson
c1607300bb
Accept a "narrow" layout for 7.1 with mmdevapi
2015-01-15 01:56:04 -08:00
Chris Robinson
ed05c83ee7
Fix the flags type
2015-01-11 15:02:26 -08:00
Chris Robinson
c71d8c0fc5
Update a comment
2014-12-24 01:17:55 -08:00
Chris Robinson
ad11a90720
Don't update the channel format if all JACK ports were allocated
2014-12-23 22:02:56 -08:00
Chris Robinson
93b69583d3
Try the device-specified channel configuration first
...
This does basically no checking that the channel config is correct, but should
be good enough for when non-stereo modes are requested.
2014-12-23 21:06:10 -08:00
Chris Robinson
2f162f0fc3
Use the custom ringbuffer instead of JACK's
2014-12-23 20:24:10 -08:00
Chris Robinson
6ccf10bbde
Don't set unused pointers to NULL, don't try to write 0 samples
2014-12-23 11:56:55 -08:00
Chris Robinson
e84b3f4707
At least measure the ringbuffer size for JACK's latency
...
We should also add the port latency, but there's currently no way to ensure
it's synchronized with the ringbuffer (the ringbuffer will update before the
port latency gets updated).
2014-12-23 11:42:57 -08:00
Chris Robinson
beb670a939
Add an option to prevent spawning a JACK server
2014-12-22 19:29:55 -08:00
Chris Robinson
b8d98dd6d0
Add an option for an increased ringbuffer size with JACK
2014-12-22 18:48:54 -08:00
Chris Robinson
7e6d0d6b4f
Fill out the JACK playback backend
...
A few notes about it:
The OpenAL device's requested buffer metrics are ignored, and instead the
device will keep one JACK-sized buffer's worth of audio prepared for JACK's
next process request.
Output is restricted to 32-bit float stereo. Part of this is because JACK
requires a buffer size that's a power of 2 (measured in samples), and the
ringbuffer requires a buffer size that's a power of 2 (measured in bytes). A
channel count of 6 (5.1) or 7 (6.1) will not work without causing a sample to
split over the edge of the ringbuffer. Additioanlly, JACK doesn't provide
information about what channel configuration a device or set of ports has, so
there's no way to know what ports 3 and up map to (even the first two ports are
unknown, but assuming stereo seems to work well enough).
There is no device latency measurement (for AL_SOFT_source_latency) due to the
non-atomicity between the ringbuffer's read size and port latency. A method is
needed to ensure the ringbuffer's read size and port latency can both be
measured between the end of a JACK update cycle (when the port latency has been
updated with the newly-retrieved audio) and the following ringbuffer read
update.
2014-12-22 13:30:35 -08:00
Chris Robinson
23197ddbc3
Add a skeleton backend for JACK
2014-12-21 15:51:16 -08:00
Chris Robinson
c2975b5f44
Trace lparam and wparam message values
2014-12-21 12:37:02 -08:00
Chris Robinson
a91bca64f8
Check the PROPVARIANT type before use
2014-12-21 12:20:31 -08:00
Chris Robinson
13092d94b7
Use VECTOR_FOR_EACH instead of a manual loop
2014-12-21 10:45:10 -08:00
Chris Robinson
28a9f0826c
Use a macro for the record thread name
2014-12-21 10:38:40 -08:00
Chris Robinson
abf0bd13ca
Support capture with mmdevapi
2014-12-19 15:49:37 -08:00
Chris Robinson
4b91d34d58
Set a couple pulse callbacks to NULL during reset, and minor cleanups
2014-12-17 10:10:28 -08:00
Chris Robinson
af193e9fb3
Don't kill pulseaudio's mixer thread if it's already killed
2014-12-17 09:47:58 -08:00
Chris Robinson
6883619b14
Check mmdevice endpoint for being headphones
2014-11-27 17:43:37 -08:00
Chris Robinson
8d6d2e9a2b
Avoid unnecessary uses of ALCdevice_Lock and ALCdevice_Unlock
2014-11-27 15:27:43 -08:00
Chris Robinson
82780a703b
Set headphones when dsound reports headphones
2014-11-27 02:30:52 -08:00
Chris Robinson
bdbf6613ef
Support B-Format output with the wave file writer
2014-11-25 22:20:00 -08:00
Chris Robinson
cbe22763ee
Require at least pulse client 0.9.16
2014-11-24 13:15:04 -08:00