Difference between revisions of "Microphone.new"

From GiderosMobile
Line 2: Line 2:
 
'''Available since:''' Gideros 2013.06<br/>
 
'''Available since:''' Gideros 2013.06<br/>
 
=== Description ===
 
=== Description ===
Creates a new Microphone object.
+
<translate>Creates a new Microphone object.</translate>
 
<source lang="lua">
 
<source lang="lua">
 
  Microphone.new(deviceName,sampleRate,numChannels,bitsPerSample,quality)
 
  Microphone.new(deviceName,sampleRate,numChannels,bitsPerSample,quality)
 
</source>
 
</source>
 
=== Parameters ===
 
=== Parameters ===
'''deviceName''': (string) The name of the device. Passing nil or an empty string will pick the default device. <br/>
+
'''deviceName''': (string) <translate>The name of the device. Passing nil or an empty string will pick the default device.</translate> <br/>
'''sampleRate''': (number) Sample rate of the recording. This value should be between 4000 and 44100. <br/>
+
'''sampleRate''': (number) <translate>Sample rate of the recording. This value should be between 4000 and 44100.</translate> <br/>
'''numChannels''': (number) Number of channels. This value can be 1 for mono and 2 for stereo. <br/>
+
'''numChannels''': (number) <translate>Number of channels. This value can be 1 for mono and 2 for stereo.</translate> <br/>
'''bitsPerSample''': (number) Bits per sample. This value can be 8 or 16. <br/>
+
'''bitsPerSample''': (number) <translate>Bits per sample. This value can be 8 or 16.</translate> <br/>
'''quality''': (number) Quality factor when a compression codec is used, between 0 and 1. Default to 0.5. '''optional'''<br/>
+
'''quality''': (number) <translate>Quality factor when a compression codec is used, between 0 and 1. Default to 0.5.</translate> '''optional'''<br/>

Revision as of 14:38, 23 August 2018

Available since: Gideros 2013.06

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