HugoCortell Posted September 18, 2025 Report Posted September 18, 2025 I can't seem to get OpenAL (part of OpenTK) audiosources to actually go from 1f to 0f in volume based on the distance from the source to the max distance. I do use... SourceRelativere = false AL.Source(slot.Source, ALSourcef.RolloffFactor, 1f); AL.Source(slot.Source, ALSourcef.MaxDistance, 35f); The source position is indeed updated and correctly set. I debug the distance between both and can tell how far I am off the threshold. I even tried using: AL.Source(slot.Source, (ALSourcei)0xD000, (int)ALDistanceModel.LinearDistanceClamped); But it just does not work. What am I doing wrong? I can't think of ANYTHING. There has to be something...
HugoCortell Posted September 18, 2025 Author Report Posted September 18, 2025 Solved: You need to EXPLICITLY define MinGain and MaxGain, as well as enable the ALCapability of AL_SOURCE_DISTANCE_MODEL
Recommended Posts