summaryrefslogtreecommitdiff
path: root/multimedia/fpc-dts/files/patch-packages-dts-src-dts.pas
blob: 623471ea21a070e9895d495abe1cd0f3ccd7f540 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
--- packages/dts/src/dts.pas	2010-04-21 20:42:31.000000000 +0100
+++ packages/dts/src/dts.pas	2010-04-21 20:52:51.000000000 +0100
@@ -272,7 +272,7 @@
 {$IF Defined(WINDOWS)}
   dtslib = 'dts.dll';
 {$ELSEIF Defined(UNIX)}
-  dtslib = 'libdts.so';
+  dtslib = 'libdca.so';
 {$ELSE}
   {$MESSAGE ERROR 'DYNLINK not supported'}
 {$IFEND}
@@ -331,14 +331,14 @@
   DTS_ADJUST_LEVEL    = $100;
 
 
-function dts_init(mm_accel: cuint32): pdts_state_t; cdecl; external {$IFDEF DYNLINK}dtslib{$ENDIF};
-function dts_syncinfo(state: pdts_state_t; buf: pcuint8; var flags: cint; var sample_rate: cint; var bit_rate: cint; var frame_length: cint): cint; cdecl; external {$IFDEF DYNLINK}dtslib{$ENDIF};
-function dts_frame(state: pdts_state_t; buf: pcuint8; var flags: cint; var level: dts_level_t; bias: dts_sample_t): cint; cdecl; external {$IFDEF DYNLINK}dtslib{$ENDIF};
-procedure dts_dynrng(state: pdts_state_t; call: dts_dynrng_call; data: pointer); cdecl; external {$IFDEF DYNLINK}dtslib{$ENDIF};
-function dts_blocks_num(state: pdts_state_t): cint; cdecl; external {$IFDEF DYNLINK}dtslib{$ENDIF};
-function dts_block(state: pdts_state_t): cint; cdecl; external {$IFDEF DYNLINK}dtslib{$ENDIF};
-function dts_samples(state: pdts_state_t): pdts_sample_t; cdecl; external {$IFDEF DYNLINK}dtslib{$ENDIF};
-procedure dts_free(state: pdts_state_t); cdecl; external {$IFDEF DYNLINK}dtslib{$ENDIF};
+function dca_init(mm_accel: cuint32): pdts_state_t; cdecl; external {$IFDEF DYNLINK}dtslib{$ENDIF};
+function dca_syncinfo(state: pdts_state_t; buf: pcuint8; var flags: cint; var sample_rate: cint; var bit_rate: cint; var frame_length: cint): cint; cdecl; external {$IFDEF DYNLINK}dtslib{$ENDIF};
+function dca_frame(state: pdts_state_t; buf: pcuint8; var flags: cint; var level: dts_level_t; bias: dts_sample_t): cint; cdecl; external {$IFDEF DYNLINK}dtslib{$ENDIF};
+procedure dca_dynrng(state: pdts_state_t; call: dts_dynrng_call; data: pointer); cdecl; external {$IFDEF DYNLINK}dtslib{$ENDIF};
+function dca_blocks_num(state: pdts_state_t): cint; cdecl; external {$IFDEF DYNLINK}dtslib{$ENDIF};
+function dca_block(state: pdts_state_t): cint; cdecl; external {$IFDEF DYNLINK}dtslib{$ENDIF};
+function dca_samples(state: pdts_state_t): pdts_sample_t; cdecl; external {$IFDEF DYNLINK}dtslib{$ENDIF};
+procedure dca_free(state: pdts_state_t); cdecl; external {$IFDEF DYNLINK}dtslib{$ENDIF};
 
 
 
@@ -378,12 +378,61 @@
   end;
 
 
+function dts_init(mm_accel: cuint32): pdts_state_t;
+function dts_syncinfo(state: pdts_state_t; buf: pcuint8; var flags: cint; var sample_rate: cint; var bit_rate: cint; var frame_length: cint): cint;
+function dts_frame(state: pdts_state_t; buf: pcuint8; var flags: cint; var level: dts_level_t; bias: dts_sample_t): cint;
+procedure dts_dynrng(state: pdts_state_t; call: dts_dynrng_call; data: pointer);
+function dts_blocks_num(state: pdts_state_t): cint;
+function dts_block(state: pdts_state_t): cint;
+function dts_samples(state: pdts_state_t): pdts_sample_t;
+procedure dts_free(state: pdts_state_t);
+
 function dts_decoder_init(mm_accel: cuint32; user: pointer; read: dts_read_func; seek: dts_seek_func; close: dts_close_func; tell: dts_tell_func): pdts_decoder;
 function dts_decoder_read(decoder: pdts_decoder; buffer: pointer; length: cint): cint;
 procedure dts_decoder_free(decoder: pdts_decoder);
 
 implementation
 
+function dts_init(mm_accel: cuint32): pdts_state_t;
+begin
+   Result := dca_init(mm_accel);
+end;
+
+function dts_syncinfo(state: pdts_state_t; buf: pcuint8; var flags: cint; var sample_rate: cint; var bit_rate: cint; var frame_length: cint): cint;
+begin
+   Result := dca_syncinfo(state, buf, flags, sample_rate, bit_rate, frame_length);
+end;
+
+function dts_frame(state: pdts_state_t; buf: pcuint8; var flags: cint; var level: dts_level_t; bias: dts_sample_t): cint;
+begin
+   Result := dca_frame(state, buf, flags, level, bias);
+end;
+
+procedure dts_dynrng(state: pdts_state_t; call: dts_dynrng_call; data: pointer);
+begin
+   dca_dynrng(state, call, data);
+end;
+
+function dts_blocks_num(state: pdts_state_t): cint;
+begin
+   Result := dca_blocks_num(state);
+end;
+
+function dts_block(state: pdts_state_t): cint;
+begin
+   Result := dca_block(state);
+end;
+
+function dts_samples(state: pdts_state_t): pdts_sample_t;
+begin
+   Result := dca_samples(state)
+end;
+
+procedure dts_free(state: pdts_state_t);
+begin
+   dca_free(state);
+end;
+
 function dts_decoder_init(mm_accel: cuint32; user: pointer; read: dts_read_func; seek: dts_seek_func; close: dts_close_func; tell: dts_tell_func): pdts_decoder;
 begin
   GetMem(Result, Sizeof(dts_decoder));
Only in work.new/fpc-2.4.0/packages/dts/src: dts.pas~