| 348 | } |
| 349 | |
| 350 | uint32 AudioBackendOAL::Source_Add(const AudioDataInfo& format, const Vector3& position, const Quaternion& orientation, float volume, float pitch, float pan, bool loop, bool spatial, float attenuation, float minDistance, float doppler) |
| 351 | { |
| 352 | PROFILE_MEM(Audio); |
| 353 | uint32 sourceID = 0; |
| 354 | ALC::Source::Rebuild(sourceID, position, orientation, volume, pitch, pan, loop, spatial, attenuation, minDistance, doppler); |
| 355 | if (sourceID) |
| 356 | { |
| 357 | // Cache audio data format assigned on source (used in Source_GetCurrentBufferTime) |
| 358 | ALC::Locker.Lock(); |
| 359 | auto& data = ALC::SourcesData[sourceID]; |
| 360 | data.Format = format; |
| 361 | data.Spatial = spatial; |
| 362 | data.Pan = pan; |
| 363 | ALC::Locker.Unlock(); |
| 364 | } |
| 365 | return sourceID; |
| 366 | } |
| 367 | |
| 368 | void AudioBackendOAL::Source_Remove(uint32 sourceID) |
| 369 | { |