Copyright © 2006-2018 MultiMedia Soft

Adding the API to a C# project

Previous pageReturn to chapter overviewNext page

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 Sound Recorder API" as displayed below and, if your application targets .NET framework versions 2.0, 3.0 or 3.5, select "Audio Sound Recorder API v2" or, if your application targets .NET framework 4, select "Audio Sound Recorder 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 Sound Recorder API v2" or like this



if you selected "Audio Sound Recorder API v4"


At this point we need to create a new instance of the component's class and, before starting sound recording management, to initialize the component: for this purpose it's mandatory a call to the InitRecordingSystem method. The code snippet below shows how to perform instancing and initialization of the component


Visual C#


// instance the API as a global variable

AudioSoundRecorderApi.AudioSoundRecorderApiObj m_audioRecorderAPI = new AudioSoundRecorderApi.AudioSoundRecorderApiObj();


// initialize the API at the beginning of your code




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.