59 Commits

Author SHA1 Message Date
Chris Robinson
14912229b1 Avoid default names for winmm and dsound 2012-02-20 22:03:08 -08:00
Chris Robinson
2b64df05e6 Avoid using a default name with the MMDevApi backend 2012-02-20 21:46:01 -08:00
Chris Robinson
01d8d956da Avoid using a default name when opening a PulseAudio device 2012-02-20 21:03:54 -08:00
Chris Robinson
4f0d862cbe Set the default ALSA device name when probing 2012-02-20 20:59:55 -08:00
Chris Robinson
e2ccc6f98e Always use "OpenAL Soft" for the short device enumeration list 2012-02-20 20:45:22 -08:00
Chris Robinson
d24ada7ab7 Don't accept the pulseaudio default name for capture 2012-02-20 20:29:20 -08:00
Chris Robinson
54e2316b65 Use a string to report unsupported capture sample types 2012-02-20 20:25:58 -08:00
Chris Robinson
771ef3e8d5 Rename p -> hp for ALSA's hw params 2012-02-20 12:46:09 -08:00
Chris Robinson
e4f14fdc61 Check the pulse spawn-server config option before testing a connection to pulseaudio 2012-02-19 14:07:44 -08:00
Chris Robinson
4a65747a4b Add a COUNTOF macro to get the number of entries in a static array 2012-02-19 12:07:40 -08:00
Chris Robinson
bbc679a5db Minor MMDevApi cleanups 2012-02-18 13:08:54 -08:00
Chris Robinson
592fb2b913 Make sure an ALSA capture device was found before accessing the map 2012-02-18 12:39:17 -08:00
Chris Robinson
f68f3f5f86 Simplify ALSA parameter error checking 2012-02-18 12:34:58 -08:00
Chris Robinson
5f23860880 Rename a couple variables and fix their types 2012-02-18 11:07:54 -08:00
Chris Robinson
faf59a7cba Fix some comments 2012-02-18 11:03:42 -08:00
Chris Robinson
eb8be88866 Use the correct type to store the count from IMMDeviceCollection_GetCount 2012-02-17 12:31:53 -08:00
Chris Robinson
e43e1bd7f5 Silence another MSVC warning 2012-02-17 01:32:35 -08:00
Chris Robinson
eb586b0ed7 Initialize a variable before use 2012-02-17 01:30:41 -08:00
Chris Robinson
10257f485a Support device enumeration with mmdevapi 2012-02-16 17:04:08 -08:00
Chris Robinson
deee6a73f0 Fix a device count leak and make sure COM is cleaned up if an mmdevice open fails 2012-02-16 10:08:50 -08:00
Chris Robinson
5d17cef55f Calculate the buffer time before modifying the frequency 2012-02-15 22:54:17 -08:00
Chris Robinson
70f1a7e3ca Get the mmdevapi device period after initialization 2012-02-15 22:40:01 -08:00
Chris Robinson
60785eab8e Move the endian test macro to alMain.h 2012-02-15 21:47:35 -08:00
Chris Robinson
7e9af6f406 Use a switch to check the device format with winmm 2012-02-15 21:13:13 -08:00
Chris Robinson
1140b3ae83 Support signed and unsigned 32-bit int output 2012-02-14 11:44:57 -08:00
Chris Robinson
5e1d1a52ba Check for each ALSA prefix config option only as needed 2012-02-13 10:33:53 -08:00
Chris Robinson
b375b130ba Add config options for card- and device-specific prefixes in ALSA device names 2012-02-11 09:36:40 -08:00
Chris Robinson
3fb6351212 Format the ALSA device name when enumerating them 2012-02-11 06:55:24 -08:00
Chris Robinson
b4b492c417 Improve checks for supported output formats from ALSA 2012-02-09 22:26:16 -08:00
Chris Robinson
deb84cfdac Improve a couple error messages with the full ALSA device control name 2012-02-07 07:04:33 -08:00
Chris Robinson
15a8e58225 Implement capture for the DirectSound backend
Based on a patch by Jeffrey Knockel <jeff250.at.gmail.com>
2012-01-31 01:47:59 -08:00
Chris Robinson
0ef3a30b84 Fix WaveIn shutdown for real
The processing thread must be messaged when shutting down, and depending on the
state of the device, waveInReset may not do it. Additionally, all buffers must
be removed from the device before they can be unprepared and the device closed.
2012-01-20 12:36:23 -08:00
Chris Robinson
2b2ce8bf3b Always message the WinMM processing thread when a buffer is done
So the processing thread can keep track of completed buffers when shutting
down, too.
2012-01-20 12:06:31 -08:00
Chris Robinson
47c8c15878 Fix a possible race condition when shutting down WinMM devices
If the processing threads are interrupted between the shutdown check and re-
adding the buffer back to the device, the device can be left with a buffer that
will get unprepared and freed while in use.
2012-01-20 03:02:21 -08:00
Chris Robinson
ae7b61b040 Avoid printing messages about device parameter changes in the backends 2012-01-17 16:38:58 -08:00
Chris Robinson
e0966d99a1 Retry opening the PortAudio device with 16-bit short if 32-bit float output fails 2012-01-17 15:26:22 -08:00
Chris Robinson
66a700729b Retry opening the DSound device with 16-bit short if 32-bit float output fails 2012-01-17 12:38:47 -08:00
Chris Robinson
a7266442c2 Retry opening the WinMM device with 16-bit short if 32-bit float output fails 2012-01-17 12:21:52 -08:00
Chris Robinson
cf34b9c04e Support 32-bit float in the WinMM backend 2012-01-17 12:17:41 -08:00
Chris Robinson
6a97f6a327 Reset the ALSA device if the number of available samples grows too large 2011-11-28 10:24:24 -08:00
Chris Robinson
dfd02817fa Make ALSA XRUN when the number of available samples exceeds the buffer size 2011-11-28 09:12:30 -08:00
Chris Robinson
319f40462f Initialize/Uninitialize COM as needed 2011-10-24 22:11:16 -07:00
Chris Robinson
75679c959a Don't update the device update parameters when PulseAudio does an async buffer update
It risks a deadlock, and though the UpdateSize won't change, we'll still fill
as much of the buffer as we can up to a multiple of it
2011-10-19 16:07:56 -07:00
Chris Robinson
044774ed72 Rename the MMDevAPI backend's MessageProc function 2011-09-24 13:55:44 -07:00
Chris Robinson
390d94ec97 Define _WIN32_WINNT on the command line with _WIN32 2011-09-20 14:59:01 -07:00
Chris Robinson
edb386eb1e Add a ConfigValueStr function, to return the string through a parameter 2011-09-19 11:29:18 -07:00
Chris Robinson
cc3dd648ac Check the number of available samples before calling the capture method 2011-09-18 20:27:34 -07:00
Chris Robinson
7e06a10f73 Return int and float config values through a parameter
This allows the getter functions to return whether or not the option exists
without a separate call and check.
2011-09-18 16:16:55 -07:00
Chris Robinson
fe1e046ea6 Remove a couple ineffective alcSetError calls 2011-09-14 11:55:57 -07:00
Chris Robinson
97024151e4 Return an error from the CaptureSamples method instead of setting it 2011-09-14 02:01:35 -07:00