PortAudio  2.0
pa_linux_pulseaudio_cb_internal.h
Go to the documentation of this file.
1 
2 /*
3  * PulseAudio host to play natively in Linux based systems without
4  * ALSA emulation
5  *
6  * Copyright (c) 2014-2023 Tuukka Pasanen <tuukka.pasanen@ilmi.fi>
7  * Copyright (c) 2016 Sqweek
8  *
9  * Based on the Open Source API proposed by Ross Bencina
10  * Copyright (c) 1999-2002 Ross Bencina, Phil Burk
11  *
12  * Permission is hereby granted, free of charge, to any person obtaining
13  * a copy of this software and associated documentation files
14  * (the "Software"), to deal in the Software without restriction,
15  * including without limitation the rights to use, copy, modify, merge,
16  * publish, distribute, sublicense, and/or sell copies of the Software,
17  * and to permit persons to whom the Software is furnished to do so,
18  * subject to the following conditions:
19  *
20  * The above copyright notice and this permission notice shall be
21  * included in all copies or substantial portions of the Software.
22  *
23  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
26  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
27  * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
28  * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
29  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30  */
31 
32 /*
33  * The text above constitutes the entire PortAudio license; however,
34  * the PortAudio community also makes the following non-binding requests:
35  *
36  * Any person wishing to distribute modifications to the Software is
37  * requested to send the modifications to the original developer so that
38  * they can be incorporated into the canonical version. It is also
39  * requested that these non-binding requests be included along with the
40  * license above.
41  */
42 
43 #ifndef _PA_HOSTAPI_PULSEAUDIO_CB_H_
44 #define _PA_HOSTAPI_PULSEAUDIO_CB_H_
45 
46 #include "pa_util.h"
47 #include "pa_allocation.h"
48 #include "pa_hostapi.h"
49 #include "pa_stream.h"
50 #include "pa_cpuload.h"
51 #include "pa_process.h"
52 
53 #include "pa_unix_util.h"
54 #include "pa_ringbuffer.h"
55 
56 
57 /* PulseAudio headers */
58 #include <stdio.h>
59 #include <string.h>
60 #include <pulse/pulseaudio.h>
61 
63 
64 
65 #ifdef __cplusplus
66 extern "C"
67 {
68 #endif /* __cplusplus */
69 
70 int PaPulseAudio_updateTimeInfo( pa_stream * s,
71  PaStreamCallbackTimeInfo *timeInfo,
72  int record );
73 
74 void *PaPulseAudio_processThread( void *userdata );
75 
77 
79 
81 
83 
84 void PaPulseAudio_StreamRecordCb( pa_stream * s,
85  size_t length,
86  void *userdata );
87 
88 void PaPulseAudio_StreamPlaybackCb( pa_stream * s,
89  size_t length,
90  void *userdata );
91 
92 #ifdef __cplusplus
93 }
94 #endif /* __cplusplus */
95 
96 
97 #endif
Single-reader single-writer lock-free ring buffer.
void PaStream
Definition: portaudio.h:639
Buffer Processor prototypes. A Buffer Processor performs buffer length adaption, coordinates sample f...
Allocation Group prototypes. An Allocation Group makes it easy to allocate multiple blocks of memory ...
Interfaces and representation structures used by pa_front.c to manage and communicate with host API i...
PaError PaPulseAudio_AbortStreamCb(PaStream *s)
Definition: pa_linux_pulseaudio_cb.c:948
Stream interfaces, representation structures and helper functions used to interface between pa_front...
void * PaPulseAudio_processThread(void *userdata)
int PaError
Definition: portaudio.h:121
PaError PaPulseAudio_CloseStreamCb(PaStream *s)
Definition: pa_linux_pulseaudio_cb.c:465
PaError PaPulseAudio_StopStreamCb(PaStream *s)
Definition: pa_linux_pulseaudio_cb.c:942
void PaPulseAudio_StreamRecordCb(pa_stream *s, size_t length, void *userdata)
Definition: pa_linux_pulseaudio_cb.c:390
Prototypes for utility functions used by PortAudio implementations.
void PaPulseAudio_StreamPlaybackCb(pa_stream *s, size_t length, void *userdata)
Definition: pa_linux_pulseaudio_cb.c:412
PaError PaPulseAudio_StartStreamCb(PaStream *s)
Definition: pa_linux_pulseaudio_cb.c:634
Functions to assist in measuring the CPU utilization of a callback stream. Used to implement the Pa_G...
int PaPulseAudio_updateTimeInfo(pa_stream *s, PaStreamCallbackTimeInfo *timeInfo, int record)
Definition: pa_linux_pulseaudio_cb.c:70
Definition: portaudio.h:703