TaylorSMarks / playsound

Pure Python, cross platform, single function module with no dependencies for playing sounds.
Other
517 stars 114 forks source link

Features I would love to see #119

Open Toma400 opened 2 years ago

Toma400 commented 2 years ago

So, since I saw most tickets here are for issues specifically, and even though there's some sort of feature request in #118, there's no place for requesting specific features

I would love to see these two features:

1) a bit related to #118, it would be awesome to have option to customise sound loudness - like some sort of integer value injected which would make sound go higher or lower. I imagine code being like:

       playsound(file_name, -5, True)  # obviously -5 makes it quieter respectively 5 levels more

2) possibility to finish the sound playing currently, like playsound().stop() or something even more customised, like selecting specific sound process to be stopped - like playsound(chosen_sound_which_is_playing_right_now).stop().

These two suggestions are just because I absolutely love the concept of this module, but without those, it is too limited for me to use it in my game right now. If those options got added, I could not only force program to stop the sound in different locations (so player changing locations would hear new song, not old one finishing and new one getting into), but also add some customisation of volume for players to change in settings.

Thanks a lot!

Toma400 commented 2 years ago

If there was possibility of adding "stop" element with smooth ending (so sound would decrease volume till it stops fully), instead of sharp "stopping" the sound in such cutting manner, it would be even more awesome, although I'm almost certain this would require a lot of tweaking, so it's more like my "dream", not a proper request.

And sorry for mentioning you in my own issue, but I kinda wanted to have quick link to check out from time to time if this request is updated in any way ^^ you can see to which project it'd be used, if updated

Toma400 commented 2 years ago

Another feature that I feel it'd be awesome to have is to check if any sound is playing from the module, so we will know if running new sound will interfere with older one, or not.

TechWiz-3 commented 2 years ago

Great ideas man. I seriously need the playsound.stop() part to allow for skipping tracks without them playing over eachother lol

TaylorSMarks commented 1 year ago

The only requests I take are pull requests, and the only bugs I’m going to care about are the ones that include failing unit tests.

You’re welcome to implement these features and open a pull request. Please remember to cover them with unit tests in your pull request.

Taylor

On Apr 13, 2022, at 07:46, Toma400 @.***> wrote:

 If there was possibility of adding "stop" element with smooth ending (so sound would decrease volume till it stops fully), instead of sharp "stopping" the sound in such cutting manner, it would be even more awesome, although I'm almost certain this would require a lot of tweaking, so it's more like my "dream", not a proper request.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.