sound recording functions.
Members
# inner DOJS_ENCODING
Properties:
Name | Type | Description |
---|---|---|
DOJS_ENCODING |
string
|
the current text encoding used by DOjS. Usually "UTF8". other possible values are "ASCII", "ASCII_CP", "UNICODE" and "UNKNOWN" |
# inner SNDIN_8BIT
Properties:
Name | Type | Description |
---|---|---|
SNDIN_8BIT |
boolean
|
true if 8bit input is available. |
# inner SNDIN_16BIT
Properties:
Name | Type | Description |
---|---|---|
SNDIN_16BIT |
boolean
|
true if 16bit input is available. |
# inner SNDIN_AVAILABLE
Properties:
Name | Type | Description |
---|---|---|
SNDIN_AVAILABLE |
boolean
|
true if sound recording is available. |
# inner SNDIN_STEREO
Properties:
Name | Type | Description |
---|---|---|
SNDIN_STEREO |
boolean
|
true if stereo input is available. |
Methods
# inner ReadSoundInput() → {Array.<number>}
get the actuall sound data.
returns one or two arrays with sound data or null if no data available.
Array.<number>
# inner SoundInputSource(src)
select sound input source.
Parameters:
Name | Type | Description |
---|---|---|
src |
*
|
a value from SOUND. |
# inner SoundStartInput(rate, bits, stereo)
start sound recording with given parameters.
Parameters:
Name | Type | Description |
---|---|---|
rate |
number
|
sample rate. |
bits |
number
|
8 or 16 bits. |
stereo |
boolean
|
true for stereo recording. |