AudRecordLib
|
Implements the exported functions. More...
#include "stdafx.h"
#include "exports.h"
#include "wmfunctions.h"
#include "device.h"
#include "misc.h"
#include "alloc.h"
Functions | |
AUDRECORD_API HRESULT | GetWMACodecConfigs (CodecConfigs **ppConfigs) |
AUDRECORD_API void WINAPI | FreeWMACodecConfigs (CodecConfigs *pConfigs) |
AUDRECORD_API HRESULT | GetAudioEndpoints (EndpointArray **ppEndpoints) |
AUDRECORD_API void | FreeAudioEndpoints (EndpointArray *pEndpoints) |
AUDRECORD_API HRESULT | CreateAudRecordInterface (CodecConfiguration *pCodecConfig, struct IAudRecord **ppAudRecord) |
AUDRECORD_API PVOID | SetAllocFreeFunctions (pfnAlloc allocFn, pfnFree freeFn, PVOID pUserData) |
AUDRECORD_API void | DumpUnfreedAllocations () |
Implements the exported functions.
AUDRECORD_API HRESULT CreateAudRecordInterface | ( | CodecConfiguration * | pCodecConfig, |
IAudRecord ** | ppAudRecord | ||
) |
Create an IAudRecord interface using the specified codec.
Creates a new IAudRecord interface and calls ChangeCodec with the pCodecConfig parameter. Recording does not start until you add one or more targets with the AddFileTarget, AddNetworkTarget, or AddCustomTarget member functions and call Record with an Endpoint returnen from GetAudioEndpoints. COM must be initialized before calling this function. When you no longer need the IAudRecord object, free it by calling Release()
pCodecConfig | The initial codec configuration to use as for the output | |
[out] | ppAudRecord |
AUDRECORD_API void DumpUnfreedAllocations | ( | ) |
In debug builds, AudRecord keeps a list of all allocations made either by the default allocation functions or by those set by SetAllocFreeFunctions(). Calling this function dumps all allocations and stack traces via both the ETW debug stream and the debuggers text output via OutputDebugStringA()
AUDRECORD_API void FreeAudioEndpoints | ( | EndpointArray * | pEndpoints | ) |
Frees a list of audio render endpoints allocated by GetAudioEndpoints
pEndpoints | The allocated pointer retrieved from GetAudioEndpoints |
AUDRECORD_API void WINAPI FreeWMACodecConfigs | ( | CodecConfigs * | pConfigs | ) |
Frees a list of codec configurations allocated by GetWMACodecConfigs
pConfigs | The allocated pointer retrieved from GetWMACodecConfigs |
AUDRECORD_API HRESULT GetAudioEndpoints | ( | EndpointArray ** | ppEndpoints | ) |
Returns an list of all installed audio output devices.
Retrieves the list of possible devices to capture audio on along with their name and description. One of these endpoints must be passed to IAudRecord::Record to begin recording. CoInitialize must be called prior to calling this function and the returned pointer must be freed with FreeAudioEndpoints when it is no longer required
[out] | ppEndpoints | A pointer to a pointer that receives the allocated audio endpoints |
AUDRECORD_API HRESULT GetWMACodecConfigs | ( | CodecConfigs ** | ppConfigs | ) |
Returns an list of all installed audio codec configurations.
Retrieves the list of usable codecs and a list of each CBR and VBR configuration they support. These configurations can be passed to CreateAudRecordInterface and IAudRecord::ChangeCodec to define the compression format and bitrate used. CoInitialize must be called prior to calling this function
[out] | ppConfigs | A pointer to a pointer that receives the allocated codec configurations |
Sets the functions used to allocate and free the memory AudRecordLib requires
If this function isn't called, HeapAlloc and HeapFree are used.
allocFn | Function which should allocate memory |
freeFn | Frees the memory returned by allocFn |
pUserData | Opaque blob of context data that is passed to both functions untouched |