MusInitialize.html
3.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<html>
<head>
<title>NINTENDO64 Sound Tools Programing Manual</title>
</head>
<body bgcolor="#d0d0d0" text="#000000" link="#008000" vlink="#008000">
<h1><font color="#000080">MusInitialize()</font></h1>
<h2><font color="#ff0000">$B%W%m%H%?%$%W@k8@(B</font></h2>
<pre> int <strong>MusInitialize</strong>(musConfig *<font color="#0000ff">config</font>);</pre>
<h2><font color="#ff0000">$B0z?t(B</font></h2>
<table>
<tr>
<td valign="top">
<font color="#0000ff"><code>config</code></font>
</td>
<td>
$B%3%s%U%#%0%l!<%7%g%s9=B$BN$N%"%I%l%9(B
</td>
</tr>
</table>
<h2><font color="#ff0000">$B@bL@(B</font></h2>
<p>$B%_%e!<%8%C%/%W%l%$%d!<$r=i4|2=$7$^$9!#$3$N4X?t$O%9%1%8%e!<%i%9%l%C%I$K%_%e!<%8%C%/%W%l%$%d!<$r%$%s%9%H!<%k$7!"%3%s%U%#%0%l!<%7%g%s$7$^$9!#$3$N4X?t$,8F$P$l$k$H!"%i%$%V%i%j$N(BAPI$B4X?t$,;HMQ$G$-$k$h$&$K$J$j$^$9!#(B</p>
<p>$B%"%I%l%9(B<font color="#0000ff"><code>config</code></font>$B$KCV$+$l$F$$$k%3%s%U%#%0%l!<%7%g%s9=B$BN$O0J2<$N$h$&$J%G!<%?$r4^$s$G$$$^$9!#(B</p>
<pre> typedef struct
{
int <a href="chapter_libuse.html#control_flag">control_flag</a>;
int <a href="chapter_libuse.html#channles">channel</a>;
OSSched <a href="chapter_libuse.html#sched">*sched</a>;
int <a href="chapter_libuse.html#thread_priority">thread_priority</a>;
unsigned char <a href="chapter_libuse.html#heap">*heap</a>;
int <a href="chapter_libuse.html#heap_length">heap_length</a>;
unsigned char <a href="chapter_libuse.html#ptr">*ptr</a>;
unsigned char <a href="chapter_libuse.html#wbk">*wbk</a>;
void <a href="chapter_libuse.html#default_fxbank">*default_fxbank</a>;
int <a href="chapter_libuse.html#fifo_length">fifo_length</a>;
int <a href="chapter_libuse.html#syn_updates">syn_updates</a>;
int <a href="chapter_libuse.html#syn_output_rate">syn_output_rate</a>;
int <a href="chapter_libuse.html#syn_rsp_cmds">syn_rsp_cmds</a>;
int <a href="chapter_libuse.html#syn_retraceCount">syn_retraceCount</a>;
int <a href="chapter_libuse.html#syn_num_dma_bufs">syn_num_dma_bufs</a>;
int <a href="chapter_libuse.html#syn_dma_buf_size">syn_dma_buf_size</a>;
OSPiHandle <a href="chapter_libuse.html#diskrom_handle">*diskrom_handle</a>;
} musConfig;
</pre>
<h2><font color="#ff0000">$BLa$jCM(B</font></h2>
<p>$B%_%e!<%8%C%/%W%l%$%d!<$H%*!<%G%#%*%^%M!<%8%c$K$h$C$F;HMQ$5$l$k!"%R!<%W$+$i$N%a%b%j$NNL!#(B</p>
<h2><font color="#ff0000">$BNc(B</font></h2>
<pre> int InitMusicPlayer(void)
{
musConfig init;
init.control_flag = 0;
init.channels = 24;
init.sched = &scheduler;
init.thread_priority = 12;
init.heap = &audio_heap[0];
init.heap_length = AUDIO_HEAP_SIZE;
init.fifo_length = 64;
init.ptr = &ptr_buffer[0];
init.wbk = &_wbankSegmentRomStart[0];
init.default_fxbank = NULL;
init.syn_output_rate = 44100;
init.syn_updates = 256;
init.syn_rsp_cmds = 4096;
init.syn_retraceCount = 1;
init.syn_num_dma_bufs = 36;
init.syn_dma_buf_size = 0x1000;
<font color="#800000">/* $B$b$7(B64DD$BFbB"(BROM$B>e$N%5%s%W%k$rMxMQ$9$k$J$i(B */
/* $B<!$N%3%a%s%H$r30$7$F$/$@$5$$(B */</font>
<font color="#800000">/* init.diskrom_handle = osDriveRomInit(); */</font>
return (<strong>MusInitialize</strong>(&init));
}
</pre>
</body>
</html>