SaveVoiceStream
number, string voicechat.SaveVoiceStream( VoiceStream voiceStream, string fileName = nil, string gamePath = DATA, function callback = nil, boolean returnWaveData = false )
Description
Sends the given voice data to the given client.
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 write the data into since 0.8
.
You should always inform your players if you save their voice!
You can set both fileName
and returnWaveData
which will cause it to be written to disk and the data to be returned
If fileName
and returnWaveData
are both not set then it will error as atleast one of them needs to be enabled.
Recently Changed
This was recently changed in version (0.8 - DEV).
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
2string fileName = nil
the fileName to use. This can also be the callback function, in which case it will internally enable
returnWaveData
& behave like itReturns
Example
Showing the agument overloads