libsidplayfp::sidemu Class Referenceabstract

`#include <sidemu.h>`

Inheritance diagram for libsidplayfp::sidemu:

## Public Types

enum | { OUTPUTBUFFERSIZE = 5000 }

## Public Member Functions

| sidemu (sidbuilder *builder)
virtual void | clock ()=0
virtual bool | lock (EventScheduler *scheduler)
virtual void | unlock ()
virtual void | voice (unsigned int num, bool mute)=0
virtual void | model (SidConfig::sid_model_t model, bool digiboost)=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
Public Member Functions inherited from libsidplayfp::c64sid
virtual void | reset (uint8_t volume)=0
void | reset ()
void | poke (uint_least16_t address, uint8_t value) override
uint8_t | peek (uint_least16_t address) override
void | getStatus (uint8_t regs[0x20]) const

## Protected Attributes

EventScheduler * | eventScheduler
event_clock_t | m_accessClk
short * | m_buffer
| The sample buffer.
int | m_bufferpos
| Current position in buffer.
bool | m_status
bool | isLocked
std::string | m_error

## Static Protected Attributes

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 libsidplayfp::c64sid
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

anonymous enum

Buffer size. 5000 is roughly 5 ms at 96 kHz

## Member Function Documentation

## buffer()

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

inline

Get the buffer.

## bufferpos() [1/2]

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

inline

Get the current position in buffer.

## bufferpos() [2/2]

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

inline

Set the position in buffer.

## clock()

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

pure virtual

Clock the SID chip.

Implemented in libsidplayfp::ReSIDfp, libsidplayfp::ReSID, libsidplayfp::HardSID, and libsidplayfp::exSID.

## error()

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

inline

Get a detailed error message.

## lock()

bool libsidplayfp::sidemu::lock | ( | EventScheduler * | scheduler | ) |

virtual

Set execution environment and lock sid to it.

Reimplemented in libsidplayfp::HardSID, and libsidplayfp::exSID.

## model()

virtual void libsidplayfp::sidemu::model | ( | SidConfig::sid_model_t | model,
|  | bool | digiboost
| ) |  |

pure virtual

Set SID model.

Implemented in libsidplayfp::HardSID, libsidplayfp::ReSIDfp, libsidplayfp::ReSID, and libsidplayfp::exSID.

## sampling()

virtual void libsidplayfp::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 |

## unlock()

void libsidplayfp::sidemu::unlock | ( |  | ) |

virtual

Unlock sid.

Reimplemented in libsidplayfp::HardSID, and libsidplayfp::exSID.

## voice()

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

pure virtual

Mute/unmute voice.

Implemented in libsidplayfp::ReSIDfp, libsidplayfp::ReSID, libsidplayfp::HardSID, and libsidplayfp::exSID.

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

- sidemu.h
- sidemu.cpp