237 lines
35 KiB
HTML
237 lines
35 KiB
HTML
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|||
|
<head>
|
|||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|||
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|||
|
<meta name="generator" content="Doxygen 1.8.6"/>
|
|||
|
<title>PonyTracker: Fichier source de sources/lecture/lecture.c</title>
|
|||
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|||
|
<script type="text/javascript" src="jquery.js"></script>
|
|||
|
<script type="text/javascript" src="dynsections.js"></script>
|
|||
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|||
|
<script type="text/javascript" src="search/search.js"></script>
|
|||
|
<script type="text/javascript">
|
|||
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
|||
|
</script>
|
|||
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|||
|
</head>
|
|||
|
<body>
|
|||
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|||
|
<div id="titlearea">
|
|||
|
<table cellspacing="0" cellpadding="0">
|
|||
|
<tbody>
|
|||
|
<tr style="height: 56px;">
|
|||
|
<td id="projectlogo"><img alt="Logo" src="vinyl.png"/></td>
|
|||
|
<td style="padding-left: 0.5em;">
|
|||
|
<div id="projectname">PonyTracker
|
|||
|
</div>
|
|||
|
<div id="projectbrief">Un projet de tracker de musique</div>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
</tbody>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<!-- end header part -->
|
|||
|
<!-- Généré par Doxygen 1.8.6 -->
|
|||
|
<script type="text/javascript">
|
|||
|
var searchBox = new SearchBox("searchBox", "search",false,'Recherche');
|
|||
|
</script>
|
|||
|
<div id="navrow1" class="tabs">
|
|||
|
<ul class="tablist">
|
|||
|
<li><a href="index.html"><span>Page principale</span></a></li>
|
|||
|
<li><a href="namespaces.html"><span>Espaces de nommage</span></a></li>
|
|||
|
<li><a href="annotated.html"><span>Structures de données</span></a></li>
|
|||
|
<li class="current"><a href="files.html"><span>Fichiers</span></a></li>
|
|||
|
<li>
|
|||
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
|||
|
<span class="left">
|
|||
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
|||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|||
|
alt=""/>
|
|||
|
<input type="text" id="MSearchField" value="Recherche" accesskey="S"
|
|||
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
|||
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
|||
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
|||
|
</span><span class="right">
|
|||
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
|||
|
</span>
|
|||
|
</div>
|
|||
|
</li>
|
|||
|
</ul>
|
|||
|
</div>
|
|||
|
<div id="navrow2" class="tabs2">
|
|||
|
<ul class="tablist">
|
|||
|
<li><a href="files.html"><span>Liste des fichiers</span></a></li>
|
|||
|
<li><a href="globals.html"><span>Variables globale</span></a></li>
|
|||
|
</ul>
|
|||
|
</div>
|
|||
|
<!-- window showing the filter options -->
|
|||
|
<div id="MSearchSelectWindow"
|
|||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|||
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|||
|
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>Tout</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Structures de données</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Espaces de nommage</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Fichiers</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Fonctions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Définitions de type</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Énumérations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Valeurs énumérées</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark"> </span>Pages</a></div>
|
|||
|
|
|||
|
<!-- iframe showing the search results (closed by default) -->
|
|||
|
<div id="MSearchResultsWindow">
|
|||
|
<iframe src="javascript:void(0)" frameborder="0"
|
|||
|
name="MSearchResults" id="MSearchResults">
|
|||
|
</iframe>
|
|||
|
</div>
|
|||
|
|
|||
|
<div id="nav-path" class="navpath">
|
|||
|
<ul>
|
|||
|
<li class="navelem"><a class="el" href="dir_08d237fc27d4ecd563f71c5d52f2fecc.html">sources</a></li><li class="navelem"><a class="el" href="dir_a0ced6c35a98b4c7fb5b02604504764a.html">lecture</a></li> </ul>
|
|||
|
</div>
|
|||
|
</div><!-- top -->
|
|||
|
<div class="header">
|
|||
|
<div class="headertitle">
|
|||
|
<div class="title">lecture.c</div> </div>
|
|||
|
</div><!--header-->
|
|||
|
<div class="contents">
|
|||
|
<a href="lecture_8c.html">Aller à la documentation de ce fichier.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> </div>
|
|||
|
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="preprocessor">#include "<a class="code" href="lecture_8h.html">lecture.h</a>"</span></div>
|
|||
|
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> </div>
|
|||
|
<div class="line"><a name="l00013"></a><span class="lineno"><a class="line" href="lecture_8c.html#a2a4fe87548fecc765d22bc12e63a52d2"> 13</a></span> <span class="keywordtype">void</span> <a class="code" href="lecture_8c.html#a2a4fe87548fecc765d22bc12e63a52d2">lireTick</a> (<a class="code" href="fmod_8h.html#a5e4d72799afeaac653e26b9dac0eb9bb">FMOD_SYSTEM</a>* system, <a class="code" href="struct__motif.html">Motif</a>* m, <span class="keywordtype">int</span> tmp, <a class="code" href="fmod_8h.html#a148f1267d9a53e1641f314b531476dcf">FMOD_SOUND</a>* sample[], <a class="code" href="fmod_8h.html#a9fb107c7e07c194c97e0a668f29016b1">FMOD_CHANNEL</a>* chan[], <span class="keywordtype">int</span> nbrPortees, <span class="keywordtype">int</span> tempo) { <span class="comment">// On va lire les ticks (plus petite division temporelle de la playlist) de haut en bas</span></div>
|
|||
|
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> </div>
|
|||
|
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>  <span class="comment">//int tempsPrecedent = SDL_GetTicks();</span></div>
|
|||
|
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> </div>
|
|||
|
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> chaine = 0; chaine < nbrPortees; chaine++) { <span class="comment">// On va lire les chaines une <20> une par num<75>ro croissant</span></div>
|
|||
|
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>  <span class="keywordflow">if</span> (m != NULL) {</div>
|
|||
|
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>  <span class="keywordflow">if</span> (<a class="code" href="motifs_8c.html#a6b6a18807e4f73c7710d611c7ff6d9f6">getInstrument</a>(m,0,tmp) == -1) <a class="code" href="fmod_8h.html#a6534ff867da60c2760307ee44ce939ee">FMOD_Channel_Stop</a>(chan[0]); <span class="comment">// Si la note est un silence, la chaine s'arr<EFBFBD>te</span></div>
|
|||
|
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>  <span class="keywordflow">else</span> {</div>
|
|||
|
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>  <span class="keywordflow">if</span> (<a class="code" href="motifs_8c.html#ad9706b025d4ab4474778af8b6a3c1a66">getNote</a>(m,0,tmp) != 0) {</div>
|
|||
|
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> </div>
|
|||
|
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>  <a class="code" href="fmod_8h.html#a6534ff867da60c2760307ee44ce939ee">FMOD_Channel_Stop</a>(chan[chaine]); </div>
|
|||
|
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>  <a class="code" href="fmod_8h.html#a26729838a41737b08bfbe5fef00cb12c">FMOD_System_PlaySound</a>(system, <a class="code" href="fmod_8h.html#a7652d3b63f5652cac1982e8027cde426ac3812d64e2374f37d2ae47fdd04d2c13">FMOD_CHANNEL_FREE</a>, sample[<a class="code" href="motifs_8c.html#a6b6a18807e4f73c7710d611c7ff6d9f6">getInstrument</a>(m,chaine,tmp)], 0, &chan[chaine]);</div>
|
|||
|
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span> </div>
|
|||
|
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>  <span class="comment">//Ici on va s'occuper du pitch</span></div>
|
|||
|
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>  <a class="code" href="fmod_8h.html#a2a546c1efce476d85cd8065d962d705d">FMOD_DSP</a> *pitch;</div>
|
|||
|
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>  <a class="code" href="fmod_8h.html#a3ffed58aa417d39812fbe2aef9da643c">FMOD_System_CreateDSPByType</a>(system, <a class="code" href="fmod__dsp_8h.html#a3bffdef0fa956bf454fa078bfdfab3aeaeb5f500b3a0f4dc04ec9f6737220d8e9">FMOD_DSP_TYPE_PITCHSHIFT</a>, &pitch);</div>
|
|||
|
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  <a class="code" href="fmod_8h.html#a0a5239854d0319eb9fd836df450aa2ac">FMOD_DSP_SetParameter</a>(pitch, <a class="code" href="fmod__dsp_8h.html#afe9bcffb55e5a00aec395d8e800c48c0aa046a2faa407441b54ae6fcfd602c2ed">FMOD_DSP_PITCHSHIFT_PITCH</a>, 2.0);</div>
|
|||
|
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  <a class="code" href="fmod_8h.html#ac1f397dbf8ebf6ec27ec6074b2863199">FMOD_Channel_AddDSP</a>(chan[chaine], pitch, 0); <span class="comment">// C'est quoi chan1 ??? Je l'ai remplac<61> par chan[1], vu que chan1 est as d<>clar<61>...</span></div>
|
|||
|
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>  <span class="comment">// On va passer une bonne journ<72>e...</span></div>
|
|||
|
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  }</div>
|
|||
|
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  }</div>
|
|||
|
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  }</div>
|
|||
|
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  }</div>
|
|||
|
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  <span class="comment">/* while (SDL_GetTicks() - tempsPrecedent < 125) {} // Si 125 ms se sont <20>coul<75>es (il faudra r<>gler ce temps sur le tempo)</span></div>
|
|||
|
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="comment"> tempsPrecedent = tempsPrecedent + 125;</span></div>
|
|||
|
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="comment"> Avouez que ce serait con qu'on ait besoin de SDL juste pour la temporisation</span></div>
|
|||
|
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="comment"> alors qu'on peut utiliser la fonction native usleep pour <20>a, et beaucoup plus simplement. */</span></div>
|
|||
|
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  usleep(60000000/tempo);</div>
|
|||
|
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span> }</div>
|
|||
|
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span> </div>
|
|||
|
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span> </div>
|
|||
|
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span> </div>
|
|||
|
<div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="lecture_8h.html#ae9f8bb9930882abb275282c8ac2fb90c"> 45</a></span> <span class="keywordtype">void</span> <a class="code" href="lecture_8c.html#aed433892d863e7af069a7ee2e04c22e0">lecture</a> (<span class="keywordtype">int</span> nombreChaines, <span class="keywordtype">int</span> tempo, <a class="code" href="struct__motif.html">Motif</a>* melodie[]) {</div>
|
|||
|
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span> </div>
|
|||
|
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <a class="code" href="fmod_8h.html#a5e4d72799afeaac653e26b9dac0eb9bb">FMOD_SYSTEM</a> *system;</div>
|
|||
|
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span> </div>
|
|||
|
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  <a class="code" href="fmod_8h.html#ae6ddadf8cb315e93ae7e6456b19db276">FMOD_RESULT</a> resultat;</div>
|
|||
|
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span> </div>
|
|||
|
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span> </div>
|
|||
|
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  <a class="code" href="fmod_8h.html#ac548169586519f2221f6e01026fb3823">FMOD_System_Create</a>(&system);</div>
|
|||
|
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  <a class="code" href="fmod_8h.html#a6cd00ff26eeec6872df228587d729e38">FMOD_System_Init</a>(system, 8, <a class="code" href="fmod_8h.html#a01663d77bad51a4c4122d7240007da46">FMOD_INIT_NORMAL</a>, NULL); <span class="comment">//Le deuxi<78>me argument donne le nombre de canaux <20> utiliser (nombre de chaines)</span></div>
|
|||
|
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span> </div>
|
|||
|
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span> </div>
|
|||
|
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  <span class="comment">//INITIALISATION SAMPLES ET CHANNELS</span></div>
|
|||
|
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span> </div>
|
|||
|
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  <a class="code" href="fmod_8h.html#a9fb107c7e07c194c97e0a668f29016b1">FMOD_CHANNEL</a> **chan = malloc(nombreChaines*<span class="keyword">sizeof</span>(<a class="code" href="fmod_8h.html#a9fb107c7e07c194c97e0a668f29016b1">FMOD_CHANNEL</a>*)); <span class="comment">// On ouvre le nombre de chaines n<>cessaires dans le mixer</span></div>
|
|||
|
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span> </div>
|
|||
|
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  <a class="code" href="fmod_8h.html#a148f1267d9a53e1641f314b531476dcf">FMOD_SOUND</a> *sample[5]; <span class="comment">// On charge les samples avec un message d'erreur en cas d'<EFBFBD>chec</span></div>
|
|||
|
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span> </div>
|
|||
|
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  resultat = <a class="code" href="fmod_8h.html#a55fa542e4f48998c4ff3fdee2a03f7ee">FMOD_System_CreateStream</a>(system, <span class="stringliteral">"lecture/0.wav"</span>, <a class="code" href="fmod_8h.html#a827465855cd511e3e87d0081bb688ac9">FMOD_SOFTWARE</a> | <a class="code" href="fmod_8h.html#ad8e48fbc6807fd50a860483c2fcd76cf">FMOD_2D</a> | <a class="code" href="fmod_8h.html#a68dc1a665929a508309a33b640bd7143">FMOD_LOOP_NORMAL</a>, 0, &sample[0]);</div>
|
|||
|
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  <span class="keywordflow">if</span> (resultat != <a class="code" href="fmod_8h.html#ae6ddadf8cb315e93ae7e6456b19db276a5e0335893e67b6367bba4b8431a3425a">FMOD_OK</a>)</div>
|
|||
|
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  {</div>
|
|||
|
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  fprintf(stderr, <span class="stringliteral">"Impossible de lire le fichier audio\n"</span>);</div>
|
|||
|
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  exit(EXIT_FAILURE);</div>
|
|||
|
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  }</div>
|
|||
|
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span> </div>
|
|||
|
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  resultat = <a class="code" href="fmod_8h.html#a55fa542e4f48998c4ff3fdee2a03f7ee">FMOD_System_CreateStream</a>(system, <span class="stringliteral">"lecture/1.wav"</span>, <a class="code" href="fmod_8h.html#a827465855cd511e3e87d0081bb688ac9">FMOD_SOFTWARE</a> | <a class="code" href="fmod_8h.html#ad8e48fbc6807fd50a860483c2fcd76cf">FMOD_2D</a> | <a class="code" href="fmod_8h.html#a68dc1a665929a508309a33b640bd7143">FMOD_LOOP_NORMAL</a>, 0, &sample[1]);</div>
|
|||
|
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  <span class="keywordflow">if</span> (resultat != <a class="code" href="fmod_8h.html#ae6ddadf8cb315e93ae7e6456b19db276a5e0335893e67b6367bba4b8431a3425a">FMOD_OK</a>)</div>
|
|||
|
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  {</div>
|
|||
|
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  fprintf(stderr, <span class="stringliteral">"Impossible de lire le fichier audio\n"</span>);</div>
|
|||
|
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  exit(EXIT_FAILURE);</div>
|
|||
|
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  }</div>
|
|||
|
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span> </div>
|
|||
|
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  resultat = <a class="code" href="fmod_8h.html#a55fa542e4f48998c4ff3fdee2a03f7ee">FMOD_System_CreateStream</a>(system, <span class="stringliteral">"lecture/2.wav"</span>, <a class="code" href="fmod_8h.html#a827465855cd511e3e87d0081bb688ac9">FMOD_SOFTWARE</a> | <a class="code" href="fmod_8h.html#ad8e48fbc6807fd50a860483c2fcd76cf">FMOD_2D</a> | <a class="code" href="fmod_8h.html#a68dc1a665929a508309a33b640bd7143">FMOD_LOOP_NORMAL</a>, 0, &sample[2]);</div>
|
|||
|
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  <span class="keywordflow">if</span> (resultat != <a class="code" href="fmod_8h.html#ae6ddadf8cb315e93ae7e6456b19db276a5e0335893e67b6367bba4b8431a3425a">FMOD_OK</a>)</div>
|
|||
|
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  {</div>
|
|||
|
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  fprintf(stderr, <span class="stringliteral">"Impossible de lire le fichier audio\n"</span>);</div>
|
|||
|
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  exit(EXIT_FAILURE);</div>
|
|||
|
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  }</div>
|
|||
|
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span> </div>
|
|||
|
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  resultat = <a class="code" href="fmod_8h.html#a55fa542e4f48998c4ff3fdee2a03f7ee">FMOD_System_CreateStream</a>(system, <span class="stringliteral">"lecture/3.wav"</span>, <a class="code" href="fmod_8h.html#a827465855cd511e3e87d0081bb688ac9">FMOD_SOFTWARE</a> | <a class="code" href="fmod_8h.html#ad8e48fbc6807fd50a860483c2fcd76cf">FMOD_2D</a> | <a class="code" href="fmod_8h.html#a68dc1a665929a508309a33b640bd7143">FMOD_LOOP_NORMAL</a>, 0, &sample[3]);</div>
|
|||
|
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  <span class="keywordflow">if</span> (resultat != <a class="code" href="fmod_8h.html#ae6ddadf8cb315e93ae7e6456b19db276a5e0335893e67b6367bba4b8431a3425a">FMOD_OK</a>)</div>
|
|||
|
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  {</div>
|
|||
|
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  fprintf(stderr, <span class="stringliteral">"Impossible de lire le fichier audio\n"</span>);</div>
|
|||
|
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  exit(EXIT_FAILURE);</div>
|
|||
|
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  }</div>
|
|||
|
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span> </div>
|
|||
|
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  resultat = <a class="code" href="fmod_8h.html#a55fa542e4f48998c4ff3fdee2a03f7ee">FMOD_System_CreateStream</a>(system, <span class="stringliteral">"lecture/4.wav"</span>, <a class="code" href="fmod_8h.html#a827465855cd511e3e87d0081bb688ac9">FMOD_SOFTWARE</a> | <a class="code" href="fmod_8h.html#ad8e48fbc6807fd50a860483c2fcd76cf">FMOD_2D</a> | <a class="code" href="fmod_8h.html#a68dc1a665929a508309a33b640bd7143">FMOD_LOOP_NORMAL</a>, 0, &sample[4]);</div>
|
|||
|
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  <span class="keywordflow">if</span> (resultat != <a class="code" href="fmod_8h.html#ae6ddadf8cb315e93ae7e6456b19db276a5e0335893e67b6367bba4b8431a3425a">FMOD_OK</a>)</div>
|
|||
|
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  {</div>
|
|||
|
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  fprintf(stderr, <span class="stringliteral">"Impossible de lire le fichier audio\n"</span>);</div>
|
|||
|
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  exit(EXIT_FAILURE);</div>
|
|||
|
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  }</div>
|
|||
|
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span> </div>
|
|||
|
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span> </div>
|
|||
|
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  <span class="comment">//Lecture des motifs</span></div>
|
|||
|
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  <span class="keywordflow">for</span> (<a class="code" href="melodie_8h.html#aa6ad6d988cc7efe51fa58d04849f9d05">courant</a> = 0; <a class="code" href="melodie_8h.html#aa6ad6d988cc7efe51fa58d04849f9d05">courant</a> < <a class="code" href="melodie_8h.html#a29bf3fc0ffe4e72e45f0c84ab4f8cd1e">taille</a>; <a class="code" href="melodie_8h.html#aa6ad6d988cc7efe51fa58d04849f9d05">courant</a>++) {</div>
|
|||
|
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < melodie[<a class="code" href="melodie_8h.html#aa6ad6d988cc7efe51fa58d04849f9d05">courant</a>] -> nbrTmp; i++) {</div>
|
|||
|
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  printf(<span class="stringliteral">"lecture temps %d : N=%d I=%d\n"</span>,i,<a class="code" href="motifs_8c.html#ad9706b025d4ab4474778af8b6a3c1a66">getNote</a>(melodie[<a class="code" href="melodie_8h.html#aa6ad6d988cc7efe51fa58d04849f9d05">courant</a>],0,i),<a class="code" href="motifs_8c.html#a6b6a18807e4f73c7710d611c7ff6d9f6">getInstrument</a>(melodie[courant],0,i));</div>
|
|||
|
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  <a class="code" href="lecture_8c.html#a2a4fe87548fecc765d22bc12e63a52d2">lireTick</a> (system, melodie[courant], i, sample, chan, nombreChaines, tempo);</div>
|
|||
|
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  }</div>
|
|||
|
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  }</div>
|
|||
|
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span> </div>
|
|||
|
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  <span class="comment">//On relache le syst<73>me FMOD</span></div>
|
|||
|
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i <= nombreChaines; i++) {</div>
|
|||
|
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  <a class="code" href="fmod_8h.html#ac3b64b3f95061b87d60894f0fbf4590f">FMOD_Sound_Release</a>(sample[i]);</div>
|
|||
|
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  }</div>
|
|||
|
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  <a class="code" href="fmod_8h.html#a50315634613fccdc1652aa4f07f47e09">FMOD_System_Close</a>(system);</div>
|
|||
|
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  <a class="code" href="fmod_8h.html#af14b4d20b06d60e71f33e5d7828a3b77">FMOD_System_Release</a>(system);</div>
|
|||
|
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span> }</div>
|
|||
|
<div class="ttc" id="fmod_8h_html_a26729838a41737b08bfbe5fef00cb12c"><div class="ttname"><a href="fmod_8h.html#a26729838a41737b08bfbe5fef00cb12c">FMOD_System_PlaySound</a></div><div class="ttdeci">FMOD_RESULT F_API FMOD_System_PlaySound(FMOD_SYSTEM *system, FMOD_CHANNELINDEX channelid, FMOD_SOUND *sound, FMOD_BOOL paused, FMOD_CHANNEL **channel)</div></div>
|
|||
|
<div class="ttc" id="motifs_8c_html_a6b6a18807e4f73c7710d611c7ff6d9f6"><div class="ttname"><a href="motifs_8c.html#a6b6a18807e4f73c7710d611c7ff6d9f6">getInstrument</a></div><div class="ttdeci">int getInstrument(Motif *m, int portee, int tmp)</div><div class="ttdef"><b>Definition:</b> <a href="motifs_8c_source.html#l00085">motifs.c:85</a></div></div>
|
|||
|
<div class="ttc" id="motifs_8c_html_ad9706b025d4ab4474778af8b6a3c1a66"><div class="ttname"><a href="motifs_8c.html#ad9706b025d4ab4474778af8b6a3c1a66">getNote</a></div><div class="ttdeci">int getNote(Motif *m, int portee, int tmp)</div><div class="ttdef"><b>Definition:</b> <a href="motifs_8c_source.html#l00077">motifs.c:77</a></div></div>
|
|||
|
<div class="ttc" id="fmod_8h_html_a148f1267d9a53e1641f314b531476dcf"><div class="ttname"><a href="fmod_8h.html#a148f1267d9a53e1641f314b531476dcf">FMOD_SOUND</a></div><div class="ttdeci">struct FMOD_SOUND FMOD_SOUND</div><div class="ttdef"><b>Definition:</b> <a href="fmod_8h_source.html#l00065">fmod.h:65</a></div></div>
|
|||
|
<div class="ttc" id="fmod_8h_html_a3ffed58aa417d39812fbe2aef9da643c"><div class="ttname"><a href="fmod_8h.html#a3ffed58aa417d39812fbe2aef9da643c">FMOD_System_CreateDSPByType</a></div><div class="ttdeci">FMOD_RESULT F_API FMOD_System_CreateDSPByType(FMOD_SYSTEM *system, FMOD_DSP_TYPE type, FMOD_DSP **dsp)</div></div>
|
|||
|
<div class="ttc" id="melodie_8h_html_aa6ad6d988cc7efe51fa58d04849f9d05"><div class="ttname"><a href="melodie_8h.html#aa6ad6d988cc7efe51fa58d04849f9d05">courant</a></div><div class="ttdeci">int courant</div><div class="ttdef"><b>Definition:</b> <a href="melodie_8h_source.html#l00008">melodie.h:8</a></div></div>
|
|||
|
<div class="ttc" id="struct__motif_html"><div class="ttname"><a href="struct__motif.html">_motif</a></div><div class="ttdef"><b>Definition:</b> <a href="motifs_8h_source.html#l00031">motifs.h:31</a></div></div>
|
|||
|
<div class="ttc" id="fmod__dsp_8h_html_afe9bcffb55e5a00aec395d8e800c48c0aa046a2faa407441b54ae6fcfd602c2ed"><div class="ttname"><a href="fmod__dsp_8h.html#afe9bcffb55e5a00aec395d8e800c48c0aa046a2faa407441b54ae6fcfd602c2ed">FMOD_DSP_PITCHSHIFT_PITCH</a></div><div class="ttdef"><b>Definition:</b> <a href="fmod__dsp_8h_source.html#l00550">fmod_dsp.h:550</a></div></div>
|
|||
|
<div class="ttc" id="fmod__dsp_8h_html_a3bffdef0fa956bf454fa078bfdfab3aeaeb5f500b3a0f4dc04ec9f6737220d8e9"><div class="ttname"><a href="fmod__dsp_8h.html#a3bffdef0fa956bf454fa078bfdfab3aeaeb5f500b3a0f4dc04ec9f6737220d8e9">FMOD_DSP_TYPE_PITCHSHIFT</a></div><div class="ttdef"><b>Definition:</b> <a href="fmod__dsp_8h_source.html#l00059">fmod_dsp.h:59</a></div></div>
|
|||
|
<div class="ttc" id="fmod_8h_html_a6534ff867da60c2760307ee44ce939ee"><div class="ttname"><a href="fmod_8h.html#a6534ff867da60c2760307ee44ce939ee">FMOD_Channel_Stop</a></div><div class="ttdeci">FMOD_RESULT F_API FMOD_Channel_Stop(FMOD_CHANNEL *channel)</div></div>
|
|||
|
<div class="ttc" id="fmod_8h_html_ae6ddadf8cb315e93ae7e6456b19db276"><div class="ttname"><a href="fmod_8h.html#ae6ddadf8cb315e93ae7e6456b19db276">FMOD_RESULT</a></div><div class="ttdeci">FMOD_RESULT</div><div class="ttdef"><b>Definition:</b> <a href="fmod_8h_source.html#l00097">fmod.h:97</a></div></div>
|
|||
|
<div class="ttc" id="fmod_8h_html_ac548169586519f2221f6e01026fb3823"><div class="ttname"><a href="fmod_8h.html#ac548169586519f2221f6e01026fb3823">FMOD_System_Create</a></div><div class="ttdeci">FMOD_RESULT F_API FMOD_System_Create(FMOD_SYSTEM **system)</div></div>
|
|||
|
<div class="ttc" id="melodie_8h_html_a29bf3fc0ffe4e72e45f0c84ab4f8cd1e"><div class="ttname"><a href="melodie_8h.html#a29bf3fc0ffe4e72e45f0c84ab4f8cd1e">taille</a></div><div class="ttdeci">int taille</div><div class="ttdef"><b>Definition:</b> <a href="melodie_8h_source.html#l00010">melodie.h:10</a></div></div>
|
|||
|
<div class="ttc" id="fmod_8h_html_a9fb107c7e07c194c97e0a668f29016b1"><div class="ttname"><a href="fmod_8h.html#a9fb107c7e07c194c97e0a668f29016b1">FMOD_CHANNEL</a></div><div class="ttdeci">struct FMOD_CHANNEL FMOD_CHANNEL</div><div class="ttdef"><b>Definition:</b> <a href="fmod_8h_source.html#l00066">fmod.h:66</a></div></div>
|
|||
|
<div class="ttc" id="fmod_8h_html_a5e4d72799afeaac653e26b9dac0eb9bb"><div class="ttname"><a href="fmod_8h.html#a5e4d72799afeaac653e26b9dac0eb9bb">FMOD_SYSTEM</a></div><div class="ttdeci">struct FMOD_SYSTEM FMOD_SYSTEM</div><div class="ttdef"><b>Definition:</b> <a href="fmod_8h_source.html#l00064">fmod.h:64</a></div></div>
|
|||
|
<div class="ttc" id="fmod_8h_html_ae6ddadf8cb315e93ae7e6456b19db276a5e0335893e67b6367bba4b8431a3425a"><div class="ttname"><a href="fmod_8h.html#ae6ddadf8cb315e93ae7e6456b19db276a5e0335893e67b6367bba4b8431a3425a">FMOD_OK</a></div><div class="ttdef"><b>Definition:</b> <a href="fmod_8h_source.html#l00099">fmod.h:99</a></div></div>
|
|||
|
<div class="ttc" id="fmod_8h_html_a0a5239854d0319eb9fd836df450aa2ac"><div class="ttname"><a href="fmod_8h.html#a0a5239854d0319eb9fd836df450aa2ac">FMOD_DSP_SetParameter</a></div><div class="ttdeci">FMOD_RESULT F_API FMOD_DSP_SetParameter(FMOD_DSP *dsp, int index, float value)</div></div>
|
|||
|
<div class="ttc" id="fmod_8h_html_a6cd00ff26eeec6872df228587d729e38"><div class="ttname"><a href="fmod_8h.html#a6cd00ff26eeec6872df228587d729e38">FMOD_System_Init</a></div><div class="ttdeci">FMOD_RESULT F_API FMOD_System_Init(FMOD_SYSTEM *system, int maxchannels, FMOD_INITFLAGS flags, void *extradriverdata)</div></div>
|
|||
|
<div class="ttc" id="lecture_8c_html_aed433892d863e7af069a7ee2e04c22e0"><div class="ttname"><a href="lecture_8c.html#aed433892d863e7af069a7ee2e04c22e0">lecture</a></div><div class="ttdeci">void lecture(int nombreChaines, int tempo, Motif *melodie[])</div><div class="ttdef"><b>Definition:</b> <a href="lecture_8c_source.html#l00045">lecture.c:45</a></div></div>
|
|||
|
<div class="ttc" id="fmod_8h_html_ac3b64b3f95061b87d60894f0fbf4590f"><div class="ttname"><a href="fmod_8h.html#ac3b64b3f95061b87d60894f0fbf4590f">FMOD_Sound_Release</a></div><div class="ttdeci">FMOD_RESULT F_API FMOD_Sound_Release(FMOD_SOUND *sound)</div></div>
|
|||
|
<div class="ttc" id="fmod_8h_html_a68dc1a665929a508309a33b640bd7143"><div class="ttname"><a href="fmod_8h.html#a68dc1a665929a508309a33b640bd7143">FMOD_LOOP_NORMAL</a></div><div class="ttdeci">#define FMOD_LOOP_NORMAL</div><div class="ttdef"><b>Definition:</b> <a href="fmod_8h_source.html#l00895">fmod.h:895</a></div></div>
|
|||
|
<div class="ttc" id="fmod_8h_html_a827465855cd511e3e87d0081bb688ac9"><div class="ttname"><a href="fmod_8h.html#a827465855cd511e3e87d0081bb688ac9">FMOD_SOFTWARE</a></div><div class="ttdeci">#define FMOD_SOFTWARE</div><div class="ttdef"><b>Definition:</b> <a href="fmod_8h_source.html#l00900">fmod.h:900</a></div></div>
|
|||
|
<div class="ttc" id="lecture_8c_html_a2a4fe87548fecc765d22bc12e63a52d2"><div class="ttname"><a href="lecture_8c.html#a2a4fe87548fecc765d22bc12e63a52d2">lireTick</a></div><div class="ttdeci">void lireTick(FMOD_SYSTEM *system, Motif *m, int tmp, FMOD_SOUND *sample[], FMOD_CHANNEL *chan[], int nbrPortees, int tempo)</div><div class="ttdef"><b>Definition:</b> <a href="lecture_8c_source.html#l00013">lecture.c:13</a></div></div>
|
|||
|
<div class="ttc" id="fmod_8h_html_a2a546c1efce476d85cd8065d962d705d"><div class="ttname"><a href="fmod_8h.html#a2a546c1efce476d85cd8065d962d705d">FMOD_DSP</a></div><div class="ttdeci">struct FMOD_DSP FMOD_DSP</div><div class="ttdef"><b>Definition:</b> <a href="fmod_8h_source.html#l00070">fmod.h:70</a></div></div>
|
|||
|
<div class="ttc" id="fmod_8h_html_af14b4d20b06d60e71f33e5d7828a3b77"><div class="ttname"><a href="fmod_8h.html#af14b4d20b06d60e71f33e5d7828a3b77">FMOD_System_Release</a></div><div class="ttdeci">FMOD_RESULT F_API FMOD_System_Release(FMOD_SYSTEM *system)</div></div>
|
|||
|
<div class="ttc" id="lecture_8h_html"><div class="ttname"><a href="lecture_8h.html">lecture.h</a></div></div>
|
|||
|
<div class="ttc" id="fmod_8h_html_a50315634613fccdc1652aa4f07f47e09"><div class="ttname"><a href="fmod_8h.html#a50315634613fccdc1652aa4f07f47e09">FMOD_System_Close</a></div><div class="ttdeci">FMOD_RESULT F_API FMOD_System_Close(FMOD_SYSTEM *system)</div></div>
|
|||
|
<div class="ttc" id="fmod_8h_html_a55fa542e4f48998c4ff3fdee2a03f7ee"><div class="ttname"><a href="fmod_8h.html#a55fa542e4f48998c4ff3fdee2a03f7ee">FMOD_System_CreateStream</a></div><div class="ttdeci">FMOD_RESULT F_API FMOD_System_CreateStream(FMOD_SYSTEM *system, const char *name_or_data, FMOD_MODE mode, FMOD_CREATESOUNDEXINFO *exinfo, FMOD_SOUND **sound)</div></div>
|
|||
|
<div class="ttc" id="fmod_8h_html_a7652d3b63f5652cac1982e8027cde426ac3812d64e2374f37d2ae47fdd04d2c13"><div class="ttname"><a href="fmod_8h.html#a7652d3b63f5652cac1982e8027cde426ac3812d64e2374f37d2ae47fdd04d2c13">FMOD_CHANNEL_FREE</a></div><div class="ttdef"><b>Definition:</b> <a href="fmod_8h_source.html#l01845">fmod.h:1845</a></div></div>
|
|||
|
<div class="ttc" id="fmod_8h_html_a01663d77bad51a4c4122d7240007da46"><div class="ttname"><a href="fmod_8h.html#a01663d77bad51a4c4122d7240007da46">FMOD_INIT_NORMAL</a></div><div class="ttdeci">#define FMOD_INIT_NORMAL</div><div class="ttdef"><b>Definition:</b> <a href="fmod_8h_source.html#l00733">fmod.h:733</a></div></div>
|
|||
|
<div class="ttc" id="fmod_8h_html_ad8e48fbc6807fd50a860483c2fcd76cf"><div class="ttname"><a href="fmod_8h.html#ad8e48fbc6807fd50a860483c2fcd76cf">FMOD_2D</a></div><div class="ttdeci">#define FMOD_2D</div><div class="ttdef"><b>Definition:</b> <a href="fmod_8h_source.html#l00897">fmod.h:897</a></div></div>
|
|||
|
<div class="ttc" id="fmod_8h_html_ac1f397dbf8ebf6ec27ec6074b2863199"><div class="ttname"><a href="fmod_8h.html#ac1f397dbf8ebf6ec27ec6074b2863199">FMOD_Channel_AddDSP</a></div><div class="ttdeci">FMOD_RESULT F_API FMOD_Channel_AddDSP(FMOD_CHANNEL *channel, FMOD_DSP *dsp, FMOD_DSPCONNECTION **connection)</div></div>
|
|||
|
</div><!-- fragment --></div><!-- contents -->
|
|||
|
<!-- start footer part -->
|
|||
|
<hr class="footer"/><address class="footer"><small>
|
|||
|
Généré le Vendredi 16 Mai 2014 12:37:44 pour PonyTracker par  <a href="http://www.doxygen.org/index.html">
|
|||
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|||
|
</a> 1.8.6
|
|||
|
</small></address>
|
|||
|
</body>
|
|||
|
</html>
|