MusInitialize.html 3.41 KB
<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 = &amp;scheduler;
    init.thread_priority = 12;

    init.heap = &amp;audio_heap[0];
    init.heap_length = AUDIO_HEAP_SIZE;

    init.fifo_length = 64;

    init.ptr = &amp;ptr_buffer[0];
    init.wbk = &amp;_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>(&amp;init));
  }
</pre>

</body>
</html>