Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
168 serge 1
;
2
;   This file is part of the Infinity sound library.
3
;   (C) copyright Serge 2006
4
;   email: infinity_sound@mail.ru
5
;
6
;   This program is free software; you can redistribute it and/or modify
7
;   it under the terms of the GNU General Public License as published by
8
;   the Free Software Foundation; either version 2 of the License, or
9
;   (at your option) any later version.
10
;
11
;   This program is distributed in the hope that it will be useful,
12
;   but WITHOUT ANY WARRANTY; without even the implied warranty of
13
;   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
;   GNU General Public License for more details.
15
 
16
format MS COFF
17
 
18
include 'proc32.inc'
19
include 'main.inc'
20
 
21
DEBUG		    equ 1
22
 
23
EVENT_NOTIFY	    equ 0x00000200
24
 
25
OS_BASE               equ 0;  0x80400000
26
new_app_base          equ 0x60400000;   0x01000000
27
PROC_BASE             equ OS_BASE+0x0080000
28
 
29
public service_proc
30
public START
31
public IMPORTS
32
 
33
SND_CREATE_BUFF     equ 2
34
SND_PLAY            equ 3
35
SND_STOP            equ 4
36
SND_SETBUFF         equ 5
37
SND_DESTROY_BUFF    equ 6
38
 
39
DEV_PLAY            equ 1
40
DEV_STOP            equ 2
41
DEV_CALLBACK        equ 3
42
 
43
struc IOCTL
44
{  .handle           dd ?
45
   .io_code          dd ?
46
   .input            dd ?
47
   .inp_size         dd ?
48
   .output           dd ?
49
   .out_size         dd ?
50
}
51
 
52
virtual at 0
53
  IOCTL IOCTL
54
end virtual
55
 
56
section '.flat' align 16
57
 
58
START:
59
           stdcall [GetService], szSound
60
           test eax, eax
61
           jz .fail
62
           mov [hSound], eax
63
 
64
           stdcall [KernelAlloc], 16*512
65
           test eax, eax
66
           jz .out_of_mem
67
           mov [mix_buff], eax
68
 
69
           mov edi, stream_list
70
           mov ecx, 17
71
           xor eax, eax
72
           cld
73
           rep stosd
74
 
75
           mov edi, stream
76
           mov ecx, 4*STREAM_SIZE
77
           rep stosd
78
 
79
           stdcall set_handler, [hSound], new_mix
80
 
81
	   stdcall [RegService], szInfinity, service_proc
82
           mov [stream_count],0
83
 
84
	   ret
85
.fail:
86
     if DEBUG
87
	   mov esi, msgFail
88
	   call   [SysMsgBoardStr]
89
     end if
90
	   xor eax, eax
91
	   ret
92
 
93
.out_of_mem:
94
     if DEBUG
95
           mov esi, msgMem
96
	   call   [SysMsgBoardStr]
97
     end if
98
	   xor eax, eax
99
	   ret
100
 
101
handle     equ  IOCTL.handle
102
io_code    equ  IOCTL.io_code
103
input      equ  IOCTL.input
104
inp_size   equ  IOCTL.inp_size
105
output     equ  IOCTL.output
106
out_size   equ  IOCTL.out_size
107
 
108
align 4
109
proc service_proc stdcall, ioctl:dword
110
 
111
           mov edi, [ioctl]
112
           mov eax, [edi+io_code]
113
 
114
	   cmp eax, SND_CREATE_BUFF
115
	   jne @F
116
           mov ebx, [edi+input]
117
           stdcall CreateBuffer,[ebx]
118
	   ret
119
@@:
120
	   cmp eax, SND_PLAY
121
	   jne @F
122
 
123
           mov ebx, [edi+input]
124
	   stdcall play_buffer, [ebx]
125
	   ret
126
@@:
127
	   cmp eax, SND_STOP
128
	   jne @F
129
 
130
;       if DEBUG
131
;	   mov esi, msgStop
132
;	   call   [SysMsgBoardStr]
133
;       end if
134
 
135
           mov ebx, [edi+input]
136
	   stdcall stop_buffer, [ebx]
137
	   ret
138
@@:
139
	   cmp eax, SND_SETBUFF
140
	   jne @F
141
 
142
           mov ebx, [edi+input]
143
	   mov eax, [ebx+4]
144
	   add eax, new_app_base
145
	   stdcall set_buffer, [ebx],eax,[ebx+8],[ebx+12]
146
	   ret
147
@@:
148
           cmp eax, SND_DESTROY_BUFF
149
	   jne @F
150
 
151
           mov ebx, [edi+input]
152
           stdcall DestroyBuffer, [ebx]
153
	   ret
154
@@:
155
	   xor eax, eax
156
	   ret
157
endp
158
 
159
restore   handle
160
restore   io_code
161
restore   input
162
restore   inp_size
163
restore   output
164
restore   out_size
165
 
166
TASK_COUNT    equ 0x0003004
167
CURRENT_TASK  equ 0x0003000
168
 
169
 
170
align 8
171
proc CreateBuffer stdcall, format:dword
172
	   locals
173
	      str dd ?
174
	   endl
175
 
176
	   call alloc_stream
177
	   and eax, eax
178
	   jz .fail
179
	   mov [str], eax
180
           mov edi, eax
181
 
182
	   mov edx, [stream_count]
183
	   mov [stream_list+edx*4], eax
184
	   inc [stream_count]
185
 
186
	   mov [edi+STREAM.magic], 'WAVE'
187
	   mov [edi+STREAM.size], STREAM_SIZE
188
 
189
	   stdcall [KernelAlloc], 180*1024
190
 
191
	   mov edi, [str]
192
	   mov [edi+STREAM.base], eax
193
	   mov [edi+STREAM.curr_seg], eax
194
	   mov [edi+STREAM.notify_off1], eax
195
	   add eax, 0x8000
196
	   mov [edi+STREAM.notify_off2], eax
197
	   add eax, 0x7FFF
198
	   mov [edi+STREAM.limit], eax
199
 
200
	   inc eax
201
 
202
	   mov [edi+STREAM.work_buff], eax
203
	   mov [edi+STREAM.work_read], eax
204
	   mov [edi+STREAM.work_write], eax
205
	   mov [edi+STREAM.work_count], 0
206
	   add eax, 0x10000
207
	   mov [edi+STREAM.work_top], eax
208
	   add eax, 1024*32
209
	   mov [edi+STREAM.r_buff], eax
210
 
211
	   mov ebx, [CURRENT_TASK]
212
           shl ebx, 5
213
           mov eax, [0x3000+ebx+4]
214
 
215
	   mov [edi+STREAM.notify_task], eax
216
 
217
	   mov eax, [format]
218
	   mov [edi+STREAM.format], eax
219
	   mov [edi+STREAM.flags], SND_STOP
220
 
221
           xor ebx, ebx
222
           cmp eax, 19
223
           jb @f
224
           mov ebx, 0x80808080
225
@@:
226
           mov [edi+STREAM.r_silence], ebx
227
 
228
	   shl eax, 4
229
           mov ebx, [resampler_params+eax]
230
           mov ecx, [resampler_params+eax+4]
231
           mov edx, [resampler_params+eax+8]
232
 
233
           mov [edi+STREAM.r_size],ebx
234
           mov [edi+STREAM.r_end], ecx
235
           mov [edi+STREAM.r_dt],  edx
236
 
237
	   mov ebx, [resampler_params+eax+12]
238
	   mov [edi+STREAM.resample], ebx
239
 
240
	   mov edi, [edi+STREAM.base]
241
	   mov ecx, 180*1024/4
242
	   xor eax, eax
243
	   rep stosd
244
 
245
	   mov eax, [str]
246
	   ret
247
 
248
.fail:
249
	   xor eax, eax
250
	   ret
251
endp
252
 
253
align 4
254
pid_to_slot:
255
 
256
    push   ebx
257
    push   ecx
258
    mov    ebx,[TASK_COUNT]
259
    shl    ebx,5
260
    mov    ecx,2*32
261
.loop:
262
    cmp    byte [CURRENT_TASK+ecx+0xa],9
263
    jz     .endloop              ;skip empty slots
264
    cmp    [CURRENT_TASK+ecx+0x4],eax ;check PID
265
    jz     .pid_found
266
.endloop:
267
    add    ecx,32
268
    cmp    ecx,ebx
269
    jle    .loop
270
    pop    ecx
271
    pop    ebx
272
    xor    eax,eax
273
    ret
274
 
275
.pid_found:
276
    shr    ecx,5
277
    mov    eax,ecx
278
    pop    ecx
279
    pop    ebx
280
    ret
281
 
282
 
283
 
284
align 4
285
proc DestroyBuffer stdcall, str:dword
286
 
287
           mov esi, [str]
288
 
289
           cmp [esi+STREAM.magic], 'WAVE'
290
	   jne .fail
291
 
292
           cmp [esi+STREAM.size], STREAM_SIZE
293
	   jne .fail
294
 
295
           stdcall [KernelFree], [esi+STREAM.base]
296
 
297
           mov eax, [str]
298
	   call free_stream
299
 
300
           mov edi, [str]
301
           mov ecx, STREAM_SIZE/4
302
           xor eax, eax
303
           cld
304
           rep stosd
305
 
306
           mov eax, [str]
307
           mov esi, stream_list
308
           mov ecx, 16
309
@@:
310
           cmp [esi], eax
311
           je .remove
312
           add esi, 4
313
           dec ecx
314
           jnz @B
315
           xor eax, eax
316
	   inc eax
317
	   ret
318
.remove:
319
           mov edi, esi
320
           add esi, 4
321
           cld
322
           rep movsd
323
           dec [stream_count]
324
           xor eax, eax
325
	   inc eax
326
	   ret
327
.fail:
328
	   xor eax, eax
329
	   ret
330
endp
331
 
332
align 4
333
proc play_buffer stdcall, str:dword
334
 
335
	   mov ebx, [str]
336
 
337
	   cmp [ebx+STREAM.magic], 'WAVE'
338
	   jne .fail
339
 
340
	   cmp [ebx+STREAM.size], STREAM_SIZE
341
	   jne .fail
342
 
343
	   mov [ebx+STREAM.flags], SND_PLAY
344
 
345
	   mov eax,[ebx+STREAM.work_buff]
346
	   mov [ebx+STREAM.work_read], eax
347
	   mov [ebx+STREAM.work_write], eax
348
	   mov [ebx+STREAM.work_count], 0
349
 
350
	   mov eax, [ebx+STREAM.base]
351
	   mov [ebx+STREAM.curr_seg], eax
352
 
353
	   mov esi, [ebx+STREAM.curr_seg]
354
	   mov edi, [ebx+STREAM.work_write]
355
	   mov edx, [ebx+STREAM.r_buff]
356
 
357
	   mov ecx, 32
358
           mov eax, [ebx+STREAM.r_silence]
359
@@:
360
	   mov [edx], eax
361
	   add edx, 4
362
	   dec ecx
363
	   jnz @B
364
 
365
	   mov edx, [ebx+STREAM.r_buff]
366
 
367
	   stdcall [ebx+STREAM.resample], edi, esi, edx,\
368
	      [ebx+STREAM.r_dt],[ebx+STREAM.r_size],[ebx+STREAM.r_end]
369
 
370
	   mov ebx, [str]
371
 
372
	   add [ebx+STREAM.work_count], eax;
373
	   add [ebx+STREAM.work_write], eax;
374
 
375
	   mov eax, [ebx+STREAM.r_size]
376
	   add [ebx+STREAM.curr_seg], eax
377
 
378
;       if DEBUG
379
;	   mov esi, msgPlay
380
;	   call   [SysMsgBoardStr]
381
;       end if
382
 
383
	   stdcall  dev_play, [hSound]
384
 
385
	   xor eax, eax
386
	   inc eax
387
	   ret
388
 
389
.fail:
390
	   xor eax, eax
391
	   ret
392
 
393
endp
394
 
395
 
396
align 4
397
proc stop_buffer stdcall, str:dword
398
 
399
	   mov edi, [str]
400
 
401
	   cmp [edi+STREAM.magic], 'WAVE'
402
	   jne .fail
403
 
404
	   cmp [edi+STREAM.size], STREAM_SIZE
405
	   jne .fail
406
 
407
	   mov [edi+STREAM.flags], SND_STOP
408
 
409
;           stdcall [ServiceHandler], [hSound], dword DEV_STOP, 0
410
 
411
	   xor eax, eax
412
	   inc eax
413
	   ret
414
 
415
.fail:
416
	   xor eax, eax
417
	   ret
418
 
419
endp
420
 
421
align 4
422
proc set_buffer stdcall, str:dword,src:dword,offs:dword,size:dword
423
 
424
	   mov edx, [str]
425
	   test edx, edx
426
	   jz .fail
427
 
428
	   cmp [edx+STREAM.magic], 'WAVE'
429
	   jne .fail
430
 
431
	   cmp [edx+STREAM.size], STREAM_SIZE
432
	   jne .fail
433
 
434
	   mov esi,[src]
435
	   test esi, esi
436
	   jz .fail
437
 
438
           cmp esi, new_app_base
439
           jb .fail
440
 
441
	   mov ecx, [size]
442
	   test ecx, ecx
443
	   jz .fail
444
 
445
	   mov eax, [edx+STREAM.base]
446
	   add eax, [offs]
447
 
448
           cmp eax, [edx+STREAM.base]
449
           jb .fail
450
 
451
	   mov edi, eax
452
	   add eax, ecx
453
	   sub eax, 1
454
 
455
	   cmp eax, [edx+STREAM.limit]
456
           ja .fail
457
 
458
	   shr ecx, 2
459
           cld
460
	   rep movsd
461
 
462
	   xor eax, eax
463
	   inc eax
464
	   ret
465
.fail:
466
	   xor eax, eax
467
	   ret
468
endp
469
 
470
align 4
471
proc alloc_stream
472
 
473
	   mov esi, stream_map
474
 
475
	   pushf
476
	   cli
477
 
478
	   bsf eax, [esi]
479
	   jnz .find
480
	   popf
481
	   xor eax, eax
482
	   ret
483
 
484
.find:	   btr [esi], eax
485
	   popf
486
	   mov ebx, STREAM_SIZE
487
	   mul ebx
488
	   add eax, stream
489
	   ret
490
endp
491
 
492
align 4
493
proc free_stream
494
	   sub eax, stream
495
           mov ebx, STREAM_SIZE
496
	   xor edx, edx
497
	   div ebx
498
 
499
	   and edx, edx
500
           jnz .err
501
 
502
	   bts [stream_map], eax
503
 
504
	   ret
505
.err:
506
           xor eax, eax
507
	   ret
508
endp
509
 
510
align 4
511
proc check_stream
512
 
513
	   xor edx, edx
514
	   mov ecx, [play_count]
515
.l1:
516
	   mov esi, [play_list+edx]
517
 
518
	   mov eax, [esi+STR.curr_seg]
519
	   cmp eax, [esi+STR.limit]
520
	   jb .next
521
 
522
.m1:	   mov eax,[esi+STR.base]
523
	   mov [esi+STR.curr_seg], eax
524
.next:
525
	   add edx, 4
526
	   loop .l1
527
	   ret
528
endp
529
 
530
 
531
align 4
532
proc prepare_playlist
533
 
534
.restart:
535
           xor ebx, ebx
536
	   xor edx, edx
537
	   mov [play_count], 0
538
	   mov ecx, [stream_count]
539
           jcxz .exit
540
.l1:
541
           mov esi, [stream_list+ebx]
542
           test esi, esi
543
           jz .next
544
 
545
           cmp [esi+STREAM.magic], 'WAVE'
546
           jne .next
547
 
548
           cmp [esi+STREAM.size], STREAM_SIZE
549
           jne .next
550
 
551
           mov eax,[esi+STREAM.notify_task]
552
           cmp eax, -1
553
           je .fail
554
 
555
           call pid_to_slot
556
           test eax, eax
557
           jz .fail
558
 
559
           cmp [esi+STREAM.flags], SND_PLAY;
560
	   jne .next
561
           cmp [esi+STREAM.work_count], 16384
562
           jb .next
563
 
564
           mov [play_list+edx], esi
565
	   inc [play_count]
566
	   add edx, 4
567
.next:
568
	   add ebx, 4
569
	   loop .l1
570
.exit:
571
	   ret
572
 
573
.fail:
574
           stdcall DestroyBuffer, esi
575
           jmp .restart
576
endp
577
 
578
align 4
579
proc prepare_updatelist
580
 
581
	   xor ebx, ebx
582
	   xor edx, edx
583
	   mov [play_count], 0
584
	   mov ecx, [stream_count]
585
           jcxz .exit
586
.l1:
587
	   mov eax, [stream_list+ebx]
588
           test eax, eax
589
           jz .next
590
	   cmp [eax+STREAM.flags], SND_PLAY
591
	   jne .next
592
 
593
	   mov [play_list+edx], eax
594
	   inc [play_count]
595
	   add edx, 4
596
.next:
597
	   add ebx, 4
598
	   loop .l1
599
.exit:
600
	   ret
601
endp
602
 
603
 
604
align 4
605
proc set_handler stdcall, hsrv:dword, handler_proc:dword
606
           locals
607
             handler    dd ?
608
             io_code    dd ?
609
             input      dd ?
610
             inp_size   dd ?
611
             output     dd ?
612
             out_size   dd ?
613
             val        dd ?
614
           endl
615
 
616
           mov eax, [hsrv]
617
           lea ecx, [handler_proc]
618
           xor ebx, ebx
619
 
620
           mov [handler], eax
621
           mov [io_code], DEV_CALLBACK
622
           mov [input], ecx
623
           mov [inp_size], 4
624
           mov [output], ebx
625
           mov [out_size], 0
626
 
627
           lea eax, [handler]
628
           stdcall [ServiceHandler], eax
629
           ret
630
endp
631
 
632
align 4
633
proc dev_play stdcall, hsrv:dword
634
           locals
635
             handle     dd ?
636
             io_code    dd ?
637
             input      dd ?
638
             inp_size   dd ?
639
             output     dd ?
640
             out_size   dd ?
641
             val        dd ?
642
           endl
643
 
644
           mov eax, [hsrv]
645
           xor ebx, ebx
646
 
647
           mov [handle], eax
648
           mov [io_code], DEV_PLAY
649
           mov [input], ebx
650
           mov [inp_size], ebx
651
           mov [output], ebx
652
           mov [out_size], ebx
653
 
654
           lea eax, [handle]
655
           stdcall [ServiceHandler], eax
656
           ret
657
endp
658
 
659
include 'mixer.asm'
660
 
661
align 16
662
play_list    dd 16 dup(0)
663
stream_list  dd 17 dup(0)
664
 
665
align 16
666
resampler_params:
667
     ;r_size    r_end   r_dt   resampler_func
668
     dd 0,0,0,0                                  ; 0  PCM_ALL
669
     dd 16384,          0,     0, copy_stream    ; 1  PCM_2_16_48
670
     dd 16384,          0,     0, m16_stereo     ; 2  PCM_1_16_48
671
 
672
     dd 16384, 0x08000000, 30109, resample_2     ; 3  PCM_2_16_44
673
     dd  8192, 0x08000000, 30109, resample_1     ; 4  PCM_1_16_44
674
 
675
     dd 16384, 0x08000000, 21846, resample_2     ; 5  PCM_2_16_32
676
     dd  8192, 0x08000000, 21846, resample_1     ; 6  PCM_1_16_32
677
 
678
     dd 16384, 0x08000000, 16384, resample_2     ; 7  PCM_2_16_24
679
     dd  8192, 0x08000000, 16384, resample_1     ; 8  PCM_1_16_24
680
 
681
     dd  8192, 0x04000000, 15052, resample_2     ; 9  PCM_2_16_22
682
     dd  4096, 0x04000000, 15052, resample_1     ;10  PCM_1_16_22
683
 
684
     dd  8192, 0x04000000, 10923, resample_2     ;11  PCM_2_16_16
685
     dd  4096, 0x04000000, 10923, resample_1     ;12  PCM_1_16_16
686
 
687
     dd  8192, 0x04000000,  8192, resample_2     ;13  PCM_2_16_12
688
     dd  4096, 0x04000000,  8192, resample_1     ;14  PCM_1_16_12
689
 
690
     dd  4096, 0x02000000,  7527, resample_2     ;15  PCM_2_16_11
691
     dd  2048, 0x02000000,  7527, resample_1     ;16  PCM_1_16_11
692
 
693
     dd  4096, 0x02000000,  5462, resample_2     ;17  PCM_2_16_8
694
     dd  2048, 0x02000000,  5462, resample_1     ;18  PCM_1_16_8
695
 
696
     dd 16384,          0,     0, s8_stereo      ;19  PCM_2_8_48
697
     dd  8192,          0,     0, m8_stereo      ;20  PCM_1_8_48
698
 
699
     dd  8192, 0x08000000, 30109, resample_28    ;21  PCM_2_8_44
700
     dd  4096, 0x08000000, 30109, resample_18    ;22  PCM_1_8_44
701
 
702
     dd  8192, 0x08000000, 21846, resample_28    ;23  PCM_2_8_32
703
     dd  4096, 0x08000000, 21846, resample_18    ;24  PCM_1_8_32
704
 
705
     dd  8192, 0x08000000, 16384, resample_28    ;25  PCM_2_8_24
706
     dd  4096, 0x08000000, 16384, resample_18    ;26  PCM_1_8_24
707
 
708
     dd  4096, 0x04000000, 15052, resample_28    ;27  PCM_2_8_22
709
     dd  2048, 0x04000000, 15052, resample_18    ;28  PCM_1_8_22
710
 
711
     dd  4096, 0x04000000, 10923, resample_28    ;29  PCM_2_8_16
712
     dd  2048, 0x04000000, 10923, resample_18    ;30  PCM_1_8_16
713
 
714
     dd  4096, 0x04000000,  8192, resample_28    ;31  PCM_2_8_12
715
     dd  2048, 0x04000000,  8192, resample_18    ;32  PCM_1_8_12
716
 
717
     dd  2048, 0x02000000,  7527, resample_28    ;33  PCM_2_8_11
718
     dd  1024, 0x02000000,  7527, resample_18    ;34  PCM_1_8_11
719
 
720
     dd  2048, 0x02000000,  5462, resample_28    ;35  PCM_2_8_8
721
     dd  1024, 0x02000000,  5462, resample_18    ;36  PCM_1_8_8
722
 
723
 
724
play_count   dd 0
725
 
726
stream_count dd 0
727
 
728
align 8
729
hSound	     dd 0
730
 
731
m7	     dw 0x8000,0x8000,0x8000,0x8000
732
mm80	     dq 0x8080808080808080
733
mm_mask      dq 0xFF00FF00FF00FF00
734
 
735
mix_input    dd 16 dup(0)
736
 
737
align 16
738
;fpu_state    db 512 dup(0)
739
 
740
align 16
741
stream	     db STREAM_SIZE*16 dup(0)
742
stream_map   dd 0xFFFF	      ; 16
743
mix_buff     dd 0
744
mix_buff_map dd 0
745
 
746
align 16
747
IMPORTS:
748
 
749
AttachIntHandler   dd szAttachIntHandler
750
SysMsgBoardStr	   dd szSysMsgBoardStr
751
PciApi		   dd szPciApi
752
PciRead32	   dd szPciRead32
753
PciRead8	   dd szPciRead8
754
AllocKernelSpace   dd szAllocKernelSpace
755
MapPage 	   dd szMapPage
756
KernelAlloc	   dd szKernelAlloc
757
KernelFree         dd szKernelFree
758
GetPgAddr	   dd szGetPgAddr
759
RegService	   dd szRegService
760
GetCurrentTask	   dd szGetCurrentTask
761
GetService	   dd szGetService
762
ServiceHandler	   dd szServiceHandler
763
FpuSave            dd szFpuSave
764
FpuRestore         dd szFpuRestore
765
		   dd 0
766
 
767
szKernel	    db 'KERNEL', 0
768
szAttachIntHandler  db 'AttachIntHandler',0
769
szSysMsgBoardStr    db 'SysMsgBoardStr', 0
770
szPciApi	    db 'PciApi', 0
771
szPciRead32	    db 'PciRead32', 0
772
szPciRead8	    db 'PciRead8', 0
773
szAllocKernelSpace  db 'AllocKernelSpace',0
774
szMapPage	    db 'MapPage',0
775
szRegService	    db 'RegService',0
776
szKernelAlloc	    db 'KernelAlloc',0
777
szGetPgAddr	    db 'GetPgAddr',0
778
szGetCurrentTask    db 'GetCurrentTask ',0
779
szGetService	    db 'GetService',0
780
szServiceHandler    db 'ServiceHandler',0
781
szKernelFree        db 'KernelFree',0
782
szFpuSave           db 'FpuSave',0
783
szFpuRestore        db 'FpuRestore',0
784
 
785
 
786
szInfinity   db 'INFINITY',0
787
szSound      db 'SOUND',0
788
 
789
if DEBUG
790
msgFail      db 'Sound service not found',13,10,0
791
msgPlay      db 'Play buffer',13,10,0
792
msgStop      db 'Stop',13,10,0
793
msgUser      db 'User callback',13,10,0
794
msgMem       db 'Not enough memory',13,10,0
795
end if