[GH-ISSUE #109] volume up and down in the TUI is slow (yes it's that slow) #45

Closed
opened 2026-03-02 23:43:59 +03:00 by kerem · 9 comments
Owner

Originally created by @sewnie on GitHub (Jan 17, 2023).
Original GitHub issue: https://github.com/aome510/spotify-player/issues/109

To Reproduce
press + or - in the TUI.

Expected behavior
the volume is changed quickly.

Log and backtrace

2023-01-17T18:16:02.584287Z  INFO client_request{request=Player(Volume(70))}: spotify_player::client: successfully handled the client request, took: 881ms
2023-01-17T18:16:02.645004Z  INFO client_request{request=Player(Volume(65))}: spotify_player::client: successfully handled the client request, took: 1943ms
2023-01-17T18:16:02.789889Z  INFO client_request{request=Player(Volume(70))}: spotify_player::client: successfully handled the client request, took: 910ms
2023-01-17T18:16:02.794967Z  INFO spotify_player::streaming: Got an event from the integrated player: VolumeSet { volume: 45875 }
2023-01-17T18:16:02.795170Z  INFO spotify_player::streaming: Got an event from the integrated player: VolumeSet { volume: 45875 }
2023-01-17T18:16:02.795421Z  INFO spotify_player::streaming: Got an event from the integrated player: VolumeSet { volume: 42598 }
2023-01-17T18:16:02.805218Z  INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 394ms
2023-01-17T18:16:02.908913Z  INFO client_request{request=Player(Volume(70))}: spotify_player::client: successfully handled the client request, took: 872ms
2023-01-17T18:16:03.050788Z  INFO spotify_player::streaming: Got an event from the integrated player: VolumeSet { volume: 45875 }
2023-01-17T18:16:03.050805Z  INFO spotify_player::streaming: Got an event from the integrated player: VolumeSet { volume: 45875 }
2023-01-17T18:16:03.189504Z  INFO client_request{request=Player(Volume(70))}: spotify_player::client: successfully handled the client request, took: 868ms
2023-01-17T18:16:03.244697Z  INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 449ms
2023-01-17T18:16:03.245835Z  INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 450ms
2023-01-17T18:16:03.347952Z  INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 552ms
2023-01-17T18:16:03.434754Z  INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 383ms
2023-01-17T18:16:03.435040Z  INFO spotify_player::streaming: Got an event from the integrated player: VolumeSet { volume: 45875 }
2023-01-17T18:16:03.658299Z  INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 607ms
2023-01-17T18:16:03.831520Z  INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 396ms

Additional context
I would like to point out that changing the volume from Spotify's Mobile or Web or Desktop client is very quick, compared to the TUI.

Originally created by @sewnie on GitHub (Jan 17, 2023). Original GitHub issue: https://github.com/aome510/spotify-player/issues/109 **To Reproduce** press `+` or `-` in the TUI. **Expected behavior** the volume is changed quickly. **Log and backtrace** ``` 2023-01-17T18:16:02.584287Z INFO client_request{request=Player(Volume(70))}: spotify_player::client: successfully handled the client request, took: 881ms 2023-01-17T18:16:02.645004Z INFO client_request{request=Player(Volume(65))}: spotify_player::client: successfully handled the client request, took: 1943ms 2023-01-17T18:16:02.789889Z INFO client_request{request=Player(Volume(70))}: spotify_player::client: successfully handled the client request, took: 910ms 2023-01-17T18:16:02.794967Z INFO spotify_player::streaming: Got an event from the integrated player: VolumeSet { volume: 45875 } 2023-01-17T18:16:02.795170Z INFO spotify_player::streaming: Got an event from the integrated player: VolumeSet { volume: 45875 } 2023-01-17T18:16:02.795421Z INFO spotify_player::streaming: Got an event from the integrated player: VolumeSet { volume: 42598 } 2023-01-17T18:16:02.805218Z INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 394ms 2023-01-17T18:16:02.908913Z INFO client_request{request=Player(Volume(70))}: spotify_player::client: successfully handled the client request, took: 872ms 2023-01-17T18:16:03.050788Z INFO spotify_player::streaming: Got an event from the integrated player: VolumeSet { volume: 45875 } 2023-01-17T18:16:03.050805Z INFO spotify_player::streaming: Got an event from the integrated player: VolumeSet { volume: 45875 } 2023-01-17T18:16:03.189504Z INFO client_request{request=Player(Volume(70))}: spotify_player::client: successfully handled the client request, took: 868ms 2023-01-17T18:16:03.244697Z INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 449ms 2023-01-17T18:16:03.245835Z INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 450ms 2023-01-17T18:16:03.347952Z INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 552ms 2023-01-17T18:16:03.434754Z INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 383ms 2023-01-17T18:16:03.435040Z INFO spotify_player::streaming: Got an event from the integrated player: VolumeSet { volume: 45875 } 2023-01-17T18:16:03.658299Z INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 607ms 2023-01-17T18:16:03.831520Z INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 396ms ``` **Additional context** I would like to point out that changing the volume from Spotify's Mobile or Web or Desktop client is very quick, compared to the TUI.
kerem 2026-03-02 23:43:59 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@aome510 commented on GitHub (Jan 17, 2023):

Thanks for creating this issue. I'm well aware of this problem.

As you can see from the logs, currently, the client updates the volume by getting the current value, add/subtract 5%, then make a "set" request. The problem is that it takes time for spotify server to reflect the new change, hence making the update look slow. Pressing + multiple times only result in one update.

I already have some rough ideas to fix this.

<!-- gh-comment-id:1385904827 --> @aome510 commented on GitHub (Jan 17, 2023): Thanks for creating this issue. I'm well aware of this problem. As you can see from the logs, currently, the client updates the volume by getting the current value, add/subtract 5%, then make a "set" request. The problem is that it takes time for spotify server to reflect the new change, hence making the update look slow. Pressing `+` multiple times only result in one update. I already have some rough ideas to fix this.
Author
Owner

@sewnie commented on GitHub (Jan 17, 2023):

i cannot express how thankful i am for your ability to take the time to look into bugs and make such good software.

<!-- gh-comment-id:1385921531 --> @sewnie commented on GitHub (Jan 17, 2023): i cannot express how thankful i am for your ability to take the time to look into bugs and make such good software.
Author
Owner

@sewnie commented on GitHub (Jan 17, 2023):

i like to have my music loud, so setting volume to 100 by default solves this issue for me :D

<!-- gh-comment-id:1385930926 --> @sewnie commented on GitHub (Jan 17, 2023): i like to have my music loud, so setting `volume` to `100` by default solves this issue for me :D
Author
Owner

@sewnie commented on GitHub (Feb 22, 2023):

because its slow, updating isn't even checked either, which can prompt the wrong volume increase.

https://user-images.githubusercontent.com/47404953/220662834-9d9d9043-229d-40b2-bee5-50decf07cb7d.mp4

<!-- gh-comment-id:1440220715 --> @sewnie commented on GitHub (Feb 22, 2023): because its slow, updating isn't even checked either, which can prompt the wrong volume increase. https://user-images.githubusercontent.com/47404953/220662834-9d9d9043-229d-40b2-bee5-50decf07cb7d.mp4
Author
Owner

@McKean commented on GitHub (Mar 21, 2023):

@apprehensions you mentioned setting volume to 100 by default solves it, is this already a setting that can be applied or are you requesting this via this issue? I'm all in favor, maybe if there's a way just use the volume which has been set and continue where left of.

<!-- gh-comment-id:1477529381 --> @McKean commented on GitHub (Mar 21, 2023): @apprehensions you mentioned setting volume to 100 by default solves it, is this already a setting that can be applied or are you requesting this via this issue? I'm all in favor, maybe if there's a way just use the volume which has been set and continue where left of.
Author
Owner

@aome510 commented on GitHub (Mar 22, 2023):

I may go back to this issue later this month.

@McKean you can set the default volume of the integrated device in app.toml general config file: https://github.com/aome510/spotify-player/blob/master/examples/app.toml#L27

<!-- gh-comment-id:1479818133 --> @aome510 commented on GitHub (Mar 22, 2023): I may go back to this issue later this month. @McKean you can set the default `volume` of the integrated `device` in `app.toml` general config file: https://github.com/aome510/spotify-player/blob/master/examples/app.toml#L27
Author
Owner

@sewnie commented on GitHub (Mar 26, 2023):

if a solution hadn't been found, i suggest implementing 'Fake' speed; by changing the audio backend's volume before submitting to the Spotify API that we have changed the volume, which might make users a bit confused but this is a good workaround i believe

<!-- gh-comment-id:1483957467 --> @sewnie commented on GitHub (Mar 26, 2023): if a solution hadn't been found, i suggest implementing 'Fake' speed; by changing the audio backend's volume before submitting to the Spotify API that we have changed the volume, which might make users a bit confused but this is a good workaround i believe
Author
Owner

@aome510 commented on GitHub (Mar 26, 2023):

Should be better with #171. Lmk if u guys encountered any related issues.

<!-- gh-comment-id:1484217786 --> @aome510 commented on GitHub (Mar 26, 2023): Should be better with #171. Lmk if u guys encountered any related issues.
Author
Owner

@sewnie commented on GitHub (Mar 26, 2023):

exactly ONE second between me requesting volume change, since this is as slow as everything else, it's pretty good!

<!-- gh-comment-id:1484247793 --> @sewnie commented on GitHub (Mar 26, 2023): exactly **ONE second** between me requesting volume change, since this is as slow as everything else, it's pretty good!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-player#45
No description provided.