This file is indexed.

/usr/include/bio2jack.h is in libbio2jack0-dev 0.9-2.1build1.

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
/*
 * Copyright 2003-2004 Chris Morgan <cmorgan@alum.wpi.edu>
 *
 * This library 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 2.1 of the License, or (at your option) any later version.
 *
 * This library 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 this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#ifndef _H_JACK_OUT_H
#define _H_JACK_OUT_H

#include <jack/jack.h>

#ifdef __cplusplus
extern "C" {
#else
#define bool long
#endif

#ifndef TRUE
#define TRUE 1
#endif

#ifndef FALSE
#define FALSE 0
#endif

#define ERR_SUCCESS                           0
#define ERR_OPENING_JACK                      1
#define ERR_RATE_MISMATCH                     2
#define ERR_BYTES_PER_OUTPUT_FRAME_INVALID    3
#define ERR_BYTES_PER_INPUT_FRAME_INVALID     4
#define ERR_TOO_MANY_OUTPUT_CHANNELS          5
#define ERR_PORT_NAME_OUTPUT_CHANNEL_MISMATCH 6
#define ERR_PORT_NOT_FOUND                    7
#define ERR_TOO_MANY_INPUT_CHANNELS           8
#define ERR_PORT_NAME_INPUT_CHANNEL_MISMATCH  9

enum status_enum { PLAYING, PAUSED, STOPPED, CLOSED, RESET };
enum pos_enum    { BYTES, MILLISECONDS };

#define PLAYED          1 /* played out of the speakers(estimated value but should be close */
#define WRITTEN_TO_JACK 2 /* amount written out to jack */
#define WRITTEN         3 /* amount written to the bio2jack device */

/**********************/
/* External functions */
void JACK_Init(void); /* call this before any other bio2jack calls */
void JACK_DoSampleRateConversion(bool value); /* whether the next device that's Open()d should do
                                                 sample rate conversion if necessary */
void JACK_SetSampleRateConversionFunction(int converter); /* which SRC converter function should be used
                                                             for the next Open()d device */
int  JACK_Open(int *deviceID, unsigned int bits_per_sample, unsigned long *rate, int channels); /* Note: defaults to 0 input channels
												   if you need input (record) use OpenEx
												   instead */
int  JACK_OpenEx(int *deviceID, unsigned int bits_per_channel,
                 unsigned long *rate,
                 unsigned int input_channels, unsigned int output_channels,
                 const char **jack_port_name, unsigned int jack_port_name_count,
                 unsigned long jack_port_flags);
int  JACK_Close(int deviceID); /* return 0 for success */
void JACK_Reset(int deviceID); /* free all buffered data and reset several values in the device */
long JACK_Write(int deviceID, unsigned char *data, unsigned long bytes); /* returns the number of bytes written */
long JACK_Read(int deviceID, unsigned char *data, unsigned long bytes); /* returns the number of bytes read */

/* state setting values */
/* set/get the written/played/buffered value based on a byte or millisecond input value */
long JACK_GetPosition(int deviceID, enum pos_enum position, int type);
void JACK_SetPosition(int deviceID, enum pos_enum position, long value);

long JACK_GetJackLatency(int deviceID); /* deprectated, you probably want JACK_GetJackOutputLatency */
long JACK_GetJackOutputLatency(int deviceID); /* return the output latency in frames */
long JACK_GetJackInputLatency(int deviceID); /* return the input latency in frames */

int JACK_SetState(int deviceID, enum status_enum state); /* playing, paused, stopped */
enum status_enum JACK_GetState(int deviceID);

long JACK_GetMaxOutputBufferedBytes(int deviceID);
long JACK_GetMaxInputBufferedBytes(int deviceID);

/* bytes that jack requests during each callback */
unsigned long JACK_GetJackBufferedBytes(int deviceID);

/* Properties of the jack driver */

/* linear means 0 volume is silence, 100 is full volume */
/* dbAttenuation means 0 volume is 0dB attenuation */
/* Bio2jack defaults to linear */
/* Note: volume controls only effect output channels for now */
enum JACK_VOLUME_TYPE { linear, dbAttenuation };
enum JACK_VOLUME_TYPE JACK_SetVolumeEffectType(int deviceID,
                                               enum JACK_VOLUME_TYPE type);

int  JACK_SetAllVolume(int deviceID, unsigned int volume); /* returns 0 on success */
int  JACK_SetVolumeForChannel(int deviceID, unsigned int channel, unsigned int volume);
void JACK_GetVolumeForChannel(int deviceID, unsigned int channel, unsigned int *volume);


unsigned long JACK_GetOutputBytesPerSecond(int deviceID); /* bytes_per_output_frame * sample_rate */
unsigned long JACK_GetInputBytesPerSecond(int deviceID);  /* bytes_per_input_frame * sample_rate */
unsigned long JACK_GetBytesStored(int deviceID);          /* bytes currently buffered in the output buffer */
unsigned long JACK_GetBytesFreeSpace(int deviceID);       /* bytes of free space in the output buffer */
unsigned long JACK_GetBytesUsedSpace(int deviceID);       /* bytes of space used in the input buffer */
unsigned long JACK_GetBytesPerOutputFrame(int deviceID);
unsigned long JACK_GetBytesPerInputFrame(int deviceID);

/* Note: these will probably be removed in a future release */
int  JACK_GetNumInputChannels(int deviceID);
int  JACK_GetNumOutputChannels(int deviceID);

long JACK_GetSampleRate(int deviceID); /* samples per second */

void JACK_SetClientName(char *name); /* sets the name that bio2jack will use when
                                        creating a new jack client.  name_%pid%_%deviceID%%counter%
                                        will be used
                                        NOTE: this defaults to name = bio2jack
                                        NOTE: we limit the size of the client name to
                                           jack_client_name_size() */

enum JACK_PORT_CONNECTION_MODE
{
    CONNECT_ALL,    /* connect to all avaliable ports */
    CONNECT_OUTPUT, /* connect only to the ports we need for output */
    CONNECT_NONE    /* don't connect to any ports */
};

/* set the mode for port connections */
/* defaults to CONNECT_ALL */ 
void JACK_SetPortConnectionMode(enum JACK_PORT_CONNECTION_MODE mode);

#ifdef __cplusplus
}
#endif

#endif /* #ifndef JACK_OUT_H */