Rev 205 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 205 | Rev 228 | ||
---|---|---|---|
Line 12... | Line 12... | ||
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | // GNU General Public License for more details. |
14 | // GNU General Public License for more details. |
Line 15... | Line 15... | ||
15 | 15 | ||
16 | #include "kolibri.h" |
16 | #include "kolibri.h" |
17 | #include "stdio.h" |
17 | //#include "stdio.h" |
18 | #include "string.h" |
18 | #include "string.h" |
19 | #include "ac97wav.h" |
19 | #include "ac97wav.h" |
- | 20 | #include "mpg/mpg123.h" |
|
- | 21 | ||
- | 22 | #define MP3_ERROR_OUT_OF_BUFFER 5 |
|
Line 20... | Line 23... | ||
20 | #include "mp3dec/mp3dec.h" |
23 | int m_last_error; |
21 | 24 | ||
- | 25 | void thread_proc(); |
|
- | 26 | void touch(char *buf, int size); |
|
Line 22... | Line 27... | ||
22 | void thread_proc(); |
27 | int mp3FindSync(byte* buf, int size, int* sync); |
Line 23... | Line 28... | ||
23 | void touch(char *buf, int size); |
28 | int stream_read_raw(struct reader *rd,unsigned char *buf, int size); |
Line 24... | Line 29... | ||
24 | 29 | ||
25 | extern char *__argv; |
30 | char *fname; |
Line 38... | Line 43... | ||
38 | "PCM_2_8_24","PCM_1_8_24","PCM_2_8_22","PCM_1_8_22", |
43 | "PCM_2_8_24","PCM_1_8_24","PCM_2_8_22","PCM_1_8_22", |
39 | "PCM_2_8_16","PCM_1_8_16","PCM_2_8_12","PCM_1_8_12", |
44 | "PCM_2_8_16","PCM_1_8_16","PCM_2_8_12","PCM_1_8_12", |
40 | "PCM_2_8_11","PCM_1_8_11","PCM_2_8_8","PCM_1_8_8" |
45 | "PCM_2_8_11","PCM_1_8_11","PCM_2_8_8","PCM_1_8_8" |
41 | }; |
46 | }; |
42 | *******/ |
47 | *******/ |
- | 48 | //int freqs[9] = {44100,48000,32000,22050,24000,16000 ,11025 ,12000 ,8000}; |
|
- | 49 | ||
- | 50 | struct reader rd; |
|
- | 51 | struct frame fr; |
|
Line 43... | Line 52... | ||
43 | 52 | ||
44 | DWORD hDrv; |
53 | DWORD hDrv; |
45 | DWORD hSound; |
54 | DWORD hSound; |
46 | DWORD hBuff; |
55 | DWORD hBuff; |
Line 53... | Line 62... | ||
53 | int m_vol; |
62 | int m_vol; |
54 | DWORD status; |
63 | DWORD status; |
55 | DWORD offset; |
64 | DWORD offset; |
56 | DWORD first_sync; |
65 | DWORD first_sync; |
Line 57... | Line 66... | ||
57 | 66 | ||
58 | char *testbuff; |
67 | unsigned char *testbuff; |
59 | char *outbuf; |
68 | unsigned char *outbuf; |
- | 69 | unsigned char *inpbuf; |
|
- | 70 | unsigned char *outPtr; |
|
60 | char *inpbuf; |
71 | |
61 | int inpsize; |
72 | int inpsize; |
- | 73 | int outsize; |
|
- | 74 | int outremain; |
|
- | 75 | int totalout; |
|
Line 62... | Line 76... | ||
62 | int outsize; |
76 | int done; |
63 | 77 | ||
64 | char srv_name[] = "INFINITY"; |
78 | char srv_name[] = "INFINITY"; |
65 | char srv_intel[] = "SOUND"; |
79 | char srv_intel[] = "SOUND"; |
Line 66... | Line -... | ||
66 | char header[] = "AC97 MP3 player"; |
- | |
67 | char buttons_text[]=" Play Stop << >> Vol- Vol+"; |
- | |
68 | - | ||
69 | MPEG_DECODE_INFO mpginfo; |
80 | char header[] = "AC97 MP3 player"; |
Line 70... | Line 81... | ||
70 | MPEG_DECODE_PARAM param; |
81 | char buttons_text[]=" Play Stop << >> Vol- Vol+"; |
71 | 82 | ||
72 | void (*snd_play)(); |
83 | void (*snd_play)(); |
Line 86... | Line 97... | ||
86 | 97 | ||
87 | make_button(7,41,286,11, 0x30|BT_HIDE|BT_NOFRAME,0x404040); |
98 | make_button(7,41,286,11, 0x30|BT_HIDE|BT_NOFRAME,0x404040); |
Line 88... | Line 99... | ||
88 | draw_bar(7,41,286,11,0x404040); |
99 | draw_bar(7,41,286,11,0x404040); |
89 | 100 | ||
90 | draw_bar(7,55,286,11,0x404040); |
101 | draw_bar(7,55,286,11,0x404040); |
Line 91... | Line 102... | ||
91 | write_text(12,58,0x004000|FONT0, __argv, strlen(__argv)); |
102 | write_text(12,58,0x004000|FONT0, fname, strlen(fname)); |
92 | write_text(11,57,0x00FF20|FONT0, __argv, strlen(__argv)); |
103 | write_text(11,57,0x00FF20|FONT0, fname, strlen(fname)); |
93 | 104 | ||
Line 94... | Line 105... | ||
94 | write_text(8,8,0xFFFFFF|FONT0, header, strlen(header)); |
105 | write_text(8,8,0xFFFFFF|FONT0, header, strlen(header)); |
95 | write_text(12,28,0x404040|FONT0,buttons_text,strlen(buttons_text)); |
106 | write_text(12,28,0x404040|FONT0,buttons_text,strlen(buttons_text)); |
Line 96... | Line 107... | ||
96 | write_text(11,27,0xA0FFA0|FONT0,buttons_text,strlen(buttons_text)); |
107 | write_text(11,27,0xA0FFA0|FONT0,buttons_text,strlen(buttons_text)); |
97 | 108 | ||
98 | EndDraw(); |
109 | EndDraw(); |
99 | }; |
110 | }; |
100 | 111 | ||
101 | void draw_progress_bar() |
112 | void draw_progress_bar() |
102 | { DWORD x; |
113 | { DWORD x; |
Line 113... | Line 124... | ||
113 | debug_out(*str); |
124 | debug_out(*str); |
114 | str++; |
125 | str++; |
115 | } |
126 | } |
116 | } |
127 | } |
Line 117... | Line 128... | ||
117 | 128 | ||
118 | int main() //int argc, char *argv[]) |
129 | int main(int argc, char *argv[]) //int argc, char *argv[]) |
119 | { DWORD fmt; |
130 | { DWORD fmt; |
120 | char *thread_stack; |
131 | char *thread_stack; |
121 | DWORD r_bytes; |
132 | DWORD r_bytes; |
Line -... | Line 133... | ||
- | 133 | int retval; |
|
- | 134 | ||
- | 135 | fname = argv[1]; |
|
122 | int retval; |
136 | //debug_out_str(fname); |
123 | 137 | ||
124 | InitHeap(1024*1024); |
138 | InitHeap(1024*1024); |
Line 125... | Line 139... | ||
125 | if(get_fileinfo(__argv, &fileinfo)==FILE_NOT_FOUND) |
139 | if(get_fileinfo(fname, &fileinfo)==FILE_NOT_FOUND) |
126 | return 0; |
140 | return 0; |
Line 137... | Line 151... | ||
137 | if (m_vol > 85) |
151 | if (m_vol > 85) |
138 | { m_vol = 85; |
152 | { m_vol = 85; |
139 | SetMasterVol(hDrv,m_vol); |
153 | SetMasterVol(hDrv,m_vol); |
140 | }; |
154 | }; |
Line 141... | Line -... | ||
141 | - | ||
142 | _asm {fninit}; |
- | |
143 | mp3DecodeInit(); |
- | |
144 | 155 | ||
145 | testbuff = UserAlloc(4096); |
156 | testbuff = UserAlloc(4096); |
146 | get_fileinfo(__argv, &fileinfo); |
157 | get_fileinfo(fname, &fileinfo); |
147 | offset = 0; |
158 | offset = 0; |
148 | retval=read_file (__argv,testbuff,0,2048,&r_bytes); |
159 | retval=read_file (fname,testbuff,0,2048,&r_bytes); |
Line -... | Line 160... | ||
- | 160 | if (retval) return 0; |
|
- | 161 | ||
- | 162 | inpbuf = UserAlloc(0x10000); |
|
- | 163 | touch(inpbuf, 0x10000); |
|
- | 164 | ||
- | 165 | create_reader(&rd, inpbuf, 0x10000); |
|
149 | if (retval) return 0; |
166 | init_reader(&rd,fname); |
150 | 167 | ||
151 | fmt = test_wav((WAVEHEADER*)testbuff); |
168 | fmt = test_wav((WAVEHEADER*)testbuff); |
152 | if (fmt != 0) |
169 | if (fmt != 0) |
- | 170 | { |
|
153 | { |
171 | snd_play = &play_wave; |
154 | snd_play = &play_wave; |
172 | set_reader(&rd, 44); |
155 | outbuf = UserAlloc(32*1024); |
- | |
156 | touch(outbuf, 32768); |
173 | outbuf = UserAlloc(32*1024); |
157 | offset = 44; |
174 | touch(outbuf, 32768); |
158 | } |
175 | } |
159 | else |
176 | else |
160 | { fmt = test_mp3(testbuff); |
177 | { fmt = test_mp3(testbuff); |
Line 161... | Line 178... | ||
161 | if(fmt ==0) return 0; |
178 | if(fmt ==0) return 0; |
162 | snd_play = &play_mp3; |
179 | snd_play = &play_mp3; |
163 | 180 | ||
164 | inpsize = mpginfo.maxInputSize*30; |
181 | outremain = 0x40000 ; |
165 | inpbuf = UserAlloc(inpsize); |
182 | outbuf = UserAlloc(outremain); |
166 | touch(inpbuf, inpsize); |
183 | touch(outbuf, outremain); |
167 | outsize = mpginfo.outputSize*30+0x10000; |
184 | make_decode_tables(32767); |
168 | outbuf = UserAlloc(outsize); |
185 | init_layer2(); |
Line 169... | Line 186... | ||
169 | touch(outbuf, outsize); |
186 | init_layer3(SBLIMIT); |
Line 170... | Line 187... | ||
170 | first_sync = offset; |
187 | fr.single = -1; |
Line 200... | Line 217... | ||
200 | return 0; |
217 | return 0; |
201 | }; |
218 | }; |
Line 202... | Line 219... | ||
202 | 219 | ||
203 | void touch(char *buf, int size) |
220 | void touch(char *buf, int size) |
- | 221 | { int i; |
|
204 | { int i; |
222 | char a; |
205 | for ( i = 0;i < size; i+=4096) |
223 | for ( i = 0;i < size; i+=4096) |
206 | buf[i] = 0; |
224 | a = buf[i]; |
Line 207... | Line 225... | ||
207 | }; |
225 | }; |
208 | 226 | ||
209 | DWORD test_mp3(char *buf) |
- | |
210 | { int retval; |
227 | DWORD test_mp3(char *buf) |
211 | int sync; |
- | |
212 | WAVEHEADER whdr; |
- | |
213 | DWORD r_bytes=2048; |
- | |
214 | - | ||
215 | for (;;) |
- | |
216 | { |
- | |
217 | if (!mp3FindSync(buf, 2048, &sync)) |
- | |
Line -... | Line 228... | ||
- | 228 | { unsigned long hdr; |
|
218 | offset+= 2048; |
229 | WAVEHEADER whdr; |
219 | else break; |
230 | |
220 | - | ||
221 | if (offset >= fileinfo.size || offset >= 102400) |
231 | while (1) |
222 | return 0; |
232 | { if(rd.filepos > 102400) |
- | 233 | return 0; |
|
- | 234 | if(!rd.head_read(&rd,&hdr)) |
|
- | 235 | return 0; |
|
- | 236 | if(!decode_header(&fr,hdr)) |
|
- | 237 | { rd.strpos-=3; |
|
- | 238 | rd.stream-=3; |
|
- | 239 | rd.strremain+=3; |
|
223 | 240 | continue; |
|
224 | retval = read_file (__argv,buf,offset,2048,&r_bytes); |
- | |
225 | if(retval != 0) return 0; |
- | |
226 | }; |
- | |
Line 227... | Line 241... | ||
227 | offset+=sync; |
241 | }; |
- | 242 | break; |
|
228 | retval = read_file (__argv,buf,offset,2048,&r_bytes); |
243 | }; |
229 | if(retval != 0) return 0; |
244 | |
230 | 245 | first_sync = rd.filepos-rd.strremain-4; |
|
231 | mp3GetDecodeInfo(buf, r_bytes, &mpginfo, 1); |
246 | |
232 | whdr.riff_id = 0x46464952; |
247 | whdr.riff_id = 0x46464952; |
233 | whdr.riff_format = 0x45564157; |
248 | whdr.riff_format = 0x45564157; |
Line 234... | Line 249... | ||
234 | whdr.wFormatTag = 0x01; |
249 | whdr.wFormatTag = 0x01; |
235 | whdr.nSamplesPerSec = mpginfo.frequency; |
250 | whdr.nSamplesPerSec = freqs[fr.sampling_frequency]; |
- | 251 | whdr.nChannels = 2; //mpginfo.channels; |
|
236 | whdr.nChannels = mpginfo.channels; |
252 | whdr.wBitsPerSample = 16; |
237 | whdr.wBitsPerSample = mpginfo.bitsPerSample; |
253 | |
Line 238... | Line 254... | ||
238 | 254 | return test_wav(&whdr); |
|
239 | return test_wav(&whdr); |
255 | }; |
240 | }; |
256 | |
Line 241... | Line 257... | ||
241 | void wave_out(char* buff) |
257 | void wave_out(char* buff) |
242 | { DWORD ev[2]; |
- | |
243 | - | ||
244 | GetNotify(&ev[0]); |
- | |
245 | SetBuffer(hSound,hBuff,buff,ev[1],0x8000); |
258 | { DWORD ev[6]; |
246 | } |
- | |
247 | 259 | ||
- | 260 | GetNotify(&ev[0]); |
|
Line 248... | Line 261... | ||
248 | void play_mp3() |
261 | SetBuffer(hSound,hBuff,buff,ev[1],0x8000); |
Line 249... | Line -... | ||
249 | { int retval; |
- | |
250 | DWORD r_bytes; |
- | |
251 | char *inpPtr; |
- | |
252 | char *outPtr; |
- | |
253 | int inpBytes; |
- | |
254 | int totalout; |
- | |
255 | - | ||
256 | offset = first_sync; |
- | |
257 | - | ||
258 | retval = read_file (__argv,inpbuf,offset,inpsize,&r_bytes); |
- | |
259 | if(retval != 0) |
- | |
260 | { status = ST_STOP; |
262 | } |
261 | return ; |
263 | |
- | 264 | void play_mp3() |
|
Line 262... | Line 265... | ||
262 | }; |
265 | { char *outPtr; |
263 | offset+=inpsize; |
266 | int totalout; |
264 | 267 | int outcount; |
|
Line 265... | Line -... | ||
265 | mp3DecodeStart(inpbuf, inpsize); |
- | |
266 | - | ||
267 | inpPtr = inpbuf+mpginfo.skipSize; |
268 | |
268 | inpBytes = inpsize-mpginfo.skipSize; |
269 | set_reader(&rd, first_sync); |
269 | outPtr = outbuf; |
270 | |
Line 270... | Line 271... | ||
270 | totalout=0; |
271 | outPtr = outbuf; |
- | 272 | totalout=0; |
|
- | 273 | done = 0; |
|
271 | 274 | ||
- | 275 | memset(outbuf,0,0x10000); |
|
- | 276 | SetBuffer(hSound,hBuff,outbuf,0,0x10000); |
|
- | 277 | PlayBuffer(hSound, hBuff); |
|
272 | memset(outbuf,0,0x10000); |
278 | |
273 | SetBuffer(hSound,hBuff,outbuf,0,0x10000); |
279 | while(1) |
274 | PlayBuffer(hSound, hBuff); |
- | |
275 | 280 | { if(status!=ST_PLAY) |
|
276 | _asm { fninit } |
281 | break; |
277 | 282 | ||
278 | while(1) |
- | |
279 | { if(status!=ST_PLAY) |
- | |
280 | break; |
- | |
281 | - | ||
282 | for(;;) |
- | |
283 | { param.inputBuf = inpPtr; |
283 | for(;;) |
284 | param.inputSize = inpBytes; |
- | |
285 | param.outputBuf = outPtr; |
- | |
286 | - | ||
287 | if(!mp3DecodeFrame(¶m)) |
- | |
288 | if( mp3GetLastError()== MP3_ERROR_OUT_OF_BUFFER) |
- | |
289 | break; |
- | |
290 | - | ||
291 | inpPtr += param.inputSize; |
- | |
292 | inpBytes -= param.inputSize; |
- | |
Line -... | Line 284... | ||
- | 284 | { outcount = 0; |
|
- | 285 | if( !read_frame(&rd, &fr)) |
|
- | 286 | { done = 1; |
|
- | 287 | break; |
|
- | 288 | }; |
|
- | 289 | fr.do_layer(&fr, outPtr,&outcount); |
|
- | 290 | outPtr+= outcount; |
|
- | 291 | totalout+=outcount; |
|
- | 292 | outremain-=outcount; |
|
- | 293 | if(outremain < outcount*2) |
|
- | 294 | break; |
|
- | 295 | }; |
|
- | 296 | ||
- | 297 | if(done) |
|
- | 298 | { if(totalout < 32768) |
|
- | 299 | { memset(outPtr,0,32768-totalout); |
|
- | 300 | totalout = 32768; |
|
- | 301 | }; |
|
- | 302 | }; |
|
293 | outPtr+=param.outputSize; |
303 | if(totalout < 32768) |
294 | totalout+=param.outputSize; |
304 | continue; |
295 | }; |
305 | /* |
296 | memmove(inpbuf, inpPtr, inpBytes); |
306 | _asm |
297 | retval = read_file(__argv, &inpbuf[inpBytes],offset, inpsize-inpBytes, &r_bytes); |
307 | { push edx |
- | 308 | push eax |
|
298 | offset+=r_bytes; |
309 | mov eax, 0xFF |
- | 310 | mov edx, 0x400 |
|
299 | 311 | out dx, al |
|
300 | if (r_bytes== 0) break; |
312 | pop eax |
301 | 313 | pop edx |
|
- | 314 | }; |
|
302 | inpPtr = inpbuf; |
315 | */ |
303 | inpBytes += r_bytes; |
316 | outPtr = outbuf; |
304 | if(totalout < 32768) continue; |
317 | while (totalout > 32768) |
Line 305... | Line 318... | ||
305 | 318 | { wave_out(outPtr); |
|
306 | outPtr = outbuf; |
319 | totalout-=0x8000; |
307 | while (totalout > 32768) |
320 | outPtr+=0x8000; |
308 | { wave_out(outPtr); |
321 | outremain+=0x8000; |
309 | totalout-=0x8000; |
322 | }; |
Line 310... | Line 323... | ||
310 | outPtr+=0x8000; |
323 | if(done) break; |
Line 311... | Line 324... | ||
311 | }; |
324 | memmove(outbuf,outPtr, totalout); |
312 | memmove(outbuf,outPtr, totalout); |
325 | outPtr = outbuf+totalout; |
- | 326 | } |
|
313 | outPtr = outbuf+totalout; |
327 | |
314 | }; |
- | |
315 | if(status != ST_EXIT) |
328 | if(status != ST_EXIT) |
316 | status = ST_STOP; |
- | |
317 | }; |
329 | status = ST_STOP; |
Line 318... | Line 330... | ||
318 | 330 | }; |
|
Line 319... | Line 331... | ||
319 | void play_wave() |
331 | |
320 | { |
332 | void play_wave() |
321 | int retval; |
333 | { DWORD ev[6]; |
322 | int remain; |
334 | int retval; |
323 | int i; |
335 | int remain; |
Line 324... | Line 336... | ||
324 | 336 | int i; |
|
325 | offset = 44; |
337 | |
326 | 338 | // offset = 44; |
|
327 | read_file (__argv,outbuf,offset,32*1024,0); |
- | |
328 | offset+=32*1024; |
- | |
329 | SetBuffer(hSound,hBuff,outbuf,0,0x8000); |
- | |
330 | - | ||
331 | read_file (__argv,outbuf,offset,32*1024,0); |
- | |
332 | offset+=32*1024; |
- | |
333 | SetBuffer(hSound,hBuff,outbuf,0x8000,0x8000); |
- | |
334 | - | ||
335 | PlayBuffer(hSound, hBuff); |
- | |
336 | - | ||
337 | retval = 0; |
339 | |
338 | while(1) |
- | |
339 | { |
- | |
340 | if(status!=ST_PLAY) |
340 | // read_file (fname,outbuf,offset,32*1024,0); |
341 | break; |
- | |
342 | - | ||
343 | GetNotify(&event[0]); |
341 | // offset+=32*1024; |
Line 344... | Line 342... | ||
344 | if(retval == FILE_EOF) |
342 | stream_read_raw(&rd,outbuf,32768); |
345 | break; |
343 | SetBuffer(hSound,hBuff,outbuf,0,0x8000); |
346 | remain = fileinfo.size-offset; |
344 | stream_read_raw(&rd,outbuf,32768); |
Line 447... | Line 445... | ||
447 | break; |
445 | break; |
Line 448... | Line 446... | ||
448 | 446 | ||
449 | case 0x30: |
447 | case 0x30: |
450 | if(status==ST_DONE) |
448 | if(status==ST_DONE) |
451 | break; |
449 | break; |
452 | if(snd_play == play_mp3) |
450 | // if(snd_play == play_mp3) |
453 | continue; |
451 | // continue; |
454 | pos = (GetMousePos(REL_WINDOW)>>16)-7; |
452 | pos = (GetMousePos(REL_WINDOW)>>16)-7; |
- | 453 | offset = ((fileinfo.size-44)/286*pos+44)&0xFFFFFFFC; |
|
455 | offset = ((fileinfo.size-44)/286*pos+44)&0xFFFFFFFC; |
454 | set_reader(&rd, offset); |
456 | draw_progress_bar(); |
455 | draw_progress_bar(); |
457 | break; |
456 | break; |
458 | }; |
457 | }; |
459 | }; |
458 | }; |
Line 630... | Line 629... | ||
630 | }; |
629 | }; |
631 | return retval; |
630 | return retval; |
632 | }; |
631 | }; |
Line 633... | Line 632... | ||
633 | 632 | ||
- | 633 | int wait_for_event_infinite() |
|
634 | int wait_for_event_infinite() |
634 | { void *a; |
635 | { int retval; |
635 | int retval; |
636 | _asm |
636 | _asm |
637 | { mov eax,10 |
637 | { mov eax,10 |
638 | int 0x40 |
638 | int 0x40 |
639 | mov [retval], eax |
639 | mov [retval], eax |
Line 655... | Line 655... | ||
655 | mov ebx, 2 |
655 | mov ebx, 2 |
656 | int 0x40 |
656 | int 0x40 |
657 | }; |
657 | }; |
658 | }; |
658 | }; |
Line -... | Line 659... | ||
- | 659 | ||
659 | 660 | ///********* |
|
660 | void * __cdecl memmove ( void * dst, const void * src, size_t count) |
661 | void *memmove ( void * dst, void * src, int count) |
- | 662 | { void *ret; |
|
Line 661... | Line 663... | ||
661 | { void * ret = dst; |
663 | ret = dst; |
662 | 664 | ||
663 | if (dst <= src || (char *)dst >= ((char *)src + count)) |
665 | if (dst <= src || (char *)dst >= ((char *)src + count)) |
664 | { |
666 | { |
Line 676... | Line 678... | ||
676 | { *(char *)dst = *(char *)src; |
678 | { *(char *)dst = *(char *)src; |
677 | dst = (char *)dst - 1; |
679 | dst = (char *)dst - 1; |
678 | src = (char *)src - 1; |
680 | src = (char *)src - 1; |
679 | } |
681 | } |
680 | } |
682 | } |
681 | return(ret); |
683 | return ret; |
682 | }; |
684 | }; |
- | 685 | //**********/ |
|
Line -... | Line 686... | ||
- | 686 | ||
- | 687 | void * __cdecl mem_cpy(void * dst,const void * src,size_t count) |
|
- | 688 | { void * ret = dst; |
|
- | 689 | while (count--) |
|
- | 690 | { *(char *)dst = *(char *)src; |
|
- | 691 | dst = (char *)dst + 1; |
|
683 | 692 | src = (char *)src + 1; |
|
- | 693 | }; |
|
684 | 694 | return(ret); |
|
Line 685... | Line 695... | ||
685 | 695 | } |
|
686 | 696 | ||
Line 687... | Line 697... | ||
687 | // debug_out_str(formats[fmt]); |
697 | // debug_out_str(formats[fmt]); |