aflibSampleData.h

00001 /*
00002  * Copyright: (C) 1999-2001 Bruce W. Forsberg
00003  *
00004  *   This library is free software; you can redistribute it and/or
00005  *   modify it under the terms of the GNU Lesser General Public
00006  *   License as published by the Free Software Foundation; either
00007  *   version 2.1 of the License, or any later version.
00008  *
00009  *   This library 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 GNU
00012  *   Lesser General Public License for more details.
00013  *
00014  *   You should have received a copy of the GNU Lesser General Public
00015  *   License along with this library; if not, write to the Free Software
00016  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
00017  *
00018  *   Bruce Forsberg  forsberg@tns.net
00019  *
00020  */
00021 
00022 
00023 #ifndef _AFLIBSAMPLEDATA_H_
00024 #define _AFLIBSAMPLEDATA_H_
00025 
00026 
00027 #ifdef HAVE_CONFIG_H
00028 #include <config.h>
00029 #endif
00030 
00031 class aflibAudio;
00032 
00033 class aflibSampleData {
00034 
00035 public:
00036 
00037    aflibSampleData(const aflibAudio * file);
00038 
00039    ~aflibSampleData();
00040 
00041    void
00042    setOutputRange(
00043       int  min,
00044       int  max);
00045 
00046    void
00047    setMaxMinMode(bool mode);
00048 
00049    void
00050    setNumSamplePoints(
00051       unsigned int points);
00052 
00053    void
00054    setParametersSamples(
00055       long long start_sample,
00056       long long stop_sample);
00057 
00058    void
00059    setParametersSeconds(
00060       double start_seconds,
00061       double stop_seconds);
00062 
00063    void
00064    setChannels(
00065       int num_channels,
00066       int * array);
00067 
00068    int
00069    getDelta() const;
00070 
00071    bool
00072    process(
00073       int * array);
00074 
00075 private:
00076 
00077    aflibSampleData();
00078 
00079    aflibSampleData(const aflibSampleData& op);
00080 
00081    const aflibSampleData&
00082    operator=(const aflibSampleData& op);
00083 
00084 
00085 const aflibAudio * _file;
00086 int *         _channel_array;
00087 
00088 bool          _minmax_mode;
00089 int           _output_max;
00090 int           _output_min;
00091 int           _a0;
00092 int           _a1;
00093 int           _delta;
00094 unsigned int  _num_channels;
00095 unsigned int  _num_points;
00096 long long     _start_sample;
00097 long long     _stop_sample;
00098 
00099 };
00100 
00101 
00102 #endif

Generated on Tue Jan 16 12:42:55 2007 for Open Source Audio Library Project by  doxygen 1.4.6