source: roaraudio/roard/include/driver.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: 4.5 KB
RevLine 
[0]1//driver.h:
2
[668]3/*
[4708]4 *      Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2008-2011
[668]5 *
6 *  This file is part of roard a part of RoarAudio,
7 *  a cross-platform sound system for both, home and professional use.
8 *  See README for details.
9 *
10 *  This file is free software; you can redistribute it and/or modify
11 *  it under the terms of the GNU General Public License version 3
12 *  as published by the Free Software Foundation.
13 *
14 *  RoarAudio is distributed in the hope that it will be useful,
15 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
16 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 *  GNU General Public License for more details.
18 *
19 *  You should have received a copy of the GNU General Public License
20 *  along with this software; see the file COPYING.  If not, write to
[3517]21 *  the Free Software Foundation, 51 Franklin Street, Fifth Floor,
22 *  Boston, MA 02110-1301, USA.
[668]23 *
24 */
25
[0]26#ifndef _DRIVER_H_
27#define _DRIVER_H_
28
29#include <roaraudio.h>
30
31#define DRIVER_USERDATA_T void *
32
[4141]33#if 0
[1175]34#ifndef ROAR_DRIVER_DEFAULT
[2343]35
36#if defined(ROAR_HAVE_OSS_BSD) || defined(ROAR_HAVE_OSS)
37#define ROAR_DRIVER_DEFAULT "oss"
[0]38#else
[929]39
[2783]40#ifdef ROAR_HAVE_LIBWINMM
41#define ROAR_DRIVER_DEFAULT "wmm"
42#else
43
[929]44#ifdef ROAR_HAVE_LIBAO
45#define ROAR_DRIVER_DEFAULT "ao"
46#else
47
[2343]48#ifdef ROAR_HAVE_ESD
49#define ROAR_DRIVER_DEFAULT "esd"
[929]50#else
51
[0]52#define ROAR_DRIVER_DEFAULT "null"
53#endif
[929]54#endif
55#endif
[2783]56#endif
[2343]57
[1175]58#endif
[4141]59#endif
[0]60
61#ifdef ROAR_HAVE_ESD
62#include <esd.h>
63#include "driver_esd.h"
64#endif
65
66#include "driver_roar.h"
[10]67#include "driver_raw.h"
[3262]68#include "driver_dstr.h"
[1824]69#include "driver_dmx.h"
[1974]70#include "driver_pwmled.h"
[2209]71
[2803]72#if defined(ROAR_HAVE_GETTIMEOFDAY) && defined(ROAR_HAVE_USLEEP)
[2209]73#define ROAR_HAVE_DRIVER_SYSCLOCK
[2207]74#include "driver_sysclock.h"
[2209]75#endif
[0]76
77#ifdef ROAR_HAVE_LIBAO
78#include <ao/ao.h>
79#include "driver_ao.h"
80#endif
81
[950]82#ifdef ROAR_HAVE_LIBSHOUT
83#include <shout/shout.h>
84#include "driver_shout.h"
85#endif
86
[1543]87#ifdef ROAR_HAVE_LIBSNDIO
88#include <sndio.h>
89#include "driver_sndio.h"
90#endif
91
[915]92#if defined(ROAR_HAVE_OSS_BSD) || defined(ROAR_HAVE_OSS)
93#if defined(__OpenBSD__) || defined(__NetBSD__)
94#include <soundcard.h>
95#else
96#include <sys/soundcard.h>
97#endif
98#include <sys/ioctl.h>
99
100#include "driver_oss.h"
101#endif
[10]102
[3725]103#ifdef ROAR_HAVE_LIBRSOUND
104#ifdef _DRV_NEED_RSOUND_H
105#include <rsound.h>
106#endif
107#include "driver_rsound.h"
108#endif
109
[3751]110#ifdef ROAR_HAVE_LIBPORTAUDIO
111#include <portaudio.h>
112#ifdef ROAR_HAVE_LIBPABLIO
113#include <pablio/pablio.h>
114#endif
115#include "driver_portaudio.h"
116#endif
117
[3692]118#ifdef ROAR_HAVE_LIBASOUND
119#include <alsa/asoundlib.h>
120#include "driver_alsa.h"
121#endif
122
[2800]123#ifdef ROAR_HAVE_LIBWINMM
[2801]124#include <windows.h>
[2773]125#include <mmsystem.h>
126#include "driver_wmm.h"
127#endif
128
[3839]129#ifdef ROAR_HAVE_LIBPULSE
130#include <pulse/simple.h>
131#include "driver_pulsesimple.h"
132#endif
133
[4490]134#ifdef ROAR_HAVE_LIBJACK
135#include <jack/jack.h>
136#include <jack/transport.h>
137#include "driver_jack.h"
138#endif
139
[1915]140#define DRV_FLAG_NONE           0x00
141#define DRV_FLAG_FHSEC          0x01
142
[0]143struct roar_driver {
144 char * name;
145 char * desc;
146 char * devices;
[1915]147 unsigned int flags;
[1918]148 unsigned int subsystems;
[0]149 int (*open )(DRIVER_USERDATA_T * inst, char * device, struct roar_audio_info * info);
150 int (*close)(DRIVER_USERDATA_T   inst);
[2367]151 int (*vio_init)(struct roar_vio_calls * calls, char * device, struct roar_audio_info * info, int fh, struct roar_stream_server * sstream);
[0]152};
153
154void print_driverlist (void);
155
156int driver_open (DRIVER_USERDATA_T * inst,
157                 int * driver_id, char * driver /* NOTE: this is not part of struct roar_driver's def! */,
158                 char * device, struct roar_audio_info * info);
[931]159int driver_openvio(struct roar_vio_calls * calls,
160                 int * driver_id, char * driver /* NOTE: this is not part of struct roar_driver's def! */,
[2364]161                 char * device, struct roar_audio_info * info, int fh,
162                 struct roar_stream_server * sstream);
[931]163
[0]164int driver_close(DRIVER_USERDATA_T   inst, int driver);
[937]165int driver_closevio(struct roar_vio_calls * calls, int driver);
[0]166int driver_pause(DRIVER_USERDATA_T   inst, int driver, int newstate);
167int driver_write(DRIVER_USERDATA_T   inst, int driver, char * buf, int len);
168int driver_read (DRIVER_USERDATA_T   inst, int driver, char * buf, int len);
169int driver_flush(DRIVER_USERDATA_T   inst, int driver);
[1590]170int driver_set_volume(int stream, struct roar_mixer_settings * mixer);
[0]171
[2345]172// opening a cdriver
[2507]173#ifndef ROAR_WITHOUT_DCOMP_CDRIVER
[2367]174int driver_cdriver_open(struct roar_vio_calls * inst, char * device, struct roar_audio_info * info, int fh, struct roar_stream_server * sstream);
[2507]175#endif
[2345]176
[0]177#endif
178
179//ll
Note: See TracBrowser for help on using the repository browser.