Members
(inner) sample
- Source:
convert from 16 bit linear to ulaw
(inner) sign
- Source:
get the sample into sign-magnitude
Methods
(static) decode(samplesnon-null) → (non-null) {Int16Array}
- Source:
Decode 8-bit mu-Law samples into 16-bit PCM samples.
Parameters:
Name | Type | Description |
---|---|---|
samples |
Uint8Array | A array of 8-bit mu-Law samples. |
Returns:
- Type
- Int16Array
(static) decodeSample(muLawSample) → {number}
- Source:
Decode a 8-bit mu-Law sample as 16-bit PCM.
Parameters:
Name | Type | Description |
---|---|---|
muLawSample |
number | The 8-bit mu-Law sample |
Returns:
- Type
- number
(static) encode(samplesnon-null) → (non-null) {Uint8Array}
- Source:
Encode 16-bit linear PCM samples into 8-bit mu-Law samples.
Parameters:
Name | Type | Description |
---|---|---|
samples |
Int16Array | A array of 16-bit PCM samples. |
Returns:
- Type
- Uint8Array
(static) encodeSample(sample) → {number}
- Source:
Encode a 16-bit linear PCM sample as 8-bit mu-Law.
Parameters:
Name | Type | Description |
---|---|---|
sample |
number | A 16-bit PCM sample |
Returns:
- Type
- number