Run the Xact3.exe program in the DXSDK installation directory> Uilities => bin => x86 to create a waveform library and Sound Bank project, copy clip.wav or similar files to the Wave Bank workspace, drag them into the Sound Bank workspace, and select the Build menu to generate the XBox and Win directories, which are ready-to-use audio files.
Once <xact3.h> ~ XACT3Audio (* MapFileData (LPCWSTR path, DWORD &*****XactAudio. h ~ XACT3Audio (= XACT3CreateEngine (response, <=== XactEngine-> Initialize (<== XactEngine-> CreateInMemoryWaveBank (m_pWaveData, size ,,, & == response-> CreateSoundBank (m_pSoundData, size, & * metadata: MapFileData (LPCWSTR path, DWORD & = CreateFileW (path, GENERIC_READ, file_pai_read, nullptr, OPEN_EXISTING, (hFile = (size =-= CreateFileMapping (hFile, nullptr, PAG E_READONLY ,(! * Data = MapViewOfFile (hMap, FILE_MAP_READ,->=- >==->-> =XactAudio. cpp
Basically, they are all stylized things. You only need to add the following code at the end of LoadContent () of Cube. cpp:
(! (!m_audio.LoadWaveBank(L (!m_audio.LoadSoundBank(L = m_audio.SoundBank->GetCueIndex(->Play(cue, , , nullptr);
Complete code can be downloaded from my blog x01.Lab. Download.