• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • Examples
  • File List
  • File Members

SoundInfo.h

Go to the documentation of this file.
00001 // 
00002 //   Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
00003 // 
00004 // This program is free software; you can redistribute it and/or modify
00005 // it under the terms of the GNU General Public License as published by
00006 // the Free Software Foundation; either version 3 of the License, or
00007 // (at your option) any later version.
00008 // 
00009 // This program 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
00012 // GNU General Public License for more details.
00013 // 
00014 // You should have received a copy of the GNU General Public License
00015 // along with this program; if not, write to the Free Software
00016 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00017 
00018 // 
00019 //
00020 
00021 
00022 #ifndef __SOUNDINFO_H__
00023 #define __SOUNDINFO_H__
00024 
00025 #include "MediaParser.h" // for audioCodecType enum and AudioInfo
00026 
00027 namespace gnash {
00028 namespace media {
00029 
00031 //
00037 class SoundInfo {
00038 public:
00040         //
00071         SoundInfo(audioCodecType format, bool stereo, boost::uint32_t sampleRate,
00072             boost::uint32_t sampleCount, bool is16bit,
00073             boost::int16_t delaySeek=0)
00074             :
00075         _format(format),
00076                 _stereo(stereo),
00077                 _sampleRate(sampleRate),
00078                 _sampleCount(sampleCount),
00079                 _delaySeek(delaySeek),
00080                 _is16bit(is16bit)
00081         {
00082         }
00083 
00085         //
00087         audioCodecType getFormat() const { return _format; }
00088 
00090         //
00092         bool isStereo() const { return _stereo; }
00093 
00095         //
00097         unsigned long getSampleRate() const { return _sampleRate; }
00098 
00100         //
00106         unsigned long getSampleCount() const { return _sampleCount; }
00107 
00109         // 
00112         boost::int16_t getDelaySeek() const { return _delaySeek; }
00113 
00115         //
00117         bool is16bit() const { return _is16bit; }
00118 
00119 private:
00121         audioCodecType _format;
00122 
00124         unsigned long _dataSize;
00125 
00127         bool _stereo;
00128 
00130         boost::uint32_t _sampleRate;
00131 
00133         boost::uint32_t _sampleCount;
00134 
00136         boost::int16_t _delaySeek;
00137 
00140         bool _is16bit;
00141 };
00142 
00143 } // gnash.media namespace 
00144 } // namespace gnash
00145 
00146 #endif // __SOUNDINFO_H__

Generated on Thu Sep 30 2010 14:35:03 for Gnash by  doxygen 1.7.1