98 Commits

Author SHA1 Message Date
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
Chris Robinson
6636131d3b Pass the frame count to aluMixData 2009-09-15 18:19:00 -07:00
Chris Robinson
832dc8a585 Remove unnecessary vars and rework device name checks 2009-08-27 18:55:18 -07:00
Chris Robinson
bb121e68a6 Rebuild device lists when retrieving them 2009-08-27 06:09:33 -07:00
Chris Robinson
6bb14e45ce Store a copy of the device name in the device 2009-08-27 02:53:09 -07:00
Chris Robinson
45dc804819 Store copies of the device names in the individual backends 2009-08-27 01:47:41 -07:00
Chris Robinson
81db01ebf1 Add a method to deinitialize backends 2009-08-26 23:45:00 -07:00
Chris Robinson
929b025fd6 Support disconnect for ALSA playback and capture
As a consequence for capture, mmap is no longer supported. Later on, supporting
mmap capture to write directly into the ring buffer is a possibility.
2009-08-26 21:27:10 -07:00
Chris Robinson
dc26261065 Support 32-bit float output 2009-08-15 13:20:35 -07:00
Chris Robinson
e079291202 Remove unnecessary function parameters 2009-08-13 19:36:14 -07:00
Chris Robinson
243939f94f Allow delaying playback start until context creation, and don't use UpdateSize to store the buffer size
This will make it possible to support the context attributes (frequency,
refresh, etc) for some backends
2009-08-13 12:28:46 -07:00
Chris Robinson
5460e85c40 Set the right access mode for non-mmap capture 2009-07-02 20:50:12 -07:00
Chris Robinson
432f0ba34c Specify the right format for ALSA recording 2009-07-02 20:32:19 -07:00
Chris Robinson
5a8ad67660 Lock the context before getting the mmap region to update 2009-05-26 14:54:59 -07:00
Chris Robinson
f1e442408b Set the correct data size 2009-05-26 14:51:57 -07:00