![]() |
Freeciv21
Develop your civilization from humble roots to a global empire
|
#include <fc_config.h>#include <cstring>#include "log.h"#include "support.h"#include "audio.h"#include "audio_sdl.h"#include <array>
Include dependency graph for audio_sdl.cpp:Go to the source code of this file.
Classes | |
| struct | sample |
Functions | |
| static void | sdl_audio_set_volume (double volume) |
| Set the volume. More... | |
| static double | sdl_audio_get_volume () |
| Get the volume. More... | |
| static bool | sdl_audio_play (const QString &tag, const QString &fullpath, bool repeat, audio_finished_callback cb) |
| Play sound. More... | |
| static void | sdl_audio_stop () |
| Stop music. More... | |
| static void | sdl_audio_wait () |
| Wait for audio to die on all channels. More... | |
| static void | quit_sdl_audio () |
| Quit SDL. More... | |
| static int | init_sdl_audio () |
| Init SDL. More... | |
| static void | sdl_audio_shutdown () |
| Clean up. More... | |
| static bool | sdl_audio_init () |
| Initialize. More... | |
| void | audio_sdl_init () |
| Initialize. More... | |
Variables | |
| const size_t | buf_size = 1024 |
| static Mix_Music * | mus = nullptr |
| static std::array< sample, MIX_CHANNELS > | samples |
| static double | sdl_audio_volume |
| void audio_sdl_init | ( | ) |
Initialize.
Note that this function is called very early at the client startup. So for example logging isn't available.
Definition at line 253 of file audio_sdl.cpp.
Referenced by audio_init().
|
static |
Init SDL.
If the video is already in use (by gui-sdl), just init the subsystem.
This will need to be changed if SDL is used elsewhere.
Definition at line 183 of file audio_sdl.cpp.
Referenced by sdl_audio_init().
|
static |
Quit SDL.
If the video is still in use (by gui-sdl), just quit the subsystem.
This will need to be changed if SDL is used elsewhere.
Definition at line 168 of file audio_sdl.cpp.
Referenced by sdl_audio_init(), and sdl_audio_shutdown().
|
static |
|
static |
|
static |
|
static |
Set the volume.
Definition at line 54 of file audio_sdl.cpp.
Referenced by audio_sdl_init(), and sdl_audio_init().
|
static |
|
static |
Stop music.
Definition at line 144 of file audio_sdl.cpp.
Referenced by audio_sdl_init(), and sdl_audio_shutdown().
|
static |
Wait for audio to die on all channels.
WARNING: If a channel is looping, it will NEVER exit! Always call music_stop() first!
Definition at line 155 of file audio_sdl.cpp.
Referenced by audio_sdl_init(), and sdl_audio_shutdown().
| const size_t buf_size = 1024 |
Definition at line 44 of file audio_sdl.cpp.
Referenced by sdl_audio_init().
|
static |
Definition at line 47 of file audio_sdl.cpp.
Referenced by sdl_audio_play(), and sdl_audio_shutdown().
|
static |
Definition at line 48 of file audio_sdl.cpp.
Referenced by sdl_audio_init(), sdl_audio_play(), and sdl_audio_shutdown().
|
static |
Definition at line 49 of file audio_sdl.cpp.
Referenced by audio_sdl_init(), sdl_audio_get_volume(), sdl_audio_init(), sdl_audio_play(), and sdl_audio_set_volume().