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

Audio Volume Mixer WIP #502

Open
DominusExult opened this issue Apr 14, 2024 · 10 comments
Open

Audio Volume Mixer WIP #502

DominusExult opened this issue Apr 14, 2024 · 10 comments

Comments

@DominusExult
Copy link
Member

I've created a new gump to control the volume of music, sfx and speech.

So far it can only read and write the settings of exult.cfg.

Atm I'm stumped to actually move the slider via the scroll buttons, dragging with the mouse or mousewheel. This is out of my meager programming knowledge and I'm hitting a wall.

Furthermore this is not hooked up to the actual volume of these sources.
SFX can probably easily be done via AUDIO_MAX_VOLUME, music maybe via volume_curve. AFAICT there is nothing to control the volume of voc files.

I have this branched in my fork of Exult at https://github.com/DominusExult/exult/tree/volume_mixer.
Pressing Shift+V will open the gump.

image

@NotStanley4330
Copy link
Contributor

I pulled this down and will look at getting the sliders working. I can also make it so it controls master SFX volume as I know how that works fairly well.

@wench
Copy link
Member

wench commented Apr 26, 2024

I'll add in code that will allow proper realtime volume control of music . volume curve isn't really appropriate for this. Not sure if ogg music and midi should have separate controls. Midi could have separate controls per device but that doesn't really seem necessary

@wench
Copy link
Member

wench commented Apr 26, 2024

Thinking the gump should only control music volume for the current music device or oggs but the config file should probably store things separately per device to allow people to tune volume per device by switching between them.

@DominusExult
Copy link
Member Author

Thinking the gump should only control music volume for the current music device or oggs but the config file should probably store things separately per device to allow people to tune volume per device by switching between them.

This might be a bit over the top for the normal user but probably welcomed by more "serious" users.
So I guess <volume> should be its own section under <audio> with several <volume_DRIVERNAME> and <volume_sfx>, <volume_speech>

@wench
Copy link
Member

wench commented Apr 29, 2024

Sounds good to me. As I add music volume support to the Audio code I'll update the Audio code so it will use those config settings to set music volume upon startup. I'll fork your branch and make a pull request on your repository when done

@DominusExult
Copy link
Member Author

I've updated my fork with main Exult and added a button to the Audio Options gump.
(name of the button and the used shortcut key are open for discussion :))

The Audio Options gump could use just a tiny bit more space or I need to minimize the gap between the section by just 1 pixel to have a wider gap between the mixer button and the audio section.

image

@wench
Copy link
Member

wench commented Apr 29, 2024

If it is ok with you I'll add a new slider widget class and update your new gump to use that instead of what you've done

@DominusExult
Copy link
Member Author

Go for it, I have no attachment to it ;)

@wench
Copy link
Member

wench commented Apr 29, 2024

Ok cool. Also letting you know that #508 when merged will conflict with your changes to AudioOptions_gump because you changed the position of the music looping button and that conflicts with the changes I made to the button.

@DominusExult
Copy link
Member Author

Ok cool. Also letting you know that #508 when merged will conflict with your changes to AudioOptions_gump because you changed the position of the music looping button and that conflicts with the changes I made to the button.

yes, I know that it will not apply cleanly but at least there is no conflict with where I placed it.

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

No branches or pull requests

3 participants