beeper update: proper equation. Need more work for low freqs

Former-commit-id: a98210ef06bea8f3a85af134fac8848225728c65
Former-commit-id: 901f266d529af99133f0605d2ce76c8cb52c7d17
This commit is contained in:
Song Minjae
2016-09-27 00:51:14 +09:00
parent bd4c95b321
commit 8c014cf4c8
9 changed files with 63 additions and 29 deletions

View File

@@ -124,7 +124,7 @@ open class SimpleTextTerminal(
// complete beep queue
if (beepCursor >= beepQueue.size) {
clearBeepQueue()
println("!! Beep queue clear")
// println("!! Beep queue clear")
}
// actually play queue
@@ -345,7 +345,7 @@ open class SimpleTextTerminal(
* @param freg: Frequency (float)
*/
override fun beep(duration: Int, freq: Float) {
println("!! Beep playing row $beepCursor, d ${Math.min(duration, maxDuration)} f $freq")
// println("!! Beep playing row $beepCursor, d ${Math.min(duration, maxDuration)} f $freq")
host.playTone(Math.min(duration, maxDuration), freq)
}