diff options
author | Alexey Kulakov <panda75@bk.ru> | 2014-12-31 17:08:47 +0000 |
---|---|---|
committer | Alexey Kulakov <panda75@bk.ru> | 2014-12-31 17:08:47 +0000 |
commit | da87b3fa0479333cfe9505713f6ffaa54b9ba543 (patch) | |
tree | d4868e4947c3944bb3313a057ec3b189a876018f /plugins/Watrack/formats/fmt_ogg.pas | |
parent | f33f9ebac9806cba6bfd89715566a65c29b5fee2 (diff) |
pascal code: reformat, small fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@11700 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Watrack/formats/fmt_ogg.pas')
-rw-r--r-- | plugins/Watrack/formats/fmt_ogg.pas | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/plugins/Watrack/formats/fmt_ogg.pas b/plugins/Watrack/formats/fmt_ogg.pas index d0ba567d08..fbe959d48b 100644 --- a/plugins/Watrack/formats/fmt_ogg.pas +++ b/plugins/Watrack/formats/fmt_ogg.pas @@ -5,12 +5,12 @@ unit fmt_OGG; interface
uses wat_api;
-function ReadOGG(var Info:wat_api.tSongInfo):boolean; cdecl;
-function ReadSPX(var Info:wat_api.tSongInfo):boolean; cdecl;
-function ReadfLaC(var Info:wat_api.tSongInfo):boolean; cdecl;
+function ReadOGG(var Info:tSongInfo):boolean; cdecl;
+function ReadSPX(var Info:tSongInfo):boolean; cdecl;
+function ReadfLaC(var Info:tSongInfo):boolean; cdecl;
implementation
-uses windows,common,io,tags,srv_format,utils, m_api;
+uses windows,common,io,tags,srv_format,base64,utils;
const
OGGSign = $5367674F; //OggS
@@ -95,12 +95,12 @@ const 5 : CUESHEET
}
type
- MetaHdr = packed record
+ tMetaHdr = packed record
blocktype:byte;
blocklen:array [0..2] of byte;
end;
type
- StreamInfo = packed record
+ tStreamInfo = packed record
MinBlockSize:word;
MaxBlocksize:word;
MinFrameSize:array [0..2] of byte;
@@ -109,10 +109,9 @@ type MD5:array [0..15] of byte;
end;
-procedure OGGGetComment(ptr:PAnsiChar;size:integer;var Info:wat_api.tSongInfo);
+procedure OGGGetComment(ptr:PAnsiChar;size:integer;var Info:tSongInfo);
var
- alen,len,values:dword;
- clen:int;
+ clen,alen,len,values:dword;
ls:PAnsiChar;
value:PAnsiChar;
cover:pByte;
@@ -151,7 +150,7 @@ begin else if (Info.track=0) and (lstrcmpia(ls,'TRACKNUMBER')=0) then Info.track:=StrToInt(value)
- else if (cover=nil) and (lstrcmpia(ls,'COVERART')=0) then cover:=mir_base64_decode(value,clen)
+ else if (cover=nil) and (lstrcmpia(ls,'COVERART')=0) then clen:=Base64Decode(value,cover)
else if lstrcmpia(ls,'COVERARTMIME')=0 then ext:=GetImageType(nil,value);
end;
dec(values);
@@ -185,7 +184,7 @@ begin end;
end;
-function ReadSPX(var Info:wat_api.tSongInfo):boolean; cdecl;
+function ReadSPX(var Info:tSongInfo):boolean; cdecl;
var
f:THANDLE;
OGGHdr:tOGGHdr;
@@ -243,7 +242,7 @@ begin result:=0;
end;
-function ReadOGG(var Info:wat_api.tSongInfo):boolean; cdecl;
+function ReadOGG(var Info:tSongInfo):boolean; cdecl;
var
f:THANDLE;
OGGHdr:tOGGHdr;
@@ -368,12 +367,12 @@ begin CloseHandle(f);
end;
-function ReadfLaC(var Info:wat_api.tSongInfo):boolean; cdecl;
+function ReadfLaC(var Info:tSongInfo):boolean; cdecl;
var
f:THANDLE;
data64:int64;
- hdr:MetaHdr;
- frm:StreamInfo;
+ hdr:tMetaHdr;
+ frm:tStreamInfo;
id:dword;
flag:integer;
size:dword;
|