mirror of
https://github.com/JorjBauer/aiie.git
synced 2024-10-31 09:15:51 +00:00
99d0c8e72c
* New BIOS interface * New linux framebuffer version * Unified linuxfb and SDL with Teensy * Abstracted VM RAM * Fixed disk image corruption due to bad cache handling * Variable CPU speed support
33 lines
746 B
C++
33 lines
746 B
C++
#ifndef __SDLSPEAKER_H
|
|
#define __SDLSPEAKER_H
|
|
|
|
#include <stdio.h>
|
|
#include <stdint.h>
|
|
#include "physicalspeaker.h"
|
|
|
|
#define SPEAKERQUEUESIZE 1024
|
|
|
|
class SDLSpeaker : public PhysicalSpeaker {
|
|
public:
|
|
SDLSpeaker();
|
|
virtual ~SDLSpeaker();
|
|
|
|
virtual void toggle(uint32_t c);
|
|
virtual void maintainSpeaker(uint32_t c, uint64_t microseconds);
|
|
virtual void beginMixing();
|
|
virtual void mixOutput(uint8_t v);
|
|
private:
|
|
uint8_t mixerValue;
|
|
bool toggleState;
|
|
|
|
uint32_t toggleTimes[SPEAKERQUEUESIZE];
|
|
uint8_t toggleCount; // # of entries still in queue
|
|
uint8_t toggleReadPtr; // ring buffer pointer in queue
|
|
uint8_t toggleWritePtr; // ring buffer pointer in queue
|
|
|
|
uint64_t lastCycleCount;
|
|
uint64_t lastSampleCount;
|
|
};
|
|
|
|
#endif
|