record queue command clarification needed...

Status
Not open for further replies.

Simon.M

Member
Hi Folks,

I am teaching myself how to use various audio library components in the audio library. I am currently trying to understand the "record queue" and "Play queue" Modules. I have done searches using my favourite search engine and seem to find nothing close to what i am asking. So here are my questions...

for the purposes of the question i am going to set some parameters from my limited knowledge (please correct anything that is wrong, so I can fully understand).

full sample rate: 48000 Hz
per channel sample rate: 24000 Hz

Does the record queue command in simple terms just take the sample rate and divide by 128 for the bandwidth of each slot in the 128 array entries ( so 128 multiply by the bandwidth of each slot will equal the per channel sample rate), So it will fit into one audio packet, or does it take multiple packets to make up the per channel sample rate.

I think asking here will save me months of going down rabbit holes and giving up without ever knowing the answer.

I am just looking for information on the relationship between the per channel sample rate and the contents of the 128 entry buffer. if I can understand what it provided, Then i will understand what I need to do with the buffer. I do NOT require snippets of code or anybody to write code for me, just a basic understanding of the commands.

Thanks in advance

Best regards

Simon.M
 
short answer
sampling rate is always 44.1 kHz
the record/play queues are connected to individual channels and store blocks of 128 samples
i.e. for stereo data you need 2 queue objects.
how data will be stored is determined by input output objects, queue does not know these details.
Anyhow, to understand better the audio library, best is to inspect the code.
 
Hi WMXZ,

Thanks for the speedy response, So relating to those two commands the sampling rate is always 44117 Hz and doesn't matter if somebody changes the sample rate for example to 192000 Hz.

I already had a quick look at the library code and found it hard to follow without knowing something about how these two commands work. Now you have given me something to work with, it may make some sense in understanding the code better.

Thanks for the help

Best regards

Simon.M
 
Simon,
the driving parameter is the block size 128 that is defined in cores 'AudioStream.h'.
There is also the common sampling frequency defined.
While you could change sampling frequency here care must be taken when using input/output objects.
For example, I2S input/output or USB output/input assume 41.1 kHz to generate the correct clocks,
 
Hi WMXZ,

The reason for my original question is as follows...

I have a teensy 3.6 and the audio board. I have been trying out the convolution sdr software by dd4wh (frank). i have it working with the ELEKTOR SDR PCB. The code I found was buggy and it crashes sometimes. Frank as far as i know no longer supports the teensy 3.6 on his convolution SDR github page. The code has evolved into a teensy 4 project only on the old teensy 3.6 github page.

That project relies on the record and play functions to get the audio stream out for the DSP functions using CMSIS DSP library. Now you know this you might understand why I needed to know about the record and play modules. The software/firmware switches the sample rates to get various spectrum analyser widths. All this to learn and fix some of the bugs or possibly write some of my own software/firmware (at a much later date).

This project is not being started and finish in a couple of hours, This project is to last me several months (over the winter evenings in my spare time) possibly a couple of years of learning new programming skills to achieve my end goal. will I complete it... I hope so...

Best regards

Simon.M

"There is no learning to be had from cut and paste, with little to no understanding in how it works."
 
Hi WMXZ,

Thanks for the help with my query earlier, The information you gave me about AudioStream.h has been very helpful in understanding the two commands I asked about. I now have a basic understanding of the two commands and can proceed further in my quest.

So thank you so much for all your help.

best regards

Simon.M
 
Status
Not open for further replies.
Back
Top