yoheimuta / RxMusicPlayer

A reactive library to make it easy for audio playbacks using RxSwift.
MIT License
58 stars 8 forks source link

Boost volume #57

Closed rastaman111 closed 2 years ago

rastaman111 commented 2 years ago

Hey! I poked around in your code and implemented the Sound Boost function Default value player.volume = 1, can be changed to 2

If interested, I can throw off the implementation so that you can release an update

yoheimuta commented 2 years ago

@rastaman111 Thank you for letting me know. As far as I know, the volume's max value is 1.0. Is it worth setting it to 2.0?

A value of 0.0 indicates silence; a value of 1.0 (the default) indicates full audio volume for the player instance.

https://developer.apple.com/documentation/avfoundation/avplayer/1390127-volume

rastaman111 commented 2 years ago

Good afternoon @yoheimuta. by default 1.0, but you can set any value, I put 2.0 on the switch and it works great :)

rastaman111 commented 2 years ago

Hi, @yoheimuta

File RxMusicPlayer func playVolume

Used - self.musicPlayer.player?.playVolume = value ? 2.0 : 1.0

RxMusicPlayer.zip

yoheimuta commented 2 years ago

@rastaman111 Thank you for elaborating on it. Although I gave it a try setting the volume property to 1 and 2, I wasn't aware of the difference.

It looks like the document doesn't support the feature of boosting volume. I'm closing this issue for now, but let me know when you have another solid ground for this.

rastaman111 commented 2 years ago

@yoheimuta I threw off the file where I implemented the sound boost, it is working, copy it as an independent library and check