| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
If we let the daemon decide freely by passing -1, we end up always getting 20ms.
We want to set this value because in some cases we want to select a higher
latency-time in order to save power.
Fixes #597601
|
|
|
|
| |
Makes it much easier to see what is going on and is a lot less error prone.
|
|
|
|
|
|
| |
pa_stream_get_timing_info() can return NULL.
Fixes bug #595220.
|
|
|
|
|
| |
Handle stream events and request a PAUSE/PLAY state change from the application
when we receive a CORK/UNCORK event.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Remove the code to deal with a ringbuffer reset as this code is now in the base
class.
Bump the -base requirement as we need the new baseaudiosink code to function
properly.
|
|
|
|
| |
It is conditionaly set, so do the same when unsetting.
|
|
|
|
|
|
|
| |
Don't use relative seeks, it's too hard to track where we are after a flush
etc.
fixes #593015
|
|
|
|
|
|
| |
Otherwise that code will just be expanded to nothing when compiled
-DG_DISABLE_ASSERT (PS: why is mainloop_start() called in the init
function and not when changing state to READY?)
|
|
|
|
|
|
|
| |
configured_sink/source_usec in the timing_info is only since 0.9.11 so
conditionally compile this information.
fixes #590038
|
|
|
|
|
|
|
| |
when we get an invalid stream index from pulse because we were just starting,
avoid using it for getting and setting the volume.
Fixes #589365
|
|
|
|
| |
Fixes #589459.
|
|
|
|
|
| |
Set the minreq and maxlength buffer attributes to -1 to let puleseaudio select a
sensible value.
|
|
|
|
|
|
|
|
| |
We can't wait for the ENTER/LEAVE messages to be be posted because the base
class sometimes calls the start method with the object lock, which would block
the message posting.
Instead, just assume that the message will be posted soon and continue. We'll
have to fix this in the base class.
|
|
|
|
| |
Use relative seeks because I was told that absolute seeks don't work.
|
|
|
|
| |
Fixes #587695
|
|
|
|
|
|
|
| |
Emit stream-status messages for the pulse thread.
Don't use our own GCond for signaling but simply use the pulse mainloop
mechanisms for synchronisation.
See #587695
|
| |
|
|
|
|
| |
Add check for pulseaudio 0.9.15 and enable 24bits samples in that case.
|
|
|
|
|
|
| |
Upper volume limmit was 1000. That appear unneceasrily high. It would also cause
sever distortion if accidentialy used. Now its 10 (~ +15db) which is also in
sync with volume and playbin2.
|
|
|
|
|
|
| |
Since we map the ringbuffer to the pulseaudio internal ringbuffer, flush the
pulseaudio buffer when we are asked to clear the ringbuffer.
This avoids some leftover audio after a seek.
|
|
|
|
|
| |
don't leak the device_description.
some cleanups.
|
|
|
|
|
|
|
| |
Hack around thread-safety issues in GObject and our racy _get_type()
functions (we could easily fix the _get_type() functions, but we still
need to hack around the GObject class races until we require a newer
GLib version, I think).
|
| |
|
|
|
|
|
| |
Replace goto done: with return, as those are checks when we don't want to flag a
pending notify.
|
|
|
|
| |
Move existing check a few lines up, so that we check before accessing fields.
|
|
|
|
| |
Rename internal method for consistency.
|
|
|
|
|
| |
We were putting the requested values back into ringbuffer spec, instead of
using the queried values.
|
|
|
|
|
| |
Occasionally, we get a change callback for an old stream, triggering
the assertion unnecessarily. Just ignore such callbacks.
|
| |
|
|
|
|
|
| |
Always signal the waiters in the async callbacks. Especially for the volume
callbacks since this might cause deadlocks.
|
|
|
|
| |
Detected by LLVM's CLang static analyzer
|
| |
|
|
|
|
| |
Don't crash when the timing info is not yet available.
|
|
|
|
|
|
|
|
| |
First we ignore request to fill the ringbuffer which are less then a segment.
The small request where causing stutter.
Then we disable flushing the stream when running against pa 0.9.12 as this
triggers an assertiong in the sound server and terminates it. It does not happen
with 0.9.10 and 0.9.14.
|
|
|
|
|
| |
When the server is disconnected or when we are shut down, make our clock return
an invalid time instead of erroring out.
|
|
|
|
|
| |
Keep bps as gint instead of guint because we will be doing signed math with it
later on and we don't want weird results.
|
|
|
|
|
| |
Don't try to change the stream volume (and other things) when we don't have a
stream yet. Just store the values for later.
|
| |
|
|
|
|
|
|
|
| |
We can use prebuf = 0 to instruct pulse to not pause the stream on underflows.
This way we can remove the underflow callback. We however have to manually
uncork the stream now when we have no available space in the buffer or when we
are writing too far away from the current read_index.
|
| |
|
|
|
|
|
| |
Start filling up the buffer with empty samples when an underflow happens. We
need to do this to keep pulseaudio reporting the right time for us.
|
|
|
|
|
| |
Use the default basesink methods for implementing pull based scheduling, it
works fine for us.
|
| |
|
|
|
|
|
|
|
| |
when we switch streams, the clock will reset to 0. Make sure that the provided
clock doesn't get stuck when this happens by keeping an initial offset. We also
need to make sure that we subtract this offset in samples when writing to the
ringbuffer.
|
|
|
|
|
| |
Derive from BaseAudioSink and implement our custom ringbuffer that maps to the
internal pulseaudio ringbuffer.
|
|
|
|
|
| |
Make the state change function a bit more readable and only pause after the
parent had a change to pause first.
|
|
|
|
|
| |
Use an instance variable to track whether the stream is corked or not,
instead of using PA API that was only introduced in 0.9.11
|