Agregando sonido

This commit is contained in:
2025-06-28 21:14:07 -04:00
parent 4125e866b4
commit 02b5f6ecaf
8 changed files with 180 additions and 8 deletions

View File

@@ -1,6 +1,7 @@
#ifndef MACHINE_H
#define MACHINE_H
#include "Sound.h"
#include "Graphics/Graphics.h"
#include "Interpreter/Interpreter.h"
#include "SDL3/SDL_events.h"
@@ -11,6 +12,7 @@ class Machine
{
std::shared_ptr<MachineState> machine_state;
std::shared_ptr<Graphics> graphics;
std::unique_ptr<Sound> sound;
std::shared_ptr<CallbackManager> callback_manager;
std::shared_ptr<Interpreter> interpreter;
@@ -21,10 +23,16 @@ class Machine
double accumulator;
double target_cycle_time;
uint64_t last_timer_time;
double timer_accumulator;
double timer_cycle_time;
std::string rom;
bool running;
void execute_interpreter();
void update_timers();
void on_rom_load(const std::string& path);
void on_reset() const;
void on_stop();