You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I did a simple implementation of panning for Android by modifying setVolume and setPan in sound.js. I don't know if it is the right way for doing it but documenting it here in case it is useful:
Sound.prototype.setVolume=function(value){this._volume=value;if(this._loaded){if(IsAndroid){varleftVolume=value<0 ? this._volume*(1-Math.abs(value)) : this._volume;varrightVolume=value>0 ? this._volume*(1-value) : this._volume;RNSound.setVolume(this._key,leftVolume,rightVolume);}else{RNSound.setVolume(this._key,value);}}returnthis;};Sound.prototype.setPan=function(value){if(this._loaded){if(IsAndroid){varleftVolume=value<0 ? this._volume*(1-Math.abs(value)) : this._volume;varrightVolume=value>0 ? this._volume*(1-value) : this._volume;this._pan=value;//should this be outside of if(this._loaded)like setVolume?RNSound.setVolume(this._key,leftVolume,rightVolume);}else{RNSound.setPan(this._key,this._pan=value);}}returnthis;
Thanks
The text was updated successfully, but these errors were encountered:
I did a simple implementation of panning for Android by modifying
setVolume
andsetPan
insound.js
. I don't know if it is the right way for doing it but documenting it here in case it is useful:Thanks
The text was updated successfully, but these errors were encountered: