Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

aflibDevFile.h

Go to the documentation of this file.
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 
00041 #ifndef _AFLIBDEVFILE_H
00042 #define _AFLIBDEVFILE_H
00043 
00044 #include "aflibFile.h"
00045 
00046 #define AFLIB_DEV_ITEM_BUFFER "aflib_dev_item_buffer"
00047 
00048 class aflibDevFile : public aflibFile {
00049 
00050 public:
00051 
00052    aflibDevFile();
00053 
00054    ~aflibDevFile();
00055 
00056    aflibStatus
00057    afopen(
00058       const char * file,
00059       aflibConfig* cfg);
00060 
00061    aflibStatus
00062    afcreate(
00063       const char * file,
00064       const aflibConfig& config);
00065 
00066    aflibStatus
00067    afread(
00068       aflibData& data,
00069       long long position = -1);
00070 
00071    aflibStatus
00072    afwrite(
00073       aflibData& data,
00074       long long position = -1);
00075 
00076    bool
00077    setItem(
00078       const char * item,
00079       const void * value);
00080 
00081    void
00082    programDevice();
00083 
00084    bool
00085    isDataSizeSupported(aflib_data_size size);
00086 
00087    bool
00088    isEndianSupported(aflib_data_endian end);
00089 
00090    bool
00091    isSampleRateSupported(int& rate);
00092 
00093 private:
00094 
00095    int
00096    createBuffer(
00097       const aflibConfig& cfg,
00098       double factor);
00099 
00100 bool   _create_mode;
00101 int    _snd_format;
00102 int    _snd_stereo;
00103 int    _snd_speed;
00104 double _snd_buffer;
00105 int  _fd_int;
00106 aflib_data_size  _size;
00107 string  _file;
00108 
00109 };
00110 
00111 
00112 #endif

Generated at Tue Aug 7 22:18:06 2001 for Open Source Audio Library Project by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001