/* 3DSound Plugin - DMS2 - November 99 - by Sébastien DENEUX */ typeof class=S;; var maxDownloadSize=204800;; /*-------------*/ fun cbcomm(ui,cli,action,param,b)= if !strcmp action "getSound" then let b -> [name long] in if name==nil then nil else UsendCli this cli ui "setSound" linebuild name::long::nil else nil;; /*-------------*/ fun newOb(o)= /*ObRegisterAction o (strcatn (ObName o)::".unregister"::nil) nil;*/ /*test*/ /*_fooS "** 3DSound : newOb"; _fooS strcat "** 3DSound : wavFileName = " hd UgetParam ObUi o "wavFileName";*/ let hd UgetParam ObUi o "wavFileName" -> name in if name==nil then nil else let _checkpack name -> p in if p==nil then nil else let _fileSize p -> long in ( if long <= maxDownloadSize then _RSregister this name RSfile+RScontrol name else nil; UcbComm this ObUi o mkfun5 @cbcomm [name itoa long]; 0 );; /*-------------*/ fun IniPlug(file)= set class=getInfo strextr _getpack _checkpack file "name"; PlugRegister class @newOb nil; 0;;