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 ()=default
 
virtual int16_t getSampleAt (EmuTime::param time) const =0
 
virtual EmuTime getEndTime () const =0
 
virtual unsigned getFrequency () const =0
 
virtual void fillBuffer (unsigned pos, std::span< float *, 1 > bufs, unsigned num) const =0
 
virtual float getAmplificationFactorImpl () const =0
 
FileType getFirstFileType () const
 
std::string getFirstFileTypeAsString () const
 
const Sha1SumgetSha1Sum () const
 Get sha1sum for this image.
 

Protected Member Functions

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

Detailed Description

Definition at line 12 of file CassetteImage.hh.

Member Enumeration Documentation

◆ FileType

Enumerator
ASCII 
BINARY 
BASIC 
UNKNOWN 

Definition at line 15 of file CassetteImage.hh.

Constructor & Destructor Documentation

◆ ~CassetteImage()

virtual openmsx::CassetteImage::~CassetteImage ( )
virtualdefault

◆ CassetteImage()

openmsx::CassetteImage::CassetteImage ( )
protecteddefault

Member Function Documentation

◆ fillBuffer()

virtual void openmsx::CassetteImage::fillBuffer ( unsigned  pos,
std::span< float *, 1 >  bufs,
unsigned  num 
) const
pure virtual

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

◆ getAmplificationFactorImpl()

virtual float openmsx::CassetteImage::getAmplificationFactorImpl ( ) const
pure virtual

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

◆ getEndTime()

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

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

◆ getFirstFileType()

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

Definition at line 24 of file CassetteImage.hh.

◆ getFirstFileTypeAsString()

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

Definition at line 6 of file CassetteImage.cc.

References ASCII, BASIC, and BINARY.

◆ getFrequency()

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

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

◆ getSampleAt()

virtual int16_t openmsx::CassetteImage::getSampleAt ( EmuTime::param  time) const
pure virtual

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

◆ getSha1Sum()

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 25 of file CassetteImage.cc.

References openmsx::Sha1Sum::empty().

◆ setFirstFileType()

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

Definition at line 38 of file CassetteImage.hh.

◆ setSha1Sum()

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

Definition at line 19 of file CassetteImage.cc.

References openmsx::Sha1Sum::empty().

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


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