[2352] | 1 | //midi.c: |
---|
| 2 | |
---|
| 3 | /* |
---|
[5381] | 4 | * Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2009-2012 |
---|
[2352] | 5 | * The code (may) include prototypes and comments (and maybe |
---|
[4038] | 6 | * other code fragements) from OpenBSD's sndio. |
---|
[4050] | 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 --- |
---|
[2352] | 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 |
---|
[3517] | 41 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, |
---|
| 42 | * Boston, MA 02110-1301, USA. |
---|
[2352] | 43 | * |
---|
| 44 | * NOTE for everyone want's to change something and send patches: |
---|
| 45 | * read README and HACKING! There a addition information on |
---|
| 46 | * the license of this document you need to read before you send |
---|
| 47 | * any patches. |
---|
| 48 | */ |
---|
| 49 | |
---|
| 50 | #define ROAR_USE_OWN_SNDIO_HDL |
---|
| 51 | #include "libroarsndio.h" |
---|
| 52 | |
---|
[2355] | 53 | struct mio_hdl * mio_open (const char * name, unsigned mode, int nbio_flag) { |
---|
| 54 | return sio_open(name, mode, nbio_flag); |
---|
| 55 | } |
---|
| 56 | |
---|
| 57 | void mio_close (struct mio_hdl * hdl) { |
---|
| 58 | return sio_close(hdl); |
---|
| 59 | } |
---|
| 60 | |
---|
| 61 | size_t mio_write (struct mio_hdl * hdl, const void * addr, size_t nbytes) { |
---|
| 62 | return sio_write(hdl, addr, nbytes); |
---|
| 63 | } |
---|
| 64 | |
---|
| 65 | size_t mio_read (struct mio_hdl * hdl, void * addr, size_t nbytes) { |
---|
| 66 | return sio_read(hdl, addr, nbytes); |
---|
| 67 | } |
---|
| 68 | |
---|
| 69 | int mio_nfds (struct mio_hdl * hdl) { |
---|
| 70 | return mio_nfds(hdl); |
---|
| 71 | } |
---|
| 72 | |
---|
| 73 | int mio_pollfd (struct mio_hdl * hdl, struct pollfd * pfd, int events) { |
---|
| 74 | return sio_pollfd(hdl, pfd, events); |
---|
| 75 | } |
---|
| 76 | |
---|
| 77 | int mio_revents(struct mio_hdl * hdl, struct pollfd * pfd) { |
---|
| 78 | return sio_revents(hdl, pfd); |
---|
| 79 | } |
---|
| 80 | |
---|
| 81 | int mio_eof (struct mio_hdl * hdl) { |
---|
| 82 | return sio_eof(hdl); |
---|
| 83 | } |
---|
[2353] | 84 | |
---|
[2352] | 85 | //ll |
---|