39 lines
3.5 KiB
HTML
39 lines
3.5 KiB
HTML
<!-- This page was created with the RAD auto-doc generator. -->
|
|
<!doctype html public "-//w3c//dtd html 3.2 final//en">
|
|
<html>
|
|
<head>
|
|
<title>Sound on the Xbox</title>
|
|
<meta http-equiv="content-type" content="text/html; charset=iso8859-1">
|
|
<meta name="ms.locale" content="en-us">
|
|
<meta name="description" content="">
|
|
<meta name="ms-hkwd" content="Sound on the Xbox">
|
|
<link rel="stylesheet" title="default" href="reference.css" type="text/css" media="screen">
|
|
</head>
|
|
<body topmargin="0">
|
|
<table cellspacing=0 cellpadding=0 class=bar width=100% height=25>
|
|
<tr class=bar>
|
|
<td class=bar>
|
|
<i> <a href="index.html" class=trn>Bink SDK 1.5v</a></i>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<h1>Sound on the Xbox</h1>
|
|
<h4>Discussion</h4>
|
|
<p>For sound support on the Xbox, Bink hooks directly to DirectSound. You don't have to to anything special at all - everything is handled automatically. If you <b>aren't</b> going to play a 5.1 soundtrack, then Bink will automatically route the default stereo or mono sound track to all of the 5.1 speakers. If you <b>are</b> going to play 5.1 soundtracks with Bink, then you need to setup the Bink file and your playback code using these tips. The first step in 5.1 playback is to make a Bink file that contains multiple audio tracks (check out the <a href="Audio Tracks in Bink.html#Audio-tracks-in-Bink">Audio-tracks-in-Bink</a> section for more information on audio tracks). You use the Bink Sound Mixer to mix in each of the separate audio tracks. Author the multiple sound tracks like this: <b>Track ID 0 -</b> A stereo track containing the front left and front right channels. <b>Track ID 1 -</b> A mono track containing the center channel. <b>Track ID 2 -</b> A mono track containing the sub-woofer channel. <b>Track ID 3 -</b> A stereo track containing the back left and back right channels. Then, at runtime, you need to tell Bink to open all of the sound tracks simultaneously. To do this, use code something like this: </p><code><font size=3 color=#006000><pre><br>U32 TrackIDsToPlay[ 4 ] = { 0, 1, 2, 3 };<br>BinkSetSoundTrack( 4, TrackIDsToPlay );<br>bink = BinkOpen( "file.bik", BINKSNDTRACK );</pre></font></code><p>Now we have to tell DirectSound where to route each of the sound tracks. To do this, use code like this: </p><code><font size=3 color=#006000><pre><br>U32 bins[ 2 ];<br>bins[ 0 ] = DSMIXBIN_FRONT_LEFT;bins[ 1 ] = DSMIXBIN_FRONT_RIGHT;BinkSetMixBins( bink, 0, bins, 2 );<br>bins[ 0 ] = DSMIXBIN_FRONT_CENTER;BinkSetMixBins( bink, 1, bins, 1 );<br>bins[ 0 ] = DSMIXBIN_LOW_FREQUENCY;BinkSetMixBins( bink, 2, bins, 1 );<br>bins[ 0 ] = DSMIXBIN_BACK_LEFT;bins[ 1 ] = DSMIXBIN_BACK_RIGHT;BinkSetMixBins( bink, 3, bins, 2 );</pre></font></code><p>ExamXbox.CPP has example code to do all of this - check out the BINK51 code sections for details. </p>
|
|
<p><a href="Memory management onxuuiga.html">Next Topic (Memory management on the Xbox)</a> </p><p><a href="Gamma on the Xbox.html">Previous Topic (Gamma on the Xbox)</a> </p><p>
|
|
<br>
|
|
<b>Group:</b>
|
|
<a href="The Xbox Platform.html">The Xbox Platform</a><br>
|
|
<b>Related Sections:</b>
|
|
<a href="Audio Tracks in Bink.html">Audio Tracks in Bink</a><br>
|
|
<b>Related Functions:</b>
|
|
<a href="BinkSetMixBins.html">BinkSetMixBins</a>, <a href="BinkSetSoundTrack.html">BinkSetSoundTrack</a></p>
|
|
<p align=center>
|
|
<a href="mailto:Bink1@radgametools.com">For technical support, e-mail Bink1@radgametools.com</a>
|
|
<br>
|
|
<a href="http://www.radgametools.com/bnkmain.htm?from=help1.5v">© Copyright 1994-2003 RAD Game Tools, Inc. All Rights Reserved.</a>
|
|
</p>
|
|
<br>
|
|
</body>
|
|
</html>
|