flutter_sound
flutter_sound copied to clipboard
iOS Voice processing enabled setting bug fix
Voice processing enabled setting bug fix: changed from bool cast that would always evaluate to true/YES no matter what was received from dart side, to NSString description compare that works properly now. This wrong mapping was causing the voice processing to always be true
and this in turn caused crashes when using multiple instances of Flutter Sound Player (issue I've opened: bug).
Thank you @vedranivicatos for your Pull Request. We appreciate your bug fix. I am always impressed when someone is able to debug Flutter_sound_core without any help from me. I will look to your patch and merge it into a new version tomorrow.
@Larpoux You guys are welcome. I'm more than happy to contribute to such a project. However, this is just a necessary small fix. There is a bigger issue that this was causing that I opened a couple of days ago. This needs to be addressed as well.
Hi, thank you for your debugging and fix, I also waiting for this bug fixed. But, it doesn't look safe to compare description with hardcoded string. How about casting to NSNumber and using boolValue? Like,
bool voiceProcessing = ((NSNumber *)call.arguments[@"voiceProcessing"]).boolValue;
Official flutter doc says flutter bool will be changed into NSNumber.
This PR is stale because it has been open 90 days with no activity. Leave a comment or this will be closed in 7 days
@vedranivicatos : I added the boolean parameter "enableVoiceProcessing" inside startRecorder(). I think that this parameter is only when recording from mic and not relevant for the Player.
Please reopen the PR if you do not agree.