glscene

 

TGLSoundLibrary

Page history last edited by skinhat 4 yrs ago

Used to provide a library of sounds files that can be referenced by short filename by a TGLBSoundEmitter. For example the sound library might hold the following three wave files:

c:\program files\glscene\main.wav

c:\program files\glscene\sounds\helmet.wav

c:\program files\glscene\sounds\fistula.wav

They can be added to the library using the addfile method of the samples property of the TGLSoundLibrary.

When assigning a wave file to the TGLBSoundEmitter soundname property it is possible to specify just main.wav instead of c:\program files\glscene\main.wav. For example:

   var

     SoundEmitter:TGLBSoundEmitter;

   begin

     SoundEmitter:= TGLBSoundEmitter.Create(Mickey.Behaviours);

     SoundEmitter.Source.SoundLibrary:=GLSoundLibrary;

     SoundEmitter.Source.SoundName:='main.wav';

     SoundEmitter.Playing:=True;

   end;

Important TGLSoundLibrary properties and methods:

samples TGLSoundSamples: List of sound files

Demo: CVS/Demos/sound/3Dsound

Unit: GLSound

Descends from TComponent.

Comments (0)

You don't have permission to comment on this page.