USB Audio & Frank B's samplerate change code

Status
Not open for further replies.

PE4WJ

Member
Hi,

I am trying to use a Teensy 3.6 as a soundcard (essentially along the lines of the PassThroughStereo and WavFilePlayerUSB examples), this works perfectly fine at 44.1 kHz for both recording and playback but I would like to run it at 192 ksample/sec. I have tried to use Frank B's sample rate change code but when playing back it seems that the PC still outputs at 44100 sample/sec but the Teensy expects 192 ksample/sec leading to weird sounding audio. When recording and running an FFT on the recorded samples, I can see a clear lowpass characteristic, cutting off at 22050 Hz so something is not in order. Any clues appreciated!

Wouter Jan PE4WJ
 
Hi,

I am trying to use a Teensy 3.6 as a soundcard (essentially along the lines of the PassThroughStereo and WavFilePlayerUSB examples), this works perfectly fine at 44.1 kHz for both recording and playback but I would like to run it at 192 ksample/sec. I have tried to use Frank B's sample rate change code but when playing back it seems that the PC still outputs at 44100 sample/sec but the Teensy expects 192 ksample/sec leading to weird sounding audio.

Can't say much about that, but part of the issue might be this:

https://github.com/PaulStoffregen/cores/blob/master/teensy3/usb_dev.c#L472
(At least it should use the AUDIO_SAMPLE_RATE... unfortunately Paul changed this to 44117 (why?) so some tricks would be needed to correct this)
I use this: https://github.com/FrankBoesing/Arduino-Teensy-Codec-lib/blob/master/codecs.h#L66


I'd try to patch these lines and see what happens....
 
Last edited:
Status
Not open for further replies.
Back
Top