1 /*---------------------------------------------------------------------------*
2   Project:  Horizon
3   File:     mic.h
4 
5   Copyright (C)2009-2012 Nintendo Co., Ltd.  All rights reserved.
6 
7   These coded instructions, statements, and computer programs contain
8   proprietary information of Nintendo of America Inc. and/or Nintendo
9   Company Ltd., and are protected by Federal copyright law.  They may
10   not be disclosed to third parties or copied or duplicated in any form,
11   in whole or in part, without the prior written consent of Nintendo.
12 
13   $Rev: 46365 $
14  *---------------------------------------------------------------------------*/
15 
16 #ifndef NN_SAMPLE_DEMOS_DEMO1_MIC_H_
17 #define NN_SAMPLE_DEMOS_DEMO1_MIC_H_
18 
19 #include "device.h"
20 
21 class MicDemo : public Device
22 {
23 public:
24     virtual void Initialize(demo::RenderSystemDrawing* p_RenderSystem);
25     virtual void Finalize(void);
26 
27     virtual void Start(void);
28     virtual void End(void);
29 
30     void GetMicData(s16* pDest, size_t size);
31     void CopyMicData(s16* pDest, size_t size);
32 
33     virtual void DrawFrame(void);
34 
35 private:
36     static const int MIC_BUFFER_SIZE   = nn::mic::BUFFER_ALIGNMENT_SIZE;
37     static const u8  MIC_GAIN          = 43;
38 
39     size_t m_SamplingLength;
40     u8 m_MicGain;
41     bool m_RetryStart;
42     NN_PADDING2;
43 
44     static char m_MicBuffer[MIC_BUFFER_SIZE];
45 };
46 
47 /* NN_SAMPLE_DEMOS_DEMO1_MIC_H_ */
48 #endif
49 
50 /*---------------------------------------------------------------------------*
51   End of file
52  *---------------------------------------------------------------------------*/
53