X-Git-Url: https://code.delx.au/pulseaudio/blobdiff_plain/22cb23eedb2eae7c79dc8fcf395be08bfc666256..fa499dad06ba6558111cdef64c18f2401e803cff:/polyp/polyplib-simple.h diff --git a/polyp/polyplib-simple.h b/polyp/polyplib-simple.h index ee2e27e3..9abef3fa 100644 --- a/polyp/polyplib-simple.h +++ b/polyp/polyplib-simple.h @@ -7,7 +7,7 @@ This file is part of polypaudio. polypaudio is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published + it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. @@ -16,7 +16,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with polypaudio; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. @@ -29,12 +29,20 @@ #include "cdecl.h" /** \file - * A simple but limited synchronous playback and recording API. */ + * A simple but limited synchronous playback and recording + * API. This is synchronouse, simplified wrapper around the standard + * asynchronous API. */ + +/** \example pacat-simple.c + * A simple playback tool using the simple API */ + +/** \example parec-simple.c + * A simple recording tool using the simple API */ PA_C_DECL_BEGIN /** \struct pa_simple - * A simple connection object */ + * An opaque simple connection object */ struct pa_simple; /** Create a new connection to the server */ @@ -46,7 +54,8 @@ struct pa_simple* pa_simple_new( const char *stream_name, /**< A descriptive name for this client (application name, song title, ...) */ const struct pa_sample_spec *ss, /**< The sample type to use */ const struct pa_buffer_attr *attr, /**< Buffering attributes, or NULL for default */ - int *error /**< A pointer where the error code is stored when the routine returns NULL. It is OK to pass NULL here. */ + pa_volume_t volume, /**< Initial volume. Only for playback streams. \since 0.5 */ + int *error /**< A pointer where the error code is stored when the routine returns NULL. It is OK to pass NULL here. */ ); /** Close and free the connection to the server. The connection objects becomes invalid when this is called. */ @@ -61,6 +70,12 @@ int pa_simple_drain(struct pa_simple *s, int *error); /** Read some data from the server */ int pa_simple_read(struct pa_simple *s, void*data, size_t length, int *error); +/** Return the playback latency. \since 0.5 */ +pa_usec_t pa_simple_get_playback_latency(struct pa_simple *s, int *perror); + +/** Flush the playback buffer. \since 0.5 */ +int pa_simple_flush(struct pa_simple *s, int *perror); + PA_C_DECL_END #endif