#include "sound.h"
-#include "SDL.h"
-#include "types.h"
+#include <SDL2/SDL.h>
+#include <stdint.h>
#include "log.h"
#include "v6808.h"
#include "timing.h"
static SDL_AudioSpec desired;
static bool soundInitialized = false;
-static uint32 cyclesToExecuteWholePart;
+static uint32_t cyclesToExecuteWholePart;
static double cyclesToExecuteFractionalPart;
// Private function prototypes
void SDLSoundCallback(void * userdata, Uint8 * buffer, int length);
+
//
// Initialize the SDL sound system
//
}
// Setup clock cycles & etc.
- cyclesToExecuteWholePart = (uint32)CYCLES_TO_EXECUTE;
+ cyclesToExecuteWholePart = (uint32_t)CYCLES_TO_EXECUTE;
cyclesToExecuteFractionalPart = CYCLES_TO_EXECUTE - (double)cyclesToExecuteWholePart;
#if 0
printf("Cycles to execute: %lf; cycles W: %u; cycles F: %lf\n", CYCLES_TO_EXECUTE, cyclesToExecuteWholePart, cyclesToExecuteFractionalPart);
WriteLog("Sound: Successfully initialized.\n");
}
+
//
// Close down the SDL sound subsystem
//
}
}
+
//
// Sound card callback handler
//
void SDLSoundCallback(void * userdata, Uint8 * buffer, int length)
{
extern V6808REGS soundCPU;
- extern uint8 sram[];
+ extern uint8_t sram[];
int cnt = 0;
static float overflow = 0.0;
- static uint32 time = cyclesToExecuteWholePart;
+ static uint32_t time = cyclesToExecuteWholePart;
while (cnt != length)
{
}
}
}
+