Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 3 of 3

Thread: Can I detect incoming sound on Line In, Audio Shield?

  1. #1

    Can I detect incoming sound on Line In, Audio Shield?

    For my escape room I'm going to replace the inner works of a rotary phone by a Teensy 3.2 + Audio Shield. The players will have to find the right number to call. Up to that point, I will play WAV files (buzz tone etc.) from the SD card. After they called the right number, the Teensy will stop playing the WAV sounds.

    Then the Game Master will speak to them through the Line In. As I gather it, the sound from Line In will directly go out to the jack plug, mixed with whatever the Teensy is playing. Is this correct?

    Then my question: can I detect activity on the Line In? If yes, I can silence the buzz tone from the Teensy. (If no, I have to use another form of communication (a digital pin) to change its state from active to passive.)

  2. #2
    Senior Member
    Join Date
    Feb 2017
    Posts
    270
    Quote Originally Posted by cow_n_berg View Post
    As I gather it, the sound from Line In will directly go out to the jack plug, mixed with whatever the Teensy is playing. Is this correct?
    Pretty sure that is incorrect. Both the Line In and the microphone are inputs to the SGTL5000. You can select one of them. The selected one enters the Teensy via it's RX I2S interface. It's up to your program what happens to it after that.

  3. #3
    All right, it slowly comes together in my brain.
    Code:
    inputSelect(AUDIO_INPUT_LINEIN);
    And then I can hook up a peak analyzer to the i2s input, and hook up the i2s input to a mixer and then to the i2s outputClick image for larger version. 

Name:	Audio Design Tool Heartbeat.jpg 
Views:	11 
Size:	39.9 KB 
ID:	15643.

    Thanks!

Posting Permissions

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