Unit CastleSoundBase

Description

Sound engine basic types.

Uses

Overview

Classes, Interfaces, Objects and Records

Name Description
Class ENoMoreSources  
Class ESoundFileError  
Class TSoundDevice  
Class TSoundDeviceList  

Functions and Procedures

function DataFormatToStr(const DataFormat: TSoundDataFormat): string;

Types

TSoundDistanceModel = (...);
TSoundDataFormat = (...);
TSoundLoading = (...);

Description

Functions and Procedures

function DataFormatToStr(const DataFormat: TSoundDataFormat): string;
 

Types

TSoundDistanceModel = (...);

How does distance affect spatial sounds, used for TSoundEngine.DistanceModel.

Values
TSoundDataFormat = (...);

Sound sample format.

8-bit data is unsigned. Just like in case of 8-bit WAV files, and OpenAL AL_FORMAT_MONO8 / AL_FORMAT_STEREO8: It is expressed as an unsigned value over the range 0 to 255, 128 being an audio output level of zero.

16-bit data is signed. Just like in case of 16-bit WAV files, and OpenAL AL_FORMAT_MONO16 / AL_FORMAT_STEREO16: It is expressed as a signed value over the range -32768 to 32767, 0 being an audio output level of zero.

Stereo data is expressed in an interleaved format, left channel sample followed by the right channel sample.

Values
  • sfMono8
  • sfMono16
  • sfStereo8
  • sfStereo16
TSoundLoading = (...);

How to load a sound buffer.

Values
  • slComplete: Load entire sound file at once. The advantage is that once the sound buffer is loaded, there's zero overhead at runtime for playing it, and loading the sound buffer multiple times uses the cache properly. The disadvantage is that loading time may be long, for longer files.
  • slStreaming: Decompress the sound (like OggVorbis) during playback. It allows for much quicker sound loading (almost instant, if you use streaming for everything) but means that sounds will be loaded (in parts) during playback. In general case, we advise to use it for longer sounds (like music tracks).

Generated by PasDoc 0.16.0.