Forum Rule: Always post complete source code & details to reproduce any issue!
Page 2 of 2 FirstFirst 1 2
Results 26 to 29 of 29

Thread: Teensy 4.1 and 4-channel audio (AudioInputI2SQuad)

  1. #26
    Junior Member
    Join Date
    May 2020
    Posts
    14
    Is there a simple way to read line in through the audio boards through the adc and put the values in a buffer? Or do you have to use queue to create the audio buffer?

  2. #27
    Senior Member PaulS's Avatar
    Join Date
    Apr 2015
    Location
    Netherlands
    Posts
    277
    I'm not 100% sure about this but when using the Audio library you need to use the queue.
    Maybe this thread helps:https://forum.pjrc.com/threads/34953...rom-microphone and the example Paul Stoffregen refers to in that thread.

    Paul

  3. #28
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,516
    Quote Originally Posted by Tootsie View Post
    Do I need to remove the 10K resistor?
    The 10K resistors on pin 6 are fine. No need to remove them.


    Quote Originally Posted by Tootsie View Post
    Is there a simple way to read line in through the audio boards through the adc and put the values in a buffer? Or do you have to use queue to create the audio buffer?
    That's what the audio library queue object does... it puts the data into buffers for you.

    There is no other "simple" way. But if you want something that's not simple, you could copy the I2S code from the audio library and modify it any way you like. But managing DMA is pretty far from "simple". Unless you really enjoy messing with that sort of low-level code, your best path is to use the already well developed audio library and its queue method to get access to the raw data.

  4. #29
    Junior Member
    Join Date
    May 2020
    Posts
    14
    I would love to use the library for that exact reason. I guess I just had a way in my head I was going to do this using just the Teensy, but now with the library that has shifted.

    The general idea is to be able to find the lag between two microphones based on phase shift. What would be the best way to go about this using the library? General ideas here would be use queue and then compare the signals to each other after some peak value has been reached on one of the microphones. I think this would work and is similar to the way I was planning on doing it with just the Teensy.

    Could I possibly use the FIR filter and mixer together in order to find the lag?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •