Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages   Examples  

Software Parameters
[PCM Interface]


Defines

#define snd_pcm_sw_params_alloca(ptr)
 allocate an invalid snd_pcm_sw_params_t using standard alloca


Functions

size_t snd_pcm_sw_params_sizeof (void)
 get size of snd_pcm_sw_params_t

int snd_pcm_sw_params_malloc (snd_pcm_sw_params_t **ptr)
 allocate an invalid snd_pcm_sw_params_t using standard malloc

void snd_pcm_sw_params_free (snd_pcm_sw_params_t *obj)
 frees a previously allocated snd_pcm_sw_params_t

void snd_pcm_sw_params_copy (snd_pcm_sw_params_t *dst, const snd_pcm_sw_params_t *src)
 copy one snd_pcm_sw_params_t to another

int snd_pcm_sw_params_set_tstamp_mode (snd_pcm_t *pcm, snd_pcm_sw_params_t *params, snd_pcm_tstamp_t val)
 Set timestamp mode inside a software configuration container.

int snd_pcm_sw_params_set_sleep_min (snd_pcm_t *pcm, snd_pcm_sw_params_t *params, unsigned int val)
 Set minimum number of ticks to sleep inside a software configuration container.

int snd_pcm_sw_params_set_avail_min (snd_pcm_t *pcm, snd_pcm_sw_params_t *params, snd_pcm_uframes_t val)
 Set avail min inside a software configuration container.

int snd_pcm_sw_params_set_xfer_align (snd_pcm_t *pcm, snd_pcm_sw_params_t *params, snd_pcm_uframes_t val)
 Set xfer align inside a software configuration container.

int snd_pcm_sw_params_set_start_threshold (snd_pcm_t *pcm, snd_pcm_sw_params_t *params, snd_pcm_uframes_t val)
 Set start threshold inside a software configuration container.

int snd_pcm_sw_params_set_stop_threshold (snd_pcm_t *pcm, snd_pcm_sw_params_t *params, snd_pcm_uframes_t val)
 Set stop threshold inside a software configuration container.

int snd_pcm_sw_params_set_silence_threshold (snd_pcm_t *pcm, snd_pcm_sw_params_t *params, snd_pcm_uframes_t val)
 Set silence threshold inside a software configuration container.

int snd_pcm_sw_params_set_silence_size (snd_pcm_t *pcm, snd_pcm_sw_params_t *params, snd_pcm_uframes_t val)
 Set silence size inside a software configuration container.


Detailed Description

See the PCM (digital audio) interface page for more details.

Define Documentation

#define snd_pcm_sw_params_alloca ptr   
 

allocate an invalid snd_pcm_sw_params_t using standard alloca

Parameters:
ptr  returned pointer
Examples:
/test/latency.c, and /test/pcm.c.


Function Documentation

void snd_pcm_sw_params_copy snd_pcm_sw_params_t   dst,
const snd_pcm_sw_params_t   src
 

copy one snd_pcm_sw_params_t to another

Parameters:
dst  pointer to destination
src  pointer to source

void snd_pcm_sw_params_free snd_pcm_sw_params_t   obj
 

frees a previously allocated snd_pcm_sw_params_t

Parameters:
pointer  to object to free

int snd_pcm_sw_params_malloc snd_pcm_sw_params_t **    ptr
 

allocate an invalid snd_pcm_sw_params_t using standard malloc

Parameters:
ptr  returned pointer
Returns:
0 on success otherwise negative error code

int snd_pcm_sw_params_set_avail_min snd_pcm_t   pcm,
snd_pcm_sw_params_t   params,
snd_pcm_uframes_t    val
 

Set avail min inside a software configuration container.

Parameters:
pcm  PCM handle
params  Software configuration container
val  Minimum avail frames to consider PCM ready
Returns:
0 otherwise a negative error code
Note: This is similar to setting an OSS wakeup point. The valid values for 'val' are determined by the specific hardware. Most PC sound cards can only accept power of 2 frame counts (i.e. 512, 1024, 2048). You cannot use this as a high resolution timer - it is limited to how often the sound card hardware raises an interrupt. Note that you can greatly improve the reponses using Software Parameters where another timing source is used.
Examples:
/test/latency.c, and /test/pcm.c.

int snd_pcm_sw_params_set_silence_size snd_pcm_t   pcm,
snd_pcm_sw_params_t   params,
snd_pcm_uframes_t    val
 

Set silence size inside a software configuration container.

Parameters:
pcm  PCM handle
params  Software configuration container
val  Silence size in frames (0 for disabled)
Returns:
0 otherwise a negative error code
A portion of playback buffer is overwritten with silence when playback underrun is nearer than silence threshold (see snd_pcm_sw_params_set_silence_threshold)

int snd_pcm_sw_params_set_silence_threshold snd_pcm_t   pcm,
snd_pcm_sw_params_t   params,
snd_pcm_uframes_t    val
 

Set silence threshold inside a software configuration container.

Parameters:
pcm  PCM handle
params  Software configuration container
val  Silence threshold in frames
Returns:
0 otherwise a negative error code
A portion of playback buffer is overwritten with silence (see snd_pcm_sw_params_set_silence_size) when playback underrun is nearer than silence threshold

int snd_pcm_sw_params_set_sleep_min snd_pcm_t   pcm,
snd_pcm_sw_params_t   params,
unsigned int    val
 

Set minimum number of ticks to sleep inside a software configuration container.

Parameters:
pcm  PCM handle
params  Software configuration container
val  Minimum ticks to sleep or 0 to disable the use of tick timer
Returns:
0 otherwise a negative error code
Examples:
/test/latency.c.

int snd_pcm_sw_params_set_start_threshold snd_pcm_t   pcm,
snd_pcm_sw_params_t   params,
snd_pcm_uframes_t    val
 

Set start threshold inside a software configuration container.

Parameters:
pcm  PCM handle
params  Software configuration container
val  Start threshold in frames
Returns:
0 otherwise a negative error code
PCM is automatically started when playback frames available to PCM are >= threshold or when requested capture frames are >= threshold
Examples:
/test/latency.c, and /test/pcm.c.

int snd_pcm_sw_params_set_stop_threshold snd_pcm_t   pcm,
snd_pcm_sw_params_t   params,
snd_pcm_uframes_t    val
 

Set stop threshold inside a software configuration container.

Parameters:
pcm  PCM handle
params  Software configuration container
val  Stop threshold in frames
Returns:
0 otherwise a negative error code
PCM is automatically stopped in SND_PCM_STATE_XRUN state when available frames is >= threshold

int snd_pcm_sw_params_set_tstamp_mode snd_pcm_t   pcm,
snd_pcm_sw_params_t   params,
snd_pcm_tstamp_t    val
 

Set timestamp mode inside a software configuration container.

Parameters:
pcm  PCM handle
params  Software configuration container
val  Timestamp mode
Returns:
0 otherwise a negative error code

int snd_pcm_sw_params_set_xfer_align snd_pcm_t   pcm,
snd_pcm_sw_params_t   params,
snd_pcm_uframes_t    val
 

Set xfer align inside a software configuration container.

Parameters:
pcm  PCM handle
params  Software configuration container
val  Chunk size (frames are attempted to be transferred in chunks)
Returns:
0 otherwise a negative error code
Examples:
/test/latency.c, and /test/pcm.c.

size_t snd_pcm_sw_params_sizeof void   
 

get size of snd_pcm_sw_params_t

Returns:
size in bytes


Generated on Thu Feb 20 16:45:50 2003 for ALSA project - the C library reference by doxygen1.2.18