I am looking to have Teensy 3.1 encrypt microphone/voice input, using a simple algorithm:

incoming = voiceData;
while(incomingAudio) {
r = incomingAudio % 10;
reverse = reverse* 10 + r; // used to reverse the encryption;
incomingAudio=incomingAudio/10;
}
This code work well with the Teensy Audio shield.
I am relatively new to Teensy, so do not know how to access and manipulate the microphone/voice data. The data may come from using audio shield's LineIn (AUDIO_INPUT_LINEIN) when using stereo mode. This stereo mode allow for 2 channels and I have bee able to test it, using one for audio input from external source and the other for microphone.
Both sounds came through to my headphone, 1 for each ear.
So my problem is 3 fold, sorry for the complexity
1) Accessing and modifying the input voice/microphone data, so I can add encryption.
2) Routing the modified data to Teensy 3.1 DAC/A14 so it can be sent to external speaker
3)How to have 2 audio inputs and output them using 2 pins (like DAC/A14, Pin3, etc) as the image above indicates.
For me the preferred option is not to use the Teensy Audio shield as audio quality is not top priority. Which leads to the question of using 2 audio inputs.
I have gathered that it may be possible by using the ADC library. If so, I would greatly appreciate any example codes or pointers on how to do this.

incoming = voiceData;
while(incomingAudio) {
r = incomingAudio % 10;
reverse = reverse* 10 + r; // used to reverse the encryption;
incomingAudio=incomingAudio/10;
}
Code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
// GUItool: begin automatically generated code
AudioInputI2S i2s1; //xy=200,69
AudioOutputI2S i2s2; //xy=365,94
AudioConnection patchCord1(i2s1, 0, i2s2, 0);
AudioConnection patchCord2(i2s1, 1, i2s2, 1);
AudioControlSGTL5000 sgtl5000_1; //xy=302,184
// GUItool: end automatically generated code
const int myInput = AUDIO_INPUT_LINEIN;
//const int myInput = AUDIO_INPUT_MIC;
void setup() {
// Audio connections require memory to work. For more
// detailed information, see the MemoryAndCpuUsage example
AudioMemory(12);
// Enable the audio shield, select input, and enable output
sgtl5000_1.enable();
sgtl5000_1.inputSelect(myInput);
sgtl5000_1.volume(0.5);
}
elapsedMillis volmsec=0;
void loop() {
// every 50 ms, adjust the volume
if (volmsec > 50) {
float vol = analogRead(15);
vol = vol / 1023.0;
//audioShield.volume(vol); // <-- uncomment if you have the optional
volmsec = 0; // volume pot on your audio shield
}
}
This code work well with the Teensy Audio shield.
I am relatively new to Teensy, so do not know how to access and manipulate the microphone/voice data. The data may come from using audio shield's LineIn (AUDIO_INPUT_LINEIN) when using stereo mode. This stereo mode allow for 2 channels and I have bee able to test it, using one for audio input from external source and the other for microphone.
Both sounds came through to my headphone, 1 for each ear.
So my problem is 3 fold, sorry for the complexity
1) Accessing and modifying the input voice/microphone data, so I can add encryption.
2) Routing the modified data to Teensy 3.1 DAC/A14 so it can be sent to external speaker
3)How to have 2 audio inputs and output them using 2 pins (like DAC/A14, Pin3, etc) as the image above indicates.
For me the preferred option is not to use the Teensy Audio shield as audio quality is not top priority. Which leads to the question of using 2 audio inputs.
I have gathered that it may be possible by using the ADC library. If so, I would greatly appreciate any example codes or pointers on how to do this.