ai.h

Go to the documentation of this file.
00001 /*
00002         libbroadway - A general purpose library to control the Wii.
00003         AI support
00004 
00005 Copyright (C) 2010              Alex Marshall <trap15@raidenii.net>
00006 
00007 # This code is licensed to you under the terms of the GNU GPL, version 2;
00008 # see file COPYING or http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
00009 */
00010 
00016 #ifndef __AI_H__
00017 #define __AI_H__
00018 
00019 #include <types.h>
00020 #include <broadway.h>
00021 
00024 typedef enum {
00025         AI_SAMPLE_RATE_48000 = 0,       
00026         AI_SAMPLE_RATE_32000,           
00027 } ai_sample_rate_t;
00028 
00036 int ai_initialize(void);
00044 int ai_shutdown(void);
00045 
00052 void ai_set_sample_rate(ai_sample_rate_t rate);
00058 ai_sample_rate_t ai_get_sample_rate(void);
00059 
00068 void ai_enable_irq(int on_sample, int (*exec)(u32 irq, void* data), void* data);
00074 void ai_disable_irq(void);
00075 
00084 void ai_set_volume(u8  left, u8  right);
00093 void ai_get_volume(u8* left, u8* right);
00094 
00102 u32 ai_samples_played(void);
00105 void ai_reset_sample_counter(void);
00106 
00112 int ai_is_playing(void);
00119 int ai_play(int play);
00120 
00121 #endif
00122 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines
Generated by  doxygen 1.6.3