Original Post
I'm creating a volume slider in my game and it involves use of Mix_Volume. I'm having a problem with it... When I call Mix_Volume in Set_Volume(), volume doesn't change. However, when I call Mix_Volume() in Get_Volume(), the proper value is returned. I am aware that it's because of the different parameters, but I'm not aware of what the difference is. Mix_Volume documentation. It says there that regardless of the volume being sent that I should receive the current average volume if I pass -1 as the channel parameter. Helpppppp!
const int Audio_Engine::Get_Volume() {
volume = Mix_Volume(-1, -1);
return volume;
}
void Audio_Engine::Set_Volume(const int new_volume) {
volume = Mix_Volume(-1, new_volume);
}