working track volume

This commit is contained in:
minjaesong
2023-11-17 20:22:07 +09:00
parent eb5483ae37
commit 452e20488c
4 changed files with 30 additions and 19 deletions

View File

@@ -34,9 +34,9 @@ class AudioProcessBuf(val size: Int) {
updateFloats()
}
fun getL0() = FloatArray(size / 4) { fbuf0[2*it] }
fun getR0() = FloatArray(size / 4) { fbuf0[2*it+1] }
fun getL1() = FloatArray(size / 4) { fbuf1[2*it] }
fun getR1() = FloatArray(size / 4) { fbuf1[2*it+1] }
fun getL0(volume: Double) = FloatArray(size / 4) { (volume * fbuf0[2*it]).toFloat() }
fun getR0(volume: Double) = FloatArray(size / 4) { (volume * fbuf0[2*it+1]).toFloat() }
fun getL1(volume: Double) = FloatArray(size / 4) { (volume * fbuf1[2*it]).toFloat() }
fun getR1(volume: Double) = FloatArray(size / 4) { (volume * fbuf1[2*it+1]).toFloat() }
}