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

Ability to increase maximun sound pool. #6

Closed
John-Development opened this issue Nov 8, 2021 · 6 comments
Closed

Ability to increase maximun sound pool. #6

John-Development opened this issue Nov 8, 2021 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@John-Development
Copy link

Could be a little tweak in sound options, or even just a higher fixed value unable to be reached. The current one seems to be a bit short in some ocasions and mute lots of sounds if there are, for example, a huge amount of entities making sounds in one place.

I leave the mojang issue related to this for further information here.

@ImUrX ImUrX self-assigned this Nov 8, 2021
@ImUrX ImUrX added the enhancement New feature or request label Nov 8, 2021
@ImUrX
Copy link
Owner

ImUrX commented Nov 8, 2021

So after checking the code, the maximum of streaming sounds (i think those are the dynamic sounds) is 255, so you can never get more than that.

Problem, the only reasonable thing i can do is make the upper bound limit of sounds adjustable (which is added by minecraft) because it seems the amount of max sounds is actually determined by the audio library

@ImUrX
Copy link
Owner

ImUrX commented Nov 8, 2021

After more investigation, the simplest thing I can do is remove the limit that minecraft adds.
For increasing the maximum sound pool you need to first update the mod when I release it, then copy this file and make you read the comments at the start of the file which specify where to save the file.

For increasing it you should go to this line which says #sources = 256 you need to remove the # and modify the 256 to the value you want and just save. After all that run Minecraft and profit!

@John-Development
Copy link
Author

Checking what you said, Im able to modify it creating the file in AppData/Roaming, but could be cool if the mod itself creates that file.

Do mods have the ability to access files outside .minecraft? This might make it more accessible and easier to other people.

@ImUrX
Copy link
Owner

ImUrX commented Nov 8, 2021

It's surely possible but i dont think its a good idea to do it. It's better that the mod doesnt touch anything outside its space imo, in this case the problem is minecraft using OpenAL which is kind of old lol. The solution isnt even supported in all systems only the ones using OpenAL-Soft because if you are using hardware-based OpenAL the only solution is to add a lot more code to do some kind of pooling with the sources

i uploaded the mod to gh releases and curseforge (waiting approval). modrinth is down it seems

@ImUrX ImUrX closed this as completed Nov 8, 2021
@John-Development
Copy link
Author

Yeah, seems like a bad practice for me too, also a lot of things to take into account with different systems as you say.

Thank you for your time and your fast response btw, you helped me a lot!

@ImUrX
Copy link
Owner

ImUrX commented Nov 8, 2021

np, have fun :p

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

No branches or pull requests

2 participants