MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003667MPDAudio Output - Pulseaudiopublic2013-02-04 17:112013-04-06 13:51
Reportertowolf 
Assigned Tocirrus 
PrioritynormalSeverityfeatureReproducibilityalways
StatusassignedResolutionopen 
PlatformRaspberry piOSraspbianOS Version2012-12
Product VersionOlder than 0.17 
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:
        media.name = "PulseAudio"
        application.name = "Music Player Daemon"
        native-protocol.peer = "UNIX socket client"
        native-protocol.version = "27"
        media.role = "music"
        application.process.id = "2073"
        application.process.user = "mpd"
        application.process.host = "arpi"
        application.process.binary = "threaded-ml"
        application.language = "C"
        application.process.machine_id = "f12629ad79391c6f12cbbc1a50ccbcc8"
        module-stream-restore.id = "sink-input-by-media-role:music"
Additional InformationThe scheme is described at [1] under the heading "Developing High-Latency Applications"

[1] http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/Developer/Clients/LactencyControl [^]
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0007638)
cirrus (administrator)
2013-02-04 17:14

Care to write a patch? I don't use Pulse.
(0007639)
towolf (reporter)
2013-02-04 17: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?
(0007640)
cirrus (administrator)
2013-02-04 17: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.
(0007641)
towolf (reporter)
2013-02-04 17: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.

- Issue History
Date Modified Username Field Change
2013-02-04 17:11 towolf New Issue
2013-02-04 17:11 towolf Status new => assigned
2013-02-04 17:11 towolf Assigned To => cirrus
2013-02-04 17:14 cirrus Note Added: 0007638
2013-02-04 17:19 towolf Note Added: 0007639
2013-02-04 17:21 cirrus Note Added: 0007640
2013-02-04 17:27 towolf Note Added: 0007641
2013-04-06 13:51 cirrus Severity minor => feature


Copyright © 2000 - 2014 MantisBT Team
Powered by Mantis Bugtracker