Audio #1
@@ -39,6 +39,9 @@ func NewSineGenerator(
|
||||
return nil, fmt.Errorf("base frequency must be finite and greater than zero, got %g", baseFrequency)
|
||||
}
|
||||
|
||||
// Keep every generated tone below the Nyquist frequency (the
|
||||
// Kotelnikov–Nyquist–Shannon sampling limit), sampleRate/2
|
||||
// Nyquist leaved as compromise for common English terminology
|
||||
sampleRate := float64(rate.Num) / float64(rate.Den)
|
||||
highestFrequency := float64(cfg.Channels()) * baseFrequency
|
||||
nyquist := sampleRate / 2
|
||||
|
||||
Reference in New Issue
Block a user