X01.Game. CubeRun: XACT3 playback sound

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.