mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-18 10:35:46 -04:00
Implement event-based scheduler instead of lock-step components
This commit is contained in:
@ -3,11 +3,12 @@
|
||||
#include "common/fifo_queue.h"
|
||||
#include "types.h"
|
||||
#include <array>
|
||||
#include <memory>
|
||||
|
||||
class AudioStream;
|
||||
class StateWrapper;
|
||||
|
||||
class System;
|
||||
class TimingEvent;
|
||||
class DMA;
|
||||
class InterruptController;
|
||||
|
||||
@ -27,8 +28,6 @@ public:
|
||||
void DMARead(u32* words, u32 word_count);
|
||||
void DMAWrite(const u32* words, u32 word_count);
|
||||
|
||||
void Execute(TickCount ticks);
|
||||
|
||||
// Render statistics debug window.
|
||||
void DrawDebugStateWindow();
|
||||
|
||||
@ -40,6 +39,9 @@ public:
|
||||
}
|
||||
void EnsureCDAudioSpace(u32 num_samples);
|
||||
|
||||
// Executes the SPU, generating any pending samples.
|
||||
void GeneratePendingSamples();
|
||||
|
||||
private:
|
||||
static constexpr u32 RAM_SIZE = 512 * 1024;
|
||||
static constexpr u32 RAM_MASK = RAM_SIZE - 1;
|
||||
@ -282,11 +284,13 @@ private:
|
||||
|
||||
void ReadADPCMBlock(u16 address, ADPCMBlock* block);
|
||||
std::tuple<s32, s32> SampleVoice(u32 voice_index);
|
||||
void GenerateSample();
|
||||
void Execute(TickCount ticks);
|
||||
void UpdateEventInterval();
|
||||
|
||||
System* m_system = nullptr;
|
||||
DMA* m_dma = nullptr;
|
||||
InterruptController* m_interrupt_controller = nullptr;
|
||||
std::unique_ptr<TimingEvent> m_sample_event = nullptr;
|
||||
|
||||
SPUCNT m_SPUCNT = {};
|
||||
SPUSTAT m_SPUSTAT = {};
|
||||
|
Reference in New Issue
Block a user