aflibOggFile.h

Go to the documentation of this file.
00001 /*
00002  * Copyright: (C) 2002 Jeroen Versteeg
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  *   Jeroen Versteeg            j.m.versteeg@student.utwente.nl
00019  *
00020  */
00021 
00030 #ifndef _AFLIBOGGFILE_H
00031 #define _AFLIBOGGFILE_H
00032 
00033 #include "aflibFile.h"
00034 
00035 class aflibBufferUtils;
00036 
00037 class aflibOggFile : public aflibFile {
00038 
00039 public:
00040    aflibOggFile();
00041    ~aflibOggFile();
00042    aflibStatus afopen(const char * file, aflibConfig* cfg);
00043    aflibStatus afcreate(const char * file, const aflibConfig& cfg);
00044    aflibStatus afread(aflibData& data, long long position = -1);
00045    aflibStatus afwrite( aflibData& data, long long position = -1);
00046    bool isDataSizeSupported(aflib_data_size size);
00047    bool isEndianSupported(aflib_data_endian end);
00048    bool isSampleRateSupported(int& rate);
00049 
00050 private:
00051     int            _handle;
00052     FILE        *_stream;
00053     OggVorbis_File _ogg_handle;
00054         vorbis_info    *_vi;
00055     long long       _total_samples;
00056     long long       _cur_position;
00057         aflibBufferUtils *_buf;
00058 
00059 };
00060 
00061 
00062 #endif

Generated on Sat Feb 23 13:56:37 2008 for Open Source Audio Library Project by  doxygen 1.5.1