mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-04 13:30:08 -05:00
Added ommited clear() functions
This commit is contained in:
parent
8205a95376
commit
170a5d0d7b
1 changed files with 44 additions and 4 deletions
|
|
@ -382,14 +382,14 @@ Using standalone, it is a light method to obtain current stream position,
|
||||||
because it does not require the user <-> kernel context switch, but the value
|
because it does not require the user <-> kernel context switch, but the value
|
||||||
is less accurate, because ring buffer pointers are updated in kernel drivers
|
is less accurate, because ring buffer pointers are updated in kernel drivers
|
||||||
only when an interrupt occurs. If you want to get accurate stream state,
|
only when an interrupt occurs. If you want to get accurate stream state,
|
||||||
use functions \link ::snd_pcm_avail \endlink or \link ::snd_pcm_delay \endlink.
|
use functions \link ::snd_pcm_hwsync \endlink or \link ::snd_pcm_delay \endlink.
|
||||||
Note that both of these functions do not update the current r/w pointer
|
Note that both of these functions do not update the current r/w pointer
|
||||||
for applications, so the function \link ::snd_pcm_avail_update \endlink must
|
for applications, so the function \link ::snd_pcm_avail_update \endlink must
|
||||||
be called afterwards before any read/write begin+commit operations.
|
be called afterwards before any read/write begin+commit operations.
|
||||||
<p>
|
<p>
|
||||||
The function \link ::snd_pcm_avail \endlink returns current available space
|
The function \link ::snd_pcm_hwsync \endlink reads the current hardware pointer
|
||||||
in the ring buffer. Note that this function does not update the current r/w
|
in the ring buffer from hardware. Note that this function does not update the current
|
||||||
pointer for applications, so the function \link ::snd_pcm_avail_update \endlink
|
r/w pointer for applications, so the function \link ::snd_pcm_avail_update \endlink
|
||||||
must be called afterwards before any read/write/begin+commit operations.
|
must be called afterwards before any read/write/begin+commit operations.
|
||||||
<p>
|
<p>
|
||||||
The function \link ::snd_pcm_delay \endlink returns the delay in samples.
|
The function \link ::snd_pcm_delay \endlink returns the delay in samples.
|
||||||
|
|
@ -2777,6 +2777,16 @@ void snd_pcm_hw_params_free(snd_pcm_hw_params_t *obj)
|
||||||
free(obj);
|
free(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief clear snd_pcm_hw_params_t structure
|
||||||
|
* \param obj pointer to structure
|
||||||
|
*/
|
||||||
|
void snd_pcm_hw_params_clear(snd_pcm_hw_params_t *obj)
|
||||||
|
{
|
||||||
|
assert(obj);
|
||||||
|
memset(obj, 0, snd_pcm_hw_params_sizeof());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief copy one #snd_pcm_hw_params_t to another
|
* \brief copy one #snd_pcm_hw_params_t to another
|
||||||
* \param dst pointer to destination
|
* \param dst pointer to destination
|
||||||
|
|
@ -4911,6 +4921,16 @@ void snd_pcm_sw_params_free(snd_pcm_sw_params_t *obj)
|
||||||
free(obj);
|
free(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief clear snd_pcm_sw_params_t structure
|
||||||
|
* \param obj pointer to structure
|
||||||
|
*/
|
||||||
|
void snd_pcm_sw_params_clear(snd_pcm_sw_params_t *obj)
|
||||||
|
{
|
||||||
|
assert(obj);
|
||||||
|
memset(obj, 0, snd_pcm_sw_params_sizeof());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief copy one #snd_pcm_sw_params_t to another
|
* \brief copy one #snd_pcm_sw_params_t to another
|
||||||
* \param dst pointer to destination
|
* \param dst pointer to destination
|
||||||
|
|
@ -5331,6 +5351,16 @@ void snd_pcm_status_free(snd_pcm_status_t *obj)
|
||||||
free(obj);
|
free(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief clear snd_pcm_status_t structure
|
||||||
|
* \param obj pointer to structure
|
||||||
|
*/
|
||||||
|
void snd_pcm_status_clear(snd_pcm_status_t *obj)
|
||||||
|
{
|
||||||
|
assert(obj);
|
||||||
|
memset(obj, 0, snd_pcm_status_sizeof());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief copy one #snd_pcm_status_t to another
|
* \brief copy one #snd_pcm_status_t to another
|
||||||
* \param dst pointer to destination
|
* \param dst pointer to destination
|
||||||
|
|
@ -5450,6 +5480,16 @@ void snd_pcm_info_free(snd_pcm_info_t *obj)
|
||||||
free(obj);
|
free(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief clear snd_pcm_info_t structure
|
||||||
|
* \param obj pointer to structure
|
||||||
|
*/
|
||||||
|
void snd_pcm_info_clear(snd_pcm_info_t *obj)
|
||||||
|
{
|
||||||
|
assert(obj);
|
||||||
|
memset(obj, 0, snd_pcm_info_sizeof());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief copy one #snd_pcm_info_t to another
|
* \brief copy one #snd_pcm_info_t to another
|
||||||
* \param dst pointer to destination
|
* \param dst pointer to destination
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue