HolyLib Wiki

voicechat.LoadVoiceStream

 VoiceStream, number voicechat.LoadVoiceStream( string fileName, string gamePath = DATA, function callback = nil )

Description

Tries to load a VoiceStream from the given file.
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.

This function also supports .wav files to load from since 0.8

Recently Changed

This was recently changed in version (0.8).

The async argument was removed and the behavior was changed
If a callback is specified it WONT return anything and the callback will be called, as it will execute everythign async.

Arguments

1string fileName

the fileName to use

2string gamePath = DATA

the gamePath to use

3function 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

Function return argument(s):

Returns

1VoiceStream voiceStream

the loaded VoiceStream or nil on failure.

2number statusCode

the statusCode. 1 on success