Musikcube does not retain the system volume settings between sessions. Whenever the program is relaunched, the volume in the system volume mixer resets to the default value.
Expected Behavior
Ideally, musikcube should save and restore the system volume settings from the previous session, ensuring that the volume level remains consistent across relaunches.
Steps to Reproduce
Launch musikcube.
Play something.
Adjust the musikcube volume using the Windows volume mixer.
Close musikcube.
Relaunch musikcube.
Current Behavior
Upon relaunching musikcube, the system volume in the volume mixer is reset to the default value, disregarding any previous adjustments made by the user.
Environment
Version: 3.0.2
Operating System: Windows 10, 64-bit
Additional Information
No error messages or warnings are displayed when encountering this issue.
The program is not recognized as an audio source by Windows (i.e. not shown in volume mixer) until a track is played. This makes it problematic to change the volume manually or using a script. A semi-working solution is to run something like the following after launching musikcube:
import sys
import pycaw.pycaw as pycaw
def set_volume(program_name, volume_percent):
sessions = pycaw.AudioUtilities.GetAllSessions()
for session in sessions:
volume = session.SimpleAudioVolume
if session.Process and session.Process.name() == program_name:
volume.SetMasterVolume(volume_percent / 100, None)
if name == "main":
if len(sys.argv) != 3:
print("Usage: python set_volume.py ")
sys.exit(1)
```python set_volume.py "musikcube-cmd.exe" 25```. This works, but only if the program has already produced some sounds, which could help if you set ```ResumePlaybackOnStartup``` option to ```true``` and run this script after musikcube with a small delay (for example, using a batch script).
Issue Description
Musikcube does not retain the system volume settings between sessions. Whenever the program is relaunched, the volume in the system volume mixer resets to the default value.
Expected Behavior
Ideally, musikcube should save and restore the system volume settings from the previous session, ensuring that the volume level remains consistent across relaunches.
Steps to Reproduce
Current Behavior
Upon relaunching musikcube, the system volume in the volume mixer is reset to the default value, disregarding any previous adjustments made by the user.
Environment
Additional Information
def set_volume(program_name, volume_percent): sessions = pycaw.AudioUtilities.GetAllSessions() for session in sessions: volume = session.SimpleAudioVolume if session.Process and session.Process.name() == program_name: volume.SetMasterVolume(volume_percent / 100, None)
if name == "main": if len(sys.argv) != 3: print("Usage: python set_volume.py ")
sys.exit(1)