Commit Graph

1001 Commits

Author SHA1 Message Date
Chris Robinson
2af39e51f8 Separate speaker/panning initialization into another source file 2010-08-03 00:21:36 -07:00
Chris Robinson
1504cf8812 Use millisecond resolution for the Null and Wave Writer backends 2010-08-02 22:34:19 -07:00
Chris Robinson
3bece35bbd Prevent getting bad time values when pa_stream_get_time fails
Also makes sure that reported time won't go backwards
2010-08-02 22:27:32 -07:00
Chris Robinson
ae41ad5d1e Use a better method to time the Null and Wave Writer backends
This better compensates for precision loss when converting milliseconds to the
sample rate
2010-08-02 20:04:52 -07:00
Chris Robinson
ee61f7a55c Make sure to request a tlength that's at least minreq*2
And warn if Pulse returns a minreq that's too large
2010-08-02 17:24:40 -07:00
Chris Robinson
241ddf76d4 Enforce the device time to be a multiple of the reported resolution 2010-08-01 16:31:00 -07:00
Chris Robinson
fe6e73ede9 Be a bit more verbose when a device fails to open 2010-08-01 16:20:28 -07:00
Chris Robinson
8dab4c418c Use Pulse's stream time for the device time 2010-07-31 21:33:46 -07:00
Chris Robinson
41e2c41ecc Combine duplicate lines into the mixing macro 2010-07-31 21:09:59 -07:00
Chris Robinson
30108c7855 Remove an unnecessary variable 2010-07-31 19:14:27 -07:00
Chris Robinson
40ba9db406 Only call Pulse functions from under a lock 2010-07-31 16:07:04 -07:00
Chris Robinson
f1f2941511 Add experimental device attributes for apps to query
These will be part of the ALC_EXT_device_time extension. Behavior, values,
etc, are all subject to change.
2010-07-30 20:23:55 -07:00
Chris Robinson
d886fb118b Signal the Pulse mainloop on underruns
Otherwise there are (rare) risks of not getting signaled after writing the
amount of free audio data the client knows about, leading to a mixer loop
lockup
2010-07-30 20:20:40 -07:00
Chris Robinson
46d46c49a8 Store the time precision with the device 2010-07-25 12:54:50 -07:00
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
ab77fc14d5 Make killNow volatile 2010-07-24 10:54:12 -07:00
Chris Robinson
e0d0edc0fc Close the log file last during shutdown 2010-07-22 09:16:28 -07:00
Chris Robinson
7eb124d99c Keep count of the number of samples played 2010-07-22 08:11:44 -07:00
Chris Robinson
88f236ccd3 Make sure the device is stopped if there was an error setting up the first context 2010-07-21 14:50:39 -07:00
Chris Robinson
34a0c998cd Use CLOCK_MONOTONIC when available 2010-07-18 06:21:16 -07:00
Chris Robinson
e658df493a Update PulseAudio using period-sized chunks
To match the behavior of other backends
2010-07-17 23:30:25 -07:00
Chris Robinson
b2a257b6b0 Rename examples to utilities
There is only the one, and it more accurately reflects what it is
2010-07-17 01:02:51 -07:00
Chris Robinson
cde577690a Set the backend HAVE_ macros off before checking their availability 2010-07-17 00:37:54 -07:00
Chris Robinson
c85d53cfbe Remove the commit count from the version number
As it's only updated for releases, it's kinda useless
2010-07-16 00:18:21 -07:00
Chris Robinson
26127cd2f2 Use a long single buffer for WaveIn's capture buffers 2010-07-12 16:37:44 -07:00
Chris Robinson
42d9140afe Check the buffer's original format when queueing on a source 2010-07-12 15:53:11 -07:00
Chris Robinson
52ad28df92 Fix WaveIn device cleanup order 2010-07-08 17:37:35 -07:00
Chris Robinson
58ba5fd0dd Add missing static keyword to WinMM vars 2010-07-08 15:10:59 -07:00
Chris Robinson
71cc91cc4a Use the existing ring buffer methods for WaveIn 2010-07-07 02:47:29 -07:00
Chris Robinson
6db3463d17 Fix backslash alignment for the single-channel mixer macro 2010-07-06 16:32:58 -07:00
Chris Robinson
969818db6f Use a 100ms capture buffer minimum for PulseAudio, with 50ms fragments
This better matches what is given with the WaveIn backend
2010-07-04 16:27:42 -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
17e6840f92 Prevent multiple WinMM devices from getting the same name, as well 2010-06-10 15:54:04 -07:00
Chris Robinson
a1f987c016 Improve handling of lost DirectSound buffers 2010-06-09 23:32:35 -07:00
Chris Robinson
cff805e0a3 Prevent multiple DirectSound devices from getting the same name, too 2010-06-09 23:11:34 -07:00
Chris Robinson
25a941666a Prevent multiple PulseAudio devices from getting the same name 2010-06-09 18:22:05 -07:00
Chris Robinson
8c59849ea4 Make sure the log file is set before initializing the rest of the lib 2010-06-08 02:02:48 -07:00
Chris Robinson
f9e569099c Make the Wave Writer backend optional 2010-06-08 02:01:11 -07:00
Chris Robinson
6fd6e4eacf Remove unused variable 2010-06-07 03:49:21 -07:00
Chris Robinson
ce07270973 Remove support for the old 'refresh' config option 2010-06-06 00:53:29 -07:00
Chris Robinson
ac05863f72 Make sure the effectslot map is properly initialized 2010-06-06 00:21:13 -07:00
Chris Robinson
7f6df7695c Use an array of active sources when mixing
Prevents iterating over all allocated sources during mixing updates
2010-06-06 00:17:50 -07:00
Chris Robinson
ed58571079 Use non-blocking mode for ALSA capture 2010-06-05 19:56:58 -07:00
Chris Robinson
80fbe8a788 Allow prepending backend names with - to remove them from the available devices 2010-06-05 19:33:06 -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
98c01a40e6 Improve locking when calling the backend capture API 2010-06-05 04:42:05 -07:00
Chris Robinson
33234d605a Don't attempt to look for more samples from Pulse after a disconnect 2010-06-05 00:09:45 -07:00
Chris Robinson
c6defe9a6d Read PulseAudio's capture data into the ring buffer when querying the sample count
This ensures we have all the samples available that the app knows about
2010-06-04 00:27:31 -07:00