CHAPTER 16 Audio © 2008 Cengage Learning EMEA. LEARNING OBJECTIVES In this chapter you will learn about: – –The fundamentals of sound – –DirectX Audio.

Slides:



Advertisements
Similar presentations
Operating Systems Components of OS
Advertisements

4/1/2017 4:16 PM.
Välkommen till Sommarkollo Introduce XNA Game Studio Express Make A Game!
CSE 380 – Computer Game Programming Audio Engineering.
Pro Tools 7 Session Secrets Chapter 6: After the Bounce or Life Outside of Pro Tools Life Outside of Pro Tools.
Chapter 5.5 Audio Programming
SimPhonics, Inc. FXDirect Audio System for V+. SimPhonics, Inc. What Is FXDirect ® Audio Subsystem Add-on to V+ –Currently built-in Consists of Objects.
Audio 1 Subject:T0934 / Multimedia Programming Foundation Session:8 Tahun:2009 Versi:1/0.
Final Year Project Progress January 2007 By Daire O’Neill 4EE.
SWE 423: Multimedia Systems Chapter 3: Audio Technology (2)
GAM666 – Introduction To Game Programming DirectX Audio, first appearing in DirectX 8, is the union of ● DirectSound – low level control of the audio hardware.
4.3. S OUND Use of sound within games. In lecture exploration of answers to frequently asked student questions.
 Currently there is no software solution that combines video and animation in to one platform.  Every single change drag changes in all of the environments.
Objectives Overview Differentiate among laptops, tablets, and servers Describe the purpose and uses of smartphones, digital cameras, portable media players,
Objectives Overview Differentiate among laptops, tablets, and servers Describe the purpose and uses of smartphones, digital cameras, portable media players,
Image and Sound Editing Raed S. Rasheed Sound What is sound? How is sound recorded? How is sound recorded digitally ? How does audio get digitized.
Chapter 3.2 C++, Java, and Scripting Languages “The major programming languages used in game development.”
Chapter 5.5 Audio Programming. 2 Audio Programming Audio in games is more important than ever before.
1 Multimedia Systems 1 Dr Paul Newbury School of Engineering and Information Technology ENGG II - 3A11 Ext: 2615.
1 PC Audio 2 Sound Card  An expansion board that enables a computer to receive, manipulate and output sounds.
Java Audio.
Chapter 9 Audio.
CS371m - Mobile Computing Audio.
2 Outline Digital music The power of FPGA The “DigitalSynth” project –Hardware –Software Conclusion Demo.
LOOK 8/19/2015Theatre Arts 1(T) Sound: Properties and Functions Theatre Arts 1(T)
Microsoft Visual Basic 2012 CHAPTER ONE Introduction to Visual Basic 2012 Programming.
Windows audio architecture Win MM Application DirectSound Application SysAudio.SYS Kmixer.SYS WinMM.DLLDSound.DLL Device Drive Container USB Device Driver.
Digital Sound and Video Chapter 10, Exploring the Digital Domain.
Introduction to Interactive Media 10: Audio in Interactive Digital Media.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
MIDI. A protocol that enables computers, synthesizers, keyboards, and other musical devices to communicate with each other. Instead of storing actual.
COMP Representing Sound in a ComputerSound Course book - pages
CHAPTER 4 Window Creation and Control © 2008 Cengage Learning EMEA.
Audio. Why Audio Essential tool for – Interface – Narrative – Setting & Mood.
BLU-ICE and the Distributed Control System Constraints for Software Development Strategies Timothy M. McPhillips Stanford Synchrotron Radiation Laboratory.
Sound on the Web. Using Sound on a Web Site Conveying information  pronounce a word or describe a product Set a mood  music to match the web page scene.
Multimedia Technology and Applications Chapter 2. Digital Audio
Games Development Practices Sound Effects & OpenAL CO2301 Games Development 1 Week 15.
CHAPTER 5 Input Control © 2008 Cengage Learning EMEA.
Objective Understand digital audio production methods, software, and hardware. Course Weight : 6%
Windows, Linux, Mac, Android, iOS
Speech Processing and Recognition © Florida Institute of Technology Access audio data in real time and apply to speech recognition Final Exam Project By.
Objectives Overview Differentiate among laptops, tablets, desktops, and servers Describe the purpose and uses of smartphones, digital cameras, portable.
Chapter 12 The Principles of Computer Music Contents Digital Audio Processing Noise Reduction Audio Compression Digital Rights Management (DRM)
Chapter 13 DirectSound 로 잡음 만들기. 2 History of Sound Programming Sound programming always gets put off until the end DOS –Third party sound libraries:
Sound DirectMusic & DirectSound. Sound Formats Wav Midi (Musical Instrument Digital Interface) DLS (Downloadable Sounds) DirectMusic Producer Segments.
Theme: Multimedia Sound ProductionUFCFY Multimedia Sound Production.
Sound and Digital Sound v © Allan C. Milne Abertay University.
GAM666 – Introduction To Game Programming ● DirectX is implemented as a collection of COM objects ● To use a DirectX program, the user must have the correct.
CSC190 Introduction to Computing Operating Systems and Utility Programs.
Introduction to Game Programming Pertemuan 11 Matakuliah: T0944-Game Design and Programming Tahun: 2010.
1/27/2016Tech I Lighting Unit1 Sound: Properties and Functions Technical Theatre I.
WAVES An Introduction to Wave Motion Created by Joshua Toebbe NOHS 2015.
U73 PMD2: Understand methods and principles of sound design and production Date due: Monday 22/04/13.
Multimedia. A medium (plural media) is something that a presenter can use for presentation of information Two basic ways to present information are: –Unimedium.
XP Practical PC, 3e Chapter 14 1 Recording and Editing Sound.
Evolution music engine Alfred E. Heggestad OPLUG 1 February 2006.
What is DirectX? DirectX is built by Microsoft as a collection of API’s (Application Programming Interfaces) for the purpose of multimedia processing.
Chapter 8 Sound FX Composition. Chapter 8 Sound FX Composition.
Pre-Production Determine the overall purpose of the project.
CHAPTER 5 Input Control © 2008 Cengage Learning EMEA.
Introduction to Visual Basic 2008 Programming
Chapter 3: Windows7 Part 1.
Pre-Production Determine the overall purpose of the project.
Games Development Practices Sound Effects
Chapter 2: Operating-System Structures
02 | What DirectX Can Do and Creating the Main Game Loop
PRODUCTION PHASES CHANGES
Use of sound within games
Presentation transcript:

CHAPTER 16 Audio © 2008 Cengage Learning EMEA

LEARNING OBJECTIVES In this chapter you will learn about: – –The fundamentals of sound – –DirectX Audio – –DirectSound – –XACT – –XAudio2

INTRODUCTION TO SOUND Sound, on a physical level, is the propagation of potential and kinetic energy waves. Potential or stored energy is released in the form of kinetic energy (including other forms of energy) to affect the states of other objects.

INTRODUCTION TO SOUND A sound wave (vibration that travels through some medium) is described by means of its frequency, wavelength, period, direction, speed, and amplitude. Frequency is a measure of repeated occurrences over some period of time. Wavelength is the distance between two repeating points of a sound wave.

INTRODUCTION TO SOUND

The amplitude of a sound wave is its magnitude of oscillation (the wave’s variation in time) – i.e. the maximum variation in the wave during one wave cycle. The speed of sound expresses the distance travelled by a sound wave over a period of time. This velocity is dependent on the medium of propagation. Sound is thus mechanical energy in the form of a wave emitted from a vibrating source.

INTRODUCTION TO SOUND Sound and music in games form a crucial part of the overall gaming experience. There are generally two kinds of sounds in the computer world – digital and synthesized. – –Digital sound is recordings in the form of wave files, mp3s or oggs; to name but a few file formats. – –Synthesized sound is in turn based on hardware generated tones arranged in such a way as to produce the desired output.

INTRODUCTION TO SOUND

DIRECTX AUDIO DirectX Audio is a collective term used to describe a number of DirectX audio libraries, specifically: – –X3DAudio – –Microsoft Cross-Platform Audio Creation Tool (XACT) – –XAudio2 – –DirectSound

DirectSound The DirectSound library consists of three modules: – –the run-time dynamic link libraries (dsound,.dll and dsound3d.dll), a compile-time library (dsound.lib), and the DirectSound header (dsound.h). DirectSound allows for the simultaneous playback and manipulation of multiple wave sound files (.wav), the recording of audio, dynamic control over the addition of audio effects such as distortion and echo.

DirectSound DirectSound, similar to DirectInput, requires the creation of a main COM (Component Object Model) object from which all the other interfaces are requested. DirectSound consequently consists of a number of COM interfaces. – –The main interface, IDirectSound8, is responsible for initializing the DirectSound environment and for creating sound buffer objects. We also specify an IDirectSoundBuffer8 object to manage these created sound buffers.

DirectSound The IDirectSoundCapture8 interface is used to create sound capture buffers to facilitate recording of audio from an external device such as a keyboard or microphone. Sometimes it will be necessary to send control messages to the soundcard via notification events; IDirectSoundNotify8 is used for this purpose. There are, in addition to these interfaces, several others which can be used based on the complexity of the implemented sound system. – –Examples include IDirectSoundFXDistortion8, IDirectSoundFXWavesReverb8, IDirectSoundCaptureFXNoiseSuppress8 and IDirectSoundFull-Duplex8.

DirectSound The general steps for setting up and playing audio via the DirectSound API are as follows: – –Create a DirectSound IDirectSound8 interface object via the DirectSoundCreate8 function – this object represents the default playback device. – –Call the CreateSoundBuffer IDirectSound8 interface function to create a sound buffer which will be used for the storage and management of sound data. – –Access the wave data (stored in an audio file) and write it to the private sound buffer. – –Call the Lock IDirectSoundBuffer8 interface function to prepare a secondary buffer for the write operation. – –Call the Unlock IDirectSoundBuffer8 interface function to transfer the audio data from the private buffer to the initialized secondary buffer. – –Play the audio clip via the Play IDirectSoundBuffer8 interface function and, if playback is set to loop, then we can stop it using the Stop IDirectSoundBuffer8 interface function. [see the textbook and online source code for an example and detailed discussion].

XACT XACT is more than just an audio API, it is a complete high-level engine and library for the authoring and playback of audio via XAudio exclusive to the Xbox, DirectSound for older versions of Windows and the session-based audio stack in Windows Vista. XACT also features a helper library for 3D audio spatialization, namely, X3DAudio. XACT supports the following file formats:.wav,.aiff and.xma. It also has support for 5.1 surround sound as well as the grouping and queuing of sounds in so called wave and sound banks, respectively.

XACT The XACT Audio Creation Tool, shipped with the DirectX SDK, arranges audio files into so-called wave banks. It is typically used to construct and organize the data files needed for the integration of the XACT audio resources.

XACT The general steps for setting up and playing audio via the XACT API are: – –Initialize the XACT sound engine. – –Initialize an IXACTWave interface by first reading the.wave file into memory and then initializing the WAVEBANKENTRY XACT wave bank structure. – –Create an IXACTWave interface with the loaded wave data. This is done via the PrepareInMemoryWave IXACTEngine interface function. – –Play the wave file using the Play IXACTWave interface function. – –When finished using, destroy the IXACTEngine interface. [see the textbook and online source code for an example and detailed discussion].

XAudio2 XAudio2 is a new, still under development (at the time of writing) cross-platform, low-level audio API for unified code development under Windows XP, Windows Vista and the Xbox 360 gaming console. XAudio2 serves as replacement of DirectSound and as an extended version of the XAudio API for Xbox 360 development. All code developed using the XAudio2 API is exactly the same for both the Xbox and Windows platforms – thus resulting in a ‘write once, compile twice’ implementation.

XAudio2 The general steps for setting up and playing audio via the XAudio2 API are as follows: – –Initialize the XAudio2 sound engine. – –Create a mastering voice to control the mixing format of all audio played by the application. – –Load the wave file to play. – –Create a source voice and load the audio data into it. – –Play the source voice. – –Cleanup the source voice and all associated data. – –When finished using, release the XAudio2 engine. [see the textbook and online source code for an example and detailed discussion].