![]() |
Documentation for the Unity C# Library
|
Main logic for playing fxs and voice overs. More...
Public Member Functions | |
void | CleanOnceTimeVO () |
VoiceOverInfo | GetOverOverData (string voiceOverName) |
Get voice over data Info by name If VO data is missing from the data, it will return an error. | |
void | InitCurrentVoiceOverdata (VoiceOverData voData) |
Init current voiceover data. | |
bool | IsPlaying (string fxName) |
If the clip is missing from the data, it will return an error. | |
void | MuteRepeatableSound () |
Mute repeatable sound volume. | |
void | PauseRepeatable () |
Pause currently playing repeatable voice over and save its state Stop currently playing repeatable and saving the moment at which the music ended without notifying of the step manager. | |
int | PlayFX (string fxName) |
Play FX by fx name. | |
void | PlayFX (string fxName, bool loop) |
Play FX by fx name If the clip is missing from the data, it will return an error. | |
void | PlayFX (string fxName, float volume, bool loop) |
Play FX by fx name If the clip is missing from the data, it will return an error. | |
void | PlayLastRepeatable () |
Play last played repeatable voice over from the moment it stopped. | |
void | PlayOnceTime (AudioClip clip, string voiceOverName) |
Play once time audio clip. | |
void | PlayOnceTime (string voiceOverName) |
Play once time by voice over name. | |
void | PlayOnlyOneFX (string fxName) |
Play fx by name and stop the others that are playing. | |
void | PlayRepeatable (AudioClip clip, string voiceOverName) |
Play repeatable voice over. | |
void | PlayRepeatable (string voiceOverName) |
Play voice repeating it at a certain time intervals. | |
int | PlaySpatiallyFX (string fxName, float volume, bool loop, Transform sourceTransform) |
Play 3d FX by fx name If the clip is missing from the data, it will return an error. | |
void | PlayVoice (AudioClip clip) |
Play voice over audio clip. | |
void | PlayVoice (string voiceOver) |
Play voice over by id If the clip is missing from the data, it will return an error. | |
void | SetRepeatableSoundVolume (float volume) |
Set repeatable sound volume. | |
void | SetSfxPitch (int audioID, float pitch) |
Set sfx pitch by audio id. | |
void | SetSfxVolume (int audioID, float volume) |
Set fx volume by audio id. | |
void | SetSfxVolume (string name, float volume) |
Set sfx volume If the clip is missing from the data, it will return an warning. | |
void | StopAllFx () |
Stop all fxs. | |
void | StopAllVoiceOvers () |
Stop all voice overs. | |
void | StopFx (string fxName) |
Stop fx by name If the clip is missing from the data, it will return an error. | |
void | StopFxById (int fxId) |
Stop fx by id If the clip is missing from the data, it will return an warning. | |
void | StopOnceTimeTemporarily () |
Stop currently playing voice over. | |
void | StopPlaying () |
Stop all fxs. | |
void | StopRepeatable () |
Stop currently playing repeatable voice over and remove its state Used for hard manual stop without notifying of the step manager. | |
void | StopRepeatableTemporarily () |
Temporarily stop currently playing repeatable voice over Stop currently playing repeatable and saving the moment at which the music ended with notifying of the step manager. | |
void | UpdateLastRepeatable (string voiceOverName) |
Update last repeatable Used to restore the last played audio. | |
Properties | |
RepeatableAudio | LastPlayedRepeatableAudio [get, private set] |
RepeatableAudio | PlayOnceAudio [get, private set] |
Events | |
Action< string > | OnceTimeAudioStopped |
Action | RepeatableAudioStopped |
Private Member Functions | |
void | ConfigureAudioSource (Hellmade.Sound.Audio audio, SpatialSoundSettings spatialSoundSettings) |
SpatialSoundSettings | GetSpatialSoundSettings (VoiceOverInfo voiceOverInfo) |
void | OnAudioStopped (Hellmade.Sound.Audio audio) |
void | OnDestroy () |
int | PlayMusicWithParams (AudioClip clip) |
IEnumerator | PlayRepeatableCoroutine () |
void | Start () |
Private Attributes | |
bool | _isSoundMuted = false |
Hellmade.Sound.Audio | _lastStartedVO |
Coroutine | _playRepeatableCoroutine |
SpatialSoundSettings | defaultSpatialSoundSettings |
[SerializeField] | |
VoiceOverData | soundsFx |
[SerializeField] | |
VoiceOverData | voices |
[SerializeField] | |
Static Private Attributes | |
const float | _mutedVolume = 0.001f |
const float | _soundRepeatDelay = 30 |
Main logic for playing fxs and voice overs.
Definition at line 11 of file AudioService.cs.
|
inline |
|
inlineprivate |
|
inline |
Get voice over data Info by name If VO data is missing from the data, it will return an error.
voiceOverName | id to search for a clip in the VO data |
Definition at line 65 of file AudioService.cs.
|
inlineprivate |
|
inline |
Init current voiceover data.
voData |
Definition at line 54 of file AudioService.cs.
|
inline |
If the clip is missing from the data, it will return an error.
fxName | id to search for a clip in the VO data |
Definition at line 82 of file AudioService.cs.
|
inline |
Mute repeatable sound volume.
Definition at line 627 of file AudioService.cs.
|
inlineprivate |
Definition at line 462 of file AudioService.cs.
|
inlineprivate |
|
inline |
Pause currently playing repeatable voice over and save its state Stop currently playing repeatable and saving the moment at which the music ended without notifying of the step manager.
Definition at line 525 of file AudioService.cs.
|
inline |
Play FX by fx name.
fxName | id to search for a clip in the VO data |
Definition at line 101 of file AudioService.cs.
|
inline |
Play FX by fx name If the clip is missing from the data, it will return an error.
fxName | id to search for a clip in the VO data |
loop |
Definition at line 120 of file AudioService.cs.
|
inline |
Play FX by fx name If the clip is missing from the data, it will return an error.
fxName | id to search for a clip in the VO data |
volume | |
loop |
Definition at line 140 of file AudioService.cs.
|
inline |
Play last played repeatable voice over from the moment it stopped.
Definition at line 490 of file AudioService.cs.
|
inlineprivate |
Definition at line 661 of file AudioService.cs.
|
inline |
Play once time audio clip.
clip | |
voiceOverName | id to search for a clip in the VO data |
Definition at line 440 of file AudioService.cs.
|
inline |
Play once time by voice over name.
voiceOverName | id to search for a clip in the VO data |
Definition at line 383 of file AudioService.cs.
|
inline |
Play fx by name and stop the others that are playing.
fxName | id to search for a clip in the VO data |
Definition at line 306 of file AudioService.cs.
|
inline |
Play repeatable voice over.
clip | |
voiceOverName | id to search for a clip in the VO data |
Definition at line 415 of file AudioService.cs.
|
inline |
Play voice repeating it at a certain time intervals.
voiceOverName | id to search for a clip in the VO data |
Definition at line 363 of file AudioService.cs.
|
inlineprivate |
Definition at line 634 of file AudioService.cs.
|
inline |
Play 3d FX by fx name If the clip is missing from the data, it will return an error.
fxName | id to search for a clip in the VO data |
volume | |
loop |
Definition at line 161 of file AudioService.cs.
|
inline |
Play voice over audio clip.
clip |
Definition at line 352 of file AudioService.cs.
|
inline |
Play voice over by id If the clip is missing from the data, it will return an error.
voiceOver | id to search for a clip in the VO data |
Definition at line 334 of file AudioService.cs.
|
inline |
Set repeatable sound volume.
volume |
Definition at line 609 of file AudioService.cs.
|
inline |
Set sfx pitch by audio id.
audioID | |
pitch |
Definition at line 251 of file AudioService.cs.
|
inline |
Set fx volume by audio id.
audioID | |
volume |
Definition at line 220 of file AudioService.cs.
|
inline |
Set sfx volume If the clip is missing from the data, it will return an warning.
name | id to search for a clip in the VO data |
volume |
Definition at line 231 of file AudioService.cs.
|
inlineprivate |
|
inline |
Stop all fxs.
Definition at line 599 of file AudioService.cs.
|
inline |
Stop all voice overs.
Definition at line 590 of file AudioService.cs.
|
inline |
Stop fx by name If the clip is missing from the data, it will return an error.
fxName | id to search for a clip in the VO data |
Definition at line 265 of file AudioService.cs.
|
inline |
Stop fx by id If the clip is missing from the data, it will return an warning.
fxId | id to search for a clip in the VO data |
Definition at line 288 of file AudioService.cs.
|
inline |
Stop currently playing voice over.
Definition at line 564 of file AudioService.cs.
|
inline |
Stop all fxs.
Definition at line 324 of file AudioService.cs.
|
inline |
Stop currently playing repeatable voice over and remove its state Used for hard manual stop without notifying of the step manager.
Definition at line 506 of file AudioService.cs.
|
inline |
Temporarily stop currently playing repeatable voice over Stop currently playing repeatable and saving the moment at which the music ended with notifying of the step manager.
Definition at line 543 of file AudioService.cs.
|
inline |
Update last repeatable Used to restore the last played audio.
voiceOverName | id to search for a clip in the VO data |
Definition at line 395 of file AudioService.cs.
|
private |
Definition at line 31 of file AudioService.cs.
|
private |
Definition at line 38 of file AudioService.cs.
|
staticprivate |
Definition at line 30 of file AudioService.cs.
|
private |
Definition at line 33 of file AudioService.cs.
|
staticprivate |
Definition at line 29 of file AudioService.cs.
|
privateSerializeField |
[SerializeField]
Definition at line 24 of file AudioService.cs.
|
privateSerializeField |
[SerializeField]
Definition at line 20 of file AudioService.cs.
|
privateSerializeField |
[SerializeField]
Definition at line 16 of file AudioService.cs.
|
getprivate set |
Definition at line 26 of file AudioService.cs.
|
getprivate set |
Definition at line 27 of file AudioService.cs.
Action<string> PixoVR.Audio.AudioService.OnceTimeAudioStopped |
Definition at line 36 of file AudioService.cs.
Action PixoVR.Audio.AudioService.RepeatableAudioStopped |
Definition at line 35 of file AudioService.cs.