diff options
author | Raghuram Subramani <raghus2247@gmail.com> | 2023-10-22 09:00:16 +0530 |
---|---|---|
committer | Raghuram Subramani <raghus2247@gmail.com> | 2023-10-22 09:00:16 +0530 |
commit | eb6adb4b212cd55f8e6a553ecdcffa2f8a7cc63a (patch) | |
tree | a744ce43eeb5c2ff758ccc9d02750489b04bafc2 /src/chip8.hpp | |
parent | 689fa26e124cebb42518ed7ca14185d80fff20b9 (diff) |
Implement sound
Diffstat (limited to 'src/chip8.hpp')
-rw-r--r-- | src/chip8.hpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/chip8.hpp b/src/chip8.hpp index 5072c2e..01db296 100644 --- a/src/chip8.hpp +++ b/src/chip8.hpp @@ -4,6 +4,9 @@ #include <cstdint> #include <random> #include <bitset> +#include <mutex> + +#include "platform.hpp" const uint32_t VIDEO_HEIGHT = 32; const uint32_t VIDEO_WIDTH = 64; @@ -33,10 +36,12 @@ class Chip8 { private: std::default_random_engine randGen; std::uniform_int_distribution<uint8_t> randByte; + std::mutex timerMutex; public: void LoadROM(const char* filename); void Cycle(); + void TimerUpdateThread(Platform* platform); private: void SetupTable(); |