OSDN Git Service

First commitment for the BlackTank LPC1769.
[blacktank/blacktank.git] / audio_common.h
1 /**
2  * @file audio_common.h
3  * @brief オーディオに関する共通の定義。
4  */
5
6 #ifndef AUDIO_COMMON_H
7 #define AUDIO_COMMON_H
8
9 /**
10  * @brief オーディオデータ型
11  * @details
12  * プログラム内部で使うオーディオの基本型。
13  * 左詰めの符号付き固定小数点型である。小数点はMSBのすぐ右にある。
14  */
15 typedef int AUDIOSAMPLE;
16
17 /**
18  * @brief I2S DMAバッファの長さ
19  * @details
20  * 一回のDMA転送に使うデータバッファの長さ。
21  * AUDIOBUFSIZEがNならば、ステレオなので、N/2サンプルのデータを
22  * 一回のDMAで転送することになる。
23  */
24 #define AUDIOBUFSIZE 64
25
26 /**
27  * @brief 左チャンネルインデックス
28  */
29 #define LCH 0
30
31 /**
32  * @brief 右チャンネルインデックス
33  */
34 #define RCH 1
35
36 #endif
37