Show codec.h syntax highlighted
/***************************************************************************
codec.h - WAV codec
-------------------
begin : Wed Mar 17 2004
copyright : (C) 2004 by Reality Rift Studios
email : mattias@realityrift.com
***************************************************************************
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is the NeoEngine, NeoACWAV, codec.h
The Initial Developer of the Original Code is Mattias Jansson.
Portions created by Mattias Jansson are Copyright (C) 2004
Reality Rift Studios. All Rights Reserved.
***************************************************************************/
#ifndef __NEOACWAV_CODEC_H
#define __NEOACWAV_CODEC_H
#include <neoengine/base.h>
#include <neoengine/sound.h>
#include <neoengine/file.h>
namespace NeoACWAV
{
struct RiffChunk
{
char chunkID[4];
uint32_t chunkSize;
char format[4];
};
struct FormatChunk
{
char chunkID[4];
uint32_t chunkSize;
int16_t wFormatTag;
uint16_t wChannels;
uint32_t dwSamplesPerSec;
uint32_t dwAvgBytesPerSec;
uint16_t wBlockAlign;
uint16_t wBitsPerSample;
/* Note: there may be additional fields here, depending upon wFormatTag. */
};
struct DataChunk
{
char chunkID[4];
int32_t chunkSize;
};
/**
* \brief WAV sound codec
* \author Mattias Jansson (mattias@realityrift.com)
*/
class Codec : public NeoEngine::SoundCodec
{
public:
/**
* \param rstrFiletypeName File type name
* \param rvstrExtensions File type extensions
*/
Codec( const std::string &rstrFiletypeName, const std::vector< std::string > &rvstrExtensions );
/**
*/
virtual ~Codec();
/**
* Check if file is type (must NOT change file offset!)
* \param pkFile File
* \return true if type, false if not
*/
virtual bool IsType( NeoEngine::File *pkFile );
/**
* Create a sound stream
* \param pkFile File
* \return Ptr to new SoundStream object
*/
virtual NeoEngine::SoundStream *GetStream( NeoEngine::File *pkFile );
};
};
#endif
See more files for this project here
NeoenEngine NG (Next Generation) is the evolution of neoengine one,it\'s a different development from NeoEngine2, it\'s a direct inherits from NeoEngine one.\n
Project homepage:
http://sourceforge.net/projects/neoengineng
Programming language(s): C,C++
License: other
Makefile.am
SConscript
codec.cpp
codec.h
link.h
neoacwav-static.dev
neoacwav.cbp
neoacwav.dev
neoacwav.dsp
neoacwav.layout
neoacwav.vcproj
stream.cpp
stream.h