mirror of
https://github.com/overte-org/overte.git
synced 2025-04-11 11:13:06 +02:00
fix stereo sound speed
This commit is contained in:
parent
878774b5d3
commit
9914d4d133
2 changed files with 6 additions and 1 deletions
|
@ -1357,6 +1357,7 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
|
|||
*
|
||||
* @typedef {object} Entities.EntityProperties-Sound
|
||||
* @property {string} soundURL="" - The URL of the sound to play, as a wav, mp3, or raw file. Supports stereo and ambisonic.
|
||||
* Note: ambisonic sounds can only play as <code>localOnly</code>.
|
||||
* @property {boolean} playing=true - Whether or not the sound should play.
|
||||
* @property {number} volume=1.0 - The volume of the sound, from <code>0</code> to <code>1</code>.
|
||||
* @property {number} pitch=1.0 - The relative sample rate at which to resample the sound, within +/- 2 octaves.
|
||||
|
|
|
@ -336,10 +336,14 @@ bool SoundEntityItem::restartSound() {
|
|||
options.volume = _volume;
|
||||
options.loop = _loop;
|
||||
options.orientation = getWorldOrientation();
|
||||
options.localOnly = _localOnly;
|
||||
options.localOnly = _localOnly || _sound->isAmbisonic(); // force localOnly when ambisonic
|
||||
options.secondOffset = _timeOffset;
|
||||
options.pitch = _pitch;
|
||||
|
||||
// stereo option isn't set from script, this comes from sound metadata or filename
|
||||
options.stereo = _sound->isStereo();
|
||||
options.ambisonic = _sound->isAmbisonic();
|
||||
|
||||
if (_injector) {
|
||||
DependencyManager::get<AudioInjectorManager>()->setOptionsAndRestart(_injector, options);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue