AudRecordLib
|
Defines the exported functions and structures. More...
#include <wmsdk.h>
#include <mmdeviceapi.h>
#include "IAudRecordInterface.h"
Go to the source code of this file.
Classes | |
struct | _CodecConfiguration |
struct | _Codec |
struct | _CodecConfigs |
struct | _Endpoint |
struct | _EndpointArray |
Defines | |
#define | AUDRECORD_API __declspec(dllimport) |
Typedefs | |
typedef struct _CodecConfiguration | CodecConfiguration |
typedef struct _Codec | Codec |
typedef struct _CodecConfigs | CodecConfigs |
typedef struct _Endpoint | Endpoint |
typedef struct _EndpointArray | EndpointArray |
typedef PVOID(WINAPI * | pfnAlloc )(PVOID pUserData, SIZE_T bytesRequired) |
typedef void(WINAPI * | pfnFree )(PVOID pUserData, PVOID pMemory) |
Functions | |
AUDRECORD_API HRESULT WINAPI | GetWMACodecConfigs (CodecConfigs **ppConfigs) |
AUDRECORD_API void WINAPI | FreeWMACodecConfigs (CodecConfigs *pConfigs) |
AUDRECORD_API HRESULT WINAPI | GetAudioEndpoints (EndpointArray **ppEndpoints) |
AUDRECORD_API void WINAPI | FreeAudioEndpoints (EndpointArray *pEndpoints) |
AUDRECORD_API HRESULT WINAPI | CreateAudRecordInterface (CodecConfiguration *pCodecConfig, IAudRecord **ppAudRecord) |
AUDRECORD_API PVOID WINAPI | SetAllocFreeFunctions (pfnAlloc allocFn, pfnFree freeFn, PVOID pUserData) |
AUDRECORD_API void WINAPI | DumpUnfreedAllocations () |
Defines the exported functions and structures.
#define AUDRECORD_API __declspec(dllimport) |
Resolves to nothing if building the AudRecord dll otherwise to __declspec(dllimport)
typedef struct _CodecConfigs CodecConfigs |
A collection of codecs and their configurations
typedef struct _CodecConfiguration CodecConfiguration |
Information regarding a single codec configuration
typedef struct _EndpointArray EndpointArray |
A collection of audio render devices which can potentially be captured from
typedef PVOID(WINAPI* pfnAlloc)(PVOID pUserData, SIZE_T bytesRequired) |
Typedef for the custom alloc function form
typedef void(WINAPI* pfnFree)(PVOID pUserData, PVOID pMemory) |
Custom free function form
AUDRECORD_API HRESULT WINAPI 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 WINAPI 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 WINAPI 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 WINAPI 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 WINAPI 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 |
AUDRECORD_API PVOID WINAPI SetAllocFreeFunctions | ( | pfnAlloc | allocFn, |
pfnFree | freeFn, | ||
PVOID | pUserData | ||
) |
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 |