dimanche 28 août 2016

CreateMIDIInput and CreateMIDIOutput return value in case of error

The Reaper API is extensive, but one thing it is missing is a lot of the documentation. One thing I would suggest the developers to every new API function create a good documentation no matter how self explanatory the function signature is. And for every new Reaper release, no matter how small release, write documentation to some fixed number of functions once again no matter how self explanatory the function signature is. It is question of good practice to do so. Do not leave anything to assumptions. Now to the question:

In case of initialisation error what does the CreateMIDIInput and CreateMIDIOutput functions return? Do they return NULL if the creation fails? This is one of those things that logically thinking the answer is yes, but the web site daily wtf is not a joke and I've seen a lot in production environment during my years so due to the lack of documentation I want to verify this matter.

"Program to an interface not a class". When you document the function, or interface, you create a contract that it must follow which would also make the unit testing easier and more sensible.


CreateMIDIInput and CreateMIDIOutput return value in case of error

Aucun commentaire:

Enregistrer un commentaire