1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-10 06:39:49 +00:00
OpenMW/apps/openmw/mwsound/ffmpeg_decoder.hpp
Chris Robinson caf5d71d44 Make the sound decoder's Open method return void
Errors are thrown, not returned
2012-03-17 03:18:28 -07:00

36 lines
683 B
C++

#ifndef GAME_SOUND_FFMPEG_DECODER_H
#define GAME_SOUND_FFMPEG_DECODER_H
#include <string>
extern "C"
{
#include <avcodec.h>
#include <avformat.h>
}
#include "sound_decoder.hpp"
namespace MWSound
{
class FFmpeg_Decoder : public Sound_Decoder
{
virtual void Open(const std::string &fname);
virtual void Close();
virtual void GetInfo(int *samplerate, ChannelConfig *chans, SampleType *type);
virtual size_t Read(char *buffer, size_t bytes);
FFmpeg_Decoder();
virtual ~FFmpeg_Decoder();
friend class SoundManager;
};
#ifndef DEFAULT_DECODER
#define DEFAULT_DECODER (::MWSound::FFmpeg_Decoder)
#endif
};
#endif