File tree Expand file tree Collapse file tree
AudioCoder/src/main/java/org/operatorfoundation/audiocoder/mfsk Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ package org.operatorfoundation.audiocoder.mfsk
1919data class MFSKConfiguration (
2020 val mode : MFSKMode ,
2121 val baseFrequencyHz : Double ,
22- val sampleRate : Int = 12_000 ,
23- val amplitude : Double = 0.5 ,
24- val timeoutMs : Long = 60_000L
22+ val sampleRate : Int = MFSKConstants . MFSK_RECOMMENDED_SAMPLE_RATE ,
23+ val amplitude : Double = MFSKConstants . MFSK_DEFAULT_AMPLITUDE ,
24+ val timeoutMs : Long = MFSKConstants . MFSK_DEFAULT_TIMEOUT_MS
2525)
Original file line number Diff line number Diff line change 1+ package org.operatorfoundation.audiocoder.mfsk
2+
3+ object MFSKConstants
4+ {
5+ /* *
6+ * Recommended audio pipeline sample rate in Hz.
7+ *
8+ * Divides cleanly into all standard MFSK baud rates with no rounding error.
9+ */
10+ const val MFSK_RECOMMENDED_SAMPLE_RATE = 12_000
11+
12+ /* * Default transmit output level as a fraction of full scale, in [0.0, 1.0].
13+ * Leaves headroom for signal processing while maintaining adequate output level. */
14+ const val MFSK_DEFAULT_AMPLITUDE = 0.5
15+
16+ /* * Default receive timeout in milliseconds.
17+ * At MFSK-16's ~1.95 bytes/second, a 40-byte payload transmits in ~21 seconds.
18+ * 60 seconds provides approximately 2.5× margin for timing and signal variation. */
19+ const val MFSK_DEFAULT_TIMEOUT_MS = 60_000L
20+ }
You can’t perform that action at this time.
0 commit comments