Adding the API to a C# project
Find below required steps:
|•||Open the project you are working on|
|•||Inside the "Solution Explorer" right-click the mouse button on the "References" item|
|•||From the context menu select the "Add reference..." menu item; this will open the "Add reference" dialog box.|
|•||Select the ".NET" tab and, on the list of installed components, find the component named "Audio DJ Studio API" as displayed below and, if your application targets .NET framework versions 2.0, 3.0 or 3.5, select "Audio DJ Studio API v2" or, if your application targets .NET framework 4, select "Audio DJ Studio API v4"|
|•||Pressing the "OK" button will bring you again to your project working area and the References item of the Solution Explorer will appear like this:|
if you selected "Audio DJ Studio API v2" or like this
if you selected "Audio DJ Studio API v4"
|•||At this point we need to create a new instance of the component's class and, before starting sound playback management, to initialize the component: for this purpose it's mandatory a call to the InitSoundSystem method. The code snippet below shows how to perform instancing and initialization of the component|
// instance the API as a global variable
AudioDjStudioApi.AudioDjStudioApiObj m_audioAPI = new AudioDjStudioApi.AudioDjStudioApiObj();
// initialize the API at the beginning of your code
m_audioAPI.InitSoundSystem (1, 0, 0, 0, 0);
|•||You can now start developing your code around the control as described inside the How to use the API in your projects section|
IMPORTANT: Before exiting the container application, in order to avoid memory leaks, it's recommended that you explicitly call the Dispose method of the API.