зеркало из https://github.com/mozilla/cubeb.git
Remove duplicated version of 'delay'
This commit is contained in:
Родитель
21c386756e
Коммит
d4923cd5ce
|
@ -66,7 +66,7 @@ src_libcubeb_la_LDFLAGS = -pthread -export-symbols-regex '^cubeb_' $(platform_li
|
|||
|
||||
noinst_PROGRAMS = test/test_sanity test/test_tone test/test_audio
|
||||
|
||||
test_test_sanity_SOURCES = test/test_sanity.c
|
||||
test_test_sanity_SOURCES = test/test_sanity.c test/common.c
|
||||
test_test_sanity_LDADD = -lm src/libcubeb.la $(platform_lib)
|
||||
|
||||
test_test_tone_SOURCES = test/test_tone.c test/common.c
|
||||
|
|
|
@ -9,29 +9,13 @@
|
|||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#if defined(_WIN32)
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include "common.h"
|
||||
|
||||
#define STREAM_LATENCY 100
|
||||
#define STREAM_RATE 44100
|
||||
#define STREAM_CHANNELS 1
|
||||
#define STREAM_FORMAT CUBEB_SAMPLE_S16LE
|
||||
|
||||
static void
|
||||
delay(unsigned int ms)
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
Sleep(ms);
|
||||
#else
|
||||
sleep(ms / 1000);
|
||||
usleep(ms % 1000 * 1000);
|
||||
#endif
|
||||
}
|
||||
|
||||
static int dummy;
|
||||
static uint64_t total_frames_written;
|
||||
static int delay_callback;
|
||||
|
|
Загрузка…
Ссылка в новой задаче