I am working on an app that has a reverb feature. I know we can achieve this feature by the PresetReverb and EnvironmentalReverb classes.
For customization, we have the EnvironmentalReverb class and I am using this class like this and effects can be notice in the video:
val eReverb = EnvironmentalReverb(1, simpleExoplayer?.audioSessionId!!)
eReverb.reverbDelay = 5 // [0, 100] done
eReverb.roomLevel = -1000 // [-9000, 0]
eReverb.reverbLevel = 2000 // [-9000, 2000]
eReverb.decayHFRatio = 1000.toShort()
eReverb.decayTime = 10000
eReverb.density = 1000.toShort()
eReverb.diffusion = 1000.toShort()
eReverb.enabled = true
val auxEffectInfo = AuxEffectInfo(eReverb.id, 1.0F)
simpleExoplayer?.setAuxEffectInfo(auxEffectInfo)
Problem: If we want to apply the EnvironmentalReverb values according to the PresetReverb class effects(LARGE_ROOM, LARGE_HALL, MEDIUM_ROOM, etc) then what should be the values of reverbDelay, diffusion, density, etc?
The EnvironmentalReverb source code refers to the OpenSL ES 1.0.1 specification.
Pages 451-452 in that specification lists the following preset definitions:
The 10 values listed for each of the presets ought to correspond to the
EnvironmentalReverb
parameters in the following order:PARAM_ROOM_LEVEL
,PARAM_ROOM_HF_LEVEL
,PARAM_DECAY_TIME
,PARAM_DECAY_HF_RATIO
,PARAM_REFLECTIONS_LEVEL
,PARAM_REFLECTIONS_DELAY
,PARAM_REVERB_LEVEL
,PARAM_REVERB_DELAY
,PARAM_DIFFUSION
,PARAM_DENSITY
.