mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-15 04:54:05 +09:00
jukebox: speaker sim using convolver
This commit is contained in:
@@ -20,8 +20,9 @@ import java.io.File
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
/**
|
||||
* @param ir Binary file containing MONO IR
|
||||
* @param crossfeed The amount of channel crossfeeding to simulate the stereo ID
|
||||
* @param ir Binary file containing MONO IR (containing only two channels)
|
||||
* @param crossfeed The amount of channel crossfeeding to simulate the true stereo IR. Fullscale (0.0 - 1.0)
|
||||
* @param gain output gain. Fullscale (0.0 - 1.0)
|
||||
*/
|
||||
class Convolv(ir: File, val crossfeed: Float, gain: Float = 1f / 256f): TerrarumAudioFilter() {
|
||||
private val gain: Float = gain / (1f + crossfeed)
|
||||
|
||||
Reference in New Issue
Block a user