zmxv / react-native-sound

React Native module for playing sound clips

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

setNumberOfLoops() not working properly

yash15601 opened this issue · comments

🪲 Description

I'm using react-native-sound package to play sound 10 times at a time in a loop but setNumberOfLoops(10) or any positive number in it does not work, it start playing 30-40 times

🪲 Please post your code:

export let xSound = new Sound("x.wav", Sound.MAIN_BUNDLE, (error) => {
  if (error) {
    console.log("Sound Not Loaded successfully");
    return;
  }
});

xSound.setNumberofLoops(10)
xSound.play()

💡 Possible solution

Is your issue with...

  • iOS
  • Android

Are you using...

  • React Native CLI (react-native run-android)

Which versions are you using?

  • React Native Sound: 0.11.2
  • React Native: 0.67.4
  • Android: 10

Does the problem occur on...

  • Simulator
  • Device

If your problem is happening on a device, which device?

  • Device: SAMSUNG