MultiMedia Soft forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

SMF - Just Installed!

Author Topic: Record from a 32 channel ASIO input device to his 32 channel WAV file  (Read 38 times)

shimamura

  • Newbie
  • *
  • Posts: 2
    • View Profile

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.
Code: [Select]
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.

« Last Edit: November 10, 2021, 05:39:22 AM by shimamura shusaku »
Logged

Administrator

  • Administrator
  • Sr. Member
  • *****
  • Posts: 314
    • View Profile
    • MultiMedia Soft
Re: Record from a 32 channel ASIO input device to his 32 channel WAV file
« Reply #1 on: November 10, 2021, 12:12:51 PM »

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
Logged

shimamura

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Record from a 32 channel ASIO input device to his 32 channel WAV file
« Reply #2 on: November 11, 2021, 02:01:28 AM »

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.
Logged