Skip to content

Commit 197557f

Browse files
committed
Include portaudio.h in rtmixer.c
... instead of copying the relevant declarations manually.
1 parent fe97d98 commit 197557f

2 files changed

Lines changed: 2 additions & 22 deletions

File tree

rtmixer_build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
ffibuilder.set_source(
1919
'_rtmixer',
2020
RINGBUFFER_CDEF + open('src/rtmixer.c').read(),
21-
include_dirs=['src'],
21+
include_dirs=['src', 'portaudio/include'],
2222
sources=['portaudio/src/common/pa_ringbuffer.c'],
2323
#extra_compile_args=['-Wconversion'],
2424
# TODO: release mode by default, option for using debug mode

src/rtmixer.c

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,9 @@
22

33
#include <math.h> // for llround()
44
#include <stdbool.h> // for bool, true, false
5-
5+
#include <portaudio.h>
66
#include "rtmixer.h"
77

8-
/* From portaudio.h: */
9-
typedef struct PaStreamCallbackTimeInfo{
10-
PaTime inputBufferAdcTime;
11-
PaTime currentTime;
12-
PaTime outputBufferDacTime;
13-
} PaStreamCallbackTimeInfo;
14-
typedef unsigned long PaStreamCallbackFlags;
15-
#define paInputUnderflow ((PaStreamCallbackFlags) 0x00000001)
16-
#define paInputOverflow ((PaStreamCallbackFlags) 0x00000002)
17-
#define paOutputUnderflow ((PaStreamCallbackFlags) 0x00000004)
18-
#define paOutputOverflow ((PaStreamCallbackFlags) 0x00000008)
19-
#define paPrimingOutput ((PaStreamCallbackFlags) 0x00000010)
20-
typedef enum PaStreamCallbackResult
21-
{
22-
paContinue=0,
23-
paComplete=1,
24-
paAbort=2
25-
} PaStreamCallbackResult;
26-
/* End of declarations from portaudio.h */
27-
288
#ifdef NDEBUG
299
#define CALLBACK_ASSERT(expr) ((void)(0))
3010
#else

0 commit comments

Comments
 (0)