flutter_sound icon indicating copy to clipboard operation
flutter_sound copied to clipboard

iOS Voice processing enabled setting bug fix

Open vedranivicatos opened this issue 2 years ago • 3 comments

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).

vedranivicatos avatar Jun 03 '22 10:06 vedranivicatos

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 avatar Jun 03 '22 11:06 Larpoux

@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.

vedranivicatos avatar Jun 03 '22 12:06 vedranivicatos

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.

KwonsooMoon avatar Sep 19 '22 08:09 KwonsooMoon

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

github-actions[bot] avatar Dec 03 '23 01:12 github-actions[bot]

@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.

Larpoux avatar Mar 10 '24 18:03 Larpoux