Add a sound through xact-Overview

Source: Internet
Author: User
ArticleDirectory
    • Add a sound using xact
Use xact to add a sound overview

This chapter will further discuss xact. Xact is short for Microsoft's cross-platform Audio creation tool. It allows you to create audio projects for Windows and Xbox 360 platforms. In fact, it is also the only way to play a sound in xNa. This is not so important for Windows, because you can insert any other sound engine you want (such as directsound, openal, fmod, etc ). But it is not easy on the Xbox 360, because you can only use the xNa framework, it cannot use any other framework to play the sound. The reason you can only use xact is that xNa cannot use any unmanagedCodeFor the same reason, you cannot use any other graphics or input engine ..

However, xact is not a bad thing. It ensures that the same sound content file and playback code are used on Windows and Xbox 360 platforms. For example, Xbox 360 only supports xma compression, while PC uses other compression formats, such as MP3, Ogg, ADPCM, and other custom compression formats, but xact only supports ADPCM. IP speech applications usually use proprietary sound compression formats because human voices are more easily compressed than music. For example, sound files are very short, however, as a game developer, they usually want to achieve the highest possible quality of sound effects. Therefore, audio files are often uncompressed or use lossless compression. For music, it occupies a lot of space. If your game is on a DVD or you have enough hard disk space to waste, you can store uncompressed wav files. This is not good for xNa games because you cannot access DVDs and it is not a good idea to waste hundreds of MB of space on music.

In the past DirectX or hosted DirectX application Program , you are most likely to use directsound to play a sound or use other frameworks such as openal and fmod. Even if you use these frameworks, you still need to do a lot of custom code. You must determine which sound formats are most suitable for you and compress your own voice. In addition, you must play the music by yourself. For example, directsound is not very useful for music. It only supports WAV Files. If you want to play MP3 or Ogg music files, you must use other frameworks such as DirectShow, Windows MCI, and ActiveX playback code. It sounds like a lot of work, but the actual code for playing sound in most games is very simple. If you want to use complex 3D sound computing or support surround sound, it will be complicated, but it is still easier than developing 3D engines.

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.