1 ////////////////////////////////////////////////////////////////////////
3 // (c) 1996 Looking Glass Technologies Inc.
6 // Module name: Sound utilities standalone main routines
7 // File name: utilmain.c
9 // Description: Set of functions for setting up sound library which
10 // are used by several standalone programs
12 ////////////////////////////////////////////////////////////////////////
23 ////////////////////////////////////////////////////////////////////////
25 // Function name: SoundInit()
27 // Description: Initialize the sound module.
29 ////////////////////////////////////////////////////////////////////////
33 ISndMixer
*pMixer
= NULL
;
35 if (SndCreateMixer (&pMixer
, NULL
) == FALSE
) {
36 printf ("Sound system not started\n");
41 if (ISndMixer_Init (pMixer
, &setup
, MAX_SOUNDS
, NULL
) != kSndOk
) {
42 printf ("Sound system init failed\n");
50 ////////////////////////////////////////////////////////////////////////
52 // Function name: SoundTerm()
54 // Description: Terminate the sound module.
56 ////////////////////////////////////////////////////////////////////////
58 SoundTerm ( ISndMixer
*pMixer
)
61 ISndMixer_StopAllSamples (pMixer
);
62 ISndMixer_Release (pMixer
);
68 ////////////////////////////////////////////////////////////////////////
70 // Function name: SoundRecur()
72 // Description: Recur into the sound module for management purposes.
74 ////////////////////////////////////////////////////////////////////////
76 SoundRecur( ISndMixer
*pMixer
)
79 // allow any samples which have finished playing to do
80 // end-of-sample cleanup
81 ISndMixer_Update( pMixer
);