// This is the .aud file for the "ski" demo. // // Source code: ambiences/ski/ski.c // .aud file: ambiences/ski/ski.aud // Documentation: ambiences/HowTo.html // Print out everything SetPrintCommands 1; // Load the DSOs we need LoadDSO samp.so; LoadDSO msgGroup.so; // Create message groups for the interaction TurnL = Create MessageGroup; TurnR = Create MessageGroup; Crash = Create MessageGroup; Win = Create MessageGroup; Exit = Create MessageGroup; // Create, set up the sample actor aSamp = Create SampleActor; SetDirectory aSamp "."; // this is redundant, really SetAllAmp aSamp 0.6; // Preload files into memory, and wait a sec in case the disk is slow LoadFile aSamp "wind1.aiff"; // background sound LoadFile aSamp "wind2.aiff"; // background sound LoadFile aSamp "turnl.aiff"; // triggered sound LoadFile aSamp "turnr.aiff"; // triggered sound LoadFile aSamp "crash.aiff"; // triggered sound LoadFile aSamp "../cheer.aiff"; // triggered sound sleep 0.5; // Define the interaction... build message lists: AddMessage TurnL PlaySample aSamp "turnl.aiff"; // left-turning-skis sound AddMessage TurnR PlaySample aSamp "turnr.aiff"; // right-turning-skis sound AddMessage Crash PlaySample aSamp "crash.aiff"; // crashing/losing sound AddMessage Win PlaySample aSamp "../cheer.aiff";// winning sound AddMessage Exit SetAllAmp aSamp 0.0 3.0; // exit procedure: fade out // sounds actually start coming out here // start the background wind sound hWind1 = BeginSound aSamp SetFile wind1.aiff SetLoop 1; hWind2 = BeginSound aSamp SetFile wind2.aiff SetLoop 1; sleep 0.75; // wait a little before the start sound happens // play the starting-gate sound PlaySample aSamp start.aiff;