friture icon indicating copy to clipboard operation
friture copied to clipboard

Support alternative sampling rates/frame count.

Open zealws opened this issue 5 years ago • 1 comments

At present friture only runs with a sampling rate of 48khz and exactly 512 frames/period.

However, it should be possible for friture to dynamically detect the sampling rate/frame count from the device itself. There's even a comment in the friture source code to that effect:

# the sample rate below should be dynamic, taken from PyAudio/PortAudio
SAMPLING_RATE = 48000
FRAMES_PER_BUFFER = 512

Seems like maybe this was a FIXME in the code that was never followed-up on, so I wanted to raise this as an issue.

Also the error message when you switch to a device with an invalid sampling rate is very opaque. A window entitled Input device error appears with this error message:

Impossible to use the selected input device, reverting to the previous one

It'd be nice if friture could catch the python error printed on the command line and surface that in the UI.

zealws avatar Nov 08 '20 18:11 zealws

I am trying to use Friture to graph ultrasonic frequencies. I have manually changed the sampling rate in the code, but the display is still limited to around 20khz. Anyone has some pointers?

tzugen avatar Oct 13 '22 09:10 tzugen