View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003667MPDAudio Output - Pulseaudiopublic2013-02-04 16:112016-02-28 09:29
Assigned Tocirrus 
StatusclosedResolutionwon't fix 
PlatformRaspberry piOSraspbianOS Version2012-12
Product VersionOlder than 0.18 
Target VersionFixed in Version 
Summary0003667: Configure PulseAudio stream to use a higher latency
DescriptionIn Gstreamer I can configure the sink to let the sound hardware buffer 2000ms when routing through pulseaudio. This appears to be not possible using MPD?

I always get 200ms, where for simple music playback using a higher latency than the default would be desirable (for power saving reasons).

I suppose making this configurable would be best.
Steps To Reproduce$ pactl list sink-inputs
Sink Input 0000015
    Driver: protocol-native.c
    Owner Module: 2
    Client: 0
    Sink: 0
    Sample Specification: s16le 2ch 44100Hz
    Channel Map: front-left,front-right
    Format: pcm, format.sample_format = "\"s16le\"" format.rate = "44100" format.channels = "2" format.channel_map = "\"front-left,front-right\""
    Corked: no
    Mute: no
    Volume: 0: 52% 1: 52%
            0: -17.04 dB 1: -17.04 dB
            balance 0.00
    Buffer Latency: 81995 usec
    Sink Latency: 208486 usec
    Resample method: n/a
    Properties: = "PulseAudio" = "Music Player Daemon"
        native-protocol.peer = "UNIX socket client"
        native-protocol.version = "27"
        media.role = "music" = "2073"
        application.process.user = "mpd" = "arpi"
        application.process.binary = "threaded-ml"
        application.language = "C"
        application.process.machine_id = "f12629ad79391c6f12cbbc1a50ccbcc8" = "sink-input-by-media-role:music"
Additional InformationThe scheme is described at [1] under the heading "Developing High-Latency Applications"

[1] [^]
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
cirrus (administrator)
2013-02-04 16:14

Care to write a patch? I don't use Pulse.
towolf (reporter)
2013-02-04 16:19

My abilities would perhaps allow me to hack a value into the pa_stream_connect_playback() call and test this.

But it would already be beyond my abilities to hook it up to the rest of MPD in any clean manner.

Should I at least test with the max int - 1 hard coded value?
cirrus (administrator)
2013-02-04 16:21

Is there anything to hook up? I mean, MPD doesn't care about latency at all, it isn't interested in knowing the actual latency. MPD is optimized for reliability, not at all for latency. I'm ok with hard-coding a large value, if there's no downside.
towolf (reporter)
2013-02-04 16:27

The downside is that upon skip the buffer has to be discarded, or rewritten, otherwise after a pause or skip it would continue playing for 2000ms.

Also this is beyond my abilities. This would have to be implemented as well I suppose.

The thing is that the client has to tell pulse what it wants: just play some music whenever, or give me as close to real-time as possible for voip, for example.

As the default pulse gives you 200ms, where more would be more appropriate.
cirrus (administrator)
2016-02-28 09:29

For 3 years, nobody was interested in writing code. Closing due to lack of interest.

- Issue History
Date Modified Username Field Change
2013-02-04 16:11 towolf New Issue
2013-02-04 16:11 towolf Status new => assigned
2013-02-04 16:11 towolf Assigned To => cirrus
2013-02-04 16:14 cirrus Note Added: 0007638
2013-02-04 16:19 towolf Note Added: 0007639
2013-02-04 16:21 cirrus Note Added: 0007640
2013-02-04 16:27 towolf Note Added: 0007641
2013-04-06 11:51 cirrus Severity minor => feature
2016-02-28 09:29 cirrus Note Added: 0009838
2016-02-28 09:29 cirrus Status assigned => closed
2016-02-28 09:29 cirrus Resolution open => won't fix

Copyright © 2000 - 2016 MantisBT Team
Powered by Mantis Bugtracker