112 Commits

Author SHA1 Message Date
Chris Robinson
40dd1fb853 Add a backend callback to get the device time
The method should monotonically count the number of nanoseconds the device has
active contexts
2010-07-24 19:14:32 -07:00
Chris Robinson
d4b191d27d Avoid retrying the requested ALSA format after it failed 2010-07-04 15:48:47 -07:00
Chris Robinson
6b23f2dfa3 snd_pcm_recover should automatically re-prepare the stream as needed 2010-06-16 02:17:41 -07:00
Chris Robinson
6fd6e4eacf Remove unused variable 2010-06-07 03:49:21 -07:00
Chris Robinson
ed58571079 Use non-blocking mode for ALSA capture 2010-06-05 19:56:58 -07:00
Chris Robinson
0fdec056fa Improve error recovery when capturing from ALSA 2010-06-05 17:41:33 -07:00
Chris Robinson
1915fe831f Read capture data from ALSA when querying the available sample count 2010-06-05 04:43:26 -07:00
Chris Robinson
e98f1205e5 Increase the temp buffer sizes to construct device names with 2010-05-31 19:04:41 -07:00
Chris Robinson
da1dee351d Update device naming to be more apparent about the device being used 2010-05-31 19:00:33 -07:00
Chris Robinson
ebccfa93c3 Don't unload libs when they're not needed
Some libs don't really like being unloaded and reloaded all the time, and the
benefits aren't that great
2010-05-28 23:00:59 -07:00
Chris Robinson
37190b2caf Add a function to get the frame size from a format 2010-05-24 21:51:30 -07:00
Chris Robinson
a53e3dda75 Don't needlessly expose a variable for the backends 2010-05-12 07:27:12 -07:00
Chris Robinson
8feb089f5c Build device lists only when needed 2010-03-09 06:09:29 -08:00
Chris Robinson
2ba3a88ace Probe physical devices separately from appending them to the device list 2010-03-09 05:44:18 -08:00
Chris Robinson
96303893bc Set ALSA playback buffer and period size based on time
So rate adjustments won't modify the latency
2010-02-08 17:42:44 -08:00
Chris Robinson
fc96e965ae Always disable ALSA's resampler for playback
This means the frequency config option won't have an effect if the ALSA device
can't set an alternate sampling rate
2010-02-08 16:38:53 -08:00
Chris Robinson
78c1629aeb Disable ALSA's resampler when no specific output rate is requested 2010-02-05 11:45:17 -08:00
Chris Robinson
11d7a0e394 Specify the buffer size to ALSA, so the period count remains flexible
Under conditions where the period size is fixed (such as dmix), ALSA will still
attempt to provide the requested number of periods even if the requested period
size needs to be dramatically altered. In these cases, it would be better to
increase or decrease the period count, instead of growing or shrinking the
total buffer size and significantly changing the latency.
2010-01-20 01:19:32 -08:00
Chris Robinson
82547db2db Prepare the pcm handle after recovering 2010-01-06 23:02:28 -08:00
Chris Robinson
64ac3a4739 Use snd_pcm_recover in more places 2010-01-06 22:55:20 -08:00
Chris Robinson
c90616b963 Use snd_pcm_recover to recover from certain device errors 2010-01-06 22:50:30 -08:00
Chris Robinson
7ee81eac0f Store ALC errors with the device when possible 2009-12-28 23:19:13 -08:00
Chris Robinson
c6340ce12d Clean up some loading checks 2009-12-26 08:49:11 -08:00
Chris Robinson
d3e77a0f63 Fix incorrect error check 2009-12-25 13:19:25 -08:00
Chris Robinson
c9dcba17a9 Check error returns instead of error string 2009-12-25 13:05:04 -08:00
Chris Robinson
b5270e0bb3 Use a channel-map to specify the output device channel order 2009-12-02 04:03:51 -08:00
Chris Robinson
6cfc31777b Add an option for real-time priority mixing
Default to disable for now, as a safety precaution
2009-12-01 23:15:09 -08:00
Chris Robinson
f63d8dbf38 Enable real-time priority for ALSA, OSS, and DirectSound mixing loops 2009-11-29 23:02:21 -08:00
Chris Robinson
fdd314f7f8 Reset the kill flag after the thread has stopped 2009-11-29 10:22:12 -08:00
Chris Robinson
1f47fa9243 Try 32-bit float before 16-bit, and stereo before mono 2009-10-24 03:20:47 -07:00
Chris Robinson
9924cce466 Make sure the ALSA device list is reset if no cards are found 2009-10-21 11:53:45 -07:00
Chris Robinson
86e0b9386d Remove duplicate check in ALSA mmap playback 2009-10-16 10:57:58 -07:00
Chris Robinson
d6e439244a Rename SetALCError for consistency 2009-10-07 04:32:14 -07:00
Chris Robinson
00272883f6 Fallback to 16-bit or 8-bit, or mono, if ALSA doesn't accept the request 2009-09-27 08:35:10 -07:00
Chris Robinson
4e9767bb22 Don't store the ALSA format 2009-09-27 04:03:11 -07:00
Chris Robinson
1d54b7a266 Fix capture, too 2009-09-27 03:57:19 -07:00
Chris Robinson
c9506d939a Make sure ALSA properly loads, and fix the thread stop condition 2009-09-27 01:12:42 -07:00
Chris Robinson
21217824b7 Avoid duplicate error handling 2009-09-27 00:58:11 -07:00
Chris Robinson
8024df2991 Load backend libs on-demand 2009-09-27 00:21:40 -07:00
Chris Robinson
201b108a54 Attempt to reload backend libs when probing, if they didn't initially load 2009-09-23 01:33:58 -07:00
Chris Robinson
e11b59a80f Return imediately if trying to set an unknown format 2009-09-21 02:53:33 -07:00
Chris Robinson
0ae02e8ad4 Support floating point capture for backends that can handle it 2009-09-21 02:31:33 -07:00
Chris Robinson
2cbdffab86 Create the ALSA capture ring buffer with the proper size 2009-09-21 02:14:32 -07:00
Chris Robinson
86eefdb2a8 Mix all pending periods at once instead of one at a time 2009-09-20 00:44:39 -07:00
Chris Robinson
750399ccd7 Let verify_state restore from an ALSA underrun 2009-09-20 00:40:23 -07:00
Chris Robinson
fb97ca6022 Remove left-over backend-specific period options 2009-09-16 23:29:32 -07:00
Chris Robinson
cbcaa54173 Store the number of periods in the device instead of the buffer size
Also keep all the fields in sync
2009-09-16 22:58:54 -07:00
Chris Robinson
94e3fca702 Remove unnecessary parameters, and rename methods 2009-09-16 00:24:44 -07:00
Chris Robinson
49648fe22d Make a GetConfigValueBool function and use it 2009-09-15 22:18:13 -07:00
Chris Robinson
9f037e8980 Pass the device to aluMixData 2009-09-15 19:30:27 -07:00