/usr/include/muroar.h is in libmuroar-dev 0.1.13-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 | //muroar.h:
/*
* Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2009-2014
*
* This file is part of µRoar,
* a minimalist library to access a RoarAudio Sound Server.
*
* µRoar is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* µRoar is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with µRoar. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _MUROAR_H_
#define _MUROAR_H_
#ifdef __cplusplus
extern "C" {
#endif
#ifndef __YIFF__
// types:
#include <unistd.h>
// BYTE_ORDER and friends:
#ifdef HAVE_HEADER_ENDIAN_H
#include <endian.h>
#endif
#endif
// types of IO:
#define MUROAR_HDLTYPE_POSIX_SYSIO 1
#define MUROAR_HDLTYPE_POSIX_STDIO 2
#define MUROAR_HDLTYPE_WIN32_SOCKET 3
#define MUROAR_HDLTYPE_YIFF_SYSIO 4
#define MUROAR_HDLTYPE_YIFF_VIO 5
#ifdef __WIN32
#define MUROAR_HDLTYPE MUROAR_HDLTYPE_WIN32_SOCKET
#elif defined(__YIFF__)
#define MUROAR_HDLTYPE MUROAR_HDLTYPE_YIFF_VIO
#else
#define MUROAR_HDLTYPE MUROAR_HDLTYPE_POSIX_SYSIO
#endif
#if MUROAR_HDLTYPE == MUROAR_HDLTYPE_POSIX_SYSIO || MUROAR_HDLTYPE == MUROAR_HDLTYPE_WIN32_SOCKET
typedef int muroar_t;
#define MUROAR_HANDLE_INVALID -1
#elif MUROAR_HDLTYPE == MUROAR_HDLTYPE_POSIX_STDIO
#include <stdio.h>
typedef FILE* muroar_t;
#define MUROAR_HANDLE_INVALID NULL
#elif MUROAR_HDLTYPE == MUROAR_HDLTYPE_YIFF_VIO
/* yiff stuff */
#include <YIFF.h>
#include <YIFFc/error.h>
#include <YIFFc/memory.h> /* for stuff like NULL */
#include <YIFFc/io.h>
typedef yiffc_vio_t * muroar_t;
#define MUROAR_HANDLE_INVALID NULL
#error Unsupported value for MUROAR_HDLTYPE (WIP)
#else
#error Unsupported value for MUROAR_HDLTYPE
#endif
// Some defaults:
#define MUROAR_PORT 16002
#define MUROAR_HOST "localhost"
#define MUROAR_GSOCK "/tmp/roar"
#define MUROAR_OBJECT "roar"
#define MUROAR_DEFAULT "+default"
#define MUROAR_INVALID "+invalid"
#define MUROAR_ABSTRACT "+abstract"
// AID = Audio Info Defaults
#define MUROAR_AID_RATE 44100
#define MUROAR_AID_BITS 16
#define MUROAR_AID_CHANNELS MUROAR_CM_STEREO
#define MUROAR_CM_MONO 1
#define MUROAR_CM_STEREO 2
#define MUROAR_CMD_NOOP 0
#define MUROAR_CMD_IDENTIFY 1
#define MUROAR_CMD_AUTH 2
#define MUROAR_CMD_NEW_STREAM 3
#define MUROAR_CMD_SET_META 4
#define MUROAR_CMD_EXEC_STREAM 5
#define MUROAR_CMD_QUIT 6
#define MUROAR_CMD_GET_STANDBY 7
#define MUROAR_CMD_SET_STANDBY 8
#define MUROAR_CMD_SERVER_INFO 9
#define MUROAR_CMD_SERVER_STATS 10
#define MUROAR_CMD_SERVER_OINFO 11
#define MUROAR_CMD_ADD_DATA 12
#define MUROAR_CMD_EXIT 13
#define MUROAR_CMD_LIST_STREAMS 14
#define MUROAR_CMD_LIST_CLIENTS 15
#define MUROAR_CMD_GET_CLIENT 16
#define MUROAR_CMD_GET_STREAM 17
#define MUROAR_CMD_KICK 18
#define MUROAR_CMD_SET_VOL 19
#define MUROAR_CMD_GET_VOL 20
#define MUROAR_CMD_CON_STREAM 21
#define MUROAR_CMD_GET_META 22
#define MUROAR_CMD_LIST_META 23
#define MUROAR_CMD_BEEP 24
#define MUROAR_CMD_AUTHCTL 25
#define MUROAR_CMD_ACLCTL 26
#define MUROAR_CMD_GET_STREAM_PARA 27
#define MUROAR_CMD_SET_STREAM_PARA 28
#define MUROAR_CMD_ATTACH 29
#define MUROAR_CMD_PASSFH 30
#define MUROAR_CMD_GETTIMEOFDAY 31
#define MUROAR_CMD_WHOAMI 32
#define MUROAR_CMD_DEVCTL 33 /* send control messages to devices */
#define MUROAR_CMD_CAPS 34 /* send caps */
#define MUROAR_CMD_WAIT 35 /* wait for an event */
#define MUROAR_CMD_NOTIFY 36 /* asyncronus notify of events */
#define MUROAR_CMD_SEEK 37 /* seek in stream */
#define MUROAR_CMD_CLIENTCTL 38 /* like stream ctl, just for client connections */
#define MUROAR_CMD_LOOKUP 39 /* lookup??? */
#define MUROAR_CMD_CONCTL 40 /* change parameter for current connection */
// special CMDs:
#define MUROAR_CMD_OK 254 /* return value OK */
#define MUROAR_CMD_ERROR 255 /* return value ERROR */
// consts for CAPS command:
#define MUROAR_CF_REQUEST 0x0001
#define MUROAR_CT_CAPS 0
#define MUROAR_CT_STANDARDS 1
// stream directions:
#define MUROAR_PLAY_WAVE 1
#define MUROAR_PLAY_MIDI 12
#define MUROAR_PLAY_LIGHT 14
#define MUROAR_RECORD_WAVE 2
#define MUROAR_MONITOR_WAVE 3
#define MUROAR_MONITOR_MIDI 13
#define MUROAR_MONITOR_LIGHT 15
#define MUROAR_FILTER_WAVE 4
// Codecs:
#define MUROAR_CODEC_PCM_S_LE 0x01
#define MUROAR_CODEC_PCM_S_BE 0x02
#define MUROAR_CODEC_PCM_S_PDP 0x03
#define MUROAR_CODEC_PCM_U_LE 0x05
#define MUROAR_CODEC_PCM_U_BE 0x06
#define MUROAR_CODEC_PCM_U_PDP 0x07
#define MUROAR_CODEC_OGG_VORBIS 0x10
#define MUROAR_CODEC_FLAC 0x11
#define MUROAR_CODEC_OGG_SPEEX 0x12
#define MUROAR_CODEC_OGG_FLAC 0x14
#define MUROAR_CODEC_OGG_CELT 0x16
#define MUROAR_CODEC_ROAR_CELT 0x1a
#define MUROAR_CODEC_ROAR_SPEEX 0x1b
#define MUROAR_CODEC_RIFF_WAVE 0x20
#define MUROAR_CODEC_RIFX 0x22
#define MUROAR_CODEC_AU 0x24
#define MUROAR_CODEC_AIFF 0x28
#define MUROAR_CODEC_ALAW 0x30
#define MUROAR_CODEC_MULAW 0x34
#define MUROAR_CODEC_GSM 0x38
#define MUROAR_CODEC_GSM49 0x39
#define MUROAR_CODEC_MIDI 0x60
#define MUROAR_CODEC_DMX512 0x70
#define MUROAR_CODEC_ROARDMX 0x71
#ifdef __WIN32
#define MUROAR_CODEC_PCM_S MUROAR_CODEC_PCM_S_LE
#define MUROAR_CODEC_PCM_U MUROAR_CODEC_PCM_U_LE
#else
#if BYTE_ORDER == BIG_ENDIAN
#define MUROAR_CODEC_PCM_S MUROAR_CODEC_PCM_S_BE
#define MUROAR_CODEC_PCM_U MUROAR_CODEC_PCM_U_BE
#elif BYTE_ORDER == LITTLE_ENDIAN
#define MUROAR_CODEC_PCM_S MUROAR_CODEC_PCM_S_LE
#define MUROAR_CODEC_PCM_U MUROAR_CODEC_PCM_U_LE
#else
// most likely a PDP
#define MUROAR_CODEC_PCM_S MUROAR_CODEC_PCM_S_PDP
#define MUROAR_CODEC_PCM_U MUROAR_CODEC_PCM_U_PDP
#endif
#endif
#define MUROAR_CODEC_PCM MUROAR_CODEC_PCM_S
// muroar.c:
muroar_t muroar_connect(const char * server, const char * name);
// muroar_close.c:
int muroar_close (muroar_t fh);
// muroar_quit.c:
int muroar_quit (muroar_t fh);
// muroar_beep.c:
int muroar_beep (muroar_t fh);
// muroar_stream.c:
muroar_t muroar_stream (muroar_t fh, int dir, int * stream, int codec, int rate, int channels, int bits);
// muroario.c:
ssize_t muroar_write (muroar_t fh, const void * buf, size_t len);
ssize_t muroar_read (muroar_t fh, void * buf, size_t len);
// muroar_noop.c:
int muroar_noop (muroar_t fh);
// muroar_setvolume.c:
// We use (long unsigned int) here because we need a portable 16 bit type without <stdint.h>.
// (long unsigned int) should be big enough on all kind of archs.
int muroar_setvolume (muroar_t fh, int stream, long unsigned int left, long unsigned int right);
#ifdef __cplusplus
}
#endif
#endif
//ll
|