I added out-of-memory checks on fluid_player_add and fluid_player_add_mem - I thought it made sense at least for the potentially big allocation of the midi file. I also swapped a row or two - some compilers (and the C standard?) are a little picky on mixing declarations with statements.
Ah, good catch. It's definitely important to check that the big copy malloc succeeds.
As for mixing declarations with statements: It is allowed by the C99 standard, but not any earlier standard. I prefer code which is pre-C99 compatible for maximum portability, so it's good you fixed this (apparently GCC at least doesn't complain about it by default).
Cheers!
Matt