Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pulseaudio backend does not work reliable #7

Open
klingtnet opened this issue May 2, 2016 · 3 comments
Open

Pulseaudio backend does not work reliable #7

klingtnet opened this issue May 2, 2016 · 3 comments

Comments

@klingtnet
Copy link
Owner

Pulseaudio outputs only a single buffer of audio and then stops the output. This issue occurs for other users as well (#6).
Getting pulseaudio's debug output is not as straight-forward as one might think, at least not on Arch Linux machines running Gnome 3. To get the debug log use the following steps:

  • add autospawn=no to your ~/.config/pulse/client.conf (or /etc/pulse/client.conf, but the former one is preferred)
  • disable the systemd user service (this is not mentioned in the Arch Wiki): systemctl --user stop pulseaudio
  • maybe it's necessary to stop the socket too: systemctl --user top pulseaudio.socket to prevent pa from respawning
  • kill leftover daemons: killall pulseaudio
  • run with debug output: pulseaudio -vvvvv --log-level=debug --log-time --daemonize=no

Running cargo run --release --example sine produced the following log output:

   3.149|   0.000) D: [pulseaudio] module-augment-properties.c: Looking for .desktop file for sine
(   3.149|   0.000) D: [pulseaudio] protocol-native.c: Client enabled srbchannel.
(   3.150|   0.000) D: [pulseaudio] module-stream-restore.c: Not restoring device for stream sink-input-by-application-name:rsoundio-example, because already set to 'alsa_output.pci-0000_00_1b.0.analog-stereo'.
(   3.150|   0.000) D: [pulseaudio] module-intended-roles.c: Not setting device for stream sine, because already set.
(   3.150|   0.000) D: [pulseaudio] sink-input.c: Negotiated format: pcm, format.sample_format = "\"float32le\""  format.rate = "48000"  format.channels = "2"  format.channel_map = "\"front-left,front-right\""
(   3.150|   0.000) I: [pulseaudio] sink-input.c: Trying to change sample rate
(   3.150|   0.000) I: [pulseaudio] sink-input.c: Rate changed to 48000 Hz
(   3.150|   0.000) I: [pulseaudio] module-stream-restore.c: Restoring mute state for sink input sink-input-by-application-name:rsoundio-example.
(   3.150|   0.000) D: [pulseaudio] module-suspend-on-idle.c: Sink alsa_output.pci-0000_00_1b.0.analog-stereo becomes busy, resuming.
(   3.150|   0.000) D: [pulseaudio] module-suspend-on-idle.c: Sink alsa_output.pci-0000_00_1b.0.analog-stereo becomes idle, timeout in 5 seconds.
(   3.150|   0.000) I: [pulseaudio] resampler.c: Forcing resampler 'copy', because of fixed, identical sample rates.
(   3.150|   0.000) D: [pulseaudio] resampler.c: Resampler:
(   3.150|   0.000) D: [pulseaudio] resampler.c:   rate 48000 -> 48000 (method copy)
(   3.150|   0.000) D: [pulseaudio] resampler.c:   format float32le -> s32le (intermediate float32le)
(   3.150|   0.000) D: [pulseaudio] resampler.c:   channels 2 -> 2 (resampling 2)
(   3.150|   0.000) D: [pulseaudio] memblockq.c: memblockq requested: maxlength=33554432, tlength=0, base=8, prebuf=0, minreq=1 maxrewind=0
(   3.150|   0.000) D: [pulseaudio] memblockq.c: memblockq sanitized: maxlength=33554432, tlength=33554432, base=8, prebuf=0, minreq=8 maxrewind=0
(   3.150|   0.000) I: [pulseaudio] sink-input.c: Created input 0 "sine" on alsa_output.pci-0000_00_1b.0.analog-stereo with sample spec float32le 2ch 48000Hz and channel map front-left,front-right
(   3.150|   0.000) I: [pulseaudio] sink-input.c:     media.name = "sine"
(   3.150|   0.000) I: [pulseaudio] sink-input.c:     application.name = "rsoundio-example"
(   3.150|   0.000) I: [pulseaudio] sink-input.c:     native-protocol.peer = "UNIX socket client"
(   3.150|   0.000) I: [pulseaudio] sink-input.c:     native-protocol.version = "30"
(   3.150|   0.000) I: [pulseaudio] sink-input.c:     application.process.id = "23551"
(   3.150|   0.000) I: [pulseaudio] sink-input.c:     application.process.user = "andreas"
(   3.150|   0.000) I: [pulseaudio] sink-input.c:     application.process.host = "elitebook"
(   3.150|   0.000) I: [pulseaudio] sink-input.c:     application.process.binary = "sine"
(   3.150|   0.000) I: [pulseaudio] sink-input.c:     application.language = "C"
(   3.150|   0.000) I: [pulseaudio] sink-input.c:     window.x11.display = ":1"
(   3.150|   0.000) I: [pulseaudio] sink-input.c:     application.process.machine_id = "ce8d58fbb2eb4fcaafacb55ad232bcbc"
(   3.150|   0.000) I: [pulseaudio] sink-input.c:     application.process.session_id = "c2"
(   3.150|   0.000) I: [pulseaudio] sink-input.c:     module-stream-restore.id = "sink-input-by-application-name:rsoundio-example"
(   3.150|   0.000) I: [pulseaudio] protocol-native.c: Requested tlength=2000,00 ms, minreq=20,00 ms
(   3.150|   0.000) D: [pulseaudio] protocol-native.c: Traditional mode enabled, modifying sink usec only for compat with minreq.
(   3.150|   0.000) D: [pulseaudio] protocol-native.c: Requested latency=1960,00 ms, Received latency=1960,00 ms
(   3.150|   0.000) D: [pulseaudio] memblockq.c: memblockq requested: maxlength=4194304, tlength=768000, base=8, prebuf=0, minreq=7680 maxrewind=0
(   3.150|   0.000) D: [pulseaudio] memblockq.c: memblockq sanitized: maxlength=4194304, tlength=768000, base=8, prebuf=0, minreq=7680 maxrewind=0
(   3.150|   0.000) I: [pulseaudio] protocol-native.c: Final latency 3960,00 ms = 1960,00 ms + 2*20,00 ms + 1960,00 ms
(   3.150|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Latency set to 1960,00ms
(   3.150|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: hwbuf_unused=15360
(   3.150|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: setting avail_min=95041
(   3.150|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Requesting rewind due to latency change.
(   3.150|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Requested volume: front-left: 29777 /  45% / -20,56 dB,   front-right: 29777 /  45% / -20,56 dB
(   3.150|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Got hardware volume: front-left: 29899 /  46% / -20,45 dB,   front-right: 29899 /  46% / -20,45 dB
(   3.150|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Calculated software volume: front-left: 65269 / 100% / -0,11 dB,   front-right: 65269 / 100% / -0,11 dB (accurate-enough=yes)
(   3.150|   0.000) D: [alsa-sink-92HD81B1X5 Analog] sink.c: Volume not changing
(   3.150|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Requested to rewind 768000 bytes.
(   3.150|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Limited to 733768 bytes.
(   3.150|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: before: 91721
(   3.150|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: after: 91721
(   3.150|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Rewound 733768 bytes.
(   3.150|   0.000) D: [alsa-sink-92HD81B1X5 Analog] sink.c: Processing rewind...
(   3.150|   0.000) D: [alsa-sink-92HD81B1X5 Analog] sink.c: latency = 1105
(   3.150|   0.000) D: [alsa-sink-92HD81B1X5 Analog] sink-input.c: Have to rewind 733768 bytes on render memblockq.
(   3.150|   0.000) D: [alsa-sink-92HD81B1X5 Analog] source.c: Processing rewind...
(   3.152|   0.002) D: [alsa-sink-92HD81B1X5 Analog] protocol-native.c: Requesting rewind due to end of underrun.
(   3.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] protocol-native.c: Requesting rewind due to end of underrun.
(   3.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] sink-input.c: Requesting rewind due to uncorking
(   3.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Requested to rewind 768000 bytes.
(   3.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Limited to 751240 bytes.
(   3.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: before: 93905
(   3.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: after: 93905
(   3.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Rewound 751240 bytes.
(   3.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] sink.c: Processing rewind...
(   3.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] sink.c: latency = 1215
(   3.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] source.c: Processing rewind...
(   3.153|   0.000) D: [pulseaudio] module-suspend-on-idle.c: Sink alsa_output.pci-0000_00_1b.0.analog-stereo becomes busy, resuming.
(   3.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] protocol-native.c: Implicit underrun of 'sine'
(   3.155|   0.002) D: [alsa-sink-92HD81B1X5 Analog] protocol-native.c: Requesting rewind due to rewrite.
(   3.155|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Requested to rewind 735784 bytes.
(   3.155|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Limited to 735784 bytes.
(   3.155|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: before: 91973
(   3.155|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: after: 91973
(   3.155|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Rewound 735784 bytes.
(   3.155|   0.000) D: [alsa-sink-92HD81B1X5 Analog] sink.c: Processing rewind...
(   3.155|   0.000) D: [alsa-sink-92HD81B1X5 Analog] sink.c: latency = 41383
(   3.155|   0.000) D: [alsa-sink-92HD81B1X5 Analog] sink-input.c: Have to rewind 735784 bytes on render memblockq.
(   3.155|   0.000) D: [alsa-sink-92HD81B1X5 Analog] sink-input.c: Have to rewind 735784 bytes on implementor.
(   3.155|   0.000) D: [alsa-sink-92HD81B1X5 Analog] source.c: Processing rewind...
(   3.155|   0.000) D: [alsa-sink-92HD81B1X5 Analog] protocol-native.c: Implicit underrun of 'sine'
(   4.432|   1.276) D: [alsa-sink-92HD81B1X5 Analog] protocol-native.c: Requesting rewind due to rewrite.
(   4.432|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Requested to rewind 768000 bytes.
(   4.432|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Limited to 751304 bytes.
(   4.432|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: before: 93913
(   4.432|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: after: 93913
(   4.432|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Rewound 751304 bytes.
(   4.432|   0.000) D: [alsa-sink-92HD81B1X5 Analog] sink.c: Processing rewind...
(   4.432|   0.000) D: [alsa-sink-92HD81B1X5 Analog] sink.c: latency = 1233
(   4.432|   0.000) D: [alsa-sink-92HD81B1X5 Analog] sink-input.c: Have to rewind 751304 bytes on render memblockq.
(   4.432|   0.000) D: [alsa-sink-92HD81B1X5 Analog] sink-input.c: Have to rewind 751304 bytes on implementor.
(   4.432|   0.000) D: [alsa-sink-92HD81B1X5 Analog] source.c: Processing rewind...
(   5.097|   0.664) I: [pulseaudio] module-suspend-on-idle.c: Source alsa_input.pci-0000_00_1b.0.analog-stereo idle for too long, suspending ...
(   5.097|   0.000) D: [pulseaudio] source.c: Suspend cause of source alsa_input.pci-0000_00_1b.0.analog-stereo is 0x0004, suspending
(   5.097|   0.000) I: [alsa-source-92HD81B1X5 Analog] alsa-source.c: Device suspended...
(   5.097|   0.000) D: [pulseaudio] module-udev-detect.c: /dev/snd/controlC2 is accessible: yes
(   5.097|   0.000) D: [pulseaudio] module-udev-detect.c: Resuming all sinks and sources of card alsa_card.pci-0000_00_1b.0.
(   5.713|   0.615) D: [alsa-sink-92HD81B1X5 Analog] protocol-native.c: Requesting rewind due to rewrite.
(   5.713|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Requested to rewind 768000 bytes.
(   5.713|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Limited to 751368 bytes.
(   5.713|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: before: 93921
(   5.713|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: after: 93921
(   5.713|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Rewound 751368 bytes.
(   5.713|   0.000) D: [alsa-sink-92HD81B1X5 Analog] sink.c: Processing rewind...
(   5.713|   0.000) D: [alsa-sink-92HD81B1X5 Analog] sink.c: latency = 997
(   5.713|   0.000) D: [alsa-sink-92HD81B1X5 Analog] sink-input.c: Have to rewind 751368 bytes on render memblockq.
(   5.713|   0.000) D: [alsa-sink-92HD81B1X5 Analog] sink-input.c: Have to rewind 751368 bytes on implementor.
(   5.713|   0.000) D: [alsa-sink-92HD81B1X5 Analog] source.c: Processing rewind...
(   6.153|   0.439) D: [alsa-sink-92HD81B1X5 Analog] protocol-native.c: Requesting rewind due to rewrite.
(   6.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] sink-input.c: Requesting rewind due to corking
(   6.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Requested to rewind 768000 bytes.
(   6.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Limited to 583368 bytes.
(   6.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: before: 72921
(   6.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: after: 72921
(   6.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Rewound 583368 bytes.
(   6.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] sink.c: Processing rewind...
(   6.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] sink.c: latency = 1062
(   6.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] sink-input.c: Have to rewind 583368 bytes on render memblockq.
(   6.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] sink-input.c: Have to rewind 583368 bytes on implementor.
(   6.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] source.c: Processing rewind...
(   6.155|   0.001) D: [pulseaudio] module-suspend-on-idle.c: Sink alsa_output.pci-0000_00_1b.0.analog-stereo becomes idle, timeout in 5 seconds.
(   7.153|   0.998) D: [alsa-sink-92HD81B1X5 Analog] sink-input.c: Requesting rewind due to uncorking
(   7.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Requested to rewind 768000 bytes.
(   7.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Limited to 751816 bytes.
(   7.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: before: 93977
(   7.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: after: 93977
(   7.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Rewound 751816 bytes.
(   7.153|   0.000) D: [pulseaudio] module-suspend-on-idle.c: Sink alsa_output.pci-0000_00_1b.0.analog-stereo becomes busy, resuming.
(   7.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] sink.c: Processing rewind...
(   7.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] sink.c: latency = 1057
(   7.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] source.c: Processing rewind...
(   7.156|   0.002) D: [alsa-sink-92HD81B1X5 Analog] protocol-native.c: Requesting rewind due to rewrite.
(   7.156|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Requested to rewind 752168 bytes.
(   7.156|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Limited to 751016 bytes.
(   7.156|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: before: 93877
(   7.156|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: after: 93877
(   7.156|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Rewound 751016 bytes.
(   7.156|   0.000) D: [alsa-sink-92HD81B1X5 Analog] sink.c: Processing rewind...
(   7.156|   0.000) D: [alsa-sink-92HD81B1X5 Analog] sink.c: latency = 1118
(   7.156|   0.000) D: [alsa-sink-92HD81B1X5 Analog] sink-input.c: Have to rewind 751016 bytes on render memblockq.
(   7.156|   0.000) D: [alsa-sink-92HD81B1X5 Analog] sink-input.c: Have to rewind 751016 bytes on implementor.
(   7.156|   0.000) D: [alsa-sink-92HD81B1X5 Analog] source.c: Processing rewind...
(   8.430|   1.273) D: [alsa-sink-92HD81B1X5 Analog] protocol-native.c: Requesting rewind due to rewrite.
(   8.430|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Requested to rewind 768000 bytes.
(   8.430|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Limited to 751368 bytes.
(   8.430|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: before: 93921
(   8.430|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: after: 93921
(   8.430|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Rewound 751368 bytes.
(   8.430|   0.000) D: [alsa-sink-92HD81B1X5 Analog] sink.c: Processing rewind...
(   8.430|   0.000) D: [alsa-sink-92HD81B1X5 Analog] sink.c: latency = 1810
(   8.430|   0.000) D: [alsa-sink-92HD81B1X5 Analog] sink-input.c: Have to rewind 751368 bytes on render memblockq.
(   8.430|   0.000) D: [alsa-sink-92HD81B1X5 Analog] sink-input.c: Have to rewind 751368 bytes on implementor.
(   8.430|   0.000) D: [alsa-sink-92HD81B1X5 Analog] source.c: Processing rewind...
(   9.711|   1.281) D: [alsa-sink-92HD81B1X5 Analog] protocol-native.c: Requesting rewind due to rewrite.
(   9.711|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Requested to rewind 768000 bytes.
(   9.711|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Limited to 751336 bytes.
(   9.711|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: before: 93917
(   9.712|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: after: 93917
(   9.712|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Rewound 751336 bytes.
(   9.712|   0.000) D: [alsa-sink-92HD81B1X5 Analog] sink.c: Processing rewind...
(   9.712|   0.000) D: [alsa-sink-92HD81B1X5 Analog] sink.c: latency = 1235
(   9.712|   0.000) D: [alsa-sink-92HD81B1X5 Analog] sink-input.c: Have to rewind 751336 bytes on render memblockq.
(   9.712|   0.000) D: [alsa-sink-92HD81B1X5 Analog] sink-input.c: Have to rewind 751336 bytes on implementor.
(   9.712|   0.000) D: [alsa-sink-92HD81B1X5 Analog] source.c: Processing rewind...
(  10.153|   0.441) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: hwbuf_unused=0
(  10.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: setting avail_min=95041
(  10.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Requested volume: front-left: 29777 /  45% / -20,56 dB,   front-right: 29777 /  45% / -20,56 dB
(  10.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Got hardware volume: front-left: 29899 /  46% / -20,45 dB,   front-right: 29899 /  46% / -20,45 dB
(  10.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Calculated software volume: front-left: 65269 / 100% / -0,11 dB,   front-right: 65269 / 100% / -0,11 dB (accurate-enough=yes)
(  10.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] sink.c: Volume not changing
(  10.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Requested to rewind 768000 bytes.
(  10.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Limited to 582696 bytes.
(  10.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: before: 72837
(  10.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: after: 72837
(  10.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Rewound 582696 bytes.
(  10.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] sink.c: Processing rewind...
(  10.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] sink.c: latency = 1394
(  10.153|   0.000) D: [alsa-sink-92HD81B1X5 Analog] source.c: Processing rewind...
(  10.154|   0.001) D: [pulseaudio] module-suspend-on-idle.c: Sink alsa_output.pci-0000_00_1b.0.analog-stereo becomes idle, timeout in 5 seconds.
(  10.155|   0.000) D: [pulseaudio] module-suspend-on-idle.c: Sink alsa_output.pci-0000_00_1b.0.analog-stereo becomes idle, timeout in 5 seconds.
(  10.155|   0.000) D: [pulseaudio] core.c: Hmm, no streams around, trying to vacuum.
(  10.155|   0.000) I: [pulseaudio] sink-input.c: Freeing input 0 "sine"
(  10.155|   0.000) I: [pulseaudio] client.c: Freed 6 "rsoundio-example"
(  10.155|   0.000) I: [pulseaudio] protocol-native.c: Connection died.
(  15.155|   4.999) I: [pulseaudio] module-suspend-on-idle.c: Sink alsa_output.pci-0000_00_1b.0.analog-stereo idle for too long, suspending ...
(  15.155|   0.000) D: [pulseaudio] sink.c: Suspend cause of sink alsa_output.pci-0000_00_1b.0.analog-stereo is 0x0004, suspending
(  15.157|   0.001) I: [alsa-sink-92HD81B1X5 Analog] alsa-sink.c: Device suspended...
(  15.157|   0.000) D: [pulseaudio] core.c: Hmm, no streams around, trying to vacuum.
(  15.158|   0.000) D: [pulseaudio] module-udev-detect.c: /dev/snd/controlC2 is accessible: yes
(  15.158|   0.000) D: [pulseaudio] module-udev-detect.c: Resuming all sinks and sources of card alsa_card.pci-0000_00_1b.0.
@klingtnet
Copy link
Owner Author

klingtnet commented May 3, 2016

The pulseaudio stream works when pavucontrol runs besides the sine example. This is strange. Can somebody reproduce this @ul?

Here is a small video proof (I can't record audio with gnome's default screencaster).

@ul
Copy link

ul commented May 3, 2016

Yes, I confirm that weirdness! The example works with pavucontrol running on my system too, and doesn't work w/o it!

@klingtnet
Copy link
Owner Author

klingtnet commented May 3, 2016

The original sine example writes always max_frame_count frames, which does indeed help a bit. I've updated the example in the master branch 0e6f0f8 to write max_frame_count frames, too. The output is still distorted, even though it now outputs a continuous signal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants