After commit c018f5fd29 Fenrir is being switched over to go. If you do not want to be part of the testing process, please switch to master.
This commit is contained in:
1 parent
c018f5fd29
commit
0e50de4c76
1047 files changed
+58364
-63747
No files matched your search
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) 2026 Storm Dragon
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
package sound
|
||||
|
||||
// Use progress's pitch mapping with a triangle wave to distinguish indentation
|
||||
// from progress's clipped sine. Cache 0..100 columns before input opens.
|
||||
func indentation_clips() [101]*clip {
|
||||
var clips [101]*clip
|
||||
for level := range clips {
|
||||
clips[level] = progress_tone_shape(float64(level), true)
|
||||
}
|
||||
return clips
|
||||
}
|
||||
|
||||
// Indentation uses ordinary cue admission, independently of the progress
|
||||
// monitor and its cancellation/coalescing state. Deeper levels use tone 100.
|
||||
func (s *Service) Play_indentation(level int) bool {
|
||||
if s == nil || s.closed.Load() || s.finishing.Load() || level < 0 {
|
||||
return false
|
||||
}
|
||||
item := s.indentationTones[min(level, len(s.indentationTones)-1)]
|
||||
if item == nil {
|
||||
return false
|
||||
}
|
||||
s.pending.Store(item)
|
||||
return true
|
||||
}
|
||||
Reference in new issue
Block a user