HolyLib Wiki

voicechat.ApplyEffect

  voicechat.ApplyEffect( table effectData, VoiceData voiceData, function callback = nil )

Description

Applies the given effectData to the given Data/Stream.
If a callback is specified it WONT return anything and the callback will be called, as it will execute everythign async.
If you want it to not run async, simply provide no callback function, it will return true on success

It should be safe to modify/use the VoiceStream while it's being modified async BUT you should try to avoid doing that.

Recently Added

This was recently added in version (0.8 - DEV).

Arguments

1table effectData

The effect data that should be applied to the VoiceData

2VoiceData voiceData

The Voice data to apply the effect onto. Can also be a VoiceStream

3function callback = nil

The callback function to use. If one is given it will apply the effect async. Without a callback it won't be async!

Function argument(s):
1VoiceStream voiceStream -

the loaded VoiceStream or nil on failure

2number statusCode -

the statusCode. 1 on success

Function return argument(s):

Example

All currently valid effectData inputs

{ ContinueOnFailure = true, -- If you process a VoiceStream and it fails to apply a effect for some reason it will still proceed and ignore the failure -- Volume effect EffectName = "Volume", Volume = 1.0, -- The volume for the audio }