zmxv / react-native-sound

React Native module for playing sound clips
MIT License
2.8k stars 749 forks source link

whoosh.setVolume not work #450

Open Kenshin-liu opened 6 years ago

Kenshin-liu commented 6 years ago
  playSound() {
    const callback = (error, sound) => {
      if (error) {
        Alert.alert('error', error.message)
        return
      }
      sound.setVolume(100)
      alert(sound.getVolume())
      sound.play(() => {
        sound.release()
      })
    }
    const sound = new RNsound(demoAudio, error => callback(error, sound));
  }

get 100 but not take effect

paulmelnikow commented 5 years ago

I think volume needs to be between 0.0 and 1.0.