mirror of
https://github.com/libretro/opera-libretro.git
synced 2026-11-07 04:25:58 -10:00
43 lines
649 B
Plaintext
43 lines
649 B
Plaintext
#include "libopera/opera_dsp.h"
|
|
|
|
#include "opera_lr_callbacks.h"
|
|
#include "opera_lr_dsp.h"
|
|
|
|
#include <stdint.h>
|
|
|
|
/* MACROS */
|
|
#define DSP_BUF_SIZE 1024
|
|
#define DSP_BUF_SIZE_MASK 0x3FF
|
|
|
|
/* GLOBAL VARIABLES */
|
|
static uint32_t g_DSP_BUF_IDX = 0;
|
|
static int32_t g_DSP_BUF[DSP_BUF_SIZE];
|
|
|
|
/* PUBLIC FUNCTIONS */
|
|
|
|
void
|
|
opera_lr_dsp_process(void)
|
|
{
|
|
g_DSP_BUF[g_DSP_BUF_IDX++] = opera_dsp_loop();
|
|
g_DSP_BUF_IDX &= DSP_BUF_SIZE_MASK;
|
|
}
|
|
|
|
void
|
|
opera_lr_dsp_upload(void)
|
|
{
|
|
retro_audio_sample_batch_cb((int16_t*)g_DSP_BUF,g_DSP_BUF_IDX);
|
|
g_DSP_BUF_IDX = 0;
|
|
}
|
|
|
|
void
|
|
opera_lr_dsp_destroy(void)
|
|
{
|
|
|
|
}
|
|
|
|
void
|
|
opera_lr_dsp_init(const bool threaded_)
|
|
{
|
|
|
|
}
|