Chris Robinson
b023dbe7b8
Remove hungarian notation from the device and context structs
2012-04-19 22:50:11 -07:00
Chris Robinson
2ba2da467c
Add a comment explaining the pulseaudio prop_filter
2012-03-06 12:01:15 -08:00
Chris Robinson
3131104595
Filter out a couple pulseaudio stream properties by setting them to 0-length data
...
It seems Qt/Phonon will globally set media.role and phonon.streamid properties,
causing them to apply even to our streams if they happen to be loaded in the
same process. This is particularly a problem because media.role gets set to
"event", preventing the streams from showing in pavucontrol.
2012-03-05 13:00:51 -08:00
Chris Robinson
f64bdc4bd4
Returned pa_operations can be NULL
2012-03-05 08:37:50 -08:00
Chris Robinson
fe6e532c87
Use a separate backend callback to start playback of the device
...
This allows us to properly update the ALCdevice and its resources with the new
parameters before starting playback, instead of expecting the mixer to block
and wait after it has begun.
This also lets us avoid holding the device lock while resetting and starting
the device, which helps prevent lock inversion on some backends (ie, one thread
locking A then B, and another thread locking B then A), ultimately allowing
certain backends to asynchronously update the ALCdevice without risk of lockup.
Capture still has issues here, however.
2012-03-05 07:11:09 -08:00
Chris Robinson
bc1bb7f90f
Print and handle errors from pa_stream_readable_size
2012-03-05 00:11:28 -08:00
Chris Robinson
0f0141b9dd
Set prebuf to 0 since we're handling the stream start manually
2012-03-04 09:24:07 -08:00
Chris Robinson
b643f13a6e
Make sure the pulse stream is properly started and better handle buffer size changes
2012-03-04 05:30:42 -08:00
Chris Robinson
44e10c4f69
Remove some unneeded pulseaudio calls
2012-03-02 09:46:36 -08:00
Chris Robinson
7a832c4522
Don't unload libpulse
...
This sometimes spawns esoteric errors in dlclose
2012-03-02 09:27:30 -08:00
Chris Robinson
7d0faba424
Remove some unneeded markers
2012-03-02 09:08:17 -08:00
Chris Robinson
01d942628b
Set prebuf to the expected buffer size
...
This is to make sure the stream starts even if PulseAudio increases tlength.
2012-03-02 05:38:11 -08:00
Chris Robinson
2a9012c94d
Don't rely on PulseAudio to wake us up using early requests
2012-03-02 04:51:29 -08:00
Chris Robinson
153affac12
Recalculate the new update size using the device's UpdateSize
2012-03-02 00:08:56 -08:00
Chris Robinson
51e6786f31
Set the func list after successfully connecting to PulseAudio
2012-03-01 09:22:37 -08:00
Chris Robinson
7d9cabebff
Use NULL to open the default PulseAudio device, and get the actual device name from the stream
2012-03-01 04:37:40 -08:00
Chris Robinson
9602c46809
Move some function definitions down
2012-03-01 04:12:47 -08:00
Chris Robinson
85daab0d5e
Don't define lib handles when dynamic loading is disabled
2012-03-01 03:46:45 -08:00
Chris Robinson
105faa1935
Only support PA_API_VERSION 12
2012-03-01 03:29:28 -08:00
Chris Robinson
b299b90964
Update the stored buffer attributes if PulseAudio changes it
2012-03-01 03:09:15 -08:00
Chris Robinson
346f1ac293
Don't allow the PulseAudio stream to move
...
Since the device specifier isn't updated to reflect the change, it's best to
not allow it to move. This should be fixed eventually.
2012-03-01 02:52:32 -08:00
Chris Robinson
6e113eea89
Don't force a sample spec when looking for the default device
2012-03-01 01:34:49 -08:00
Chris Robinson
54f906b347
Don't check if the pulseaudio sink is suspended when opening
2012-03-01 01:19:07 -08:00
Chris Robinson
4b252bc494
Constify a couple string pointers
2012-03-01 01:03:37 -08:00
Chris Robinson
b192165fb4
Look for and enumerate the default PulseAudio source first
2012-02-29 23:52:10 -08:00
Chris Robinson
f887f4efdd
Use a separate function to create and connect a PulseAudio record stream
2012-02-29 23:46:30 -08:00
Chris Robinson
b37e54eead
Look for and enumerate the default PulseAudio sink first
2012-02-29 23:35:01 -08:00
Chris Robinson
ea4f458c1d
Avoid enumerating multiple devices with the same name
2012-02-29 23:21:38 -08:00
Chris Robinson
394c76d64f
Avoid passing the ALCdevice to connect_playback_stream
2012-02-29 23:13:09 -08:00
Chris Robinson
d34fc21a50
Print the enumerated devices from PulseAudio
2012-02-29 22:31:51 -08:00
Chris Robinson
fe897f291b
Don't store the frame size with pulse_data
2012-02-29 06:51:21 -08:00
Chris Robinson
fbb6239299
Read capture data from pulseaudio as needed, avoiding a ring buffer
2012-02-29 05:57:54 -08:00
Chris Robinson
973b92b8fd
Minor rearrangements for the pulseaudio mixing loop
2012-02-22 18:33:28 -08:00
Chris Robinson
1dde8ad60b
Use the stored minreq size from PulseAudio for rounding off the length to write
2012-02-21 18:07:20 -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
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
e4f14fdc61
Check the pulse spawn-server config option before testing a connection to pulseaudio
2012-02-19 14:07:44 -08:00
Chris Robinson
1140b3ae83
Support signed and unsigned 32-bit int output
2012-02-14 11:44:57 -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
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
cc3dd648ac
Check the number of available samples before calling the capture method
2011-09-18 20:27:34 -07:00
Chris Robinson
97024151e4
Return an error from the CaptureSamples method instead of setting it
2011-09-14 02:01:35 -07:00
Chris Robinson
a4f8408150
Use maxu to clamp PulseAudio's capture buffer size
2011-09-13 21:53:34 -07:00
Chris Robinson
7a0df8553f
Allow PulseAudio's tlength to grow to make sure there's at least two updates
2011-09-09 22:30:24 -07:00
Chris Robinson
7e2155d937
Return an ALC error enum from the OpenCapture backend method
2011-08-24 14:44:15 -07:00
Chris Robinson
c696d4dbb2
Return an ALC error enum from the OpenPlayback backend method
2011-08-24 14:24:48 -07:00
Chris Robinson
80b8abb0ec
Don't enumerate "PulseAudio Default" in the ALL_DEVICES list
2011-08-20 03:00:38 -07:00
Chris Robinson
9989f33fc2
Move backend sources to a separate sub-directory
2011-08-20 00:41:47 -07:00