HolyLib Wiki

LoadVoiceStreamFromWaveString

  VoiceStream, number voicechat.LoadVoiceStreamFromWaveString( string waveData, function callback = nil, boolean promiseToNeverModify = false )

Description

Tries to load a VoiceStream from the given data.
Meaning of the statusCode:

Number Meaning
-2 File not found
-1 Invalid type
0 None
1 Done

If async was used, it won't return anything.

Recently Added

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

Arguments

1string waveData
the fileName to use
2function callback = nil

the callback function to use

Function argument(s):
1VoiceStream voiceStream - the loaded VoiceStream or nil on failure
2number statusCode - the statusCode. 1 on success

3boolean promiseToNeverModify = false
If set to true, it will reference the waveData instead of copying it reducing memory usage and improving speed though you need to keep your promise of never modifying it while it's in use!

Returns

1VoiceStream voiceStream
the loaded VoiceStream or nil on failure.
2number statusCode
the statusCode. 1 on success