|
@@ -3,12 +3,50 @@ return {
|
|
description = [[
|
|
description = [[
|
|
Returns a new SoundData with all of the buffered audio samples that the Microphone has recorded.
|
|
Returns a new SoundData with all of the buffered audio samples that the Microphone has recorded.
|
|
]],
|
|
]],
|
|
- arguments = {},
|
|
|
|
- returns = {
|
|
|
|
|
|
+ arguments = {
|
|
|
|
+ {
|
|
|
|
+ name = 'soundData',
|
|
|
|
+ type = 'soundData',
|
|
|
|
+ description = 'The `SoundData` to fill with audio (instead of this method creating a new one).'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name = 'sampleCount',
|
|
|
|
+ type = 'number',
|
|
|
|
+ description = 'How many samples of audio to get right now, at most. If less is available, you will get less.'
|
|
|
|
+ },
|
|
{
|
|
{
|
|
- name = 'channels',
|
|
|
|
|
|
+ name = 'offset',
|
|
type = 'number',
|
|
type = 'number',
|
|
- description = 'The number of channels recorded.'
|
|
|
|
|
|
+ description = 'Index in samples into `soundData` at which to start to overwrite with new audio data from the microphone\'s internal buffer.'
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ returns = {
|
|
|
|
+ {
|
|
|
|
+ name = 'soundData',
|
|
|
|
+ type = 'soundData',
|
|
|
|
+ description = 'A `SoundData` with `sampleCount` of samples in it (or less if less was available; or all if sampleCount was not given). Nothing is returned if no data is available.'
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ variants = {
|
|
|
|
+ {
|
|
|
|
+ description = "Get all available audio as a newly created `SoundData`",
|
|
|
|
+ arguments = { },
|
|
|
|
+ returns = { 'soundData' }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ description = "Get at most `sampleCount` samples from the microphone\'s internal queue as a newly created `SoundData`",
|
|
|
|
+ arguments = { 'sampleCount' },
|
|
|
|
+ returns = { 'soundData' }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ description = "Get at all available audio and write it into `soundData`.",
|
|
|
|
+ arguments = { 'soundData' },
|
|
|
|
+ returns = { 'soundData' }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ description = "Get at all available audio and write it into `soundData` starting at 'offset' samples into `soundData`.",
|
|
|
|
+ arguments = { 'soundData', 'offset' },
|
|
|
|
+ returns = { 'soundData' }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
notes = [[
|
|
notes = [[
|