Giter Club home page Giter Club logo

Comments (8)

sdeleon28 avatar sdeleon28 commented on July 2, 2024 4

Can you try this workaround?

this.beepOn.play(() => {
  this.beepOn.setCurrentTime(0);
});

from react-native-sound.

MateuszMxxxx avatar MateuszMxxxx commented on July 2, 2024 2

I encountered this problem only with short sounds (less than 3 seconds)
sdeleon28 workaround did great but it required some modification.
sound.setNumberOfLoops(5).play().setCurrentTime(0);
Cheers!

from react-native-sound.

badaz avatar badaz commented on July 2, 2024 2

Same problem here with a very short sound but none of the workarounds work for me

react-native 0.33.0
react-native-sound: 0.8.4

from react-native-sound.

rexlow avatar rexlow commented on July 2, 2024 2

Having the same issue here, none of the workarounds work for me

react-native 0.41.0
react-native-sound: 0.9.1

from react-native-sound.

JasonHenson avatar JasonHenson commented on July 2, 2024 1

I ended up just recreating the sound object every time I play my short sounds (like in the demo link below). Not sure how efficient/inefficient it is but it did work for me.

this.playSoundBundle is the method i am referring to.
https://github.com/zmxv/react-native-sound-demo/blob/master/main.js

from react-native-sound.

CyxouD avatar CyxouD commented on July 2, 2024 1

It still happens with the latest version of the lib for audio with small duration (0.085 seconds)

from react-native-sound.

saadqbal avatar saadqbal commented on July 2, 2024

cancelSound.setCurrentTime(0).play();
worked for me for a 2 second sound.

from react-native-sound.

jamesdmurphy51 avatar jamesdmurphy51 commented on July 2, 2024

I solved it by removing this.sound.release()

this.sound.play(() => {
  this.sound.stop();
  //this.sound.release();
});

from react-native-sound.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.