DenyTheFlowerpot / Scrunch

Play sounds whenever you fold or unfold your Galaxy Z Fold.
European Union Public License 1.2
5 stars 2 forks source link

Option to pick audio channel #4

Open apollo316 opened 2 years ago

apollo316 commented 2 years ago

Just a request to choose which audio channel the open and close sound plays on. E.g. System, Ringtone, Notification, etc. Love the app! Thank you!!

DenyTheFlowerpot commented 2 years ago

Hi, thank you for trying out the app! Do you have a particular use case in mind for this feature?

apollo316 commented 2 years ago

Thank you for creating it! Yes the use-cases are these: My System channel is finely tuned so the keyboard click, shutter and other system sounds are just the right level, but my flip sounds I selected are too quiet. I expect this would be a likely scenario for a majority of other users as well. I could use an online site to adjust the gain of the audio file so it's the right level, but this is complicated for a normal user to do, harder yet to fine tune, and has to be done once for the open sound, once for the close sound, and then multiply by how many other sounds the user may want to change to on a given day. Thinking on this further, an in-built Gain in the app to make sure the volume level is just right for both audio files individually would not only make setup for this far easier, but might negate even needing an option for the other audio channels. (For clarity, I know you have a Gain there already to change the volume between 0-100%, but that's of the 0-100% the channel is already set to. e.g. My System channel is at 22% volume level, so even with the flip sounds setting at 100% volume that's only 22%-actual since it's capped at what the System channel is.)

DenyTheFlowerpot commented 2 years ago

Hi. Sorry, I took a long hiatus from development.

Thanks for explaining! As far as I can tell, due to the sound playback backend I'm using (SoundPool), a true gain control is impossible to implement - the volume of a sound can always only be as high as the channel it plays on. There seems to be some degree of control over the channel the sound plays on however, so I can definitely look at implementing that, as well as disabling sounds when music is playing.

I have thought about replacing SoundPool with MediaPlayer, as it would also allow for longer sounds to play in their entirety. However, doing that would also bring a boatload of other issues and complications. It's still in the back of my mind, but just slightly postponed.