clang-format in src/sound/
This commit is contained in:
@@ -27,7 +27,6 @@
|
|||||||
extern void givealbuffer_midi(void *buf, uint32_t size);
|
extern void givealbuffer_midi(void *buf, uint32_t size);
|
||||||
extern void al_set_midi(int freq, int buf_size);
|
extern void al_set_midi(int freq, int buf_size);
|
||||||
|
|
||||||
|
|
||||||
static mt32emu_report_handler_version get_mt32_report_handler_version(mt32emu_report_handler_i i);
|
static mt32emu_report_handler_version get_mt32_report_handler_version(mt32emu_report_handler_i i);
|
||||||
static void display_mt32_message(void *instance_data, const char *message);
|
static void display_mt32_message(void *instance_data, const char *message);
|
||||||
|
|
||||||
|
|||||||
@@ -28,8 +28,7 @@
|
|||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
extern "C"
|
extern "C" {
|
||||||
{
|
|
||||||
#include <86box/86box.h>
|
#include <86box/86box.h>
|
||||||
#include <86box/device.h>
|
#include <86box/device.h>
|
||||||
#include <86box/midi.h>
|
#include <86box/midi.h>
|
||||||
|
|||||||
@@ -36,7 +36,8 @@
|
|||||||
static uint32_t fm_dev_inst[FM_DRV_MAX][FM_MAX];
|
static uint32_t fm_dev_inst[FM_DRV_MAX][FM_MAX];
|
||||||
|
|
||||||
uint8_t
|
uint8_t
|
||||||
fm_driver_get(int chip_id, fm_drv_t *drv) {
|
fm_driver_get(int chip_id, fm_drv_t *drv)
|
||||||
|
{
|
||||||
switch (chip_id) {
|
switch (chip_id) {
|
||||||
case FM_YM3812:
|
case FM_YM3812:
|
||||||
if (fm_driver == FM_DRV_NUKED) {
|
if (fm_driver == FM_DRV_NUKED) {
|
||||||
|
|||||||
@@ -1574,7 +1574,8 @@ nuked_drv_write(uint16_t port, uint8_t val, void *priv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nuked_drv_reset_buffer(void *priv) {
|
nuked_drv_reset_buffer(void *priv)
|
||||||
|
{
|
||||||
nuked_drv_t *dev = (nuked_drv_t *) priv;
|
nuked_drv_t *dev = (nuked_drv_t *) priv;
|
||||||
|
|
||||||
dev->pos = 0;
|
dev->pos = 0;
|
||||||
|
|||||||
@@ -34,11 +34,12 @@ enum {
|
|||||||
FLAG_CYCLES = (1 << 0)
|
FLAG_CYCLES = (1 << 0)
|
||||||
};
|
};
|
||||||
|
|
||||||
class YMFMChipBase
|
class YMFMChipBase {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
YMFMChipBase(uint32_t clock, fm_type type, uint32_t samplerate)
|
YMFMChipBase(uint32_t clock, fm_type type, uint32_t samplerate)
|
||||||
: m_buf_pos(0), m_flags(0), m_type(type)
|
: m_buf_pos(0)
|
||||||
|
, m_flags(0)
|
||||||
|
, m_type(type)
|
||||||
{
|
{
|
||||||
memset(m_buffer, 0, sizeof(m_buffer));
|
memset(m_buffer, 0, sizeof(m_buffer));
|
||||||
}
|
}
|
||||||
@@ -69,8 +70,7 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
template <typename ChipType>
|
template <typename ChipType>
|
||||||
class YMFMChip : public YMFMChipBase, public ymfm::ymfm_interface
|
class YMFMChip : public YMFMChipBase, public ymfm::ymfm_interface {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
YMFMChip(uint32_t clock, fm_type type, uint32_t samplerate)
|
YMFMChip(uint32_t clock, fm_type type, uint32_t samplerate)
|
||||||
: YMFMChipBase(clock, type, samplerate)
|
: YMFMChipBase(clock, type, samplerate)
|
||||||
@@ -210,8 +210,7 @@ private:
|
|||||||
int32_t m_samples[2];
|
int32_t m_samples[2];
|
||||||
};
|
};
|
||||||
|
|
||||||
extern "C"
|
extern "C" {
|
||||||
{
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@@ -300,14 +299,16 @@ ymfm_drv_write(uint16_t port, uint8_t val, void *priv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int32_t *
|
static int32_t *
|
||||||
ymfm_drv_update(void *priv) {
|
ymfm_drv_update(void *priv)
|
||||||
|
{
|
||||||
YMFMChipBase *drv = (YMFMChipBase *) priv;
|
YMFMChipBase *drv = (YMFMChipBase *) priv;
|
||||||
|
|
||||||
return drv->update();
|
return drv->update();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ymfm_drv_reset_buffer(void *priv) {
|
ymfm_drv_reset_buffer(void *priv)
|
||||||
|
{
|
||||||
YMFMChipBase *drv = (YMFMChipBase *) priv;
|
YMFMChipBase *drv = (YMFMChipBase *) priv;
|
||||||
|
|
||||||
drv->reset_buffer();
|
drv->reset_buffer();
|
||||||
@@ -370,5 +371,4 @@ const fm_drv_t ymfm_drv {
|
|||||||
&ymfm_drv_set_do_cycles,
|
&ymfm_drv_set_do_cycles,
|
||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user