| !Run file for !ARSound

IconSprites <Obey$Dir>.!Sprites

If "<System$Path>" = "" Then Error System Resources not found. Please open a directory display showing !System.
If "<ARMovie$Dir>" = "" Then Error ARMovie Resources not found. Please open a directory display showing !ARMovie.

Set ARSound2$Dir <Obey$Dir>
Set ARSound2$Path <Obey$Dir>.
|Set ARSound$OptionsFile <Obey$Dir>.Options

RMEnsure FPEmulator 0 Load System:Modules.FPE
RMEnsure FPEmulator 0 Error ARSound requires the FPE module to be in the !System directory.  

| Check the correct version of CLib is loaded without upsetting existing applications

Set Clib$Flag 0
RMEnsure SharedCLibrary 3.75 Set Clib$Flag 1
RMEnsure SharedCLibrary 0 Set Clib$Flag 0
If "<Clib$Flag>" = "1" Then Error Old Shared C Library. An old version of CLib is resident in memory. You need version 3.75 or later.
Unset Clib$Flag

RMEnsure SharedCLibrary 3.75 RMLoad System:modules.CLib
RMEnsure SharedCLibrary 3.75 Error Shared C Library version 3.75 required

WimpSlot -min 96K -max 96K

Run ARSound2:!RunImage %*0
