jlewicki

I'm trying to create an XACT class based off of the dx-samples. I am able to make a fully functioning in-memory class, but making it so that it supports streaming is proving difficult.

Error:

Code Snippet

1>.\XACT.cpp(69) : error C3867: 'XACT::XACTNotificationCallback': function call missing argument list; use '&XACT::XACTNotificationCallback' to create a pointer to member
1>.\XACT.cpp(69) : error C2440: '=' : cannot convert from 'void (__stdcall XACT::* )(const XACT_NOTIFICATION *)' to 'XACT_NOTIFICATION_CALLBACK'
1> There is no context in which this conversion is possible


line(69):


Code Snippet

XACT_RUNTIME_PARAMETERS xrParams = {0};
xrParams.lookAheadTime = 250;
xrParams.fnNotificationCallback = XACTNotificationCallback; //line 69




here is the header:
Code Snippet

#define _WIN32_DCOM
#include <windows.h>
#include <commdlg.h>
#include <xact.h>
#include <shellapi.h>
#pragma warning( disable : 4996 ) // disable deprecated warning
#include <strsafe.h>
#pragma warning( default : 4996 )

class XACT
{
public:

XACT();

HRESULT PrepareXACT();
void UpdateAudio();
VOID CleanupXACT();
//LRESULT WINAPI MsgProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam );
void WINAPI XACTNotificationCallback(const XACT_NOTIFICATION* pNotification);
HRESULT FindMediaFileCch( WCHAR* strDestPath, int cchDest, LPCWSTR strFilename );
bool DoesCommandLineContainAuditionSwitch();

struct AUDIO_STATE
{
XACTINDEX iZap;
XACTINDEX iRev;
XACTINDEX iSong[3];

IXACTEngine* pEngine;
IXACTSoundBank* pSoundBank;
IXACTWaveBank* pInMemoryWaveBank;
IXACTWaveBank* pStreamingWaveBank;

IXACTCue* pZeroLatencyRevCue;

// Handles to audio files to be closed upon cleanup
HANDLE hStreamingWaveBankFile;
VOID* pbInMemoryWaveBank; // Handle to wave bank data. Its memory mapped so call UnmapViewOfFile() upon cleanup to release file
VOID* pbSoundBank; // Pointer to sound bank data. Call delete on it when the sound bank is destroyed

CRITICAL_SECTION cs;
bool bHandleStreamingWaveBankPrepared;
bool bHandleZeroLatencyCueStop;
bool bHandleSongStopped;

int nCurSongPlaying;
};

AUDIO_STATE g_audioState;

HWND g_hWnd;
};


here is the member title:


Code Snippet
void WINAPI XACT::XACTNotificationCallback(const XACT_NOTIFICATION* pNotification)