openMSX
Public Types | Public Member Functions | Protected Member Functions | List of all members
openmsx::CassetteImage Class Referenceabstract

#include <CassetteImage.hh>

Inheritance diagram for openmsx::CassetteImage:
Inheritance graph
[legend]

Public Types

enum  FileType { ASCII, BINARY, BASIC, UNKNOWN }
 

Public Member Functions

virtual ~CassetteImage ()
 
virtual short getSampleAt (EmuTime::param time)=0
 
virtual EmuTime getEndTime () const =0
 
virtual unsigned getFrequency () const =0
 
virtual void fillBuffer (unsigned pos, int **bufs, unsigned num) const =0
 
FileType getFirstFileType () const
 
std::string getFirstFileTypeAsString () const
 
const Sha1SumgetSha1Sum () const
 Get sha1sum for this image. More...
 

Protected Member Functions

 CassetteImage ()
 
void setFirstFileType (FileType type)
 
void setSha1Sum (const Sha1Sum &sha1sum)
 

Detailed Description

Definition at line 10 of file CassetteImage.hh.

Member Enumeration Documentation

Enumerator
ASCII 
BINARY 
BASIC 
UNKNOWN 

Definition at line 13 of file CassetteImage.hh.

Constructor & Destructor Documentation

virtual openmsx::CassetteImage::~CassetteImage ( )
inlinevirtual

Definition at line 15 of file CassetteImage.hh.

openmsx::CassetteImage::CassetteImage ( )
protected

Definition at line 6 of file CassetteImage.cc.

Member Function Documentation

virtual void openmsx::CassetteImage::fillBuffer ( unsigned  pos,
int **  bufs,
unsigned  num 
) const
pure virtual

Implemented in openmsx::CasImage, and openmsx::WavImage.

virtual EmuTime openmsx::CassetteImage::getEndTime ( ) const
pure virtual

Implemented in openmsx::CasImage, and openmsx::WavImage.

FileType openmsx::CassetteImage::getFirstFileType ( ) const
inline

Definition at line 21 of file CassetteImage.hh.

std::string openmsx::CassetteImage::getFirstFileTypeAsString ( ) const

Definition at line 11 of file CassetteImage.cc.

References ASCII, BASIC, and BINARY.

virtual unsigned openmsx::CassetteImage::getFrequency ( ) const
pure virtual

Implemented in openmsx::CasImage, and openmsx::WavImage.

virtual short openmsx::CassetteImage::getSampleAt ( EmuTime::param  time)
pure virtual

Implemented in openmsx::CasImage, and openmsx::WavImage.

const Sha1Sum & openmsx::CassetteImage::getSha1Sum ( ) const

Get sha1sum for this image.

This is based on the content of the file, not the logical meaning of the file. IOW: it's possible for different files (with different sha1sum) to represent the same logical cassette data (e.g. wav with different bits per sample). This method will give a different sha1sum to such files.

Definition at line 30 of file CassetteImage.cc.

References openmsx::Sha1Sum::empty().

void openmsx::CassetteImage::setFirstFileType ( FileType  type)
inlineprotected

Definition at line 35 of file CassetteImage.hh.

Referenced by openmsx::CasImage::CasImage().

void openmsx::CassetteImage::setSha1Sum ( const Sha1Sum sha1sum)
protected

Definition at line 24 of file CassetteImage.cc.

References openmsx::Sha1Sum::empty().

Referenced by openmsx::WavImage::WavImage().


The documentation for this class was generated from the following files: