You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
first of all thanks for publishing. It's a great starting point and saved me some time in my own project.
One thing I noticed:
in valid_low_rate() we are looping through [44100] to find a testrate
for testrate in [44100]:
if self.valid_test(device,testrate):
return testrate
Then, in valid_test(), we want to open a stream to see if the given testrate works with the given device. However, we are not opening the stream with the given testrate, but with the defaultSampleRate of the device.
I suggest not to look for the lowest possible rate, but only test the user-specified rate. If it is not working or the user didn't specify it, I recommend testing the defaultSampleRate of the device (which should probably work) and then setting self.rate to this value.
The text was updated successfully, but these errors were encountered:
swharden
changed the title
SWHear(): testrate from valid_low_rate() not used in valid_test()
Improve the automatically-detected audio sample rate
Sep 29, 2018
Hi,
first of all thanks for publishing. It's a great starting point and saved me some time in my own project.
One thing I noticed:
in valid_low_rate() we are looping through [44100] to find a testrate
Then, in valid_test(), we want to open a stream to see if the given testrate works with the given device. However, we are not opening the stream with the given testrate, but with the defaultSampleRate of the device.
I suggest not to look for the lowest possible rate, but only test the user-specified rate. If it is not working or the user didn't specify it, I recommend testing the defaultSampleRate of the device (which should probably work) and then setting self.rate to this value.
The text was updated successfully, but these errors were encountered: