openMSX
Public Types | Public Member Functions | Friends | List of all members
openmsx::CassettePlayer Class Reference

#include <CassettePlayer.hh>

Inheritance diagram for openmsx::CassettePlayer:
Inheritance graph
[legend]
Collaboration diagram for openmsx::CassettePlayer:
Collaboration graph
[legend]

Public Types

enum  State { PLAY, RECORD, STOP }
- Public Types inherited from openmsx::ResampledSoundDevice
enum  ResampleType { RESAMPLE_HQ, RESAMPLE_LQ, RESAMPLE_BLIP }

Public Member Functions

 CassettePlayer (const HardwareConfig &hwConf)
virtual ~CassettePlayer ()
virtual void setMotor (bool status, EmuTime::param time)
virtual short readSample (EmuTime::param time)
virtual void setSignal (bool output, EmuTime::param time)
virtual const std::string & getName () const
virtual string_ref getDescription () const
virtual void plugHelper (Connector &connector, EmuTime::param time)
virtual void unplugHelper (EmuTime::param time)
virtual void generateChannels (int **bufs, unsigned num)
template<typename Archive >
void serialize (Archive &ar, unsigned version)
- Public Member Functions inherited from openmsx::CassetteDevice
virtual void setMotor (bool status, EmuTime::param time)=0
 Sets the cassette motor relay false = off true = on.
virtual short readSample (EmuTime::param time)=0
 Read wave data from cassette device.
virtual void setSignal (bool output, EmuTime::param time)=0
 Sets the cassette output signal false = low true = high.
virtual string_ref getClass () const
 A pluggable belongs to a certain class.
- Public Member Functions inherited from openmsx::Pluggable
 Pluggable ()
virtual ~Pluggable ()
virtual const std::string & getName () const
 Name used to identify this pluggable.
virtual string_ref getDescription () const =0
 Description for this pluggable.
void plug (Connector &connector, EmuTime::param time)
 This method is called when this pluggable is inserted in a connector.
void unplug (EmuTime::param time)
 This method is called when this pluggable is removed from a conector.
ConnectorgetConnector () const
 Get the connector this Pluggable is plugged into.
bool isPluggedIn () const
 Returns true if this pluggable is currently plugged into a connector.
- Public Member Functions inherited from openmsx::ResampledSoundDevice
bool generateInput (int *buffer, unsigned num)
 Note: To enable various optimizations (like SSE), this method is allowed to generate up to 3 extra sample.
- Public Member Functions inherited from openmsx::SoundDevice
const std::string & getName () const
 Get the unique name that identifies this sound device.
const std::string & getDescription () const
 Gets a description of this sound device, to be presented to the user.
bool isStereo () const
 Is this a stereo device? This is set in the constructor and cannot be changed anymore.
virtual int getAmplificationFactor () const
 Get extra amplification factor for this device.
void recordChannel (unsigned channel, const Filename &filename)
void muteChannel (unsigned channel, bool muted)

Friends

class TapeCommand

Additional Inherited Members

- Static Public Attributes inherited from openmsx::SoundDevice
static const unsigned MAX_CHANNELS = 24
- Protected Member Functions inherited from openmsx::Pluggable
virtual void plugHelper (Connector &newConnector, EmuTime::param time)=0
virtual void unplugHelper (EmuTime::param time)=0
void setConnector (Connector *conn)
- Protected Member Functions inherited from openmsx::ResampledSoundDevice
 ResampledSoundDevice (MSXMotherBoard &motherBoard, string_ref name, string_ref description, unsigned channels, bool stereo=false)
virtual ~ResampledSoundDevice ()
virtual void setOutputRate (unsigned sampleRate)
 When a SoundDevice registers itself with the Mixer, the Mixer sets the required sampleRate through this method.
virtual bool updateBuffer (unsigned length, int *buffer, EmuTime::param time)
 Generate sample data.
virtual void update (const Setting &setting)
void createResampler ()
- Private Member Functions inherited from openmsx::EventListener
virtual ~EventListener ()
virtual int signalEvent (const std::shared_ptr< const Event > &event)=0
 This method gets called when an event you are subscribed to occurs.
 EventListener ()
- Private Member Functions inherited from openmsx::Schedulable
virtual void executeUntil (EmuTime::param time, int userData)=0
 When the previously registered syncPoint is reached, this method gets called.
virtual void schedulerDeleted ()
 Just before the the Scheduler is deleted, it calls this method of all the Schedulables that are still registered.
SchedulergetScheduler () const
EmuTime::param getCurrentTime () const
 Convenience method: This is the same as getScheduler().getCurrentTime().
template<typename Archive >
void serialize (Archive &ar, unsigned version)
 Schedulable (Scheduler &scheduler)
virtual ~Schedulable ()
void setSyncPoint (EmuTime::param timestamp, int userData=0)
bool removeSyncPoint (int userData=0)
void removeSyncPoints ()
bool pendingSyncPoint (int userData=0) const

Detailed Description

Definition at line 24 of file CassettePlayer.hh.

Member Enumeration Documentation

Enumerator:
PLAY 
RECORD 
STOP 

Definition at line 48 of file CassettePlayer.hh.

Constructor & Destructor Documentation

openmsx::CassettePlayer::CassettePlayer ( const HardwareConfig hwConf)
explicit
openmsx::CassettePlayer::~CassettePlayer ( )
virtual

Member Function Documentation

void openmsx::CassettePlayer::generateChannels ( int **  bufs,
unsigned  num 
)
virtual

Definition at line 557 of file CassettePlayer.cc.

References PLAY.

string_ref openmsx::CassettePlayer::getDescription ( ) const
virtual

Definition at line 535 of file CassettePlayer.cc.

const string & openmsx::CassettePlayer::getName ( ) const
virtual

Definition at line 529 of file CassettePlayer.cc.

Referenced by CassettePlayer(), and ~CassettePlayer().

void openmsx::CassettePlayer::plugHelper ( Connector connector,
EmuTime::param  time 
)
virtual

Definition at line 544 of file CassettePlayer.cc.

short openmsx::CassettePlayer::readSample ( EmuTime::param  time)
virtual

Definition at line 422 of file CassettePlayer.cc.

References PLAY.

template<typename Archive >
void openmsx::CassettePlayer::serialize ( Archive &  ar,
unsigned  version 
)
void openmsx::CassettePlayer::setMotor ( bool  status,
EmuTime::param  time 
)
virtual

Definition at line 404 of file CassettePlayer.cc.

void openmsx::CassettePlayer::setSignal ( bool  output,
EmuTime::param  time 
)
virtual

Definition at line 434 of file CassettePlayer.cc.

void openmsx::CassettePlayer::unplugHelper ( EmuTime::param  time)
virtual

Definition at line 550 of file CassettePlayer.cc.

References STOP.

Friends And Related Function Documentation

friend class TapeCommand
friend

Definition at line 150 of file CassettePlayer.hh.


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