Available in LEADTOOLS Imaging Pro, Vector, Document, and Medical Imaging toolkits. |
LInet::SendSound
#include "ltwrappr.h"
L_INT LInet::SendSound(plRemoteComp, pWaveFormatData, pWaveData, puldwDataSize)
LInet *plRemoteComp; |
/* instance of a remote computer */ |
LPWAVEFORMATDATA pWaveFormatData; |
/* pointer to a structure describing the sound format */ |
LPWAVEDATA pWaveData; |
/* pointer to a structure containing the sound data */ |
L_SIZE_T *puldwDataSize; |
/* address of a variable to be updated with the size of the data being sent */ |
Sends sound data to a remote computer.
Parameter |
Description |
plRemoteComp |
Instance of a remote computer to which sound data will be sent. |
pWaveFormatData |
Pointer to a structure that describes the sound format. |
pWaveData |
Pointer to a structure containing the sound data. |
puldwDataSize |
Pointer to a variable which will be updated with the size of the data that was sent. This parameter is optional. You can pass NULL if you don't need this information. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
This function sends the pWaveFormatData structure first, including all the extra bytes needed by the format. It then sends the pWaveData structure, followed by the actual sound data.
A call to LInet::OnSoundReceived will be generated on the remote computer.
The remote end can use pWaveFormatData and pWaveData to save the sound to a file, or to play it (using LMMCapture::StartFeedSound).Since this structure follows the pWaveFormatData structure, use the SIZEOF_WAVEFORMATDATA macro to determine the size of the pWaveFormatData structure and thus the start of the pWaveData structure.
The sound format is sent every time so that it will facilitate handling multiple connections to different computers that are recording sound in different formats.
You must initialize the LEADTOOLS Peer-to-Peer DLL using LInet::StartUp before calling this function.
Required DLLs and Libraries
LTNET For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
See Also