Skip to content

Latest commit

 

History

History
999 lines (659 loc) · 22.4 KB

SoundSystem.md

File metadata and controls

999 lines (659 loc) · 22.4 KB

Music.hpp

MUSIC_SMOOTH_NO

Type: constant

Description:

Replaced value:

0

File: client\SoundSystem\Music.hpp at line 8

MUSIC_SMOOTH_START

Type: constant

Description:

Replaced value:

1

File: client\SoundSystem\Music.hpp at line 9

MUSIC_SMOOTH_END

Type: constant

Description:

Replaced value:

2

File: client\SoundSystem\Music.hpp at line 10

MUSIC_SMOOTH_FULL

Type: constant

Description:

Replaced value:

3

File: client\SoundSystem\Music.hpp at line 11

MUSIC_REPEAT_NO

Type: constant

Description:

Replaced value:

0

File: client\SoundSystem\Music.hpp at line 13

MUSIC_REPEAT_YES

Type: constant

Description:

Replaced value:

1

File: client\SoundSystem\Music.hpp at line 14

MUSIC_REPEAT_AND_BACKWARD

Type: constant

Description:

Replaced value:

2

File: client\SoundSystem\Music.hpp at line 15

MUSIC_SMOOTH_TIME_DEFAULT

Type: constant

Description:

Replaced value:

5

File: client\SoundSystem\Music.hpp at line 17

MUSIC_CHANNEL_BASE

Type: constant

Description: системный. не используется

Replaced value:

0

File: client\SoundSystem\Music.hpp at line 21

MUSIC_CHANNEL_LOBBY

Type: constant

Description: канал лобби

Replaced value:

1

File: client\SoundSystem\Music.hpp at line 23

MUSIC_CHANNEL_AMBIENT

Type: constant

Description: эмбиент - основной

Replaced value:

2

File: client\SoundSystem\Music.hpp at line 25

MUSIC_CHANNEL_AMBIENT_LOCAL

Type: constant

Description: эмбиент - локальный. вход в интересное место или подобное

Replaced value:

3

File: client\SoundSystem\Music.hpp at line 27

MUSIC_CHANNEL_COMBATAMBIENT

Type: constant

Description: боевой эмбиент - пока не задействован

Replaced value:

4

File: client\SoundSystem\Music.hpp at line 29

MUSIC_CHANNEL_EVENT_GLOBAL

Type: constant

Description: музыка конца раунда, или любого важного события

Replaced value:

5

File: client\SoundSystem\Music.hpp at line 31

chm(a,b)

Type: constant

Description:

  • Param: a
  • Param: b

Replaced value:

[ a , b ]

File: client\SoundSystem\Music.hpp at line 33

MUSIC_MAP_INTERNAL_ALLCHANNELS

Type: constant

Description:

Replaced value:

[ \
chm("MUSIC_CHANNEL_BASE",0), \
chm("MUSIC_CHANNEL_LOBBY",1), \
chm("MUSIC_CHANNEL_AMBIENT",2), \
chm("MUSIC_CHANNEL_AMBIENT_LOCAL",3), \
chm("MUSIC_CHANNEL_COMBATAMBIENT",4), \
chm("MUSIC_CHANNEL_EVENT_GLOBAL",5) \
]

File: client\SoundSystem\Music.hpp at line 34

MUSIC_LIST_NODE_ENUM_DEF

Type: constant

Description:

Replaced value:

[ \
'Базовый:MUSIC_CHANNEL_BASE:Базовый начальный канал. Имеет самый низший приоритет воспроизведения.', \
'Лобби:MUSIC_CHANNEL_LOBBY:Канал лобби. В нем играет музыка для лобби', \
'Эмбиент:MUSIC_CHANNEL_AMBIENT:Основной канал для эмбиентов', \
'Локальный эмбиент:MUSIC_CHANNEL_AMBIENT_LOCAL:Локационный и ситуативный эмбиент', \
'Сражение:MUSIC_CHANNEL_COMBATAMBIENT:Боевой эмбиент. Пока не задан', \
'Глобальное событие:MUSIC_CHANNEL_EVENT_GLOBAL:Музыка конца раунда, или любого важного события. Имеет на текущий момент наивысший приоритет воспроизведения.' \
]

File: client\SoundSystem\Music.hpp at line 43

Music.sqf

BUFFER_PRIORITY_MAX

Type: constant

Description:

Replaced value:

32

File: client\SoundSystem\Music.sqf at line 99

MUSIC_DEBUG

Type: constant

Description:

Replaced value:

File: client\SoundSystem\Music.sqf at line 101

mlog(text)

Type: constant

Exists if MUSIC_DEBUG defined

Description:

  • Param: text

Replaced value:

File: client\SoundSystem\Music.sqf at line 109

mlogformat(text,args)

Type: constant

Exists if MUSIC_DEBUG defined

Description:

  • Param: text
  • Param: args

Replaced value:

logformat("[MUSIC::DEBUG]: " + text,args);

File: client\SoundSystem\Music.sqf at line 109

mlogformat(text,args)

Type: constant

Exists if MUSIC_DEBUG not defined

Description:

  • Param: text
  • Param: args

Replaced value:

File: client\SoundSystem\Music.sqf at line 112

music_internal_class2path

Type: Variable

Description: двойная ассоциация класса и пути

Initial value:

createHashMap

File: client\SoundSystem\Music.sqf at line 57

music_internal_path2class

Type: Variable

Description:

Initial value:

createHashMap

File: client\SoundSystem\Music.sqf at line 58

music_internal_folderData

Type: Variable

Description: хэш карта папок и композиций внутри них

Initial value:

createHashMap

File: client\SoundSystem\Music.sqf at line 60

music_internal_durationMap

Type: Variable

Description: карта длительности (key: musicname, val: duration)

Initial value:

createHashMap

File: client\SoundSystem\Music.sqf at line 62

music_playedObject

Type: Variable

Description: объект композиции который играет в данную минуту

Initial value:

null

File: client\SoundSystem\Music.sqf at line 65

music_internal_priority

Type: Variable

Description:

Initial value:

_buffer apply ...

File: client\SoundSystem\Music.sqf at line 121

music_internal_paused

Type: Variable

Description:

Initial value:

_buffer apply ...

File: client\SoundSystem\Music.sqf at line 122

music_internal_lastPriority

Type: Variable

Description:

Initial value:

-1

File: client\SoundSystem\Music.sqf at line 123

music_internal_map_chanToEnum

Type: Variable

Description: строковая карта всех каналов

Initial value:

createHashMapFromArray MUSIC_MAP_INTERNAL_ALLCHANNELS

File: client\SoundSystem\Music.sqf at line 247

music_internal_handleOnUpdate

Type: Variable

Description:

Initial value:

startUpdate(music_internal_onUpdate,0)

File: client\SoundSystem\Music.sqf at line 443

music_play

Type: function

Description:

  • Param: _file
  • Param: _priority (optional, default 0)
  • Param: _params (optional, default [])

File: client\SoundSystem\Music.sqf at line 136

music_setPause

Type: function

Description:

  • Param: _chan
  • Param: _mode
  • Param: _smooth (optional, default false)

File: client\SoundSystem\Music.sqf at line 300

music_stop

Type: function

Description: принудительная остановка музыки на данном канале и очистка канала. параметр -1 чистит все каналы

  • Param: _chan (optional, default -1)

File: client\SoundSystem\Music.sqf at line 333

music_internal_setFade

Type: function

Description:

  • Param: _fade
  • Param: _time (optional, default -1)

File: client\SoundSystem\Music.sqf at line 359

music_internal_onUpdate

Type: function

Description:

File: client\SoundSystem\Music.sqf at line 364

MusicManager.sqf

getStructData(var)

Type: constant

Description:

  • Param: var

Replaced value:

(music_currentPlay get var)

File: client\SoundSystem\MusicManager.sqf at line 7

setStructData(var,val)

Type: constant

Description:

  • Param: var
  • Param: val

Replaced value:

music_currentPlay set [var,val]

File: client\SoundSystem\MusicManager.sqf at line 8

music_categories

Type: Variable

Description:

Initial value:

hashSet_createList("ambient" arg "caveambient" arg "lobby" arg "events")

File: client\SoundSystem\MusicManager.sqf at line 10

music_durations

Type: Variable

Description:

Initial value:

createHashMap

File: client\SoundSystem\MusicManager.sqf at line 11

music_currentPlay

Type: Variable

Description:

Initial value:

createHashMapFromArray [["type","nan"],["duration",0],["isplaying",false]]

File: client\SoundSystem\MusicManager.sqf at line 12

music_volume

Type: Variable

Description:

Initial value:

1

File: client\SoundSystem\MusicManager.sqf at line 13

music_mainThread_handle

Type: Variable

Description: music_counters = createHashMapFromArray []; //сколько конфигураций для музыки

Initial value:

startUpdate(music_onUpdate,0)

File: client\SoundSystem\MusicManager.sqf at line 161

music_lastPlayedTheme

Type: Variable

Description:

Initial value:

""

File: client\SoundSystem\MusicManager.sqf at line 16

music_settedLobbyTheme

Type: Variable

Description:

Initial value:

""

File: client\SoundSystem\MusicManager.sqf at line 26

music_isStartedAmbientMode

Type: Variable

Description:

Initial value:

false

File: client\SoundSystem\MusicManager.sqf at line 127

music_internal_createStruct

Type: function

Description: Создаёт структуру категории музыки

  • Param: _countSounds

File: client\SoundSystem\MusicManager.sqf at line 29

music_resetCurrentPlayMemory

Type: function

Description: сборс параметров музыки

File: client\SoundSystem\MusicManager.sqf at line 35

music_initCurrentPlayMemory

Type: function

Description: Вызывается только внутри запускатора музыки

  • Param: _t
  • Param: _d

File: client\SoundSystem\MusicManager.sqf at line 41

music_isStarted

Type: function

Description: Находится ли музыка в буфере

File: client\SoundSystem\MusicManager.sqf at line 49

music_isPlaying

Type: function

Description: играет ли музка в данный момент

File: client\SoundSystem\MusicManager.sqf at line 51

music_pause

Type: function

Description: пауза музыки

File: client\SoundSystem\MusicManager.sqf at line 54

music_return

Type: function

Description: возобновить проигрывание

File: client\SoundSystem\MusicManager.sqf at line 60

music_getPlayedTime

Type: function

Description: Вовзаращет текущее время с начала композиции

File: client\SoundSystem\MusicManager.sqf at line 71

music_play

Type: function

Description:

  • Param: _config
  • Param: _startTime (optional, default 0)

File: client\SoundSystem\MusicManager.sqf at line 75

music_stop

Type: function

Description:

  • Param: _fadetime (optional, default 0)

File: client\SoundSystem\MusicManager.sqf at line 90

music_changeToNew

Type: function

Description: плавная смена композиции

  • Param: _config
  • Param: _startTime
  • Param: _fadeOld (optional, default 5)
  • Param: _fadeNew (optional, default 5)

File: client\SoundSystem\MusicManager.sqf at line 110

music_setVolume

Type: function

Description: ----- VOLUME MUSIC MANAGMENT ------

  • Param: _fade
  • Param: _time (optional, default 0)

File: client\SoundSystem\MusicManager.sqf at line 117

music_playRandomAmbientMusic

Type: function

Description: testing sound

File: client\SoundSystem\MusicManager.sqf at line 123

music_setRoundMusicMode

Type: function

Description:

  • Param: _mode

File: client\SoundSystem\MusicManager.sqf at line 129

music_onUpdate

Type: function

Description: регулярный цикл обновления музыки

File: client\SoundSystem\MusicManager.sqf at line 143

MusicManager_experimental.sqf

MM_CHANNELS_MAX_ORDER_ID

Type: constant

Description: Layer component

Replaced value:

512

File: client\SoundSystem\MusicManager_experimental.sqf at line 35

MM_LAYER_NULL

Type: constant

Description:

Replaced value:

objnull

File: client\SoundSystem\MusicManager_experimental.sqf at line 36

MM_STATE_PLAYED

Type: constant

Description: TODO move to public header

Replaced value:

0

File: client\SoundSystem\MusicManager_experimental.sqf at line 39

MM_STATE_PAUSED

Type: constant

Description:

Replaced value:

1

File: client\SoundSystem\MusicManager_experimental.sqf at line 40

MM_STATE_STOPPED

Type: constant

Description:

Replaced value:

2

File: client\SoundSystem\MusicManager_experimental.sqf at line 41

mm_list_channels

Type: Variable

Description: elements info in mm_channels_internal_initStruct

Initial value:

[]

File: client\SoundSystem\MusicManager_experimental.sqf at line 45

mm_internal_mainThread_handle

Type: Variable

Description:

Initial value:

-1

File: client\SoundSystem\MusicManager_experimental.sqf at line 56

mm_currentChannel

Type: Variable

Description:

Initial value:

0

File: client\SoundSystem\MusicManager_experimental.sqf at line 58

mm_globalVolume

Type: Variable

Description:

Initial value:

1

File: client\SoundSystem\MusicManager_experimental.sqf at line 59

mm_channels_internal_initStruct

Type: function

Description:

File: client\SoundSystem\MusicManager_experimental.sqf at line 47

mm_init

Type: function

Description:

File: client\SoundSystem\MusicManager_experimental.sqf at line 61

mm_internal_thread_onUpdate

Type: function

Description:

File: client\SoundSystem\MusicManager_experimental.sqf at line 70

mm_channel_register

Type: function

Description:

  • Param: _id

File: client\SoundSystem\MusicManager_experimental.sqf at line 75

mm_layer_unregister

Type: function

Description:

  • Param: _channel

File: client\SoundSystem\MusicManager_experimental.sqf at line 85

mm_setChannelPlaying

Type: function

Description:

  • Param: _mode
  • Param: _channel (optional, default mm_currentChannel)

File: client\SoundSystem\MusicManager_experimental.sqf at line 98

mm_setChannelVolume

Type: function

Description:

  • Param: _vol
  • Param: _channel (optional, default mm_currentChannel)

File: client\SoundSystem\MusicManager_experimental.sqf at line 102

mm_getChannelVolume

Type: function

Description:

  • Param: _ch (optional, default mm_currentChannel)

File: client\SoundSystem\MusicManager_experimental.sqf at line 106

mm_internal_play

Type: function

Description:

  • Param: _id (optional, default mm_currentChannel)
  • Param: _config
  • Param: _startTime (optional, default 0)
  • Param: _smoothStart (optional, default 0)
  • Param: _isLooped (optional, default false)

File: client\SoundSystem\MusicManager_experimental.sqf at line 110

mm_getPlayedTime

Type: function

Description:

  • Param: _layer (optional, default mm_currentChannel)

File: client\SoundSystem\MusicManager_experimental.sqf at line 116

Sound3d.sqf

sound3d_internal_list_soundBuff

Type: Variable

Description:

Initial value:

[]

File: client\SoundSystem\Sound3d.sqf at line 169

soundProcessor_play

Type: function

Description: Рантайм вычисление процессор громкости звука

File: client\SoundSystem\Sound3d.sqf at line 19

sound3d_playOnObject

Type: function

Description: функция локальна

  • Param: _source
  • Param: _class
  • Param: _dist
  • Param: _pitch (optional, default 1)
  • Param: _offset (optional, default 0)

File: client\SoundSystem\Sound3d.sqf at line 41

sound3d_playOnObjectLooped

Type: function

Description: функция локальна

  • Param: _additionalObjects
  • Param: _3dSoundData
  • Param: _soundDuration (optional, default -1)

File: client\SoundSystem\Sound3d.sqf at line 69

sound_selfPlay

Type: function

Description: Проигрывает локальный звук

  • Param: _path
  • Param: _offset (optional, default 0)

File: client\SoundSystem\Sound3d.sqf at line 104

sound3d_playLocal

Type: function

Description: from say3D [sound, maxDistance, pitch, isSpeech, offset]

  • Param: _obj
  • Param: _clsSound
  • Param: _pitch (optional, default 1)
  • Param: _distance (optional, default 10)
  • Param: _offset (optional, default 0)

File: client\SoundSystem\Sound3d.sqf at line 113

sound3d_playLocalOnObjectLooped

Type: function

Description:

  • Param: _file
  • Param: _src
  • Param: _pitch (optional, default 1)
  • Param: _dist (optional, default 10)
  • Param: _offset (optional, default 0)
  • Param: _preendbuf (optional, default 0)
  • Param: _vol (optional, default 1)

File: client\SoundSystem\Sound3d.sqf at line 125

sound3d_stopLocalLopped

Type: function

Description:

  • Param: _soundPtr

File: client\SoundSystem\Sound3d.sqf at line 150

sound3d_internal_localHandler

Type: function

Description:

  • Param: _src
  • Param: _sid
  • Param: _preend
  • Param: _psParams

File: client\SoundSystem\Sound3d.sqf at line 170