Go Back   Cockos Incorporated Forums > REAPER Forums > ReaScript, JSFX, REAPER Plug-in Extensions, Developer Forum

Reply
 
Thread Tools Display Modes
Old 08-28-2016, 08:40 AM   #1
msiren
Human being with feelings
 
Join Date: Jun 2012
Location: Jyväskylä, Finland
Posts: 8
Default 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.
msiren is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 04:19 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.