mirror of
				https://github.com/vsariola/sointu.git
				synced 2025-11-04 00:45:35 -05:00 
			
		
		
		
	refactor(tracker): Rewrote the sequencer loop to use simple mutex
This commit is contained in:
		@ -77,12 +77,18 @@ func (synth *C.Synth) Render(buffer []float32, maxtime int) (int, int, error) {
 | 
			
		||||
 | 
			
		||||
// Trigger is part of C.Synths' implementation of sointu.Synth interface
 | 
			
		||||
func (s *C.Synth) Trigger(voice int, note byte) {
 | 
			
		||||
	if voice < 0 || voice >= len(s.SynthWrk.Voices) {
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	s.SynthWrk.Voices[voice] = C.Voice{}
 | 
			
		||||
	s.SynthWrk.Voices[voice].Note = C.int(note)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Release is part of C.Synths' implementation of sointu.Synth interface
 | 
			
		||||
func (s *C.Synth) Release(voice int) {
 | 
			
		||||
	if voice < 0 || voice >= len(s.SynthWrk.Voices) {
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	s.SynthWrk.Voices[voice].Release = 1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user