mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 19:14:05 +09:00
ModMgr: I can load class by name; dropped Groovy script support, coding must go to JAR
This commit is contained in:
40
src/net/torvald/terrarum/audio/SpatialAudioMixer.kt
Normal file
40
src/net/torvald/terrarum/audio/SpatialAudioMixer.kt
Normal file
@@ -0,0 +1,40 @@
|
||||
package net.torvald.terrarum.audio
|
||||
|
||||
/**
|
||||
* Mixes spacial audio sources to multiple channels
|
||||
*
|
||||
*
|
||||
* Channels and their mapping:
|
||||
*
|
||||
* Notation: (front/side/rear.subwoofer/top-front)
|
||||
* Plugs: G-Front (green), K-Rear (black), Y-Centre/Subwoofer (yellow), E-Side (grey)
|
||||
* e.g. E-RC,NULL means GREY jack outputs REAR-CENTRE to its left and nothing to its right channel.
|
||||
*
|
||||
* = Headphones: Binaural
|
||||
* = Stereo ---------- (2/0/0.0/0): G-FL,FR
|
||||
* = Quadraphonic ---- (2/0/2.0/0): G-FL,FR; K-RL,RR
|
||||
* = 4.0 ------------- (3/0/1.0/0): G-FL,FR; Y-FC,RC
|
||||
* = 5.1 ------------- (3/0/2.1/0): G-FL,FR; Y-FC,SW; K-RL,RR
|
||||
* = 6.1 ------------- (3/0/3.1/0): G-FL,FR; Y-FC,SW; K-RL,RR, E-RC,RC
|
||||
* = 7.1 ------------- (3/2/2.1/0): G-FL,FR; Y-FC,SW; K-RL,RR, E-SL,SR
|
||||
* = Dolby Atmos 5.1.2 (3/0/2.1/2): G-FL,FR; Y-FC,SW; K-RL,RR, E-TL,TR
|
||||
*
|
||||
*
|
||||
* Channel uses:
|
||||
*
|
||||
* - Front and centre: usual thingies
|
||||
* - Rear: weather/ambient if 4.0, channel phantoming otherwise
|
||||
* - Top/Side: weather/ambient
|
||||
* - Side: extreme pan for front channels
|
||||
* - Centre: interface/UI
|
||||
*
|
||||
* * If both side and rear speakers are not there, play weather/ambient to the stereo speakers but NOT TO THE CENTRE
|
||||
* * For non-existent speakers, use channel phantoming
|
||||
*
|
||||
* Note: 5.1.2 does NOT output Dolby-compatible signals.
|
||||
*/
|
||||
object SpatialAudioMixer {
|
||||
|
||||
const val centreQuotient = 0.7071f
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user