Record from a 32 channel ASIO input device to his 32 channel WAV file

Started by shimamura, November 10, 2021, 05:36:46 AM

Previous topic - Next topic

shimamura

Hello.
I'm considering purchasing the Audio Sound Recorder API for .NET.
Can this API record from a 32 channel ASIO input device to his 32 channel WAV file?
The following program could only record from the start channel to 8channels.

public void Execute()
{
   short inputDevice = 0;
   short channels = 32;
   short firstCh = 0;

  var mRec = new AudioSoundRecorderApi.AudioSoundRecorderApiObj();
  mRec.InitDriversType(enumDriverTypes.DRIVER_TYPE_ASIO);
  mRec.InitRecordingSystem();
  mRec.ASIO.DeviceStart(inputDevice, 0, enumAsioChannelModes.ASIO_CHANNEL_MODE_MULTI, firstCh);

  System.Diagnostics.Debug.WriteLine($"Current Device:{mRec.GetInputDeviceDesc(inputDevice)}");
  System.Diagnostics.Debug.WriteLine($" ChannelsCount:{mRec.GetInputDeviceChannelsCount(inputDevice)}");

  mRec.EncodeFormats.ForRecording = enumEncodingFormats.ENCODING_FORMAT_WAV;
  mRec.EncodeFormats.WAV.EncodeMode = enumWavEncodeModes.WAV_ENCODE_PCM_S24;
  mRec.EncodeFormats.ResampleMode = enumResampleModes.RESAMPLE_MODE_CUSTOM_FORMAT;
  mRec.EncodeFormats.ResampleCustomFrequency = 44100;
  mRec.EncodeFormats.ResampleCustomChannels = channels;
  mRec.ASIO.DeviceRecordParamsSet(inputDevice, false, enumAsioRecordMonoToStereoMode.ASIO_REC_MONO_BOTH_CHANS);

  enumErrorCodes nResult = mRec.StartFromAsioDevice(inputDevice, firstCh, channels, @"d:\test.wav");
  if (nResult != enumErrorCodes.ERR_NOERROR)
  {
      MessageBox.Show($" Error {nResult}");
  }
  else
  {
      System.Threading.Thread.Sleep(1000 * 3);
  }
  mRec.ASIO.DeviceStop(0);
}

I am using a RMA MADIface XT Audio Interface.
* I'm sorry for the poor English. Translated by Google Translate.


Administrator

Hello,

although we don't have direct experience with this kind of sound cards, the wav recording is probably limited to 8 channels because this is the number of "physical" channels reported by the ASIO driver: as far as we know, MADI devices transmit a certain number of "virtual" channels through one single optical "physical" channel: unfortunately our component is currently unable to split these virtual channels and store them inside separate channels into the output wav file.

Kind regards

Severino Delaurenti
MultiMedia Soft

shimamura

thank you for your answer.
Certainly, when set as ASIO Device, 1 end point device is 196ch, but
When set as a WDM Device, multiple end point devices are created in units of 8 channels.
It may be physically 8ch.
(However, if firstCh = 3; channels = 8, 2ch to 9ch will be recorded. )
I will consider it a little more.

<code>
Debug.WriteLine($"Current Device:{mRec.GetInputDeviceDesc(inputDevice)}");
Debug.WriteLine($"ChannelsCount:{mRec.GetInputDeviceChannelsCount(inputDevice)}");
---------------------------------------
output (Use ASIO Driver)
---------------------------------------
Current Device:ASIO MADIface USB
ChannelsCount:196
</code>

* I'm sorry for the poor English. Translated by Google Translate.