Inserting a Wave Stream Into a Data Set Example for C#

public bool InsertWaveFileIntoDataSet(ref LTDICLib.LEADDicomDS objDataSet, ref string sInputWaveFilename)
{
   bool tempInsertWaveFileIntoDataSet = false;
   tempInsertWaveFileIntoDataSet = false;
   LTDICLib.DicomWaveformGroup objAudioWaveformGroup = new LTDICLib.DicomWaveformGroup(); objAudioWaveformGroup.EnableMethodErrors = false;
   // Load the audio file into the waveform group
   if (objAudioWaveformGroup.LoadAudio(sInputWaveFilename, 0) != (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
      return tempInsertWaveFileIntoDataSet;
   // Insert the audio waveform group into the Data Set
   if (objDataSet.AddWaveformGroup(objAudioWaveformGroup, 0, -1) != (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
      return tempInsertWaveFileIntoDataSet;
   return true;
}