OpenMoHAA 0.82.0
Loading...
Searching...
No Matches
snd_public_new.h
1/*
2===========================================================================
3Copyright (C) 2023 the OpenMoHAA team
4
5This file is part of OpenMoHAA source code.
6
7OpenMoHAA source code is free software; you can redistribute it
8and/or modify it under the terms of the GNU General Public License as
9published by the Free Software Foundation; either version 2 of the License,
10or (at your option) any later version.
11
12OpenMoHAA source code is distributed in the hope that it will be
13useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with OpenMoHAA source code; if not, write to the Free Software
19Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20===========================================================================
21*/
22
23#pragma once
24
25#ifdef __cplusplus
26
27void S_EndRegistration(void);
28
29void S_Respatialize(int entityNum, const vec3_t origin, vec3_t axis[3]);
30sfxHandle_t S_RegisterSound(const char* sample, qboolean compressed, qboolean streamed);
31void S_AddLoopingSound(const vec3_t origin, const vec3_t velocity, sfxHandle_t sfxHandle, float volume, float minDist, float maxDist, float pitch, int flags);
32void S_StartLocalSound(const char* name, qboolean force_load);
33void S_StartLocalSoundChannel(const char* sound_name, qboolean force_load, int channel);
34void S_StartSound(const vec3_t origin, int entNum, int entChannel, sfxHandle_t sfxHandle, float volume, float minDist, float pitch, float maxDist, qboolean streamed);
35void S_ClearLoopingSounds(void);
36qboolean S_IsSoundRegistered(const char* name);
37void S_Init2();
38
39#endif
40
41#ifdef __cplusplus
42extern "C" {
43#endif
44
45// Music soundtrack
46
47void MUSIC_Pause();
48void MUSIC_Unpause();
49qboolean MUSIC_LoadSoundtrackFile(const char* filename);
50qboolean MUSIC_SongValid(const char* mood);
51qboolean MUSIC_Loaded(void);
52void Music_Update(void);
53void MUSIC_SongEnded(void);
54void MUSIC_NewSoundtrack(const char* name);
55void MUSIC_UpdateMood(int current, int fallback);
56void MUSIC_UpdateVolume(float volume, float fade_time);
57void MUSIC_StopAllSongs(void);
58void MUSIC_FreeAllSongs(void);
59qboolean MUSIC_Playing(void);
60int MUSIC_FindSong(const char* name);
61int MUSIC_CurrentSongChannel(void);
62void MUSIC_StopChannel(int channel_number);
63qboolean MUSIC_PlaySong(const char* alias);
64void MUSIC_UpdateMusicVolumes(void);
65void MUSIC_CheckForStoppedSongs(void);
66
67void S_TriggeredMusic_Start();
68void S_TriggeredMusic_StartLoop();
69void S_TriggeredMusic_Stop();
70
71const char* S_CurrentSoundtrack();
72
73void S_StopSound(int entnum, int channel);
74void S_StopAllSounds2(qboolean stop_music);
75float S_GetSoundTime(sfxHandle_t handle);
76void S_SetGlobalAmbientVolumeLevel(float volume);
77void S_SetReverb(int reverb_type, float reverb_level);
78qboolean S_IsSoundPlaying(int channelNumber, const char* name);
79
80void S_UpdateEntity(int entityNum, const vec3_t origin, const vec3_t velocity, qboolean use_listener);
81void S_FadeSound(float fTime);
82void S_TriggeredMusic_PlayIntroMusic();
83void S_TriggeredMusic_SetupHandle(const char* pszName, int iLoopCount, int iOffset, qboolean autostart);
84
85const char* S_GetMusicFilename();
86int S_GetMusicLoopCount();
87unsigned int S_GetMusicOffset();
88
89void S_StopMovieAudio();
90int S_CurrentMoviePosition();
91void S_SetupMovieAudio(const char* pszMovieName);
92
93#ifdef __cplusplus
94}
95#endif