sidemu Class Referenceabstract

`#include <sidemu.h>`

Inheritance diagram for sidemu:

## Public Types

enum | { OUTPUTBUFFERSIZE = 5000 }

## Public Member Functions

| sidemu (sidbuilder *builder)
virtual void | clock ()=0
virtual bool | lock (EventContext *env)
virtual void | unlock ()
virtual void | voice (unsigned int num, bool mute)=0
virtual void | model (SidConfig::sid_model_t model)=0
virtual void | sampling (float systemfreq SID_UNUSED, float outputfreq SID_UNUSED, SidConfig::sampling_method_t method SID_UNUSED, bool fast SID_UNUSED)
const char * | error () const
sidbuilder * | builder () const
int | bufferpos () const
void | bufferpos (int pos)
short * | buffer () const
void | poke (uint_least16_t address, uint8_t value)
uint8_t | peek (uint_least16_t address)
Public Member Functions inherited from c64sid
virtual void | reset (uint8_t volume)=0
void | reset ()

## Protected Attributes

EventContext * | m_context
event_clock_t | m_accessClk
short * | m_buffer
| The sample buffer.
int | m_bufferpos
| Current position in buffer.
bool | m_status
bool | m_locked
std::string | m_error

## Static Protected Attributes

static std::string | m_credit
static const char | ERR_UNSUPPORTED_FREQ [] = "Unable to set desired output frequency."
static const char | ERR_INVALID_SAMPLING [] = "Invalid sampling method."
static const char | ERR_INVALID_CHIP [] = "Invalid chip model."

## Additional Inherited Members

Protected Member Functions inherited from component
virtual uint8_t | read (uint_least8_t addr)=0
virtual void | write (uint_least8_t addr, uint8_t data)=0

## Detailed Description

Inherit this class to create a new SID emulation.

## Member Enumeration Documentation

anonymous enum

Buffer size. 5000 is roughly 5 ms at 96 kHz

## Member Function Documentation

short* sidemu::buffer | ( |  | ) | const

inline

Get the buffer.

int sidemu::bufferpos | ( |  | ) | const

inline

Get the current position in buffer.

void sidemu::bufferpos | ( | int | pos | ) |

inline

Set the position in buffer.

virtual void sidemu::clock | ( |  | ) |

pure virtual

Clock the SID chip.

Implemented in HardSID, ReSID, and ReSIDfp.

const char* sidemu::error | ( |  | ) | const

inline

Get a detailed error message.

bool sidemu::lock | ( | EventContext * | env | ) |

virtual

Set execution environment and lock sid to it.

Reimplemented in HardSID.

virtual void sidemu::model | ( | SidConfig::sid_model_t | model | ) |

pure virtual

Set SID model.

Implemented in HardSID, ReSID, and ReSIDfp.

uint8_t sidemu::peek | ( | uint_least16_t | address | ) |

inline virtual

Bank read. You probably should override this method, except if the Bank is only used in write context.

Parameters

  address | value to read from

Returns
  value at address

Reimplemented from c64sid.

void sidemu::poke | ( | uint_least16_t | address,
|  | uint8_t | value
| ) |  |

inline virtual

Bank write.

Override this method if you expect write operations on your bank. Leave unimplemented if it's logically/operationally impossible for writes to ever arrive to bank.

Parameters

  address | address to write to
  value | value to write

Reimplemented from c64sid.

virtual void sidemu::sampling | ( | float systemfreq | SID_UNUSED,
|  | float outputfreq | SID_UNUSED,
|  | SidConfig::sampling_method_t method | SID_UNUSED,
|  | bool fast | SID_UNUSED
| ) |  |

inline virtual

Set the sampling method.

Parameters

  systemfreq |
  outputfreq |
  method |
  fast |

void sidemu::unlock | ( |  | ) |

virtual

Unlock sid.

Reimplemented in HardSID.

virtual void sidemu::voice | ( | unsigned int | num,
|  | bool | mute
| ) |  |

pure virtual

Mute/unmute voice.

Implemented in HardSID, ReSID, and ReSIDfp.

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

- sidemu.h
- sidemu.cpp