Site Tools


documentation:development:opera:pf25:ppgfldr:smmfldr:gspfldr:12pgs017

effectshandler

Utility code for mixers and sound effects.

Synopsis

effectshandler

Description

Utility code for basic management of mixers and sound effects.

Typical usage scenario:

During program initialization:

  • Open the audio folio.
  • Call ehInitEffectsHandler() to allocate and initialize the effects handler.
  • Call ehNewMixerInfo() to load a mixer and initialize a mixerInfo structure.
  • Call ehLoadSoundEffect() to load a sample as a sound effect and initialize a sampleInfo structure.
  • Optionally call ehSetChannelLevels() for each sound effect.

As needed during execution:

  • Call ehSetChannelLevels() for a given sound effect to adjust its player's output levels. Issue calls which control the sound effects player instrument (the SampleInfo's si_Player structure member).

During program termination:

  • Call ehDisposeSampleInfo() for each sound effect.
  • Call ehDisposeMixerInfo() for the mixer.
  • Call ehKillEffectsHandler(). Close the audio folio.

Depending on program requirements, you may want to load one or more sound effects and assemble their player apparati but not immediately connect them to a mixer. This is accomplished by calling ehNewSampleInfo() and ehSetupSamplePlayer(). When you want to connect the player to the mixer, call ehConnectSamplePlayer().

Caveats

This program is not a complete sound management facility.

Associated Files

effectshandler.c effectshandler.h

Location

examples/ExamplesLib

documentation/development/opera/pf25/ppgfldr/smmfldr/gspfldr/12pgs017.txt · Last modified: 2022/10/10 16:53 by 127.0.0.1