diff options
author | Oliver Schinagl <oliver@schinagl.nl> | 2004-12-09 14:00:26 (GMT) |
---|---|---|
committer | Oliver Schinagl <oliver@schinagl.nl> | 2004-12-09 14:00:26 (GMT) |
commit | b0ae032ae5712e38471c9347af289f3e50b0a08a (patch) | |
tree | 5f98113107975ddcc484cffb27625e09d015f504 /Graphic_Equalizer_Split/doc/html/sample_8hcc-source.html | |
parent | 593d5fded11b8723ce27883e06865ab205c6f008 (diff) | |
download | TASS-b0ae032ae5712e38471c9347af289f3e50b0a08a.zip TASS-b0ae032ae5712e38471c9347af289f3e50b0a08a.tar.gz TASS-b0ae032ae5712e38471c9347af289f3e50b0a08a.tar.bz2 |
Added defines makeing it possible to split the application in various parts namely:
Loader (loads data from the smart media into ram)
Equalizer (The 'normal' known application)
Visualization (The graphical visualization)
Diffstat (limited to 'Graphic_Equalizer_Split/doc/html/sample_8hcc-source.html')
-rw-r--r-- | Graphic_Equalizer_Split/doc/html/sample_8hcc-source.html | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/Graphic_Equalizer_Split/doc/html/sample_8hcc-source.html b/Graphic_Equalizer_Split/doc/html/sample_8hcc-source.html new file mode 100644 index 0000000..f7ee92e --- /dev/null +++ b/Graphic_Equalizer_Split/doc/html/sample_8hcc-source.html @@ -0,0 +1,78 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> +<title>Graphic Equalizer: C:/Project Marcel & Oliver/Graphic_Equalizer/src/sample.hcc Source File</title> +<link href="doxygen.css" rel="stylesheet" type="text/css"> +</head><body> +<!-- Generated by Doxygen 1.3.9.1 --> +<div class="qindex"><a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="globals.html">Globals</a></div> +<div class="nav"> +<a class="el" href="dir_000000.html">C:</a> / <a class="el" href="dir_000001.html">Project Marcel & Oliver</a> / <a class="el" href="dir_000002.html">Graphic_Equalizer</a> / <a class="el" href="dir_000004.html">src</a></div> +<h1>sample.hcc</h1><a href="sample_8hcc.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment">00001 +00019 <span class="comment">/******** System Includes *************/</span> +00020 +00021 <span class="comment">/******** Application Includes ********/</span> +00022 <span class="preprocessor">#include "<a class="code" href="sample_8hch.html">sample.hch</a>"</span> +00023 +00024 +00025 +00026 <span class="comment">/*</span> +00027 <span class="comment"> * Pointer that points towards the current 64 bits samples.</span> +00028 <span class="comment"> */</span> +00029 <span class="keywordtype">signed</span> 16 *audio_in_ptr; +00030 +00031 <span class="comment">/*</span> +00032 <span class="comment"> * 64 step counter to keep track of our samples. This is a private variable.</span> +00033 <span class="comment"> */</span> +00034 <span class="keywordtype">unsigned</span> 8 sample_count; +00035 +00036 +00037 +<a name="l00046"></a><a class="code" href="sample_8hcc.html#a2">00046</a> <span class="keywordtype">void</span> <a class="code" href="sample_8hcc.html#a2">sample_add</a>(<span class="keywordtype">signed</span> 16 in_sample) { +00047 <span class="comment">/*</span> +00048 <span class="comment"> * We only sample 64 bits in our buffer, hence we circulate around the</span> +00049 <span class="comment"> * last 6 bits.</span> +00050 <span class="comment"> */</span> +00051 audio_in_ptr[sample_count <-6] = in_sample; +00052 sample_count++; +00053 } <span class="comment">/* --- sample_add() --- */</span> +00054 +00055 +00056 +<a name="l00065"></a><a class="code" href="sample_8hcc.html#a3">00065</a> <span class="keywordtype">void</span> <a class="code" href="sample_8hcc.html#a3">sample_get</a>(<span class="keywordtype">signed</span> 16 *out_sample) { +00066 <span class="comment">/*</span> +00067 <span class="comment"> * We circulate around a 64 bits buffer, therefor we only use the last</span> +00068 <span class="comment"> * 6 bits.</span> +00069 <span class="comment"> */</span> +00070 *out_sample = audio_out_ptr[sample_count <-6]; +00071 } <span class="comment">/* --- sample_get() --- */</span> +00072 +00073 +00074 +<a name="l00084"></a><a class="code" href="sample_8hcc.html#a4">00084</a> <span class="keywordtype">unsigned</span> 1 <a class="code" href="sample_8hch.html#a2">sample_rotate_buffers</a>(<span class="keywordtype">void</span>) { +00085 <span class="keywordtype">unsigned</span> 1 retval; <span class="comment">/* store for returnvalue */</span> +00086 +00087 retval = 0; +00088 <span class="comment">/*</span> +00089 <span class="comment"> * We only want to read 64 samples, but calculations work nicer if we</span> +00090 <span class="comment"> * use 256 samples. Therefor we circulate our audio pointer around.</span> +00091 <span class="comment"> */</span> +00092 <span class="keywordflow">if</span> (!(sample_count <- 6)) { +00093 <span class="comment">/*</span> +00094 <span class="comment"> * 64 Samples have passed. We are back at '0'. Use the full</span> +00095 <span class="comment"> * sample count as index which is 0 64 128 or 192 and back to</span> +00096 <span class="comment"> * 0. Our Output is only 128 big so we only look at the</span> +00097 <span class="comment"> * 7 LSB. Also, notify the main application that 64 samples</span> +00098 <span class="comment"> * have been processed.</span> +00099 <span class="comment"> */</span> +00100 par { +00101 audio_in_ptr = &pcm_audio_in[sample_count]; +00102 audio_out_ptr = &pcm_audio_out[(sample_count <- 7)]; +00103 retval = 1; +00104 } +00105 } +00106 } <span class="comment">/* --- sample_rotate_buffers() --- */</span> +</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Nov 29 10:53:29 2004 for Graphic Equalizer by +<a href="http://www.doxygen.org/index.html"> +<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.3.9.1 </small></address> +</body> +</html> |