clang-format in src/sound/

This commit is contained in:
Jasmine Iwanek
2022-09-18 17:16:40 -04:00
parent 740d7af8d6
commit 645732b7bf
27 changed files with 521 additions and 521 deletions

View File

@@ -27,7 +27,6 @@
extern void givealbuffer_midi(void *buf, uint32_t 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 void display_mt32_message(void *instance_data, const char *message);

View File

@@ -28,8 +28,7 @@
#include <cstdlib>
#include <cstring>
extern "C"
{
extern "C" {
#include <86box/86box.h>
#include <86box/device.h>
#include <86box/midi.h>

View File

@@ -36,7 +36,8 @@
static uint32_t fm_dev_inst[FM_DRV_MAX][FM_MAX];
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) {
case FM_YM3812:
if (fm_driver == FM_DRV_NUKED) {

View File

@@ -1574,7 +1574,8 @@ nuked_drv_write(uint16_t port, uint8_t val, void *priv)
}
static void
nuked_drv_reset_buffer(void *priv) {
nuked_drv_reset_buffer(void *priv)
{
nuked_drv_t *dev = (nuked_drv_t *) priv;
dev->pos = 0;

View File

@@ -34,11 +34,12 @@ enum {
FLAG_CYCLES = (1 << 0)
};
class YMFMChipBase
{
class YMFMChipBase {
public:
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));
}
@@ -69,8 +70,7 @@ protected:
};
template <typename ChipType>
class YMFMChip : public YMFMChipBase, public ymfm::ymfm_interface
{
class YMFMChip : public YMFMChipBase, public ymfm::ymfm_interface {
public:
YMFMChip(uint32_t clock, fm_type type, uint32_t samplerate)
: YMFMChipBase(clock, type, samplerate)
@@ -210,8 +210,7 @@ private:
int32_t m_samples[2];
};
extern "C"
{
extern "C" {
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>
@@ -300,14 +299,16 @@ ymfm_drv_write(uint16_t port, uint8_t val, void *priv)
}
static int32_t *
ymfm_drv_update(void *priv) {
ymfm_drv_update(void *priv)
{
YMFMChipBase *drv = (YMFMChipBase *) priv;
return drv->update();
}
static void
ymfm_drv_reset_buffer(void *priv) {
ymfm_drv_reset_buffer(void *priv)
{
YMFMChipBase *drv = (YMFMChipBase *) priv;
drv->reset_buffer();
@@ -370,5 +371,4 @@ const fm_drv_t ymfm_drv {
&ymfm_drv_set_do_cycles,
NULL,
};
}