summaryrefslogtreecommitdiff
path: root/plugins/Watrack/formats/fmt_ogg.pas
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Watrack/formats/fmt_ogg.pas')
-rw-r--r--plugins/Watrack/formats/fmt_ogg.pas29
1 files changed, 15 insertions, 14 deletions
diff --git a/plugins/Watrack/formats/fmt_ogg.pas b/plugins/Watrack/formats/fmt_ogg.pas
index fbe959d48b..d0ba567d08 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:tSongInfo):boolean; cdecl;
-function ReadSPX(var Info:tSongInfo):boolean; cdecl;
-function ReadfLaC(var Info:tSongInfo):boolean; cdecl;
+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;
implementation
-uses windows,common,io,tags,srv_format,base64,utils;
+uses windows,common,io,tags,srv_format,utils, m_api;
const
OGGSign = $5367674F; //OggS
@@ -95,12 +95,12 @@ const
5 : CUESHEET
}
type
- tMetaHdr = packed record
+ MetaHdr = packed record
blocktype:byte;
blocklen:array [0..2] of byte;
end;
type
- tStreamInfo = packed record
+ StreamInfo = packed record
MinBlockSize:word;
MaxBlocksize:word;
MinFrameSize:array [0..2] of byte;
@@ -109,9 +109,10 @@ type
MD5:array [0..15] of byte;
end;
-procedure OGGGetComment(ptr:PAnsiChar;size:integer;var Info:tSongInfo);
+procedure OGGGetComment(ptr:PAnsiChar;size:integer;var Info:wat_api.tSongInfo);
var
- clen,alen,len,values:dword;
+ alen,len,values:dword;
+ clen:int;
ls:PAnsiChar;
value:PAnsiChar;
cover:pByte;
@@ -150,7 +151,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 clen:=Base64Decode(value,cover)
+ else if (cover=nil) and (lstrcmpia(ls,'COVERART')=0) then cover:=mir_base64_decode(value,clen)
else if lstrcmpia(ls,'COVERARTMIME')=0 then ext:=GetImageType(nil,value);
end;
dec(values);
@@ -184,7 +185,7 @@ begin
end;
end;
-function ReadSPX(var Info:tSongInfo):boolean; cdecl;
+function ReadSPX(var Info:wat_api.tSongInfo):boolean; cdecl;
var
f:THANDLE;
OGGHdr:tOGGHdr;
@@ -242,7 +243,7 @@ begin
result:=0;
end;
-function ReadOGG(var Info:tSongInfo):boolean; cdecl;
+function ReadOGG(var Info:wat_api.tSongInfo):boolean; cdecl;
var
f:THANDLE;
OGGHdr:tOGGHdr;
@@ -367,12 +368,12 @@ begin
CloseHandle(f);
end;
-function ReadfLaC(var Info:tSongInfo):boolean; cdecl;
+function ReadfLaC(var Info:wat_api.tSongInfo):boolean; cdecl;
var
f:THANDLE;
data64:int64;
- hdr:tMetaHdr;
- frm:tStreamInfo;
+ hdr:MetaHdr;
+ frm:StreamInfo;
id:dword;
flag:integer;
size:dword;