Skip to content

Commit

Permalink
Using heap alloc for sound buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioMartin86 committed Sep 8, 2024
1 parent 58eefcf commit d109ae1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Binary file modified Assets/dll/stella.wbx.zst
Binary file not shown.
5 changes: 4 additions & 1 deletion waterbox/stella/BizhawkInterface.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "M6532.hxx"
#include "TIA.hxx"

uint16_t soundbuffer[4096];
uint16_t* soundbuffer;
int nsamples;

struct InitSettings
Expand Down Expand Up @@ -201,6 +201,9 @@ ECL_EXPORT int stella_init(
{
fprintf(stderr, "Initializing Stella core...\n");

// Allocating sound buffer
soundbuffer = (uint16_t*) alloc_invisible(4096);

Settings::Options opts;
_a2600 = MediaFactory::createOSystem();
if(!_a2600->initialize(opts)) { fprintf(stderr, "ERROR: Couldn't create A2600 System\n"); return 0; }
Expand Down
2 changes: 1 addition & 1 deletion waterbox/stella/BizhawkInterface.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
#include <vector>
#include <cstdint>

extern uint16_t soundbuffer[4096];
extern uint16_t* soundbuffer;
extern int nsamples;

0 comments on commit d109ae1

Please sign in to comment.