| 77 | using std::chrono::nanoseconds; |
| 78 | |
| 79 | ALvoice *GetSourceVoice(ALsource *source, ALCcontext *context) |
| 80 | { |
| 81 | ALuint idx{source->VoiceIdx}; |
| 82 | if(idx < context->mVoices.size()) |
| 83 | { |
| 84 | ALuint sid{source->id}; |
| 85 | ALvoice &voice = context->mVoices[idx]; |
| 86 | if(voice.mSourceID.load(std::memory_order_acquire) == sid) |
| 87 | return &voice; |
| 88 | } |
| 89 | source->VoiceIdx = INVALID_VOICE_IDX; |
| 90 | return nullptr; |
| 91 | } |
| 92 | |
| 93 | void UpdateSourceProps(const ALsource *source, ALvoice *voice, ALCcontext *context) |
| 94 | { |
no test coverage detected