This file is indexed.

/usr/include/libinstpatch-1.0/libinstpatch/IpatchDLSReader.h is in libinstpatch-dev 1.0.0-3.

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
/*
 * libInstPatch
 * Copyright (C) 1999-2010 Joshua "Element" Green <jgreen@users.sourceforge.net>
 *
 * This program 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; version 2.1
 * of the License only.
 *
 * 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 program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301, USA or on the web at http://www.gnu.org.
 */
/**
 * SECTION: IpatchDLSReader
 * @short_description: DLS version 2 file reader
 * @see_also: #IpatchDLS
 * @stability: Stable
 *
 * Parses a DLS file into an object tree (#IpatchDLS).
 */
#ifndef __IPATCH_DLS_READER_H__
#define __IPATCH_DLS_READER_H__

#include <glib.h>
#include <libinstpatch/IpatchDLSFile.h>
#include <libinstpatch/IpatchRiff.h>
#include <libinstpatch/IpatchDLS2.h>
#include <libinstpatch/IpatchDLS2Info.h>
#include <libinstpatch/IpatchDLS2Region.h>
#include <libinstpatch/IpatchGigInst.h>
#include <libinstpatch/IpatchGigRegion.h>
#include <libinstpatch/IpatchGigDimension.h>

typedef struct _IpatchDLSReader IpatchDLSReader; /* private structure */
typedef struct _IpatchDLSReaderClass IpatchDLSReaderClass;

#define IPATCH_TYPE_DLS_READER   (ipatch_dls_reader_get_type ())
#define IPATCH_DLS_READER(obj) \
  (G_TYPE_CHECK_INSTANCE_CAST ((obj), IPATCH_TYPE_DLS_READER, \
   IpatchDLSReader))
#define IPATCH_DLS_READER_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_CAST ((klass), IPATCH_TYPE_DLS_READER, \
   IpatchDLSReaderClass))
#define IPATCH_IS_DLS_READER(obj) \
  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IPATCH_TYPE_DLS_READER))
#define IPATCH_IS_DLS_READER_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_TYPE ((klass), IPATCH_TYPE_DLS_READER))

/* error domain for DLS Reader */
#define IPATCH_DLS_READER_ERROR  ipatch_dls_reader_error_quark()

typedef enum
{
  /* this error is returned if a file originally thought to be a plain DLS
     file turns out to be a GigaSampler file, in which case loading should
     be restarted in GigaSampler mode */
  IPATCH_DLS_READER_ERROR_GIG
} IpatchDLSReaderError;

/* DLS reader object */
struct _IpatchDLSReader
{
  IpatchRiff parent_instance; /* derived from IpatchRiff */
  IpatchDLS2 *dls;   /* DLS or GigaSampler object to load file into */
  gboolean is_gig;	      /* set if dls is a GigaSampler object */
  gboolean needs_fixup;		/* set if regions in dls need fixup */
  GHashTable *wave_hash;	/* wave chunk file offset -> sample hash */
  guint32 *pool_table; /* wave pool table (index -> wave chunk file offset) */
  guint pool_table_size;     /* size of pool table (in cue entries) */
};

/* DLS reader class */
struct _IpatchDLSReaderClass
{
  IpatchRiffClass parent_class;
};

GType ipatch_dls_reader_get_type (void);
IpatchDLSReader *ipatch_dls_reader_new (IpatchFileHandle *handle);
IpatchDLS2 *ipatch_dls_reader_load (IpatchDLSReader *reader, GError **err);
gboolean ipatch_dls_reader_start (IpatchDLSReader *reader, GError **err);
void ipatch_dls_reader_set_pool_table (IpatchDLSReader *reader,
				       const guint32 pool_table[], guint size);
gboolean ipatch_dls_reader_fixup (IpatchDLSReader *reader, GError **err);

gboolean ipatch_dls_reader_load_level_0 (IpatchDLSReader *reader,
					 GError **err);
gboolean ipatch_dls_reader_load_inst_list (IpatchDLSReader *reader,
					   GError **err);
gboolean ipatch_dls_reader_load_region_list (IpatchDLSReader *reader,
				      IpatchDLS2Inst *inst, GError **err);
gboolean ipatch_gig_reader_load_region_list (IpatchDLSReader *reader,
					     IpatchGigInst *giginst,
					     GError **err);
gboolean ipatch_dls_reader_load_art_list (IpatchDLSReader *reader,
					  GSList **conn_list, GError **err);
gboolean ipatch_dls_reader_load_wave_pool (IpatchDLSReader *reader,
					   GError **err);
gboolean ipatch_gig_reader_load_sub_regions (IpatchDLSReader *reader,
					     IpatchGigRegion *region,
					     GError **err);
gboolean ipatch_gig_reader_load_inst_lart (IpatchDLSReader *reader,
					   IpatchGigInst *inst, GError **err);

gboolean ipatch_dls_load_info (IpatchRiff *riff, IpatchDLS2Info **info,
			       GError **err);
gboolean ipatch_dls_load_region_header (IpatchRiff *riff,
					IpatchDLS2Region *region, GError **err);
gboolean ipatch_gig_load_region_header (IpatchRiff *riff,
				        IpatchGigRegion *region, GError **err);
gboolean ipatch_dls_load_wave_link (IpatchRiff *riff, IpatchDLS2Region *region,
				    GError **err);
gboolean ipatch_dls_load_sample_info (IpatchRiff *riff,
                                      IpatchDLS2SampleInfo *info,
				      GError **err);
gboolean ipatch_dls_load_connection (IpatchRiff *riff,
				     GSList **conn_list,
				     GError **err);
gboolean ipatch_dls_load_sample_format (IpatchRiff *riff,
					IpatchDLS2Sample *sample,
					int *bitwidth, int *channels,
					GError **err);
guint32 *ipatch_dls_load_pool_table (IpatchRiff *riff, guint *size, GError **err);
gboolean ipatch_dls_load_dlid (IpatchRiff *riff, guint8 *dlid, GError **err);

gboolean ipatch_gig_load_sample_info (IpatchRiff *riff,
				      IpatchDLS2SampleInfo *info,
				      GError **err);
gboolean ipatch_gig_load_dimension_info (IpatchRiff *riff,
					 IpatchGigRegion *region,
					 GError **err);
gboolean ipatch_gig_load_dimension_names (IpatchRiff *riff,
					  IpatchGigRegion *region,
					  GError **err);
gboolean ipatch_gig_load_group_names (IpatchRiff *riff,
				      GSList **name_list, GError **err);

#endif