mirror of
https://github.com/HarbourMasters/Starship.git
synced 2025-05-08 11:38:13 +03:00
Increased samples per frame and readded malloc system
This commit is contained in:
parent
9c9aca051d
commit
2ee034b16e
2 changed files with 4 additions and 3 deletions
|
@ -42,7 +42,7 @@ void AudioThread_CreateNextAudioBuffer(int16_t *samples, uint32_t num_samples);
|
||||||
|
|
||||||
GameEngine* GameEngine::Instance;
|
GameEngine* GameEngine::Instance;
|
||||||
static GamePool MemoryPool = {
|
static GamePool MemoryPool = {
|
||||||
.chunk = 2048,
|
.chunk = 1024 * 20,
|
||||||
.cursor = 0,
|
.cursor = 0,
|
||||||
.length = 0,
|
.length = 0,
|
||||||
.memory = nullptr
|
.memory = nullptr
|
||||||
|
@ -437,7 +437,8 @@ extern "C" int32_t OTRConvertHUDXToScreenX(int32_t v) {
|
||||||
|
|
||||||
extern "C" void* GameEngine_Malloc(size_t size) {
|
extern "C" void* GameEngine_Malloc(size_t size) {
|
||||||
// This is really wrong
|
// This is really wrong
|
||||||
return malloc(size);
|
// return malloc(size);
|
||||||
|
// TODO: Kenix please take a look at this, i think it works but you are better at this
|
||||||
|
|
||||||
const auto chunk = MemoryPool.chunk;
|
const auto chunk = MemoryPool.chunk;
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ struct GamePool {
|
||||||
#define SAMPLES_LOW 528
|
#define SAMPLES_LOW 528
|
||||||
#define AUDIO_FRAMES_PER_UPDATE 2
|
#define AUDIO_FRAMES_PER_UPDATE 2
|
||||||
#define NUM_AUDIO_CHANNELS 2
|
#define NUM_AUDIO_CHANNELS 2
|
||||||
#define SAMPLES_PER_FRAME (SAMPLES_HIGH * NUM_AUDIO_CHANNELS * 2)
|
#define SAMPLES_PER_FRAME (SAMPLES_HIGH * NUM_AUDIO_CHANNELS * 3)
|
||||||
|
|
||||||
class GameEngine {
|
class GameEngine {
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue