Files |
file | pcm_simple.c |
| PCM Simple Interface.
|
Enumerations |
enum | snd_spcm_latency_t { SND_SPCM_LATENCY_STANDARD = 0,
SND_SPCM_LATENCY_MEDIUM,
SND_SPCM_LATENCY_REALTIME
} |
enum | snd_spcm_xrun_type_t { SND_SPCM_XRUN_IGNORE = 0,
SND_SPCM_XRUN_STOP
} |
enum | snd_spcm_duplex_type_t { SND_SPCM_DUPLEX_LIBERAL = 0,
SND_SPCM_DUPLEX_PEDANTIC
} |
Functions |
int | snd_spcm_init (snd_pcm_t *pcm, unsigned int rate, unsigned int channels, snd_pcm_format_t format, snd_pcm_subformat_t subformat, snd_spcm_latency_t latency, snd_pcm_access_t _access, snd_spcm_xrun_type_t xrun_type) |
| Set up a simple PCM.
|
int | snd_spcm_init_duplex (snd_pcm_t *playback_pcm, snd_pcm_t *capture_pcm, unsigned int rate, unsigned int channels, snd_pcm_format_t format, snd_pcm_subformat_t subformat, snd_spcm_latency_t latency, snd_pcm_access_t _access, snd_spcm_xrun_type_t xrun_type, snd_spcm_duplex_type_t duplex_type) |
| Initialize simple PCMs in the duplex mode.
|
int | snd_spcm_init_get_params (snd_pcm_t *pcm, unsigned int *rate, snd_pcm_uframes_t *buffer_size, snd_pcm_uframes_t *period_size) |
| Get the set up of simple PCM.
|
Detailed Description
See the PCM (digital audio) interface page for more details.
Enumeration Type Documentation
Simple PCM duplex type
- Enumerator:
SND_SPCM_DUPLEX_LIBERAL |
liberal duplex - the buffer and period sizes might not match
|
SND_SPCM_DUPLEX_PEDANTIC |
pedantic duplex - the buffer and period sizes MUST match
|
Simple PCM latency type
- Enumerator:
SND_SPCM_LATENCY_STANDARD |
standard latency - for standard playback or capture (estimated latency in one direction 350ms)
|
SND_SPCM_LATENCY_MEDIUM |
medium latency - software phones etc. (estimated latency in one direction maximally 25ms
|
SND_SPCM_LATENCY_REALTIME |
realtime latency - realtime applications (effect processors etc.) (estimated latency in one direction 5ms and better)
|
Simple PCM xrun type
- Enumerator:
SND_SPCM_XRUN_IGNORE |
driver / library will ignore all xruns, the stream runs forever
|
SND_SPCM_XRUN_STOP |
driver / library stops the stream when an xrun occurs
|
Function Documentation
Set up a simple PCM.
- Parameters:
-
| pcm | PCM handle - Parameters:
-
| rate | Sample rate - Parameters:
-
| channels | Number of channels - Parameters:
-
| format | PCM format - Parameters:
-
| subformat | PCM subformat - Parameters:
-
| latency | Latency type - Parameters:
-
| access | PCM acceess type - Parameters:
-
| xrun_type | XRUN type - Returns:
- 0 if successful, or a negative error code
- Warning:
- The simple PCM API may be broken in the current release.
|
|
|
|
|
|
|
|
Initialize simple PCMs in the duplex mode.
- Parameters:
-
| playback_pcm | PCM handle for playback - Parameters:
-
| capture_pcm | PCM handle for capture - Parameters:
-
| rate | Sample rate - Parameters:
-
| channels | Number of channels - Parameters:
-
| format | PCM format - Parameters:
-
| subformat | PCM subformat - Parameters:
-
| latency | Latency type - Parameters:
-
| access | PCM acceess type - Parameters:
-
| xrun_type | XRUN type - Parameters:
-
| duplex_type | Duplex mode - Returns:
- 0 if successful, or a negative error code
- Warning:
- The simple PCM API may be broken in the current release.
|
|
|
|
|
|
|
|
|
|
Get the set up of simple PCM.
- Parameters:
-
| pcm | PCM handle - Parameters:
-
| rate | Pointer to store the current sample rate - Parameters:
-
| buffer_size | Pointer to store the current buffer size - Parameters:
-
| period_size | Pointer to store the current period size - Returns:
- 0 if successful, or a negative error code
- Warning:
- The simple PCM API may be broken in the current release.
|
|
|
|