Copyright © 2006-2018 MultiMedia Soft

How to use the control in your projects

Previous pageReturn to chapter overviewNext page

First of all let us say that if this guide should not be clear to you, feel free to contact our support team for any doubt or curiosity you may have: we usually answer all of our customers questions in less than 24 hours. Note that the purpose of this guide is to give a taste of the main features available inside Active Sound Recorder.


As an integration to this guide, several examples of use of this component, in Visual Basic 6 and Visual C++ 6 languages, can be found inside the "Samples" folder: if during the setup phase you left the installation directory to its default, you will find them inside "C:\Program Files\Active Sound Recorder\Samples".


The first needed step is to add the control to your project: see the Adding the control to a project section for details.


Before starting sounds recording, the component needs to be initialized: for this purpose it's mandatory a call to the InitRecordingSystem method; the best place to call this initialisation method is usually the container form initialization function: for example, when using Visual Basic 6, it will be the Form_Load subroutine or, when using Visual C++, it will be the handler function of the WM_INITDIALOG Windows message.



Important note


All of our audio-related components share the same instance of the multimedia engine AdjMmsEng.dll or AdjMmsEng64.dll whose initialization/disposal requires a certain amount of time because it needs to negotiate with the underlying Windows multimedia system and the sound card drivers: this operation, depending upon the system and quality of sound card drivers in use, may require some second.

In order to obtain a better efficiency when instancing the component on multiple container forms within the same application, it would be highly recommended hosting and initializing, through the InitRecordingSystem method, an instance of the component inside a form that will stay alive for the full life of the container application, for example the application's main form: although this instance of the component may stay hidden and may never be used, the memory footprint would be in any case irrelevant but it would keep the multimedia engine alive, allowing a faster loading/disposal when the container form is closed/opened.



Main features provided by this control are the following:


Recording from an input device, usually defined as "sound card": see the How to perform a recording session section for further details.
Recording from other sources like sound files on disk or from an Internet URL: see the How to record from files, memory or clipboard and the How to perform an Internet-based recording session sections for further details.
Ripping CD tracks: see the How to perform a CD ripping session section for further details.


An important topic to keep count of is how synchronization between the container application and events generated by this control works: see the How to synchronize the container application with the control tutorial for further details.


Further capabilities of the control, not directly related to sound recording, are the following:


the ExtractAudioFromVideoFile method allows extracting the audio track from a video clip and to store it inside an output sound file that may be used later for further editing.
Control of the volume through mixers: usually every sound card have a mixer which can be used in order to set the card volumes; you can access these information using the following methods:


MixerGetCount to get the number of mixers currently installed: usually one mixer is available for every installed sound card.

MixerGetDesc to retrieve a friendly description of a mixer.

MixerVolumeSet/MixerVolumeGet to set/get the volume of a system mixer

MixerMuteSet/MixerMuteGet to set/get the mute state of a system mixer


When dealing with Windows Vista and higher versions, mixers can be managed more easily through the usage of the CoreAudioDevices object: see the How to access settings of audio devices in Windows Vista and later versions tutorial for further information about this feature.