ImageGear Professional for Linux
IG_mult_audio_format_set

This function sets the format of the audio to be retrieved from a multimedia instance.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_mult_audio_format_set(
        HIGMULT hMult, 
        LPAT_UINT lpSampleRate, 
        LPAT_UINT lpBitsPerSample, 
        LPAT_UINT lpChannels 
);

Arguments:

Name Type Description
hMult HIGMULT Multimedia instance handle.
lpSampleRate LPAT_UINT Number of samples per second.
lpBitsPerSample LPAT_UINT Number of bits per sample.
lpChannels LPAT_UINT Number of channels (1 = mono, 2 = stereo).

Return Value:

Returns the number of ImageGear errors that occurred during this function call. If there are no errors, the return value is IGE_SUCCESS.

Supported Raster Image Formats:

This function does not process image pixels.

Example:

 
Copy Code
/* Ask for 44100Hz 16-bit stereo audio */
AT_ERRCOUNT nErrcount;       /* Number of errors on stack */
HIGMULT hMult;               /* Multimedia instance handle */
AT_UINT nSampleRate = 44100; /* Sample rate of audio */
AT_UINT nBitsPerSample = 16; /* Bits per sample */
AT_UINT nChannels = 2;       /* Number of channels */
nErrcount = IG_mult_audio_format_set(hMult, &nSampleRate, &nBitsPerSample, &nChannels);

Remarks:

This is not a necessary step under normal circumstances. If possible, the audio will be converted to the format you specify as it is retrieved using IG_mult_audio_get(). If conversion is not possible, an error will occur.

 

 


©2016. Accusoft Corporation. All Rights Reserved.

Send Feedback