1 /*---------------------------------------------------------------------------*
2   Project:  THP demo
3   File:     THPPlayerCommon.h
4 
5   Copyright (C)2002-2006 Nintendo  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   $Log: THPPlayerCommon.h,v $
14   Revision 1.2  2008/02/28 06:21:28  aka
15   Moved THP_SOUND_MODE_??? from THPSimple.h.
16 
17   Revision 1.1  2006/02/03 10:00:34  aka
18   Imported from Dolphin tree.
19 
20 
21     1     02/05/14 9:41a Suzuki
22     Initial checkin.
23 
24   $NoKeywords: $
25 
26  *---------------------------------------------------------------------------*/
27 
28 #ifndef __THPPLAYERCOMMON_H__
29 #define __THPPLAYERCOMMON_H__
30 
31 #include <revolution.h>
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
37 // player mode
38 typedef enum
39 {
40     THP_MODE_ALONE = 0x00,
41     THP_MODE_WITH_AX,
42     THP_MODE_WITH_MUSYX
43 } THPPlayerMode;
44 
45 // play flag
46 typedef enum
47 {
48     THP_PLAY_ONESHOT = 0x00,
49     THP_PLAY_LOOP    = 0x01
50 } THPPlayFlag;
51 
52 // sound mode
53 #define THP_SOUND_MODE_MONO      0
54 #define THP_SOUND_MODE_STEREO    1
55 #define THP_SOUND_MODE_SURROUND  THP_SOUND_MODE_STEREO
56 #define THP_SOUND_MODE_DPL2      THP_SOUND_MODE_STEREO
57 
58 // structure for read buffer
59 typedef struct
60 {
61     u8            *ptr;
62     s32           frameNumber;
63     volatile BOOL isValid;
64 } THPReadBuffer;
65 
66 // structure for decoded video data
67 typedef struct
68 {
69     u8  *ytexture;
70     u8  *utexture;
71     u8  *vtexture;
72     s32 frameNumber;
73 } THPTextureSet;
74 
75 // structure for decoded audio data
76 typedef struct
77 {
78     s16 *buffer;
79     s16 *curPtr;
80     u32 validSample;
81 } THPAudioBuffer;
82 
83 #ifdef __cplusplus
84 }
85 #endif
86 
87 #endif // __THPPLAYERCOMMON_H__
88