rtoss - Blame information for rev 26

Subversion Repositories:
Rev:
Rev Author Line No. Line
14 roytam 1         /*
2  *  GSPlayer - The audio player for WindowsCE
3  *  Copyright (C) 2003  Y.Nagamidori
4  *
5  *  This program is free software; you can redistribute it and/or modify
6  *  it under the terms of the GNU General Public License as published by
7  *  the Free Software Foundation; either version 2 of the License, or
8  *  (at your option) any later version.
9  *
10  *  This program is distributed in the hope that it will be useful,
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *  GNU General Public License for more details.
14  *
15  *  You should have received a copy of the GNU General Public License
16  *  along with this program; if not, write to the Free Software
17  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
18  */
19  
20 #if !defined(__MAPLAY_H__)
21 #define __MAPLAY_H__
22  
23 #include <windows.h>
24 #include <tchar.h>
25 #include "mapplugin.h"
26  
27 typedef struct
28 {
29         BOOL fEnable;
30         int preamp;       //set value 64 to 0 (default 31) updated 2.18
31         int data[10]; //set value 64 to 0 (default 31) updated 2.18
32 }EQUALIZER;
33  
34 #define EFFECT_REVERB           0
35 #define EFFECT_ECHO                     1
36 #define EFFECT_SURROUND         2
37 #define EFFECT_3DCHORUS         3
38  
39 typedef struct
40 {
41         BOOL fEnable;
42         int nDelay;
43         int nRate;
44 }EFFECT;
45  
46 // nDelay
47 // EFFECT_REVERB: 0 - infinite
48 // EFFECT_ECHO: 0 - infinite
49 // EFFECT_SURROUND: ignore
50 // EFFECT_3DCHORUS: ignore
51 // nRate
52 // EFFECT_REVERB: 0 - infinite
53 // EFFECT_ECHO: 0 - infinite
54 // EFFECT_SURROUND: 0 - 100
55 // EFFECT_3DCHORUS: 0 - 100 (updated 2.16)
56  
57 typedef struct
58 {
59         int                     nVersion;
60         int                     nLayer;
61         int                     nChannels;
62         int                     nSamplingRate;
63         int                     nBitRate;
64         int                     nDuration;
65 }MAP_INFORMATION;
66  
67 typedef struct
68 {
69         int                     nThreadPriority;
70         int                     nOutputBufferLen;               // buffer length (20 - 5000 ms)
71         int                     nOutputPrebuffer;               // prebuffer (0 - 100 percent)
72         BOOL            fScanMpegCompletely;
73         BOOL            fFadeIn;
74         BOOL            fSuppressZeroSamples;
75         BOOL            fAlwaysOpenDevice;
76 }MAP_OPTIONS;
77  
78 #define MAX_URL         MAX_PATH
79 typedef struct
80 {
81         int nBuf;       // 1 buffer = 2048 bytes
82         int nPreBuf;
83         BOOL fUseProxy;
84         TCHAR szProxy[MAX_URL];
85         TCHAR szUserAgent[MAX_URL];
86 }MAP_STREAMING_OPTIONS;
87  
88 #define MAX_TAG_STR             255
89 typedef struct tID3Tag
90 {
91         TCHAR szTrack[MAX_TAG_STR];
92         TCHAR szArtist[MAX_TAG_STR];
93         TCHAR szAlbum[MAX_TAG_STR];
94         TCHAR szComment[MAX_TAG_STR];
95         TCHAR szGenre[MAX_TAG_STR];
96         int nYear;
97         int nTrackNum;
98 }ID3TAGV1;
99  
100 #ifndef MAXLONGLONG
101 #define MAXLONGLONG                      (0x7fffffffffffffff)
102 #endif
103  
26 roytam 104 #define MAX_WAVEOUTVOLUME       0xFFFFFFFF
105  
14 roytam 106 #define MAP_MSG_BASE            (WM_USER + 10000)
107 #define MAP_MSG_STATUS          (MAP_MSG_BASE + 1) // wParam == MAP_STATUS, lParam = error (stop only)
108 #define MAP_MSG_PEEK            (MAP_MSG_BASE + 2) // wParam == l lParam == r
109 #define MAP_MSG_STREAM                          (MAP_MSG_BASE + 10000)
110 #define MAP_MSG_STREAM_TITLE            (MAP_MSG_STREAM + 1) // wParam = Stream Title (TCHAR[MAX_URL])
111  
112 enum MAP_STATUS{MAP_STATUS_STOP, MAP_STATUS_PLAY, MAP_STATUS_PAUSE, MAP_STATUS_WAIT};
113 enum MAP_STREAMING_STATUS{
114         MAP_STREAMING_DISABLED, MAP_STREAMING_DISCONNECTED, MAP_STREAMING_CONNECTING,
115         MAP_STREAMING_BUFFERING, MAP_STREAMING_CONNECTED
116 };
117  
118 #ifdef MAPLAY_EXPORTS
119 #define MAPLIBEXPORT(ret) __declspec(dllexport) ret WINAPI
120 #else
121 #define MAPLIBEXPORT(ret) ret WINAPI
122 #endif
123  
124 #ifdef __cplusplus
125 extern "C" {
126 #endif
127  
128 MAPLIBEXPORT(HANDLE) MAP_Initialize();
129 MAPLIBEXPORT(void) MAP_Uninitialize(HANDLE hLib);
130 MAPLIBEXPORT(BOOL) MAP_Open(HANDLE hLib, LPCTSTR pszFile);
131 MAPLIBEXPORT(void) MAP_Close(HANDLE hLib);
132 MAPLIBEXPORT(BOOL) MAP_Play(HANDLE hLib);
133 MAPLIBEXPORT(void) MAP_Stop(HANDLE hLib);
134 MAPLIBEXPORT(void) MAP_Pause(HANDLE hLib);
135 MAPLIBEXPORT(BOOL) MAP_Ff(HANDLE hLib, long lSkip);
136 MAPLIBEXPORT(BOOL) MAP_Rew(HANDLE hLib, long lSkip);
137 MAPLIBEXPORT(BOOL) MAP_Seek(HANDLE hLib, long lTime);
138 MAPLIBEXPORT(long) MAP_GetDuration(HANDLE hLib);
139 MAPLIBEXPORT(BOOL) MAP_IsValidStream(HANDLE hLib, LPCTSTR pszFile);
140 MAPLIBEXPORT(void) MAP_SetMessageWindow(HANDLE hLib, HWND hwndMessage);
141 MAPLIBEXPORT(long) MAP_GetCurrent(HANDLE hLib); /* ms */
142 MAPLIBEXPORT(void) MAP_SetEqualizer(HANDLE hLib, EQUALIZER* value);
143 MAPLIBEXPORT(void) MAP_GetEqualizer(HANDLE hLib, EQUALIZER* value);
144 MAPLIBEXPORT(void) MAP_SetEffect(HANDLE hLib, int nEffect, EFFECT* value);
145 MAPLIBEXPORT(void) MAP_GetEffect(HANDLE hLib, int nEffect, EFFECT* value);
146 MAPLIBEXPORT(void) MAP_SetBassBoostLevel(HANDLE hLib, int nLevel);
147 MAPLIBEXPORT(int) MAP_GetBassBoostLevel(HANDLE hLib);
148 MAPLIBEXPORT(void) MAP_GetFileInfo(HANDLE hLib, MAP_INFORMATION* pInfo);
149 MAPLIBEXPORT(BOOL) MAP_GetId3Tag(HANDLE hLib, ID3TAGV1* pTag);
150 MAPLIBEXPORT(BOOL) MAP_SetId3Tag(HANDLE hLib, ID3TAGV1* pTag);
151 MAPLIBEXPORT(BOOL) MAP_GetId3TagFile(HANDLE hLib, LPCTSTR pszFile, ID3TAGV1* pTag);
152 MAPLIBEXPORT(BOOL) MAP_SetId3TagFile(HANDLE hLib, LPCTSTR pszFile, ID3TAGV1* pTag);
153 MAPLIBEXPORT(void) MAP_GetGenreString(HANDLE hLib, int nGenre, LPTSTR pszGenre);
154 MAPLIBEXPORT(MAP_STATUS) MAP_GetStatus(HANDLE hLib);
155 MAPLIBEXPORT(BOOL) MAP_SetOptions(HANDLE hLib, MAP_OPTIONS* pOptions);
156 MAPLIBEXPORT(void) MAP_GetOptions(HANDLE hLib, MAP_OPTIONS* pOptions);
157 MAPLIBEXPORT(BOOL) MAP_GetScanPeek(HANDLE hLib);
158 MAPLIBEXPORT(void) MAP_SetScanPeek(HANDLE hLib, BOOL fScan);
159 MAPLIBEXPORT(void) MAP_AudioDeviceClose(HANDLE hLib);
160  
161 MAPLIBEXPORT(void) MAP_GetBufferInfo(HANDLE hLib, DWORD* pcbTotalAudio, DWORD* pcbBufferedAudio,
162                                                                          DWORD* pcbTotalStream, DWORD* pcbBufferedStream);
163  
164 // for streaming
165 MAPLIBEXPORT(BOOL) MAP_OpenURL(HANDLE hLib, LPCTSTR pszURL);
166 MAPLIBEXPORT(BOOL) MAP_GetStreamInfo(HANDLE hLib, LPTSTR pszName, LPTSTR pszGenre, LPTSTR pszURL);
167 MAPLIBEXPORT(BOOL) MAP_GetStreamTitle(HANDLE hLib, LPTSTR pszTitle);
168 MAPLIBEXPORT(BOOL) MAP_SetStreamingOptions(HANDLE hLib, MAP_STREAMING_OPTIONS* pOptions);
169 MAPLIBEXPORT(void) MAP_GetStreamingOptions(HANDLE hLib, MAP_STREAMING_OPTIONS* pOptions);
170 MAPLIBEXPORT(MAP_STREAMING_STATUS) MAP_GetStreamingStatus(HANDLE hLib);
171 MAPLIBEXPORT(int) MAP_GetStreamingBufferingCount(HANDLE hLib);
172  
173 // plug-in
174 MAPLIBEXPORT(int) MAP_GetDecoderPlugInCount(HANDLE hLib);
175 MAPLIBEXPORT(MAP_DEC_PLUGIN*) MAP_GetDecoderPlugIn(HANDLE hLib, int nIndex);
176  
26 roytam 177 // volume
178 MAPLIBEXPORT(DWORD) MAP_GetVolume(HANDLE hLib, BOOL bSysVolume);
179 MAPLIBEXPORT(void) MAP_SetVolume(HANDLE hLib, DWORD dwVolume, BOOL bSysVolume);
180  
14 roytam 181 #ifdef __cplusplus
182 };
183 #endif
184  
185 #endif __MAPLAY_H__