annotate music2/koedec_ogg.cc @ 66:d112357a0ec1

Fix a bug with savegames introduced with changeset c7bcc0ec2267. Warning: savegames created since c7bcc0ec2267 are probably corrupted, you may have to start the game over. If you chose not to do so, you should replace all occurrences of 'TextWindow' by 'TextImplWindow', and 'Text Window' by 'TextImpl Window' in your save files.
author Thibaut Girka <thib@sitedethib.com>
date Sat, 11 Dec 2010 18:36:20 +0100
parents 4416cfac86ae
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
223b71206888 Initial import
thib
parents:
diff changeset
1 /*
223b71206888 Initial import
thib
parents:
diff changeset
2 * Copyright (c) 2004-2006 Kazunori "jagarl" Ueno
223b71206888 Initial import
thib
parents:
diff changeset
3 * All rights reserved.
223b71206888 Initial import
thib
parents:
diff changeset
4 *
223b71206888 Initial import
thib
parents:
diff changeset
5 * Redistribution and use in source and binary forms, with or without
223b71206888 Initial import
thib
parents:
diff changeset
6 * modification, are permitted provided that the following conditions
223b71206888 Initial import
thib
parents:
diff changeset
7 * are met:
223b71206888 Initial import
thib
parents:
diff changeset
8 * 1. Redistributions of source code must retain the above copyright
223b71206888 Initial import
thib
parents:
diff changeset
9 * notice, this list of conditions and the following disclaimer.
223b71206888 Initial import
thib
parents:
diff changeset
10 * 2. Redistributions in binary form must reproduce the above copyright
223b71206888 Initial import
thib
parents:
diff changeset
11 * notice, this list of conditions and the following disclaimer in the
223b71206888 Initial import
thib
parents:
diff changeset
12 * documentation and/or other materials provided with the distribution.
223b71206888 Initial import
thib
parents:
diff changeset
13 * 3. The name of the author may not be used to endorse or promote products
223b71206888 Initial import
thib
parents:
diff changeset
14 * derived from this software without specific prior written permission.
223b71206888 Initial import
thib
parents:
diff changeset
15 *
223b71206888 Initial import
thib
parents:
diff changeset
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
223b71206888 Initial import
thib
parents:
diff changeset
17 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
223b71206888 Initial import
thib
parents:
diff changeset
18 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
223b71206888 Initial import
thib
parents:
diff changeset
19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
223b71206888 Initial import
thib
parents:
diff changeset
20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
223b71206888 Initial import
thib
parents:
diff changeset
21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
223b71206888 Initial import
thib
parents:
diff changeset
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
223b71206888 Initial import
thib
parents:
diff changeset
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
223b71206888 Initial import
thib
parents:
diff changeset
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
223b71206888 Initial import
thib
parents:
diff changeset
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
223b71206888 Initial import
thib
parents:
diff changeset
26 */
223b71206888 Initial import
thib
parents:
diff changeset
27
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 45
diff changeset
28 #include <stdio.h>
15a18fbe6f21 * Known bugs added to the README
thib
parents: 45
diff changeset
29 #include <string.h>
15a18fbe6f21 * Known bugs added to the README
thib
parents: 45
diff changeset
30 #include <stdlib.h>
15a18fbe6f21 * Known bugs added to the README
thib
parents: 45
diff changeset
31 #include "music.h"
15a18fbe6f21 * Known bugs added to the README
thib
parents: 45
diff changeset
32 #include "wavfile.h"
0
223b71206888 Initial import
thib
parents:
diff changeset
33
223b71206888 Initial import
thib
parents:
diff changeset
34 extern int is_koe_ogg(char* head);
223b71206888 Initial import
thib
parents:
diff changeset
35 extern char* decode_koe_ogg(AvgKoeInfo info, int* dest_len);
223b71206888 Initial import
thib
parents:
diff changeset
36
223b71206888 Initial import
thib
parents:
diff changeset
37 extern int is_koe_ogg(char* head) {
223b71206888 Initial import
thib
parents:
diff changeset
38 #if HAVE_LIBVORBISFILE || HAVE_LIBVORBISIDEC
223b71206888 Initial import
thib
parents:
diff changeset
39 if (strncmp(head, "OggS", 4) == 0) return 1;
223b71206888 Initial import
thib
parents:
diff changeset
40 else
223b71206888 Initial import
thib
parents:
diff changeset
41 #endif
223b71206888 Initial import
thib
parents:
diff changeset
42 return 0;
223b71206888 Initial import
thib
parents:
diff changeset
43 }
223b71206888 Initial import
thib
parents:
diff changeset
44
223b71206888 Initial import
thib
parents:
diff changeset
45 #if HAVE_LIBVORBISFILE || HAVE_LIBVORBISIDEC
223b71206888 Initial import
thib
parents:
diff changeset
46
223b71206888 Initial import
thib
parents:
diff changeset
47 #if HAVE_LIBVORBISFILE
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 45
diff changeset
48 #include <vorbis/vorbisfile.h>
0
223b71206888 Initial import
thib
parents:
diff changeset
49 #else /* HAVE_LIBVORBISIDEC */
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 45
diff changeset
50 #include <tremor/ivorbiscodec.h>
15a18fbe6f21 * Known bugs added to the README
thib
parents: 45
diff changeset
51 #include <tremor/ivorbisfile.h>
0
223b71206888 Initial import
thib
parents:
diff changeset
52 #endif
223b71206888 Initial import
thib
parents:
diff changeset
53
223b71206888 Initial import
thib
parents:
diff changeset
54 #define INITSIZE 65536
223b71206888 Initial import
thib
parents:
diff changeset
55
223b71206888 Initial import
thib
parents:
diff changeset
56 static int cur_size = 0;
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 45
diff changeset
57 static char* out = NULL;
0
223b71206888 Initial import
thib
parents:
diff changeset
58 static void Resize(void) {
223b71206888 Initial import
thib
parents:
diff changeset
59 char* new_out = (char*)realloc(out, cur_size+INITSIZE);
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 45
diff changeset
60 if (new_out == NULL) {
0
223b71206888 Initial import
thib
parents:
diff changeset
61 new_out = (char*)malloc(cur_size+INITSIZE);
223b71206888 Initial import
thib
parents:
diff changeset
62 memcpy(new_out, out, cur_size);
223b71206888 Initial import
thib
parents:
diff changeset
63 free(out);
223b71206888 Initial import
thib
parents:
diff changeset
64 }
223b71206888 Initial import
thib
parents:
diff changeset
65 out = new_out;
223b71206888 Initial import
thib
parents:
diff changeset
66 cur_size += INITSIZE;
223b71206888 Initial import
thib
parents:
diff changeset
67 }
223b71206888 Initial import
thib
parents:
diff changeset
68
223b71206888 Initial import
thib
parents:
diff changeset
69 struct OggInfo {
223b71206888 Initial import
thib
parents:
diff changeset
70 FILE* stream;
223b71206888 Initial import
thib
parents:
diff changeset
71 int length;
223b71206888 Initial import
thib
parents:
diff changeset
72 int offset;
223b71206888 Initial import
thib
parents:
diff changeset
73 };
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 45
diff changeset
74
65
4416cfac86ae Convert EUC-JP files to UTF8
Thibaut Girka <thib@sitedethib.com>
parents: 52
diff changeset
75 /* ogg stream 読み込み用の dummy callback */
0
223b71206888 Initial import
thib
parents:
diff changeset
76 static size_t ogg_readfunc(void* ptr, size_t size, size_t nmemb, void* datasource) {
223b71206888 Initial import
thib
parents:
diff changeset
77 OggInfo* info = (OggInfo*)datasource;
223b71206888 Initial import
thib
parents:
diff changeset
78 int pt = ftell(info->stream) - info->offset;
223b71206888 Initial import
thib
parents:
diff changeset
79 if (pt+size*nmemb > info->length) {
223b71206888 Initial import
thib
parents:
diff changeset
80 nmemb = (info->length-pt) / size;
223b71206888 Initial import
thib
parents:
diff changeset
81 }
223b71206888 Initial import
thib
parents:
diff changeset
82 return fread(ptr, size, nmemb, info->stream);
223b71206888 Initial import
thib
parents:
diff changeset
83 }
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 45
diff changeset
84
0
223b71206888 Initial import
thib
parents:
diff changeset
85 static int ogg_seekfunc(void* datasource, ogg_int64_t new_offset, int whence) {
223b71206888 Initial import
thib
parents:
diff changeset
86 int pt;
223b71206888 Initial import
thib
parents:
diff changeset
87 OggInfo* info = (OggInfo*)datasource;
223b71206888 Initial import
thib
parents:
diff changeset
88 if (whence == SEEK_SET) pt = info->offset + new_offset;
223b71206888 Initial import
thib
parents:
diff changeset
89 else if (whence == SEEK_CUR) pt = ftell(info->stream) + new_offset;
223b71206888 Initial import
thib
parents:
diff changeset
90 else if (whence == SEEK_END) pt = info->offset + info->length + new_offset;
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 45
diff changeset
91 int r = fseek(info->stream, pt, SEEK_SET);
0
223b71206888 Initial import
thib
parents:
diff changeset
92 return r;
223b71206888 Initial import
thib
parents:
diff changeset
93 }
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 45
diff changeset
94
0
223b71206888 Initial import
thib
parents:
diff changeset
95 static long ogg_tellfunc(void* datasource) {
223b71206888 Initial import
thib
parents:
diff changeset
96 OggInfo* info = (OggInfo*)datasource;
223b71206888 Initial import
thib
parents:
diff changeset
97 int pos = ftell(info->stream);
223b71206888 Initial import
thib
parents:
diff changeset
98 if (pos == -1) return -1;
223b71206888 Initial import
thib
parents:
diff changeset
99 return pos-info->offset;
223b71206888 Initial import
thib
parents:
diff changeset
100 }
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 45
diff changeset
101
0
223b71206888 Initial import
thib
parents:
diff changeset
102 static int ogg_closefunc(void* datasource) {
223b71206888 Initial import
thib
parents:
diff changeset
103 return 0;
223b71206888 Initial import
thib
parents:
diff changeset
104 }
18
4d7486cb20a9 Sync with upstream
thib
parents: 7
diff changeset
105
4d7486cb20a9 Sync with upstream
thib
parents: 7
diff changeset
106 static int fseek_wrap(FILE *f,ogg_int64_t off,int whence){
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 45
diff changeset
107 if (f == NULL) return(-1);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 45
diff changeset
108 return fseek(f, off, whence);
18
4d7486cb20a9 Sync with upstream
thib
parents: 7
diff changeset
109 }
4d7486cb20a9 Sync with upstream
thib
parents: 7
diff changeset
110
0
223b71206888 Initial import
thib
parents:
diff changeset
111 extern char* decode_koe_ogg(AvgKoeInfo info, int* dest_len) {
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 45
diff changeset
112 if (info.stream == NULL) return NULL;
65
4416cfac86ae Convert EUC-JP files to UTF8
Thibaut Girka <thib@sitedethib.com>
parents: 52
diff changeset
113 // Voice ファイルを直接指定すると全ストリームを再生してしまうので
4416cfac86ae Convert EUC-JP files to UTF8
Thibaut Girka <thib@sitedethib.com>
parents: 52
diff changeset
114 // 必要な部分だけ切り出して callback 経由で帰す
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 45
diff changeset
115 fseek(info.stream, info.offset, SEEK_SET);
0
223b71206888 Initial import
thib
parents:
diff changeset
116
223b71206888 Initial import
thib
parents:
diff changeset
117 ov_callbacks callback;
223b71206888 Initial import
thib
parents:
diff changeset
118 callback.read_func = &ogg_readfunc;
223b71206888 Initial import
thib
parents:
diff changeset
119 callback.seek_func = &ogg_seekfunc;
223b71206888 Initial import
thib
parents:
diff changeset
120 callback.close_func = &ogg_closefunc;
223b71206888 Initial import
thib
parents:
diff changeset
121 callback.tell_func = &ogg_tellfunc;
223b71206888 Initial import
thib
parents:
diff changeset
122
223b71206888 Initial import
thib
parents:
diff changeset
123 OggInfo oinfo;
223b71206888 Initial import
thib
parents:
diff changeset
124 oinfo.stream = info.stream;
223b71206888 Initial import
thib
parents:
diff changeset
125 oinfo.length = info.length;
223b71206888 Initial import
thib
parents:
diff changeset
126 oinfo.offset = info.offset;
223b71206888 Initial import
thib
parents:
diff changeset
127
223b71206888 Initial import
thib
parents:
diff changeset
128 OggVorbis_File vf;
223b71206888 Initial import
thib
parents:
diff changeset
129 int r = ov_open_callbacks((void*)&oinfo, &vf, 0, 0, callback);
223b71206888 Initial import
thib
parents:
diff changeset
130 if (r != 0) {
223b71206888 Initial import
thib
parents:
diff changeset
131 fprintf(stderr,"ogg stream err: %d\n",r);
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 45
diff changeset
132 return NULL;
0
223b71206888 Initial import
thib
parents:
diff changeset
133 }
223b71206888 Initial import
thib
parents:
diff changeset
134 vorbis_info* vinfo = ov_info(&vf, 0);
223b71206888 Initial import
thib
parents:
diff changeset
135 info.rate = vinfo->rate;
223b71206888 Initial import
thib
parents:
diff changeset
136 int channels = vinfo->channels;
223b71206888 Initial import
thib
parents:
diff changeset
137
223b71206888 Initial import
thib
parents:
diff changeset
138 int cur = 0x2c;
223b71206888 Initial import
thib
parents:
diff changeset
139 cur_size = INITSIZE;
223b71206888 Initial import
thib
parents:
diff changeset
140 out = (char*)malloc(cur_size);
223b71206888 Initial import
thib
parents:
diff changeset
141
223b71206888 Initial import
thib
parents:
diff changeset
142 do {
223b71206888 Initial import
thib
parents:
diff changeset
143 #if HAVE_LIBVORBISFILE
44
a85cdca1980a * fixed itoa_ws
thib
parents: 18
diff changeset
144 r = ov_read(&vf, out+cur, cur_size-cur, 0, 2, 1, NULL);
0
223b71206888 Initial import
thib
parents:
diff changeset
145 #else /* HAVE_LIBVORBISIDEC */
44
a85cdca1980a * fixed itoa_ws
thib
parents: 18
diff changeset
146 r = ov_read(&vf, out+cur, cur_size-cur, NULL);
0
223b71206888 Initial import
thib
parents:
diff changeset
147 #endif
223b71206888 Initial import
thib
parents:
diff changeset
148 if (r <= 0) break;
223b71206888 Initial import
thib
parents:
diff changeset
149 cur += r;
223b71206888 Initial import
thib
parents:
diff changeset
150 if (cur_size-INITSIZE/4 < cur) Resize();
223b71206888 Initial import
thib
parents:
diff changeset
151 } while(1);
223b71206888 Initial import
thib
parents:
diff changeset
152 ov_clear(&vf);
223b71206888 Initial import
thib
parents:
diff changeset
153
65
4416cfac86ae Convert EUC-JP files to UTF8
Thibaut Girka <thib@sitedethib.com>
parents: 52
diff changeset
154 *dest_len = cur; // うまくコンバートできてるのかなあ……
0
223b71206888 Initial import
thib
parents:
diff changeset
155 const char* header = MakeWavHeader(info.rate, channels, 2, cur);
223b71206888 Initial import
thib
parents:
diff changeset
156 memcpy(out, header, 0x2c);
223b71206888 Initial import
thib
parents:
diff changeset
157
223b71206888 Initial import
thib
parents:
diff changeset
158 char* ret = out;
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 45
diff changeset
159 out = NULL;
0
223b71206888 Initial import
thib
parents:
diff changeset
160
223b71206888 Initial import
thib
parents:
diff changeset
161 return ret;
223b71206888 Initial import
thib
parents:
diff changeset
162 }
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 45
diff changeset
163
0
223b71206888 Initial import
thib
parents:
diff changeset
164 struct OggFILE_impl {
223b71206888 Initial import
thib
parents:
diff changeset
165 OggVorbis_File vf;
223b71206888 Initial import
thib
parents:
diff changeset
166 ov_callbacks callback;
223b71206888 Initial import
thib
parents:
diff changeset
167 OggInfo oinfo;
223b71206888 Initial import
thib
parents:
diff changeset
168 OggFILE_impl(FILE*, int);
223b71206888 Initial import
thib
parents:
diff changeset
169 };
223b71206888 Initial import
thib
parents:
diff changeset
170
223b71206888 Initial import
thib
parents:
diff changeset
171 OggFILE_impl::OggFILE_impl(FILE* stream, int length) {
223b71206888 Initial import
thib
parents:
diff changeset
172 callback.read_func = &ogg_readfunc;
223b71206888 Initial import
thib
parents:
diff changeset
173 callback.seek_func = &ogg_seekfunc;
223b71206888 Initial import
thib
parents:
diff changeset
174 callback.close_func = &ogg_closefunc;
223b71206888 Initial import
thib
parents:
diff changeset
175 callback.tell_func = &ogg_tellfunc;
223b71206888 Initial import
thib
parents:
diff changeset
176 oinfo.stream = stream;
223b71206888 Initial import
thib
parents:
diff changeset
177 oinfo.length = length;
223b71206888 Initial import
thib
parents:
diff changeset
178 oinfo.offset = ftell(stream);
223b71206888 Initial import
thib
parents:
diff changeset
179 }
223b71206888 Initial import
thib
parents:
diff changeset
180
223b71206888 Initial import
thib
parents:
diff changeset
181 OggFILE::OggFILE(FILE* stream, int len) {
223b71206888 Initial import
thib
parents:
diff changeset
182 pimpl = new OggFILE_impl(stream, len);
223b71206888 Initial import
thib
parents:
diff changeset
183 int r = ov_open_callbacks( (void*)&(pimpl->oinfo), &(pimpl->vf), 0, 0, pimpl->callback);
223b71206888 Initial import
thib
parents:
diff changeset
184 if (r != 0) {
223b71206888 Initial import
thib
parents:
diff changeset
185 delete pimpl;
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 45
diff changeset
186 pimpl = NULL;
0
223b71206888 Initial import
thib
parents:
diff changeset
187 return;
223b71206888 Initial import
thib
parents:
diff changeset
188 }
223b71206888 Initial import
thib
parents:
diff changeset
189 vorbis_info* vinfo = ov_info(&(pimpl->vf), 0);
223b71206888 Initial import
thib
parents:
diff changeset
190 wavinfo.SamplingRate = vinfo->rate;
223b71206888 Initial import
thib
parents:
diff changeset
191 wavinfo.Channels = vinfo->channels;
223b71206888 Initial import
thib
parents:
diff changeset
192 wavinfo.DataBits = 16;
223b71206888 Initial import
thib
parents:
diff changeset
193 }
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 45
diff changeset
194
0
223b71206888 Initial import
thib
parents:
diff changeset
195 OggFILE::~OggFILE() {
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 45
diff changeset
196 if (pimpl != NULL) {
0
223b71206888 Initial import
thib
parents:
diff changeset
197 ov_clear(&(pimpl->vf));
223b71206888 Initial import
thib
parents:
diff changeset
198 fclose(pimpl->oinfo.stream);
223b71206888 Initial import
thib
parents:
diff changeset
199 delete pimpl;
223b71206888 Initial import
thib
parents:
diff changeset
200 }
223b71206888 Initial import
thib
parents:
diff changeset
201 }
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 45
diff changeset
202
0
223b71206888 Initial import
thib
parents:
diff changeset
203 int OggFILE::Read(char* buf, int blksize, int blklen) {
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 45
diff changeset
204 if (pimpl == NULL) return -1;
0
223b71206888 Initial import
thib
parents:
diff changeset
205 #if HAVE_LIBVORBISFILE
44
a85cdca1980a * fixed itoa_ws
thib
parents: 18
diff changeset
206 int r = ov_read( &(pimpl->vf), buf, blksize*blklen, 0, 2, 1, NULL);
0
223b71206888 Initial import
thib
parents:
diff changeset
207 #else /* HAVE_LIBVORBISIDEC */
44
a85cdca1980a * fixed itoa_ws
thib
parents: 18
diff changeset
208 int r = ov_read( &(pimpl->vf), buf, blksize*blklen, NULL);
0
223b71206888 Initial import
thib
parents:
diff changeset
209 #endif
223b71206888 Initial import
thib
parents:
diff changeset
210 if (r <= 0) { // end of file
223b71206888 Initial import
thib
parents:
diff changeset
211 return -1;
223b71206888 Initial import
thib
parents:
diff changeset
212 }
223b71206888 Initial import
thib
parents:
diff changeset
213 while(r < blksize*blklen) {
223b71206888 Initial import
thib
parents:
diff changeset
214 #if HAVE_LIBVORBISFILE
44
a85cdca1980a * fixed itoa_ws
thib
parents: 18
diff changeset
215 int dr = ov_read(&(pimpl->vf), buf+r, blksize*blklen-r, 0, 2, 1, NULL);
0
223b71206888 Initial import
thib
parents:
diff changeset
216 #else /* HAVE_LIBVORBISIDEC */
44
a85cdca1980a * fixed itoa_ws
thib
parents: 18
diff changeset
217 int dr = ov_read(&(pimpl->vf), buf+r, blksize*blklen-r, NULL);
0
223b71206888 Initial import
thib
parents:
diff changeset
218 #endif
223b71206888 Initial import
thib
parents:
diff changeset
219 if (dr <= 0) break;
223b71206888 Initial import
thib
parents:
diff changeset
220 r += dr;
223b71206888 Initial import
thib
parents:
diff changeset
221 }
223b71206888 Initial import
thib
parents:
diff changeset
222 return r / blksize;
223b71206888 Initial import
thib
parents:
diff changeset
223 }
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 45
diff changeset
224
0
223b71206888 Initial import
thib
parents:
diff changeset
225 void OggFILE::Seek(int count) {
223b71206888 Initial import
thib
parents:
diff changeset
226 ov_pcm_seek(&(pimpl->vf), count);
223b71206888 Initial import
thib
parents:
diff changeset
227 return;
223b71206888 Initial import
thib
parents:
diff changeset
228 }
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 45
diff changeset
229
0
223b71206888 Initial import
thib
parents:
diff changeset
230 #else
223b71206888 Initial import
thib
parents:
diff changeset
231 extern char* decode_koe_ogg(AvgKoeInfo info, int* dest_len) {
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 45
diff changeset
232 return NULL;
0
223b71206888 Initial import
thib
parents:
diff changeset
233 }
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 45
diff changeset
234
15a18fbe6f21 * Known bugs added to the README
thib
parents: 45
diff changeset
235 OggFILE::OggFILE(FILE* stream, int a) {pimpl = NULL;}
0
223b71206888 Initial import
thib
parents:
diff changeset
236 OggFILE::~OggFILE(){}
223b71206888 Initial import
thib
parents:
diff changeset
237 void OggFILE::Seek(int count){}
223b71206888 Initial import
thib
parents:
diff changeset
238 int OggFILE::Read(char* buf, int blksize, int blklen){return -1;}
223b71206888 Initial import
thib
parents:
diff changeset
239 #endif