Difference between revisions of "Microphone.new"

From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
<languages />
+
'''Available since:''' Gideros 2013.06<br/>
'''<translate>Available since</translate>:''' Gideros 2013.06<br/>
+
'''Class:''' [[Microphone]]<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/Microphone|Microphone]]<br/>
+
 
=== <translate>Description</translate> ===
+
=== Description ===
<translate>Creates a new Microphone object.</translate>
+
Creates a new Microphone object.
<source lang="lua">
+
<syntaxhighlight lang="lua">
Microphone.new(deviceName,sampleRate,numChannels,bitsPerSample,quality)
+
Microphone.new(deviceName,sampleRate,numChannels,bitsPerSample,quality)
</source>
+
</syntaxhighlight>
=== <translate>Parameters</translate> ===
+
 
'''deviceName''': (string) <translate>The name of the device. Passing nil or an empty string will pick the default device.</translate> <br/>
+
=== Parameters ===
'''sampleRate''': (number) <translate>Sample rate of the recording. This value should be between 4000 and 44100.</translate> <br/>
+
'''deviceName''': (string) the name of the device. Passing nil or an empty string will pick the default device<br/>
'''numChannels''': (number) <translate>Number of channels. This value can be 1 for mono and 2 for stereo.</translate> <br/>
+
'''sampleRate''': (number) sample rate of the recording. This value should be between 4000 and 44100<br/>
'''bitsPerSample''': (number) <translate>Bits per sample. This value can be 8 or 16.</translate> <br/>
+
'''numChannels''': (number) number of channels. This value can be 1 for mono and 2 for stereo<br/>
'''quality''': (number) <translate>Quality factor when a compression codec is used, between 0 and 1. Default to 0.5.</translate> '''optional'''<br/>
+
'''bitsPerSample''': (number) bits per sample. This value can be 8 or 16<br/>
 +
'''quality''': (number) quality factor when a compression codec is used, between 0 and 1. Default to 0.5 '''optional'''<br/>
 +
 
 +
{{Microphone}}

Latest revision as of 14:30, 13 July 2023

Available since: Gideros 2013.06
Class: Microphone

Description

Creates a new Microphone object.

Microphone.new(deviceName,sampleRate,numChannels,bitsPerSample,quality)

Parameters

deviceName: (string) the name of the device. Passing nil or an empty string will pick the default device
sampleRate: (number) sample rate of the recording. This value should be between 4000 and 44100
numChannels: (number) number of channels. This value can be 1 for mono and 2 for stereo
bitsPerSample: (number) bits per sample. This value can be 8 or 16
quality: (number) quality factor when a compression codec is used, between 0 and 1. Default to 0.5 optional