Project Alice
Loading...
Searching...
No Matches
sound.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <stdint.h>
4
5#ifdef _WIN64
6#include "sound_win.hpp"
7#else
8#include "sound_nix.hpp"
9#endif
10
11namespace sys {
12struct state;
13}
14
15namespace sound {
16
17// called on startup and shutdown -- initialize should also load the list of available music files and load sound effects
18void initialize_sound_system(sys::state& state); // should be called *after* the window has been created
19
20// these functions are called to change the volume of the currently playing track or effect
21void change_effect_volume(sys::state& state, float v);
22void change_interface_volume(sys::state& state, float v);
23void change_music_volume(sys::state& state, float v);
24
25// these start playing an effect or track at the specified volume
26void play_effect(sys::state& state, audio_instance& s, float volume);
27void play_interface_sound(sys::state& state, audio_instance& s, float volume);
28
29// controls autoplaying music (start music should start with the main theme)
30void stop_music(sys::state& state);
31void start_music(sys::state& state, float v);
32void pause_all(sys::state& state);
33void resume_all(sys::state& state);
34// linux may not need this function, but I needed to expose a way to switch to the next track upon
35// recieving a notification via a windows event that the current track could be complete
37void play_new_track(sys::state& state);
38void play_next_track(sys::state& state);
41
42// returns the default click sound -- expect this list of functions to expand as
43// we implement more of the fixed sound effects
82//alice
89
93
94} // namespace sound
Definition: sound.hpp:15
audio_instance & get_peace_sound(sys::state &state)
Definition: sound_nix.cpp:326
audio_instance & get_minor_event_sound(sys::state &state)
Definition: sound_nix.cpp:359
void pause_all(sys::state &state)
Definition: sound_nix.cpp:226
audio_instance & get_revolt_sound(sys::state &state)
Definition: sound_nix.cpp:347
audio_instance & get_hover_sound(sys::state &state)
Definition: sound_nix.cpp:275
void initialize_sound_system(sys::state &state)
Definition: sound_nix.cpp:84
audio_instance & get_tab_population_sound(sys::state &state)
Definition: sound_nix.cpp:302
void resume_all(sys::state &state)
Definition: sound_nix.cpp:240
audio_instance & get_tab_production_sound(sys::state &state)
Definition: sound_nix.cpp:305
audio_instance & get_army_built_sound(sys::state &state)
Definition: sound_nix.cpp:329
audio_instance & get_event_sound(sys::state &state)
Definition: sound_nix.cpp:384
audio_instance & get_decision_sound(sys::state &state)
Definition: sound_nix.cpp:387
audio_instance & get_tab_budget_sound(sys::state &state)
Definition: sound_nix.cpp:272
audio_instance & get_accept_sound(sys::state &state)
Definition: sound_nix.cpp:368
void play_next_track(sys::state &state)
Definition: sound_nix.cpp:410
void update_music_track(sys::state &state)
Definition: sound_nix.cpp:255
audio_instance & get_technology_finished_sound(sys::state &state)
Definition: sound_nix.cpp:338
void change_effect_volume(sys::state &state, float v)
Definition: sound_nix.cpp:188
audio_instance & get_enact_sound(sys::state &state)
Definition: sound_nix.cpp:281
audio_instance & get_declaration_of_war_sound(sys::state &state)
Definition: sound_nix.cpp:335
audio_instance & get_console_open_sound(sys::state &state)
Definition: sound_nix.cpp:377
audio_instance & get_console_close_sound(sys::state &state)
Definition: sound_nix.cpp:380
audio_instance & get_tab_technology_sound(sys::state &state)
Definition: sound_nix.cpp:308
void stop_music(sys::state &state)
Definition: sound_nix.cpp:209
audio_instance & get_delete_sound(sys::state &state)
Definition: sound_nix.cpp:287
audio_instance & get_unpause_sound(sys::state &state)
Definition: sound_nix.cpp:393
audio_instance & get_click_left_sound(sys::state &state)
Definition: sound_nix.cpp:266
void change_interface_volume(sys::state &state, float v)
Definition: sound_nix.cpp:191
audio_instance & get_random_land_battle_sound(sys::state &state)
Definition: sound_nix.cpp:397
audio_instance & get_click_right_sound(sys::state &state)
Definition: sound_nix.cpp:269
audio_instance & get_naval_base_built_sound(sys::state &state)
Definition: sound_nix.cpp:356
audio_instance & get_tab_politics_sound(sys::state &state)
Definition: sound_nix.cpp:293
audio_instance & get_major_event_sound(sys::state &state)
Definition: sound_nix.cpp:362
native_string get_current_track_name(sys::state &state)
Definition: sound_nix.cpp:417
audio_instance & get_random_province_select_sound(sys::state &state)
Definition: sound_nix.cpp:403
audio_instance & get_railroad_built_sound(sys::state &state)
Definition: sound_nix.cpp:353
audio_instance & get_navy_move_sound(sys::state &state)
Definition: sound_nix.cpp:320
void play_effect(sys::state &state, audio_instance &s, float volume)
Definition: sound_nix.cpp:198
audio_instance & get_random_naval_battle_sound(sys::state &state)
Definition: sound_nix.cpp:400
audio_instance & get_pause_sound(sys::state &state)
Definition: sound_nix.cpp:390
void play_previous_track(sys::state &state)
Definition: sound_nix.cpp:413
audio_instance & get_navy_select_sound(sys::state &state)
Definition: sound_nix.cpp:317
audio_instance & get_checkbox_sound(sys::state &state)
Definition: sound_nix.cpp:278
void start_music(sys::state &state, float v)
Definition: sound_nix.cpp:214
audio_instance & get_decline_sound(sys::state &state)
Definition: sound_nix.cpp:365
audio_instance & get_election_sound(sys::state &state)
Definition: sound_nix.cpp:344
audio_instance & get_navy_built_sound(sys::state &state)
Definition: sound_nix.cpp:332
void play_new_track(sys::state &state)
Definition: sound_nix.cpp:407
audio_instance & get_army_select_sound(sys::state &state)
Definition: sound_nix.cpp:311
audio_instance & get_fort_built_sound(sys::state &state)
Definition: sound_nix.cpp:350
void play_interface_sound(sys::state &state, audio_instance &s, float volume)
Definition: sound_nix.cpp:203
audio_instance & get_diplomatic_request_sound(sys::state &state)
Definition: sound_nix.cpp:371
audio_instance & get_chat_message_sound(sys::state &state)
Definition: sound_nix.cpp:374
audio_instance & get_tab_diplomacy_sound(sys::state &state)
Definition: sound_nix.cpp:296
audio_instance & get_click_sound(sys::state &state)
Definition: sound_nix.cpp:263
audio_instance & get_error_sound(sys::state &state)
Definition: sound_nix.cpp:323
audio_instance & get_subtab_sound(sys::state &state)
Definition: sound_nix.cpp:284
void change_music_volume(sys::state &state, float v)
Definition: sound_nix.cpp:194
audio_instance & get_autochoose_sound(sys::state &state)
Definition: sound_nix.cpp:290
audio_instance & get_factory_built_sound(sys::state &state)
Definition: sound_nix.cpp:341
audio_instance & get_army_move_sound(sys::state &state)
Definition: sound_nix.cpp:314
audio_instance & get_tab_military_sound(sys::state &state)
Definition: sound_nix.cpp:299
Definition: constants.hpp:4
std::string native_string