Audio.hpp
1// Copyright 2019 Arthur Sonzogni. All rights reserved.
2// Use of this source code is governed by the MIT license that can be found in
3// the LICENSE file.
4
5#ifndef SMK_AUDIO_HPP
6#define SMK_AUDIO_HPP
7
8namespace smk {
9
10/// Used to Initialize OpenAL. It is required to use it in the main() function.
11/// Coucou
12///
13/// ## Example
14///
15/// ~~~cpp
16/// int main() {
17/// // Init OpenAL.
18/// smk::Audio audio;
19///
20/// // Load a sound file.
21/// auto sound_buffer = smk::SoundBuffer(asset::water_mp3);
22///
23/// // Create a sound source.
24/// auto sound = smk::Sound(sound_buffer);
25///
26/// // Play the sound.
27/// sound.Play();
28///
29/// [...]
30/// }
31/// ~~~
32class Audio {
33 public:
34 Audio();
35 ~Audio();
36 static bool Initialized();
37};
38
39} // namespace smk
40
41#endif /* end of include guard: SMK_AUDIO_HPP */
static bool Initialized()
Definition: Audio.cpp:91