-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Started new Apu implementation, added System->Speed menu, various ref…
…actorings
- Loading branch information
ferris
committed
May 17, 2013
1 parent
28a067f
commit 994b194
Showing
8 changed files
with
107 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#include "Apu.h" | ||
|
||
Apu::Apu() | ||
{ | ||
mutex = Mutex::Create(); | ||
} | ||
|
||
Apu::~Apu() | ||
{ | ||
delete mutex; | ||
} | ||
|
||
void Apu::SetAudioDriver(IAudioDriver *audioDriver) | ||
{ | ||
} | ||
|
||
void Apu::SetBeeping(bool beeping) | ||
{ | ||
mutex->Lock(); | ||
this->beeping = beeping; | ||
mutex->Unlock(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#ifndef __CHIP8_APU_H__ | ||
#define __CHIP8_APU_H__ | ||
|
||
#include "../Common.h" | ||
|
||
#include "../IAudioDriver.h" | ||
|
||
class Apu | ||
{ | ||
public: | ||
Apu(); | ||
~Apu(); | ||
|
||
void SetAudioDriver(IAudioDriver *audioDriver); | ||
|
||
void SetBeeping(bool beeping); | ||
|
||
private: | ||
IAudioDriver *audioDriver; | ||
Mutex *mutex; | ||
bool beeping; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters