This file is indexed.

/usr/include/libinstpatch-1.0/libinstpatch/IpatchSampleStore.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
/*
 * 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: IpatchSampleStore
 * @short_description: Abstract sample storage object
 * @see_also: 
 * @stability: Stable
 *
 * Sample stores provide for various storage methods for audio data.
 * Examples include: #IpatchSampleStoreFile for audio data stored in files
 * on disk, #IpatchSampleStoreRAM for audio in RAM, #IpatchSampleStoreROM for
 * samples in ROM of a sound card, etc.
 */
#ifndef __IPATCH_SAMPLE_STORE_H__
#define __IPATCH_SAMPLE_STORE_H__

/* forward type declarations */

typedef struct _IpatchSampleStore IpatchSampleStore;
typedef struct _IpatchSampleStoreClass IpatchSampleStoreClass;

#include <stdarg.h>
#include <glib.h>
#include <glib-object.h>
#include <libinstpatch/IpatchSample.h>
#include <libinstpatch/IpatchItem.h>
#include <libinstpatch/IpatchSampleTransform.h>
#include <libinstpatch/sample.h>

#define IPATCH_TYPE_SAMPLE_STORE (ipatch_sample_store_get_type ())
#define IPATCH_SAMPLE_STORE(obj) \
  (G_TYPE_CHECK_INSTANCE_CAST ((obj), IPATCH_TYPE_SAMPLE_STORE, \
   IpatchSampleStore))
#define IPATCH_SAMPLE_STORE_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_CAST ((klass), IPATCH_TYPE_SAMPLE_STORE, \
   IpatchSampleStoreClass))
#define IPATCH_IS_SAMPLE_STORE(obj) \
  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IPATCH_TYPE_SAMPLE_STORE))
#define IPATCH_IS_SAMPLE_STORE_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_TYPE ((klass), IPATCH_TYPE_SAMPLE_STORE))
#define IPATCH_SAMPLE_STORE_GET_CLASS(obj) \
  (G_TYPE_INSTANCE_GET_CLASS ((obj), IPATCH_TYPE_SAMPLE_STORE, \
   IpatchSampleStoreClass))

/* sample store base instance */
struct _IpatchSampleStore
{
  IpatchItem parent_instance;

  guint32 size;			/* size of sample data (in samples) */
  guint32 rate;			/* sample rate in hz */
};

/* sample store base class */
struct _IpatchSampleStoreClass
{
  IpatchItemClass parent_class;
};


/* IpatchSampleWidth | sign | endian | channels stored in flags field
   (9 bits) - see sample.h */

/* flags bit shift value to sample format field */
#define IPATCH_SAMPLE_STORE_FORMAT_SHIFT IPATCH_ITEM_UNUSED_FLAG_SHIFT

/**
 * ipatch_sample_store_get_format:
 *
 * Macro for getting the sample format from a sample store.  No lock is required
 * since format can only be set prior to the store being actively used.
 *
 * Returns: Sample format field.  See #sample.
 */
#define ipatch_sample_store_get_format(store) \
  ((ipatch_item_get_flags (store) >> IPATCH_SAMPLE_STORE_FORMAT_SHIFT) \
   & IPATCH_SAMPLE_FORMAT_MASK)

/**
 * ipatch_sample_store_get_size:
 *
 * Macro for getting the sample size in frames of a sample store.  No lock is required
 * since size can only be set prior to the store being actively used.
 *
 * Returns: Sample store size in frames.
 */
#define ipatch_sample_store_get_size(store) ((store)->size)

/**
 * ipatch_sample_store_get_rate:
 *
 * Macro for getting the sample rate from a sample store.  No lock is required
 * since rate can only be set prior to the store being actively used.
 *
 * Returns: Sample rate in HZ.
 */
#define ipatch_sample_store_get_rate(store) ((store)->rate)

/**
 * ipatch_sample_store_get_size_bytes:
 *
 * Macro for getting the sample store data size in bytes.  No lock is required
 * since format and size can only be set prior to the store being actively used.
 *
 * Returns: Sample store size in bytes.
 */
#define ipatch_sample_store_get_size_bytes(store) \
  (ipatch_sample_format_size (ipatch_sample_store_get_format (store)) * (store)->size)

/* we reserve flags for format and 3 for expansion */
#define IPATCH_SAMPLE_STORE_UNUSED_FLAG_SHIFT \
  (IPATCH_ITEM_UNUSED_FLAG_SHIFT + IPATCH_SAMPLE_FORMAT_BITCOUNT + 3)

GType ipatch_sample_store_get_type (void);

IpatchSampleStore *ipatch_sample_store_first (IpatchIter *iter);
IpatchSampleStore *ipatch_sample_store_next (IpatchIter *iter);

#endif