Jack2 1.9.6

hardware.h

00001 /*
00002    Copyright (C) 2001 Paul Davis
00003 
00004    This program is free software; you can redistribute it and/or modify
00005    it under the terms of the GNU General Public License as published by
00006    the Free Software Foundation; either version 2 of the License, or
00007    (at your option) any later version.
00008 
00009    This program is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012    GNU General Public License for more details.
00013 
00014    You should have received a copy of the GNU General Public License
00015    along with this program; if not, write to the Free Software
00016    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00017 
00018    $Id: hardware.h,v 1.3 2005/11/23 11:24:29 letz Exp $
00019 */
00020 
00021 #ifndef __jack_hardware_h__
00022 #define __jack_hardware_h__
00023 
00024 #include "types.h"
00025 
00026 typedef enum {
00027     AutoSync,
00028     WordClock,
00029     ClockMaster
00030 } SampleClockMode;
00031 
00032 typedef enum {
00033     Cap_HardwareMonitoring = 0x1,
00034     Cap_AutoSync = 0x2,
00035     Cap_WordClock = 0x4,
00036     Cap_ClockMaster = 0x8,
00037     Cap_ClockLockReporting = 0x10,
00038     Cap_HardwareMetering = 0x20
00039 } Capabilities;
00040 
00041 struct _jack_hardware;
00042 
00043 typedef void (*JackHardwareReleaseFunction)(struct _jack_hardware *);
00044 typedef int (*JackHardwareSetInputMonitorMaskFunction)(struct _jack_hardware *, unsigned long);
00045 typedef int (*JackHardwareChangeSampleClockFunction)(struct _jack_hardware *, SampleClockMode);
00046 typedef double (*JackHardwareGetHardwarePeak)(jack_port_t *port, jack_nframes_t frames);
00047 typedef double (*JackHardwareGetHardwarePower)(jack_port_t *port, jack_nframes_t frames);
00048 
00049 typedef struct _jack_hardware
00050 {
00051     unsigned long capabilities;
00052     unsigned long input_monitor_mask;
00053 
00054     JackHardwareChangeSampleClockFunction change_sample_clock;
00055     JackHardwareSetInputMonitorMaskFunction set_input_monitor_mask;
00056     JackHardwareReleaseFunction release;
00057     JackHardwareGetHardwarePeak get_hardware_peak;
00058     JackHardwareGetHardwarePower get_hardware_power;
00059     void *private_hw;
00060 }
00061 jack_hardware_t;
00062 
00063 #ifdef __cplusplus
00064 extern "C"
00065 {
00066 #endif
00067 
00068     jack_hardware_t * jack_hardware_new ();
00069 
00070 #ifdef __cplusplus
00071 }
00072 #endif
00073 
00074 
00075 #endif /* __jack_hardware_h__ */