ASPiK SDK
|
To maximize simplicity as well as utility, the ICustomView interface is extremely simple. It is designed with the understanding that pushing audio information (samples) into the view will be a very common chore however it is not limited to just audio data. Instead, it relies on the user’s skills with the lock-free ring buffer. The ring buffer is designed to hold pointers to any type of data. This means that you can create a custom structure that has custom view message data and use that structure for messaging to and from the custom view. So, for audio data you declare a ring buffer that stores doubles (audio samples) while for passing other data, you declare a ring buffer that stores custom data structure pointers instead.
The ICustomView definition is:
You can see that the object that implements the ICustomView interface MUST override and implement the updateView( ) function that will trigger the repaint-ing of the view. It will optionally (and usually) implement one of the remaining two functions for pushing data into the view. pushDataValue( ) will send a generic double value into the custom view (which you can cast to other datatypes if you like) while sendMessage( ) pushes a pointer of some kind into the view.