Inserting a Wave Stream Into a Data Set Example for C++ 6.0 and later
BOOL InsertWaveFileIntoDataSet(ILEADDicomDSPtr& spDataSet, LPCSTR pszInputWaveFilename)
{
IDicomWaveformGroupPtr spAudioWaveformGroup(__uuidof(DicomWaveformGroup));
spAudioWaveformGroup->EnableMethodErrors = VARIANT_FALSE;
// Load the audio file into the waveform group
if (spAudioWaveformGroup->LoadAudio(pszInputWaveFilename, 0) != DICOM_SUCCESS)
{
return FALSE;
}
// Insert the audio waveform group into the Data Set
if (spDataSet->AddWaveformGroup(spAudioWaveformGroup, 0, ELEMENT_INDEX_MAX) != DICOM_SUCCESS)
{
return FALSE;
}
return TRUE;
}