Main Page | Data Structures | Directories | File List | Data Fields | Globals

audio.hch

Go to the documentation of this file.
00001 
00019 #ifndef _AUDIO_HCH
00020 #define _AUDIO_HCH 1
00021 
00022 /*
00023  * Type definition of the shared memory to be used in various processes
00024  */
00025 typedef struct {
00026         mpram {
00027                 ram unsigned 7 write[256];      
00028                 rom unsigned 7 read[256];
00029         } fft_info with { block = "BlockRAM"};
00030         mpram {
00031                 ram unsigned 6 write[256];      
00032                 rom unsigned 6 read[256];
00033         } ifft_info with { block = "BlockRAM"};
00034         unsigned 4 *equalizer_levels_ptr;
00035         unsigned 1 display_log;
00036 } audiodata_t;
00037 
00038 
00039 
00040 
00041 /*
00042  * States used to indicate wether audio data is sampled.
00043  */
00044 #define AUDIO_NOT_READY 0
00045 #define AUDIO_READY     1
00046 
00047 
00048 
00049 /*
00050  * Line in or Mic in aliases for audio_init.
00051  */
00052 #define LINE_IN RC200AudioInLineIn
00053 #define MIC_IN  RC200AudioInMicrophone
00054 
00055 
00056 
00057 /*
00058  * Sample Rate Aliases for audio_init.
00059  */
00060 #define SR_8000         RC200AudioSampleRate8000
00061 #define SR_11025        RC200AudioSampleRate11025
00062 #define SR_16000        RC200AudioSampleRate16000
00063 #define SR_22050        RC200AudioSampleRate22050
00064 #define SR_44100        RC200AudioSampleRate44100
00065 #define SR_48000        RC200AudioSampleRate48000
00066 
00067 
00068 
00069 /*
00070  * Initialize the Audio sub-system. gain_level sets the internal amplifier to
00071  * passed level, input_source chooses between line in or mic in. The
00072  * sample_rate is set to supplied rate. Defines for these are mentioned above.
00073  */
00074 macro proc audio_init(gain_level, input_source, sample_rate, AUDIOIN, AUDIOOUT);
00075 
00076 
00077 
00078 /*
00079  * Main audiodriver loop. This procedure never returns! It handles audio io and
00080  * updates the shared memory. It needs Audio I/O handlers passed.
00081  */
00082 macro proc audio_main(audiodata, AUDIOIN, AUDIOOUT);
00083 
00084 #else
00085 #error "ERROR file audio.hch multiple times included"
00086 #endif /* --- _AUDIO_HCH --- */
00087 

Generated on Thu Dec 9 14:37:05 2004 for Graphic Equalizer 2 by  doxygen 1.3.9.1