AudRecordLib
Functions
misc.h File Reference

Declarations for miscellaneous functions. More...

Go to the source code of this file.

Functions

HRESULT CheckCOMInitialization ()
DWORD GetCurrentTimerResolution ()
BOOL GetWaveformatExType (const struct tWAVEFORMATEX *pwfx, BOOL *pIsFloat)
BOOL IsSSE2Supported ()
std::wstring GetCurrentDateTime ()
void SetCurrentThreadName (const char *pszThreadName)

Detailed Description

Declarations for miscellaneous functions.


Function Documentation

HRESULT CheckCOMInitialization ( )

Simple check to see whether COM has been initialised for the current thread

Returns:
S_OK if it has, CO_E_NOTINITIALIZED if not
std::wstring GetCurrentDateTime ( )

Returns the current date and time in the C locale

Calls time to get current UTC time, localtime to convert that, and then the wide strftime using the classic C locale to get the date/time string

Returns:
The wide result of strftime with the %#c format string
DWORD GetCurrentTimerResolution ( )

Returns the current resolution of the system timer

The function queries the value set by timeBeginPeriod, in essence it is timeGetPeriod.

Returns:
The millisecond resolution of the system timer
BOOL GetWaveformatExType ( const struct tWAVEFORMATEX *  pwfx,
BOOL *  pIsFloat 
)

Determines the validity and sample type of a WAVEFORMATEX structure

Parameters:
pwfxThe structure to examine
[out]pIsFloatIf the function returns nonzero, this is set to nonzero if the structure describes a format with float samples, zero otherwise.
Returns:
Nonzero if the WAVEFORMATEX struct has a WAVE_FORMAT_EXTENSIBLE type
BOOL IsSSE2Supported ( )

Deterines whether SSE2 support is present

Returns:
Nonzero if SSE2 is available, zero if not
void SetCurrentThreadName ( const char *  pszThreadName)

Sets the name if the current thread in the Visual Studio debugger

As an exception is used to set the name, the entire thing is wrapped around an IsDebuggerPresent() check.

Parameters:
pszThreadNameThe name of the current thread
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Defines