ukasz123 / soundpool

Soundpool plugin for Flutter
87 stars 64 forks source link

When typing a message, the sound of the keys is different. #82

Open olegys opened 3 years ago

olegys commented 3 years ago

After removing the plug-in, the sound becomes normal.

https://user-images.githubusercontent.com/18525409/132673393-7fc91f50-b548-4590-ac05-162796ecdc77.mp4

ukasz123 commented 3 years ago

@olegys, please, provide some more details on how you use the plugin? What options do you set when constructing the Soundpool instance? Do you play anything before opening the keyboard? Which methods do you use before opening the keyboard? Do you need to remove plugin from dependencies or is it enough to not use it?

olegys commented 3 years ago

@ukasz123 Iphone 7 - ios 14.5.1 After doing some testing on ios I found the problem:

1). You need to start the sound.

 final Soundpool _soundpool = Soundpool.fromOptions(
options: SoundpoolOptions(
  streamType: StreamType.notification,
),

);

_soundId = await rootBundle.load(AppSounds.pop).then((ByteData soundData) {
  return _soundpool.load(soundData);
});

_soundpool.play(_soundId!)

2). Now, when you press the keys, the sound will be different.

olegys commented 2 years ago

@ukasz123 Any updates ?