Can't have audio in and out stream at the same time

Hello there,

so I just started fiddling with openFrameworks to do some audio reactive stuff.
When I use the audioIn and audioOut only one works audioIn taking precedence.
Similar to this old question that unfortunately never got answered.

Here is simplified code:

void ofApp::setup(){
   
    bufferSize = 512;
    lAudio.assign(bufferSize, 0);
    rAudio.assign(bufferSize, 0);
    lMic.assign(bufferSize, 0);
    rMic.assign(bufferSize, 0);
    audioFile.load("path/to/wavefile");
    playhead = 0;
    
    ofSoundStreamSettings settings;    
    settings.setOutListener(this);
    settings.setInListener(this);
    settings.sampleRate = audioFile.getSampleRate();;
    settings.numOutputChannels = audioFile.getNumChannels();;
    settings.numInputChannels = 2;
    settings.bufferSize = bufferSize;
    audioStream.setup(settings);
    
}
void ofApp::audioOut(ofSoundBuffer& buffer) {
    for (size_t i = 0; i < buffer.getNumFrames(); i++){
        lAudio[i] = buffer[i*buffer.getNumChannels()    ] = audioFile.samples[0][playhead] * 0.5;
        rAudio[i] = buffer[i*buffer.getNumChannels() + 1] = audioFile.samples[1][playhead] * 0.5;
        playhead++;
    }
    audio2Vertices(); // go to stuff with lAudio and rAudio for visualisation
}

void ofApp::audioIn(ofSoundBuffer& buffer) {
    for (size_t i = 0; i < buffer.getNumFrames(); i++) {
        lMic[i] =  buffer[i*buffer.getNumChannels()];
        rMic[i] =  buffer[i*buffer.getNumChannels()+1];
    }
    micVertices(); // go to stuff with lMic and rMic for visualisation
}

So if I comment out either for loop in AudioIn or AudioOut both things seperately work. But together only the visualisation of the mic happens.

I am using AudioFile library Adam Stark for reading the wav file, but I don’t think that matters.

I also posted this on stack overflow if someone wants to collect points. I posting that here is not ok, please let me know, first time around.

Thanks in advance