TwlIPL_commit-99/add-ins/TwlSystem/man/ja_JP/snd/NNS_SndStrmAllocChannel.html

115 lines
3.5 KiB
HTML
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
<title>NNS_SndStrmAllocChannel</title>
<link rel="stylesheet" href="../css/nitro.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.65.1">
</head>
<body>
<div class="refentry" lang="ja"><a name="IDAEMWT"></a><div class="titlepage">
<div></div>
<div></div>
</div>
<h1>NNS_SndStrmAllocChannel</h1>
<h2>構文</h2>
<dl>
<dd><pre class="funcsynopsisinfo"><code>#include &lt;nnsys/snd.h&gt;</code></pre></dd>
<dd><pre class="funcprototype"><code class="funcprototype">BOOL NNS_SndStrmAllocChannel(
NNSSndStrm* <var>stream</var>,
int <var>numChannels</var>,
const u8 <var>chNoList[]</var> );</code><br></pre></dd>
</dl>
<div class="refsection" lang="ja"><a name="IDAYNWT"></a>
<h2>引数</h2>
<div class="variablelist">
<table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><em><strong><code>stream</code></strong></em></td>
<td>ストリーム構造体のポインタです。</td>
</tr>
<tr>
<td><em><strong><code>numChannels</code></strong></em></td>
<td>確保するチャンネル数です。値の範囲は、116です。</td>
</tr>
<tr>
<td><em><strong><code>chNoList[]</code></strong></em></td>
<td>チャンネル番号の配列です。</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="refsection" lang="ja"><a name="IDAVOWT"></a>
<h2>返り値</h2>
<p>
チャンネルを確保できたかどうかを返します。
</p>
</div>
<div class="refsection" lang="ja"><a name="IDA2OWT"></a>
<h2>説明</h2>
<p>
ストリーム再生用のチャンネルを確保します。
ストリームを再生する前に、あらかじめこの関数でチャンネルを確保しておく必要があります。
</p>
<p>
チャンネル番号の配列<em><strong><code>chNoList[]</code></strong></em>には、
チャンネル数<em><strong><code>numChannels</code></strong></em>分の要素が含まれている必要があります。
各要素には、チャンネル番号を指定します。
チャンネル番号は、015の間で指定できますが、下記のように、番号に応じてチャンネルの機能が異なっていますので、他の用途との協調を考えて指定する必要があります。例えば、シーケンス再生でイズを使う場合は、チャンネル番号14または15は、あまり使わない方が良いでしょう。
</p>
<div class="table"><a name="IDALPWT"></a><p class="title"><b>表 . チャンネルの番号別機能</b></p>
<table summary="チャンネルの番号別機能" border="1">
<colgroup><col><col></colgroup>
<thead>
<tr>
<th>チャンネル番号</th>
<th>機能</th>
</tr>
</thead>
<tbody>
<tr>
<td>0, 2</td>
<td>PCM/ADPCMを再生できます。このチャンネルの出力をサウンドキャプチャの入力とすることもできます。</td>
</tr>
<tr>
<td>1, 3</td>
<td>PCM/ADPCMを再生できます。サウンドキャプチャとタイマーを共用しているため、サウンドキャプチャを使うときは、サウンドキャプチャの出力チャンネルとしてしか使えません。</td>
</tr>
<tr>
<td>4 7</td>
<td>PCM/ADPCMを再生できます。シーケンス再生で波形データを再生するときには優先的に使っています。</td>
</tr>
<tr>
<td>8 13</td>
<td>PCM/ADPCMまたは、PSG矩形波を再生できます。</td>
</tr>
<tr>
<td>14, 15</td>
<td>PCM/ADPCMまたは、ホワイトイズを再生できます。</td>
</tr>
</tbody>
</table>
</div>
<p>
確保したチャンネルの解放には、
<tt class="function"><a href="NNS_SndStrmFreeChannel.html">NNS_SndStrmFreeChannel</a></tt>関数を呼びだします。
</p>
</div>
<h2>参照</h2>
<p><a href="NNS_SndStrmFreeChannel.html">NNS_SndStrmFreeChannel</a></p>
<h2>履歴</h2>
<p>2004/08/10 初版<br></p>
</div>
</body>
</html>