4 Copyright (C) 2003-2007 Jussi Laako <jussi@sonarnerd.net>
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston,
24 #ifndef __JACK_OSS_DRIVER_H__
25 #define __JACK_OSS_DRIVER_H__
27 #include <sys/types.h>
29 #include <semaphore.h>
31 #include <jack/types.h>
32 #include <jack/jslist.h>
33 #include <jack/driver.h>
34 #include <jack/jack.h>
37 #define OSS_DRIVER_DEF_DEV "/dev/dsp"
38 #define OSS_DRIVER_DEF_FS 48000
39 #define OSS_DRIVER_DEF_BLKSIZE 1024
40 #define OSS_DRIVER_DEF_NPERIODS 2
41 #define OSS_DRIVER_DEF_BITS 16
42 #define OSS_DRIVER_DEF_INS 2
43 #define OSS_DRIVER_DEF_OUTS 2
46 typedef jack_default_audio_sample_t jack_sample_t
;
48 typedef struct _oss_driver
52 jack_nframes_t sample_rate
;
53 jack_nframes_t period_size
;
54 unsigned int nperiods
;
56 unsigned int capture_channels
;
57 unsigned int playback_channels
;
74 jack_time_t last_periodtime
;
75 jack_time_t next_periodtime
;
76 jack_nframes_t sys_in_latency
;
77 jack_nframes_t sys_out_latency
;
79 JSList
*capture_ports
;
80 JSList
*playback_ports
;
82 jack_engine_t
*engine
;
83 jack_client_t
*client
;
89 pthread_mutex_t mutex_in
;
90 pthread_mutex_t mutex_out
;
92 pthread_barrier_t barrier
;