1
unit LUX.Audio.SDIF.Frames;
3
interface //#################################################################### ■
8
type //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$【型】
14
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$【レコード】
16
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$【クラス】
18
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TFrame1TYP
20
TFrame1TYP = class( TFrameSDIF )
23
_Text :TArray<AnsiChar>;
26
class function ReadCreate( const F_:TFileStream; const H_:TFrameHeaderSDIF; const P_:TFileSDIF ) :TFrameSDIF; override;
29
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TFrameASTI
31
TFrameASTI = class( TFrameSDIF )
36
class function ReadCreate( const F_:TFileStream; const H_:TFrameHeaderSDIF; const P_:TFileSDIF ) :TFrameSDIF; override;
39
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TFrame1ASO
41
TFrame1ASO = class( TFrameSDIF )
45
function GetClss :String;
46
function GetDura :Single;
47
function GetTimeMax :Single;
50
property Clss :String read GetClss ;
51
property Dura :Single read GetDura ;
52
property TimeMax :Single read GetTimeMax;
54
class function Select( const Clss_:String ) :CFrameSDIF; reintroduce; virtual;
55
class function ReadCreate( const F_:TFileStream; const H_:TFrameHeaderSDIF; const P_:TFileSDIF ) :TFrameSDIF; override;
58
//const //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$【定数】
60
//var //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$【変数】
62
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$【ルーチン】
64
implementation //############################################################### ■
67
LUX.Audio.SDIF.Matrixs, LUX.Audio.SDIF.Frames.ASO1;
69
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$【レコード】
71
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$【クラス】
73
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TFrame1TYP
75
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& private
77
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& protected
79
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& public
81
/////////////////////////////////////////////////////////////////////// メソッド
83
class function TFrame1TYP.ReadCreate( const F_:TFileStream; const H_:TFrameHeaderSDIF; const P_:TFileSDIF ) :TFrameSDIF;
85
Result := Create( P_ );
87
with TFrame1TYP( Result ) do
89
SetLength( _Text, H_.Size - 16 );
91
F_.Read( _Text[0], H_.Size - 16 );
95
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TFrameASTI
97
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& private
99
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& protected
101
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& public
103
/////////////////////////////////////////////////////////////////////// メソッド
105
class function TFrameASTI.ReadCreate( const F_:TFileStream; const H_:TFrameHeaderSDIF; const P_:TFileSDIF ) :TFrameSDIF;
110
P := TFrameSDIF.Create;
112
for N := 1 to H_.MatrixCount do TMatrixSDIF.ReadCreate( F_, P );
114
Result := Create( P_ );
116
for N := 1 to P.ChildsN do P.Head.Paren := TMatrixSDIF( Result );
121
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TFrame1ASO
123
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& private
125
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& protected
127
/////////////////////////////////////////////////////////////////////// アクセス
129
function TFrame1ASO.GetClss :String;
131
Result := TMatrixChar( FindMatrix( 'clss' ) ).Lines[ 0 ];
134
function TFrame1ASO.GetDura :Single;
136
Result := TMatrixFlo4( FindMatrix( 'dura' ) ).Values[ 0, 0 ];
139
function TFrame1ASO.GetTimeMax :Single;
141
Result := Time + Dura;
144
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& public
146
/////////////////////////////////////////////////////////////////////// メソッド
148
class function TFrame1ASO.Select( const Clss_:String ) :CFrameSDIF;
150
if SameText( Clss_, 'Tran' ) then Result := TFrameTran
152
if SameText( Clss_, 'TmSt' ) then Result := TFrameTmSt
154
if SameText( Clss_, 'Frmt' ) then Result := TFrameFrmt
156
if SameText( Clss_, 'BpGa' ) then Result := TFrameBpGa
158
if SameText( Clss_, 'Rflt' ) then Result := TFrameRflt
160
if SameText( Clss_, 'Clip' ) then Result := TFrameClip
162
if SameText( Clss_, 'Gsim' ) then Result := TFrameGsim
164
if SameText( Clss_, 'Frze' ) then Result := TFrameFrze
166
if SameText( Clss_, 'Revs' ) then Result := TFrameRevs
168
if SameText( Clss_, 'Imag' ) then Result := TFrameImag
170
if SameText( Clss_, 'Brkp' ) then Result := TFrameBrkp
172
if SameText( Clss_, 'Surf' ) then Result := TFrameSurf
174
if SameText( Clss_, 'Band' ) then Result := TFrameBand
176
if SameText( Clss_, 'Noiz' ) then Result := TFrameNoiz
179
Assert( Assigned( Result ), Clss_ + ':未対応のクラス型です。' );
182
class function TFrame1ASO.ReadCreate( const F_:TFileStream; const H_:TFrameHeaderSDIF; const P_:TFileSDIF ) :TFrameSDIF;
187
P := TFrame1ASO.Create;
189
for N := 1 to H_.MatrixCount do TMatrixSDIF.ReadCreate( F_, P );
191
Result := Select( P.Clss ).Create( P_ );
193
for N := 1 to P.ChildsN do P.Head.Paren := TMatrixSDIF( Result );
198
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$【ルーチン】
200
//############################################################################## □
202
initialization //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 初期化
204
finalization //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 最終化
206
end. //######################################################################### ■