PulseAudio 16.1

simple.h
Go to the documentation of this file.
1#ifndef foosimplehfoo
2#define foosimplehfoo
3
4/***
5 This file is part of PulseAudio.
6
7 Copyright 2004-2006 Lennart Poettering
8 Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
9
10 PulseAudio is free software; you can redistribute it and/or modify
11 it under the terms of the GNU Lesser General Public License as published
12 by the Free Software Foundation; either version 2.1 of the License,
13 or (at your option) any later version.
14
15 PulseAudio is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 General Public License for more details.
19
20 You should have received a copy of the GNU Lesser General Public License
21 along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
22***/
23
24#include <sys/types.h>
25
26#include <pulse/sample.h>
27#include <pulse/channelmap.h>
28#include <pulse/def.h>
29#include <pulse/cdecl.h>
30#include <pulse/version.h>
31
111PA_C_DECL_BEGIN
112
115 typedef struct pa_simple pa_simple;
116
118 pa_simple* pa_simple_new(
119 const char *server,
120 const char *name,
121 pa_stream_direction_t dir,
122 const char *dev,
123 const char *stream_name,
124 const pa_sample_spec *ss,
125 const pa_channel_map *map,
126 const pa_buffer_attr *attr,
127 int *error
128 );
129
131 void pa_simple_free(pa_simple *s);
132
134 int pa_simple_write(pa_simple *s, const void *data, size_t bytes, int *error);
135
138 int pa_simple_drain(pa_simple *s, int *error);
139
143 int pa_simple_read(
144 pa_simple *s,
145 void *data,
146 size_t bytes,
147 int *error
150 );
151
153 pa_usec_t pa_simple_get_latency(pa_simple *s, int *error);
154
157 int pa_simple_flush(pa_simple *s, int *error);
158
159PA_C_DECL_END
160
161#endif
channelmap.h
Constants and routines for channel mapping handling.
def.h
Global definitions.
pa_stream_direction_t
enum pa_stream_direction pa_stream_direction_t
The direction of a pa_stream object.
sample.h
Constants and routines for sample type handling.
pa_usec_t
uint64_t pa_usec_t
Type for usec specifications (unsigned).
Definition: sample.h:264
pa_simple_drain
int pa_simple_drain(pa_simple *s, int *error)
Wait until all data already written is played by the daemon.
pa_simple_new
pa_simple * pa_simple_new(const char *server, const char *name, pa_stream_direction_t dir, const char *dev, const char *stream_name, const pa_sample_spec *ss, const pa_channel_map *map, const pa_buffer_attr *attr, int *error)
Create a new connection to the server.
pa_simple_get_latency
pa_usec_t pa_simple_get_latency(pa_simple *s, int *error)
Return the playback or record latency.
pa_simple_read
int pa_simple_read(pa_simple *s, void *data, size_t bytes, int *error)
Read some data from the server.
pa_simple_flush
int pa_simple_flush(pa_simple *s, int *error)
Flush the playback or record buffer.
pa_simple_free
void pa_simple_free(pa_simple *s)
Close and free the connection to the server.
pa_simple_write
int pa_simple_write(pa_simple *s, const void *data, size_t bytes, int *error)
Write some data to the server.
pa_buffer_attr
Playback and record buffer metrics.
Definition: def.h:389
pa_channel_map
A channel map which can be used to attach labels to specific channels of a stream.
Definition: channelmap.h:264
pa_sample_spec
A sample format and attribute specification.
Definition: sample.h:252
pa_simple
An opaque simple connection object.