On how to use stereo input

I’m quite confused about how to add wave inputs to audio tracks.
Specifically, having an audio interface with two inputs, I would like to be able to set the inputs of a track to one of three options: input 1, input 2 or input 1-2.
The problem is how to use the two inputs combined as a stereo pair.
First, I tried simply:

input1->setTargetTrack (*track, 0, false);
input2->setTargetTrack (*track, 0, false);
input1->setRecordingEnabled (*track, true);
input2->setRecordingEnabled (*track, true);

(Where input1 and input2 are of the type InputDeviceInstance*).
But when recording I end with two audio clips with mono source files on the track.

Then I discovered WaveInputDevice::setStereoPair, but it seems that this will combine the two inputs in a way, so that I can then only use them as a stereo pair.

This probably comes down me not quite understanding the distinction between InputDevices and InputDeviceInstances

Is it possible to use the same physical inputs as mono inputs and stereo pairs at the same time?

That is a limitation of the engine. Inputs are either mono or stereo. What are you trying to do? Maybe I can think of another way to accomplish it.

Ah ok. I’m creating a daw and I want the user to be able to do something like this:
Create two tracks.
Set input 1 to the first.
Set input 1-2 to the second.
Record enabling track 1 should record a mono audio file and doing so for track 2 should record a stereo file.
(Similar to how it works in Logic)

The inputs don’t need to be active / sounding until the user chooses to record enable a track and it shouldn’t be possible to record enable the same input in more than one track at a time.
So the solution might be something like not actually calling input->setTargetTrack before user clicks record enable?

I don’t think this can be done at the moment as it’s the devices that have the stereo/mono setting, not the instance that the Edits get.

Eventually we’ll want to add user-definable busses for inputs (so you can make your own inputs from any hardware device) but we’re not quite there yet I’m afraid. You might just have to record in stereo on both tracks and make the second one mono when recording is stopped?

Eventually we’ll want to add user-definable busses for inputs (so you can make your own inputs from any hardware device)

That sounds great, I’ll look forward to that! I have a deadline for this project somewhere in the fall - is there a chance you’ll get to that before then?

You might just have to record in stereo on both tracks and make the second one mono when recording is stopped?

By “making it mono”, do you mean something like converting the clip (and source file) to a mono file using only the channel chosen by the user? In the example above that would be the left channel.

I’m thinking for my case a cleaner solution might be to just change the stereo pair configuration on the fly. Cause I don’t need e.g. 1-2 and 1 and 2 at the same time anyway.
So that whenever the user wants to turn on input monitoring for a track og record enable it, then I’ll pair up the inputs if needed.

That might be easier.

I’ll try it out now