1. can user change USB host audio samplerate? eg. change to 44100Hz or 48000Hz, should I change which file in SDK?
2. I test LPC55S69 usb host audio speaker demo with a 48k_16bite_2ch usb device. why API audio_recorderIncallback param3 datalen is 176? same like 44.1*2*2=176??? It should be 192?
已解决! 转到解答。
Hello @qingyunliu,
We are glad you found an explanation for question 1. As you mentioned, the dataLen is determined by the device you are connecting.
About question 2, it depends how are you reading the variable dataLen. If you read it in Global Variables while debugging the value changes. Meanwhile, if you read it in the Serial Console, you might notice that the variable is not changing. This happens because to see the Global Variables you need to stop the program producing these changes in values in the variable, but if you let the program to run freely the value of dataLen is the same value.
Best regards, Raul.
Hello @qingyunliu,
Could you please have a look to Audio 1.0 and Audio 2.0 specifications? The Audio 1.0 spec mentions the usage of sampling frequency as 48000Hz as part of the USB Audio 1.0 specification which the example complies.
Nonetheless, could be useful to check the following implementations:
Best regards, Raul.
Hello @qingyunliu,
Just for double check, are you using the host_audio_recorder_freertos example or are you doing modifications of the examples? We could not find the Audio_RecorderInCallback function in host_audio_speaker_freertos example.
Also, could you please tell us how are you obtaining/reading the value of data length (datalen) in the mentioned function?
Best regards, Raul.
Hello @qingyunliu,
We are glad you found an explanation for question 1. As you mentioned, the dataLen is determined by the device you are connecting.
About question 2, it depends how are you reading the variable dataLen. If you read it in Global Variables while debugging the value changes. Meanwhile, if you read it in the Serial Console, you might notice that the variable is not changing. This happens because to see the Global Variables you need to stop the program producing these changes in values in the variable, but if you let the program to run freely the value of dataLen is the same value.
Best regards, Raul.