source: roaraudio/include/libroarsndio/libroarsndio.h @ 4708:c9d40761088a

Last change on this file since 4708:c9d40761088a was 4708:c9d40761088a, checked in by phi, 13 years ago

updated copyright statements

File size: 3.3 KB
Line 
1//libroarsndio.h:
2
3/*
4 *      Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2009-2011
5 *  The code (may) include prototypes and comments (and maybe
6 *  other code fragements) from OpenBSD's sndio.
7 *  See 'Copyright for sndio' below for more information on
8 *  code fragments taken from OpenBSD's sndio.
9 *
10 * --- Copyright for sndio ---
11 * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
12 *
13 * Permission to use, copy, modify, and distribute this software for any
14 * purpose with or without fee is hereby granted, provided that the above
15 * copyright notice and this permission notice appear in all copies.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
18 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
19 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
20 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
21 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
22 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
23 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
24 * --- End of Copyright for sndio ---
25 *
26 *  This file is part of libroaresd a part of RoarAudio,
27 *  a cross-platform sound system for both, home and professional use.
28 *  See README for details.
29 *
30 *  This file is free software; you can redistribute it and/or modify
31 *  it under the terms of the GNU General Public License version 3
32 *  as published by the Free Software Foundation.
33 *
34 *  RoarAudio is distributed in the hope that it will be useful,
35 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
36 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
37 *  GNU General Public License for more details.
38 *
39 *  You should have received a copy of the GNU General Public License
40 *  along with this software; see the file COPYING.  If not, write to
41 *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
42 *
43 *  NOTE for everyone want's to change something and send patches:
44 *  read README and HACKING! There a addition information on
45 *  the license of this document you need to read before you send
46 *  any patches.
47 */
48
49#ifndef _LIBROARSNDIO_H_
50#define _LIBROARSNDIO_H_
51
52#include <roaraudio.h>
53
54#ifdef __cplusplus
55extern "C" {
56#endif
57
58#if defined(ROAR_HAVE_LIBSNDIO) && !defined(_ROAR_EMUL_LIBSNDIO) && !defined(ROAR_USE_OWN_SNDIO_HDL)
59#include <sndio.h>
60#else
61#define sio_hdl roar_sio_hdl
62#define mio_hdl roar_sio_hdl
63#include "sndiosym.h"
64#endif
65
66#if !defined(ROAR_HAVE_LIBSNDIO) || defined(ROAR_USE_OWN_SNDIO_HDL)
67#ifdef sio_hdl
68#undef sio_hdl
69#endif
70#define sio_hdl roar_sio_hdl
71
72#ifdef mio_hdl
73#undef mio_hdl
74#endif
75#define mio_hdl roar_sio_hdl
76#endif
77
78struct roar_sio_hdl {
79 char                   * device;
80// int              fh;
81 int                      stream_opened;
82 int                      dir;
83 int                      nonblock;
84 int                      ioerror;
85 struct roar_vio_calls    svio;
86 struct roar_connection   con;
87 struct roar_stream       stream;
88 struct roar_audio_info   info;
89 struct sio_par           para;
90 void                   (*on_move)(void * arg, int delta);
91 void                   * on_move_arg;
92 void                   (*on_vol )(void * arg, unsigned vol);
93 void                   * on_vol_arg;
94};
95
96#ifdef __cplusplus
97}
98#endif
99
100#endif
101
102//ll
Note: See TracBrowser for help on using the repository browser.