Bugzilla – Bug 3243
Audio glitches when pausing and resuming
Last modified: 2019-01-25 11:58:15 UTC
When the audio is paused and then resumed, the audio glitches. It initially restarts at full volume, drops to almost silent, then steps up to full volume. I suspect that the cause is rooted in the way Softsqueeze handles the volume changes used to fade the audio out and back in again, possibly not processing them until the audio resumes. The following are the player debug messages seen during a couple of pause / play cycles. 28235 [SlimTCP-1] DEBUG player - audg oldLeft=0 oldRight=0 newLeft=0.0 newRight=0.0 28250 [SlimTCP-1] DEBUG player - audg oldLeft=9 oldRight=9 newLeft=0.00794995 newRight=0.00794995 28266 [SlimTCP-1] DEBUG player - httpRequest=GET /stream.mp3?player=d5:66:8e:19:63:ad HTTP/1.0 Authorization: Basic c3F1ZWV6ZWJveFhYWDpJRmxMM2NwWUk0 28281 [SlimTCP-1] DEBUG player - parsed strm: command=s format=102 crossfade=0 replygain=1.0 ipaddr=localhost port=9000 autostart=true autostartThreshold=261120 28281 [SlimTCP-1] DEBUG player - connect: state 0 28297 [SlimTCP-1] DEBUG player - http connect: ipaddr=localhost port=9000 28297 [SlimTCP-1] DEBUG player - buffer null state 0 28297 [SlimTCP-1] DEBUG player - status=STMc fullness=0 bytesRx=0 elapsedSeconds=0 28313 [SlimTCP-1] DEBUG player - http write headers: GET /stream.mp3?player=d5:66:8e:19:63:ad HTTP/1.0 Authorization: Basic c3F1ZWV6ZWJveFhYWDpJRmxMM2NwWUk0 31594 [SlimTCP-1] DEBUG player - http read header: (len 136/2048) HTTP/1.0 200 OK Date: Tue, 04 Apr 2006 22:37:15 GMT Server: SlimServer (6.2.2 - 6811) Connection: close Content-Type: audio/mpeg 31594 [SlimTCP-1] DEBUG player - buffer null state 0 31610 [SlimTCP-1] DEBUG player - status=STMh fullness=0 bytesRx=0 elapsedSeconds=0 31610 [SlimTCP-1] DEBUG player - initStream: state 1 31938 [SlimTCP-1] DEBUG player - autostart: state 2 31938 [SlimTCP-1] DEBUG player - autostart: fullness=8192 threshold=261120 31938 [SlimTCP-1] DEBUG player - audg oldLeft=9 oldRight=9 newLeft=0.00794995 newRight=0.00794995 31953 [SlimTCP-1] DEBUG player - audg oldLeft=24 oldRight=24 newLeft=0.019958802 newRight=0.019958802 31953 [SlimTCP-1] DEBUG player - audg oldLeft=43 oldRight=43 newLeft=0.050782025 newRight=0.050782025 32031 [AudioDecoder-0] DEBUG player - autostart: state 2 32031 [AudioDecoder-0] DEBUG player - autostart: fullness=8192 threshold=261120 32391 [SlimTCP-1] DEBUG player - audg oldLeft=66 oldRight=66 newLeft=0.1250019 newRight=0.1250019 32438 [SlimTCP-1] DEBUG player - audg oldLeft=92 oldRight=92 newLeft=0.31641108 newRight=0.31641108 32500 [SlimTCP-1] DEBUG player - audg oldLeft=121 oldRight=121 newLeft=0.79298085 newRight=0.79298085 32578 [SlimTCP-1] DEBUG player - audg oldLeft=128 oldRight=128 newLeft=1.0 newRight=1.0 32610 [Player Status] DEBUG player - write count 167936 available 114688 32766 [AudioStream-0] DEBUG player - autostart: state 2 32766 [AudioStream-0] DEBUG player - autostart: fullness=262144 threshold=261120 32766 [AudioStream-0] DEBUG player - start: state 2 32766 [AudioMixer-0] DEBUG player - write count 262144 available 135168 32766 [AudioMixer-0] DEBUG player - status=STMs fullness=135168 bytesRx=262144 elapsedSeconds=0 33766 [Player Status] DEBUG player - write count 1028096 available 245760 34766 [Player Status] DEBUG player - write count 1785856 available 5120 35766 [Player Status] DEBUG player - write count 2662400 available 271360 36797 [Player Status] DEBUG player - write count 3530752 available 1047552 37797 [Player Status] DEBUG player - write count 3633152 available 1018880 38797 [Player Status] DEBUG player - write count 3796992 available 1047552 39203 [SlimTCP-1] DEBUG player - audg oldLeft=99 oldRight=99 newLeft=0.39844358 newRight=0.39844358 39250 [SlimTCP-1] DEBUG player - audg oldLeft=72 oldRight=72 newLeft=0.1601587 newRight=0.1601587 39313 [SlimTCP-1] DEBUG player - audg oldLeft=48 oldRight=48 newLeft=0.06250095 newRight=0.06250095 39360 [SlimTCP-1] DEBUG player - audg oldLeft=28 oldRight=28 newLeft=0.02511635 newRight=0.02511635 39422 [SlimTCP-1] DEBUG player - audg oldLeft=12 oldRight=12 newLeft=0.00999466 newRight=0.00999466 39469 [SlimTCP-1] DEBUG player - audg oldLeft=2 oldRight=2 newLeft=0.003982605 newRight=0.003982605 39516 [SlimTCP-1] DEBUG player - audg oldLeft=0 oldRight=0 newLeft=0.0 newRight=0.0 39531 [SlimTCP-1] DEBUG player - httpRequest=GET /stream.mp3?player=d5:66:8e:19:63:ad HTTP/1.0 Authorization: Basic c3F1ZWV6ZWJveFhYWDpwZHNIV2RhTEdv 39531 [SlimTCP-1] DEBUG player - parsed strm: command=p format=109 crossfade=0 replygain=1.0 ipaddr=localhost port=9000 autostart=false autostartThreshold=261120 39531 [SlimTCP-1] DEBUG player - pause: state 3 39531 [SlimTCP-1] DEBUG player - write count 3862528 available 1025024 39531 [SlimTCP-1] DEBUG player - status=STMp fullness=1025024 bytesRx=3862528 elapsedSeconds=6 39531 [Player Status] DEBUG player - write count 3862528 available 1025024 44156 [SlimTCP-1] DEBUG player - httpRequest=GET /stream.mp3?player=d5:66:8e:19:63:ad HTTP/1.0 Authorization: Basic c3F1ZWV6ZWJveFhYWDpLWDJJbEtad2xz 44156 [SlimTCP-1] DEBUG player - parsed strm: command=u format=109 crossfade=0 replygain=1.0 ipaddr=localhost port=9000 autostart=true autostartThreshold=261120 44156 [SlimTCP-1] DEBUG player - start: state 4 44188 [Player Status] DEBUG player - write count 3895296 available 1047552 44188 [SlimTCP-1] DEBUG player - audg oldLeft=0 oldRight=0 newLeft=0.0 newRight=0.0 44188 [SlimTCP-1] DEBUG player - httpRequest=GET /stream.mp3?player=d5:66:8e:19:63:ad HTTP/1.0 Authorization: Basic c3F1ZWV6ZWJveFhYWDpWVGVTN1M1S2Fx 44188 [SlimTCP-1] DEBUG player - parsed strm: command=u format=109 crossfade=0 replygain=1.0 ipaddr=localhost port=9000 autostart=true autostartThreshold=261120 44188 [SlimTCP-1] DEBUG player - start: state 3 44188 [SlimTCP-1] DEBUG player - audg oldLeft=9 oldRight=9 newLeft=0.00794995 newRight=0.00794995 44219 [SlimTCP-1] DEBUG player - audg oldLeft=24 oldRight=24 newLeft=0.019958802 newRight=0.019958802 44266 [SlimTCP-1] DEBUG player - audg oldLeft=43 oldRight=43 newLeft=0.050782025 newRight=0.050782025 44328 [SlimTCP-1] DEBUG player - audg oldLeft=66 oldRight=66 newLeft=0.1250019 newRight=0.1250019 44375 [SlimTCP-1] DEBUG player - audg oldLeft=92 oldRight=92 newLeft=0.31641108 newRight=0.31641108 44438 [SlimTCP-1] DEBUG player - audg oldLeft=121 oldRight=121 newLeft=0.79298085 newRight=0.79298085 44485 [SlimTCP-1] DEBUG player - audg oldLeft=128 oldRight=128 newLeft=1.0 newRight=1.0 45188 [Player Status] DEBUG player - write count 3997696 available 1041408 46188 [Player Status] DEBUG player - write count 4038656 available 997376 47188 [Player Status] DEBUG player - write count 4218880 available 1020928 48188 [Player Status] DEBUG player - write count 4317184 available 1038336 49188 [Player Status] DEBUG player - write count 4460544 available 1045504 49797 [SlimTCP-1] DEBUG player - audg oldLeft=99 oldRight=99 newLeft=0.39844358 newRight=0.39844358 49860 [SlimTCP-1] DEBUG player - audg oldLeft=72 oldRight=72 newLeft=0.1601587 newRight=0.1601587 49906 [SlimTCP-1] DEBUG player - audg oldLeft=48 oldRight=48 newLeft=0.06250095 newRight=0.06250095 49969 [SlimTCP-1] DEBUG player - audg oldLeft=28 oldRight=28 newLeft=0.02511635 newRight=0.02511635 50016 [SlimTCP-1] DEBUG player - audg oldLeft=12 oldRight=12 newLeft=0.00999466 newRight=0.00999466 50078 [SlimTCP-1] DEBUG player - audg oldLeft=2 oldRight=2 newLeft=0.003982605 newRight=0.003982605 50125 [SlimTCP-1] DEBUG player - audg oldLeft=0 oldRight=0 newLeft=0.0 newRight=0.0 50125 [SlimTCP-1] DEBUG player - httpRequest=GET /stream.mp3?player=d5:66:8e:19:63:ad HTTP/1.0 Authorization: Basic c3F1ZWV6ZWJveFhYWDpOZ01oT2F5dGdo 50141 [SlimTCP-1] DEBUG player - parsed strm: command=p format=109 crossfade=0 replygain=1.0 ipaddr=localhost port=9000 autostart=false autostartThreshold=261120 50141 [SlimTCP-1] DEBUG player - pause: state 3 50141 [SlimTCP-1] DEBUG player - write count 4546560 available 1022976 50141 [SlimTCP-1] DEBUG player - status=STMp fullness=1022976 bytesRx=4546560 elapsedSeconds=12 50141 [Player Status] DEBUG player - write count 4546560 available 1022976 54625 [SlimTCP-1] DEBUG player - httpRequest=GET /stream.mp3?player=d5:66:8e:19:63:ad HTTP/1.0 Authorization: Basic c3F1ZWV6ZWJveFhYWDp4NXNkOXJFYldP 54641 [SlimTCP-1] DEBUG player - parsed strm: command=u format=109 crossfade=0 replygain=1.0 ipaddr=localhost port=9000 autostart=true autostartThreshold=261120 54641 [SlimTCP-1] DEBUG player - start: state 4 54656 [Player Status] DEBUG player - write count 4575232 available 1042432 54672 [SlimTCP-1] DEBUG player - audg oldLeft=0 oldRight=0 newLeft=0.0 newRight=0.0 54672 [SlimTCP-1] DEBUG player - httpRequest=GET /stream.mp3?player=d5:66:8e:19:63:ad HTTP/1.0 Authorization: Basic c3F1ZWV6ZWJveFhYWDpXcXB3aGxId2xW 54672 [SlimTCP-1] DEBUG player - parsed strm: command=u format=109 crossfade=0 replygain=1.0 ipaddr=localhost port=9000 autostart=true autostartThreshold=261120 54672 [SlimTCP-1] DEBUG player - start: state 3 54672 [SlimTCP-1] DEBUG player - audg oldLeft=9 oldRight=9 newLeft=0.00794995 newRight=0.00794995 54688 [SlimTCP-1] DEBUG player - audg oldLeft=24 oldRight=24 newLeft=0.019958802 newRight=0.019958802 54750 [SlimTCP-1] DEBUG player - audg oldLeft=43 oldRight=43 newLeft=0.050782025 newRight=0.050782025 54797 [SlimTCP-1] DEBUG player - audg oldLeft=66 oldRight=66 newLeft=0.1250019 newRight=0.1250019 54860 [SlimTCP-1] DEBUG player - audg oldLeft=92 oldRight=92 newLeft=0.31641108 newRight=0.31641108 54906 [SlimTCP-1] DEBUG player - audg oldLeft=121 oldRight=121 newLeft=0.79298085 newRight=0.79298085 54969 [SlimTCP-1] DEBUG player - audg oldLeft=128 oldRight=128 newLeft=1.0 newRight=1.0 55672 [Player Status] DEBUG player - write count 4730880 available 1005568 56672 [Player Status] DEBUG player - write count 4833280 available 1026048 57672 [Player Status] DEBUG player - write count 4919296 available 984064 58672 [Player Status] DEBUG player - write count 5099520 available 1043456 59672 [Player Status] DEBUG player - write count 5197824 available 1026048 60672 [Player Status] DEBUG player - write count 5324800 available 1048576 61672 [Player Status] DEBUG player - write count 5419008 available 1030144 62688 [Player Status] DEBUG player - write count 5496832 available 988160 63688 [Player Status] DEBUG player - write count 5681152 available 1038336 64688 [Player Status] DEBUG player - write count 5775360 available 1039360 65688 [Player Status] DEBUG player - write count 5926912 available 1043456 66688 [Player Status] DEBUG player - write count 6012928 available 1002496 67688 [Player Status] DEBUG player - write count 6180864 available 1045504 68688 [Player Status] DEBUG player - write count 6283264 available 1017856 69688 [Player Status] DEBUG player - write count 6377472 available 1016832 70719 [Player Status] DEBUG player - write count 6545408 available 1043456 71719 [Player Status] DEBUG player - write count 6668288 available 1032192 72719 [Player Status] DEBUG player - write count 6787072 available 1027072 73735 [Player Status] DEBUG player - write count 6909952 available 1019904 74735 [Player Status] DEBUG player - write count 7041024 available 1046528 75735 [Player Status] DEBUG player - write count 7114752 available 996352 76750 [Player Status] DEBUG player - write count 7241728 available 998400 77750 [Player Status] DEBUG player - write count 7380992 available 1048576 78750 [Player Status] DEBUG player - write count 7512064 available 991232 79766 [Player Status] DEBUG player - write count 7610368 available 1003520 80766 [Player Status] DEBUG player - write count 7737344 available 994304 81766 [Player Status] DEBUG player - write count 7880704 available 1012736 82797 [Player Status] DEBUG player - write count 7999488 available 1043456 83797 [Player Status] DEBUG player - write count 8114176 available 1030144 84797 [Player Status] DEBUG player - write count 8253440 available 1020928
This will be really difficult to fix in Softsqueeze. The problem is what some pcm data is written to the Java audio output buffer and gets discarded when pausing the stream. Unfortunatly this happens inside Java, and I do not know of a workaround.
Unassigned bugs cannot have a priority.