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 volume customized #620

Closed
matthewarmand opened this issue Aug 28, 2019 · 12 comments
Closed

PulseAudio volume customized #620

matthewarmand opened this issue Aug 28, 2019 · 12 comments

Comments

@matthewarmand
Copy link
Member

Description

When using tizonia on a system with PulseAudio, the output volume of the application in Pulse seems fixed at 75% every time the program starts, regardless of the setting changing at previous runs. Would it be possible to have this setting be remembered once its changed on a previous run, or maybe be configurable? (Or just default to 100% instead of 75%, which would be my setting)

Steps to Reproduce

  1. Run tizonia on a system with PulseAudio
  2. Observe the application volume setting (either in the system tray or with pavucontrol or similar)
  3. Quit tizonia
  4. Run tizonia again and observe the application volume setting again

Expected behavior: The setting is persisted from one run to the next (alternatively, the default application volume is 100%)

Actual behaviour: The setting is 75% for each new run

Reproduces how often: 100% of the time

Versions

# tizonia --version
tizonia 0.18.0. Copyright (C) 2019 Juan A. Rubio
This software is part of the Tizonia project <http://tizonia.org>

# pulseaudio --version
pulseaudio 12.2

# snap --version
snap    2.40-1
snapd   2.40-1
series  16
arch    -
kernel  5.2.9-arch1-1-ARCH

# cat /etc/os-release
NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="0;36"
HOME_URL="https://www.archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://bugs.archlinux.org/"
LOGO=archlinux

Installation Method Used

I'm currently using the snap package, although I believe I saw the same behavior with the AUR package (and it seems like a core functionality issue, so I'd imagine probably affects all installation methods)

@tizonia
Copy link
Collaborator

tizonia commented Sep 1, 2019

Hi!, thanks for taking the time to report issues and provide feedback. This is always welcome.

I think your analysis is correct for the most part. Adding a config file option to set a default volume would be easy (and useful). I think this could be implemented quite quickly.

If anyone wants to help, I could provide some easy-to-folow instructions. Otherwise, I'll implement it when I have some time

@matthewarmand
Copy link
Member Author

@tizonia if no one else picks this up before then, I'll probably have some time to work on this after next week if you want to document some instructions here

@matthewarmand
Copy link
Member Author

@tizonia feel free to document whatever instructions you feel are necessary here and I'll take a crack at it

@tizonia
Copy link
Collaborator

tizonia commented Dec 12, 2019

@matthewarmand

I have to apologize. I was meaning to look at the implementation of this and then provide the details here for you to pick up, but I thought it was more work to detail it than to do it.

Please have a look at this commit:
a10d8e2

Basically, this adds support for this configuration option:

# PulseAudio Audio Renderer
# -------------------------------------------------------------------------
#
# OMX.Aratelia.audio_renderer.pulseaudio.pcm.default_volume = Value from 0
#                                                             to 100 (Default: 75)

The specified volume there will be honoured when the application is started.

It is in the develop, branch. I'm planning to cut a new release in the next few days.

@matthewarmand
Copy link
Member Author

No worries at all @tizonia , just glad it hit the roadmap. Thanks for the reference to the commit for context.

The specified volume there will be honoured when the application is started.

One thing I've noticed is when skipping through a playlist/album using p or n, the volume resets to 75% even if its previously been adjusted. Will this fix apply to that case as well? Basically, is set_initial_component_volume called through that codepath as well or is that effect due to something else?

Thanks again for the enhancement, very much looking forward to it

@tizonia
Copy link
Collaborator

tizonia commented Dec 12, 2019

Wow!, You're absolutely right. The volume was getting reset to its intial value. This commit fixes that:
51a0984

Thank you for your prompt reply!

@matthewarmand
Copy link
Member Author

Excellent, thanks so much! No worries at all. I use tizonia every day to listen to music at work and am looking forward to this feature getting into a release.

I'll probably leave the Issue open until a release, or you can feel free to close whenever.

Thanks again!

@tizonia
Copy link
Collaborator

tizonia commented Dec 13, 2019

Closing this issue for now. The code is now in the master branch, to be released soon.

@tizonia tizonia closed this as completed Dec 13, 2019
@tizonia tizonia changed the title PulseAudio volume remembered/customized PulseAudio volume customized Dec 20, 2019
@matthewarmand
Copy link
Member Author

@tizonia this fix is working great for gmusic, but I notice that with --youtube options this config option isn't respected. The behavior there is the same as before, but with 80% as the default setting rather than 75%

@tizonia
Copy link
Collaborator

tizonia commented Jan 31, 2020

Hi @matthewarmand

Thanks for letting me know about the issue in the youtube graph. I'm re-opening to check that.

@tizonia tizonia reopened this Jan 31, 2020
juanrubio added a commit that referenced this issue Feb 9, 2020
…ume needs

to be set on the port on construction (#620)
@tizonia
Copy link
Collaborator

tizonia commented Feb 9, 2020

@matthewarmand

I believe I have fixed the youtube volume issue. It should work now.

This is in the develop branch. Will be merged to master in just a few days.

@matthewarmand
Copy link
Member Author

Thanks @tizonia , checked on the new version and it looks good. Thanks again for all your work on this!

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

No branches or pull requests

2 participants