mirror of https://bitbucket.org/ausocean/av.git
Merged in 441-fix-check-samplerate (pull request #532)
audio-netsender: Fix sample rate validation * audio-netsender: Fix sample rate validation This change makes a simple change that makes the function compare the requested sample rate against the valid rates instead of the indices of the valid rates. Approved-by: Alan Noble
This commit is contained in:
parent
60e208fdab
commit
262e5fb5b4
|
@ -282,7 +282,7 @@ func (ac *audioClient) open() error {
|
|||
// to fix this 8000 and 16000 must be removed from this slice.
|
||||
rates := [8]int{8000, 16000, 32000, 44100, 48000, 88200, 96000, 192000}
|
||||
foundRate := false
|
||||
for r := range rates {
|
||||
for _, r := range rates {
|
||||
if r < ac.rate {
|
||||
continue
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue