Rémi Bernon (@rbernon) commented about dlls/dmime/midi.c:
+static HRESULT midi_parser_handle_set_tempo(struct midi_parser *parser, struct midi_event *event) +{ + DMUS_TEMPO_PARAM tempo; + MUSIC_TIME dmusic_time = (ULONGLONG)parser->time * DMUS_PPQ / parser->division; + HRESULT hr; + if (!parser->tempotrack) + { + if (FAILED(hr = CoCreateInstance(&CLSID_DirectMusicTempoTrack, NULL, CLSCTX_INPROC_SERVER, + &IID_IDirectMusicTrack, (void **)&parser->tempotrack))) + return hr; + } + tempo.mtTime = dmusic_time; + tempo.dblTempo = 60 * 1000000.0 / event->tempo; + TRACE("Adding tempo at time %lu, tempo %f\n", dmusic_time, tempo.dblTempo); + return IDirectMusicTrack_SetParam(parser->tempotrack, &GUID_TempoParam, dmusic_time, &tempo);
I would say the same here for instance, adding blank lines here and there helps making things more readable. ```suggestion:-12+0 DMUS_TEMPO_PARAM tempo; MUSIC_TIME dmusic_time = (ULONGLONG)parser->time * DMUS_PPQ / parser->division; HRESULT hr; if (!parser->tempotrack) { if (FAILED(hr = CoCreateInstance(&CLSID_DirectMusicTempoTrack, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicTrack, (void **)&parser->tempotrack))) return hr; } tempo.mtTime = dmusic_time; tempo.dblTempo = 60 * 1000000.0 / event->tempo; TRACE("Adding tempo at time %lu, tempo %f\n", dmusic_time, tempo.dblTempo); return IDirectMusicTrack_SetParam(parser->tempotrack, &GUID_TempoParam, dmusic_time, &tempo); ``` IMO you could also combine the two ifs. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/5190#note_63104