Format recent code changes

This commit is contained in:
derselbst 2022-06-11 17:26:09 +02:00
parent ff362b52cd
commit 3591299ea0
2 changed files with 27 additions and 27 deletions

View file

@ -553,7 +553,7 @@ static fluid_thread_return_t fluid_alsa_audio_run_s16(void *d)
{ {
FLUID_MEMSET(left, 0, buffer_size * sizeof(*left)); FLUID_MEMSET(left, 0, buffer_size * sizeof(*left));
FLUID_MEMSET(right, 0, buffer_size * sizeof(*right)); FLUID_MEMSET(right, 0, buffer_size * sizeof(*right));
(*dev->callback)(dev->data, buffer_size, 0, NULL, 2, handle); (*dev->callback)(dev->data, buffer_size, 0, NULL, 2, handle);
/* convert floating point data to 16 bit (with dithering) */ /* convert floating point data to 16 bit (with dithering) */
@ -1339,13 +1339,13 @@ fluid_alsa_seq_run(void *d)
break; break;
case SND_SEQ_EVENT_PORT_START: case SND_SEQ_EVENT_PORT_START:
{
if(dev->autoconn_inputs)
{ {
if(dev->autoconn_inputs) fluid_alsa_seq_autoconnect_port(dev, seq_ev->data.addr.client, seq_ev->data.addr.port);
{
fluid_alsa_seq_autoconnect_port(dev, seq_ev->data.addr.client, seq_ev->data.addr.port);
}
} }
break; }
break;
case SND_SEQ_EVENT_START: case SND_SEQ_EVENT_START:
evt.type = MIDI_START; evt.type = MIDI_START;

View file

@ -145,29 +145,29 @@ fluid_winmidi_callback(HMIDIIN hmi, UINT wMsg, DWORD_PTR dwInstance,
break; break;
case MIM_DATA: case MIM_DATA:
if(msg_param < 0xF0) /* Voice category message */ if(msg_param < 0xF0) /* Voice category message */
{ {
event.type = msg_type(msg_param); event.type = msg_type(msg_param);
event.channel = msg_chan(msg_param) + dev_infos->channel_map; event.channel = msg_chan(msg_param) + dev_infos->channel_map;
FLUID_LOG(FLUID_DBG, "\ndevice at index %d sending MIDI message on channel %d, forwarded on channel: %d", FLUID_LOG(FLUID_DBG, "\ndevice at index %d sending MIDI message on channel %d, forwarded on channel: %d",
dev_infos->dev_idx, msg_chan(msg_param), event.channel); dev_infos->dev_idx, msg_chan(msg_param), event.channel);
if(event.type != PITCH_BEND) if(event.type != PITCH_BEND)
{ {
event.param1 = msg_p1(msg_param); event.param1 = msg_p1(msg_param);
event.param2 = msg_p2(msg_param); event.param2 = msg_p2(msg_param);
} }
else /* Pitch bend is a 14 bit value */ else /* Pitch bend is a 14 bit value */
{ {
event.param1 = (msg_p2(msg_param) << 7) | msg_p1(msg_param); event.param1 = (msg_p2(msg_param) << 7) | msg_p1(msg_param);
event.param2 = 0; event.param2 = 0;
} }
} }
else /* System message */ else /* System message */
{ {
event.type = msg_param; event.type = msg_param;
} }
(*dev->driver.handler)(dev->driver.data, &event); (*dev->driver.handler)(dev->driver.data, &event);
break; break;