Add OpenAL AL_SOFT_source_spatialize extension support for stereo spatial audio playback

Add `AllowSpatialization` option to `AudioSource`
This commit is contained in:
Wojtek Figat
2023-04-20 15:01:22 +02:00
parent 094a3cfe5a
commit 1ffe8a7b60
16 changed files with 183 additions and 130 deletions

View File

@@ -84,7 +84,7 @@ void StreamableResource::RequestStreamingUpdate()
Streaming.LastUpdate = 0;
}
void StreamableResource::CancelStreaming()
void StreamableResource::ResetStreaming()
{
Streaming.TargetResidency = 0;
Streaming.LastUpdate = DateTime::MaxValue().Ticks;
@@ -169,7 +169,7 @@ void UpdateResource(StreamableResource* resource, DateTime now, double currentTi
else if (resource->GetAllocatedResidency() < targetResidency)
{
// Allocation failed (eg. texture format is not supported or run out of memory)
resource->CancelStreaming();
resource->ResetStreaming();
return;
}
}