Process audio in any format and size.
More...
|
enum | cloudx1_SampleFormat {
INVALID_FORMAT =0
, S16_LE
, S16_BE
, S24_LE
,
S24_BE
, S32_LE
, S32_BE
, F32_LE
,
F32_BE
, S16_NATIVE =S16_LE
, S24_NATIVE =S24_LE
, S32_NATIVE =S32_LE
,
F32_NATIVE =F32_LE
} |
|
This allows various payload size and formats, at the expense of internal conversions. This can be useful when receiving audio from network.
◆ cloudx1_SampleFormat
Supported formats for audio I/O
Enumerator |
---|
INVALID_FORMAT | Invalid.
|
S16_LE | 16-bit signed integer, little-endian
|
S16_BE | 16-bit signed integer, big-endian
|
S24_LE | 24-bit signed integer, little-endian
|
S24_BE | 24-bit signed integer, big-endian
|
S32_LE | 32-bit signed integer, little-endian
|
S32_BE | 32-bit signed integer, big-endian
|
F32_LE | 32-bit floating-point, little-endian
|
F32_BE | 32-bit floating-point, big-endian
|
S16_NATIVE | 16-bit signed integer, native
|
S24_NATIVE | 24-bit signed integer, native
|
S32_NATIVE | 32-bit signed integer, native
|
F32_NATIVE | 32-bit floating-point, native
|
Definition at line 774 of file sound4.x1.cloud.h.
◆ cloudx1_AddAudio()
Convert and process the payload.
- Parameters
-
instance | the processing instance |
payload | the binary raw audio buffer |
nFrame | the number of frames in the payload |
fmt | the format of the payload |
- Returns
- number of unprocessed frames (if can not store output) if non zero, consume output and restart where it stopped
◆ cloudx1_AddPadAudio()
Add silence to finish the current audio chunk and process it
- Parameters
-
instance | the processing instance |
- Returns
- number of added silence frame
◆ cloudx1_GetAudio()
Consume the output
- Parameters
-
instance | the processing instance |
payload | the binary raw audio buffer to store output |
max_nFrame | the maximum number of frames that can be stored in the payload |
fmt | the wanted format of the payload |
- Returns
- number of frames put in the buffer
◆ cloudx1_GetBytesFromFormat()
Get the format byte size
- Parameters
-
- Returns
- the number of bytes used by this format for a single channel audio sample
◆ cloudx1_GetFormatFromName()
Convert string to format
- Parameters
-
- Returns
- the matching format, or INVALID_FORMAT if invalid.
◆ cloudx1_GetFormatName()
Convert format to string
- Parameters
-
- Returns
- the string name of the format
◆ cloudx1_GetMaxPacketFrame()
Maximum packet size (in frames) that can be queued at output.
- Parameters
-
instance | The process instance |
- Returns
- Maximum packet size (in frames) that can be queued at output.
◆ cloudx1_GetOutputCount()
Get the available output size
- Parameters
-
instance | the processing instance |
- Returns
- number of available frames at output