Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //link kernel32, Ole32, and xaudio2 to use
- #ifndef _KIT_W32_AUDIOX2_H
- #define _KIT_W32_AUDIOX2_H
- #ifdef __cplusplus
- extern "C" {
- #endif
- #ifndef WINDOWS_LEAN_AND_MEAN
- # define WINDOWS_LEAN_AND_MEAN
- # include <windows.h>
- # undef WINDOWS_LEAN_AND_MEAN
- #else
- # include <windows.h>
- #endif
- //#include <windef.h>
- //#include <winnt.h>
- //#include <initguid.h>
- //#include <audioclient.h>
- //#include <mmdeviceapi.h>
- #include <xaudio2.h>
- #include <synchapi.h>
- #include <_kit_w32_privmacro.h>
- typedef struct {
- CRITICAL_SECTION lock;
- IXAudio2* object;
- IXAudio2MasteringVoice* master;
- IXAudio2SourceVoice** sources;
- void** sources_spec;
- unsigned int sources_len;
- unsigned int _padding; //might use this for something later
- } _kit_audioX2_Engine;
- //--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//
- extern HRESULT _kit_audioX2_CreateVoice(_kit_audioX2_Engine* engine, const WAVEFORMATEX* source_format, unsigned int* index_p);
- extern HRESULT _kit_audioX2_DestroyVoice(_kit_audioX2_Engine* engine, unsigned int index);
- //--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//
- extern HRESULT _kit_audioX2_CreateEngine(_kit_audioX2_Engine** engine_p,
- const WAVEFORMATEX* source_format,
- const wchar_t* deviceID);
- extern HRESULT _kit_audioX2_DestroyEngine(_kit_audioX2_Engine** engine_p);
- #ifdef __cplusplus
- }
- #endif
- #endif /* _KIT_W32_AUDIOX2_H */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement