Moode Forum
[PROBLEM] Volume is set to 0 after reboot - Printable Version

+- Moode Forum (https://moodeaudio.org/forum)
+-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3)
+--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7)
+--- Thread: [PROBLEM] Volume is set to 0 after reboot (/showthread.php?tid=6321)

Pages: 1 2


RE: Volume is set to 0 after reboot - Tim Curtis - 09-06-2024

(09-06-2024, 12:26 PM)the_bertrum Wrote:
(09-06-2024, 11:43 AM)Tim Curtis Wrote: I ran a quick test and am not able to repro the issue.

1. Configure volume type to Fixed (0dB)
2. Start radio station playing
3. Connect via iPhone Spotify App
4. sudo reboot

When the Web UI comes back up volume type is still correctly set to Fixed (0dB).

I think its when using not-fixed volume Tim.  Set the volume to something other than zero, connect to Spotify, kill the player, when it starts volume will be at zero.  I can't see how it could be otherwise though, based on my understanding of what happens when the Spotify renderer takes control.

If the system is rebooted while a renderer is running the renderer event script that resets the player state when the renderer disconnects never gets executed. This leaves things like the renderer active flag still showing as active.

During moode startup this condition is checked and the flags are reset and volume is set to 0 to be safe since the assumption is that an abrupt reboot or power off occurred.

You should see these lines in the log
Code:
20240906 101256 worker: Active flags:      at least one true
20240906 101256 worker: Reset flags:       all reset to false
20240906 101256 worker: MPD volume:        set to 0

In the OP's case I think the bug is that even though MPD volume shows 0 after the first reboot music is still audible.
I'll need to investigate this.


RE: Volume is set to 0 after reboot - Aureli1 - 09-06-2024

OK tim, I understand.

About the scenario usage.... OK it's not a good practice but my usage is to use Moode like a Hifi material.
- I make eletrical power on -> I would like to listening my previous radio like the previous shutdown without interact with Moode (my wife don't like to use his smartphone ;-) )
- And each evening I make electrical shutdown. I know... it's not a good practice but it makes life easier !


RE: Volume is set to 0 after reboot - Aureli1 - 09-06-2024

(09-06-2024, 03:06 PM)Tim Curtis Wrote: If the system is rebooted while a renderer is running the renderer event script that resets the player state when the renderer disconnects never gets executed. This leaves things like the renderer active flag still showing as active.
Could you show me where is this part of code?


(09-06-2024, 03:06 PM)Tim Curtis Wrote: During moode startup this condition is checked and the flags are reset and volume is set to 0 to be safe since the assumption is that an abrupt reboot or power off occurred.
Do you think that an option to specify the Volume at startup is a good idea?
And where is this code part?

Thx


RE: Volume is set to 0 after reboot - Tim Curtis - 09-06-2024

(09-06-2024, 03:56 PM)Aureli1 Wrote:
(09-06-2024, 03:06 PM)Tim Curtis Wrote: If the system is rebooted while a renderer is running the renderer event script that resets the player state when the renderer disconnects never gets executed. This leaves things like the renderer active flag still showing as active.
Could you show me where is this part of code?


(09-06-2024, 03:06 PM)Tim Curtis Wrote: During moode startup this condition is checked and the flags are reset and volume is set to 0 to be safe since the assumption is that an abrupt reboot or power off occurred.
Do you think that an option to specify the Volume at startup is a good idea?
And where is this code part?

Thx

The renderer event scripts are located in /var/local/www/commandw/

There has never been a need for a startup volume because the last volume level is retained, except in the case where conditions warrant setting it to 0 during startup, like the "reboot when renderer active" scenario.

It might be convenient to have options for autoplay and volume level after startup but in practice they are not safe. What happens if you set autoplay on and level at 80 but forgot that your amp was really cranked up the last time you listened to another audio source :-0

The startup sequence is in the file /var/www/daemon/worker.php