This class exposes general properties of the audio playback context.
Actual sounds are represented in this context by KgSound instances.
The audio scene basically consists of a listener. The position of this listener is relevant when sounds are played at certain positions: The audio channels will then be balanced to make the sound appear to come from that direction.
Because there can ogly be one listener, all methods in this class are static.
- Not all functionally exposed by the API of this class is guaranteed to be available on the compiled KgAudio backend. Check KgAudioScene::capabilities() if in doubt.
- whether an error was detected in the audio backend
Since KgAudio is typically used by games where audio is not an absolutely vital part of the gameplay, we do not need to fail if sound does not work, over even make some sort of deep analysis why something did not work. The user will notice missing sound, and advanced users may investigate the kWarning() messages. That is usually enough. If not, use this method.
The state of hasError() may theoretically change while the application runs, but in practice, this is very unlikely. (The only tricky part is typically the initial allocation of resources.)
- See also
Definition at line 52 of file kgaudioscene-openal.cpp.