Commit Graph

121 Commits

Author SHA1 Message Date
Chris Robinson
1534fcfafd Remove some unneeded includes 2011-06-14 05:06:39 -07:00
Chris Robinson
0c5c56cf88 Avoid using function pointers directly in the PulseAudio backend
Also, switch to the lib wrapper functions
2011-06-14 04:45:52 -07:00
Chris Robinson
53c5275aa4 Use a proper enum for the probe type 2011-06-14 04:02:58 -07:00
Chris Robinson
7da2eea8f0 Add a 5.1 device format that uses side channels instead of back 2011-05-28 19:35:32 -07:00
Chris Robinson
4d7aab1df4 Make some declarations static or static const 2011-05-21 21:28:27 -07:00
Chris Robinson
679f2480c9 Add a device flag for channel config requests 2011-05-03 17:11:07 -07:00
Chris Robinson
ba236ad108 Add a frequency-request device flag 2011-05-03 02:29:26 -07:00
Chris Robinson
af3adf5244 Be silent if the PulseAudio context fails to connect while probing 2011-04-30 17:58:37 -07:00
Chris Robinson
57b05fb6d4 Add a missing enum value for PA_API_VERSION 11 2011-02-07 23:53:07 -08:00
Chris Robinson
88e3a22772 Separate device format into 'channel config' and 'sample type' components 2010-12-04 19:50:00 -08:00
Chris Robinson
a7b4e0b5c5 Get rid of the device timer stuff 2010-11-21 06:32:59 -08:00
Chris Robinson
2aacca76de Improve a warning message 2010-08-04 06:18:23 -07:00
Chris Robinson
aea615edb3 Prevent re-probing while opening a Pulse device if no devices were found 2010-08-04 05:07:56 -07:00
Chris Robinson
f6b2dfd09f Only except a NULL device name for Pulse if some devices were found 2010-08-04 04:56:07 -07:00
Chris Robinson
7f9bcfbc7d Do not enumerate PulseAudio devices if a context fails to connect 2010-08-04 04:21:39 -07:00
Chris Robinson
22cc5af1fe pa_context_errno can return a positive value 2010-08-04 04:11:38 -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
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
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
40ba9db406 Only call Pulse functions from under a lock 2010-07-31 16:07:04 -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
e658df493a Update PulseAudio using period-sized chunks
To match the behavior of other backends
2010-07-17 23:30:25 -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
25a941666a Prevent multiple PulseAudio devices from getting the same name 2010-06-09 18:22: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
Chris Robinson
e98f1205e5 Increase the temp buffer sizes to construct device names with 2010-05-31 19:04:41 -07:00
Chris Robinson
2205f91e5f Fix Pulse mainloop handling for device probing 2010-05-31 19:02:20 -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
694e9a5fec Always add the default PulseAudio device when probing 2010-05-30 23:04:04 -07:00
Chris Robinson
9ac5d8ad2d List all available PulseAudio sources 2010-05-30 21:05:05 -07:00
Chris Robinson
706b9f2357 Probe and expose all available PulseAudio sinks for the enumerate_all extension 2010-05-30 20:33:57 -07:00
Chris Robinson
55b3675dee Add a separate function to create/connect a pulseaudio context 2010-05-30 19:05:19 -07:00
Chris Robinson
dc86563486 Pass the threaded main loop object to context/stream_state_callback 2010-05-30 18:19:01 -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
e9f4576d4d Watch for changes to the PulseAudio sink device 2010-05-28 17:03:57 -07:00
Chris Robinson
f89c9f7ea4 Connect a pulse stream on device open, to make sure the device isn't suspended
Also use the opportunity to get the stream's device's name, so later reset
calls will use the same device
2010-05-27 22:12:54 -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
7f533c6a25 Change inline -> __inline for MSVC 2010-05-16 06:02:27 -07:00
Chris Robinson
4d15391c88 Disable PulseAudio's write callback when disconnecting 2010-04-17 00:27:13 -07:00
Chris Robinson
d4159430f0 Set the buffer length for Pulse when opening the device
So it will properly scale with context frequency requests
2010-03-14 22:20:55 -07:00
Chris Robinson
14255a38fc Pulse's buffer size is not a good measurement for the update size
Lie and say 20ms instead, since there is no stable method to get such info
2010-03-14 21:45:23 -07:00
Chris Robinson
3108a6a997 Limit PulseAudio's buffer size to the requested length 2010-03-11 09:47:26 -08:00
Chris Robinson
9b47048231 Silence some warnings 2010-02-16 05:44:39 -08:00
Chris Robinson
3a87c3c3ba Avoid using periods with PulseAudio, and add an option to specify its buffer length 2010-02-07 19:29:48 -08:00
Chris Robinson
bd518ed264 Make sure all requested data gets written to PulseAudio 2010-01-24 00:03:23 -08:00