#include "Ltdic.h"
L_UINT16 LDicomWaveformGroup::LoadAudio(pszFilename, uFlags = 0)
Inserts an audio (wave) file into the waveform group.
Name of the audio file to load.
Reserved for future use. Pass 0.
Value | Meaning |
---|---|
0 | The function was successful. |
> 0 | An error occurred. Refer to Return Codes. |
This function is mainly intended to be used with 8-bit (mono and stereo) PCM, mu-Law and a-Law wave files. It can also be used with 16-bit (mono and stereo) PCM wave files, but in this case it will automatically convert them to 8-bit.
NOTE: This is a limitation in the DICOM standard and not in the function itself.
This function fails and returns DICOM_ERROR_FORMAT if the format of the input wave file is not PCM, mu-Law or a-Law.
This function is very useful when creating DICOM objects of type "Basic Voice Audio" (1.2.840.10008.5.1.4.1.1.9.4.1), which is typically used for report dictation. Two of the main constraints of this IOD are the sampling frequency, which should be 8000; and sample interpretation, which should be unsigned 8-bit linear, 8-bit mu-law or 8-bit A-law. For more information about this object, refer to "Basic Voice Audio Information Object Definition" and "Basic Voice Audio IOD Content Constraints" in the DICOM standard.
Required DLLs and Libraries
Win32, x64
This sample shows how to insert a wave stream into a dataset.
L_INT LDicomWaveformGroup_LoadAudioExample(LDicomDS &InputDS, L_TCHAR * pszInputWaveFileName)
{
L_INT nRet;
LDicomWaveformGroup AudioWaveformGroup;
// Load an audio file into the waveform group.
nRet = AudioWaveformGroup.LoadAudio(pszInputWaveFileName,0);
if(nRet != DICOM_SUCCESS)
return nRet;
// Insert the waveform group into the dataset
nRet = InputDS.AddWaveformGroup(&AudioWaveformGroup, 0,ELEMENT_INDEX_MAX);
if(nRet != DICOM_SUCCESS)
return nRet;
return DICOM_SUCCESS;
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.