mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-09 17:55:43 +01:00
Added timersub definition if missing
This commit is contained in:
parent
740881bdf5
commit
cd88bf91b8
1 changed files with 12 additions and 0 deletions
|
@ -818,6 +818,18 @@ static void set_params(void)
|
|||
// fprintf(stderr, "real chunk_size = %i, frags = %i, total = %i\n", chunk_size, setup.buf.block.frags, setup.buf.block.frags * chunk_size);
|
||||
}
|
||||
|
||||
#ifndef timersub
|
||||
#define timersub(a, b, result) \
|
||||
do { \
|
||||
(result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \
|
||||
(result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \
|
||||
if ((result)->tv_usec < 0) { \
|
||||
--(result)->tv_sec; \
|
||||
(result)->tv_usec += 1000000; \
|
||||
} \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
/* playback write error hander */
|
||||
|
||||
void xrun(void)
|
||||
|
|
Loading…
Reference in a new issue