Products . Sound Recorder ActiveX Control . Online Help

Sound Recorder ActiveX
 
 

System Requirements

  • any Windows operating system installed
  • sound card

Installation

  • Extract files into permanent directory.
  • Run install.bat to register ActiveX control.

Removing Sound Recorder ActiveX

  • Run uninstall.bat to unregister ActiveX control.
  • Remove the directory you created previously.

Distribution of Sound Recorder ActiveX

When distributing your application, you need to:
  • copy SoundRec.ocx to your application installation directory.
  • register it with install.bat command.
No other files and actions are needed. We would appreciate if you mention us in your "About" window (not required).

License

See license.txt for details.

Registration

Unregistered version of Sound Recorder Control allows to record only 10 minutes of a sound. You need to register the control in order to get rid of this restrinction. After registering, you will receive three numbers that you need to pass to the ActiveX control via Register() method. See below more information.

Creating ActiveX Control
It's better way to drop Sound ActiveX Control on the form in design mode. Your IDE will do all needed job in order to support it.
You can freely create more than one instance of Sound Recorder ActiveX, if you need to monitor and record sound from more than one sound card.

Properties

long Gain

This allows to adjust sound volume, per cent. For ezample, Gain=300 will inincreate volume in three times (300%), and Gain=50% will recrease volume in two times (50%). Special values are:
  • 0 (zero) - do not alter sound volume (the same as 100%).
  • 1 (one) - automatically adjust sound volume.

BSTR FileName

File name to save sound to. File will have standard RIFF WAVE header. File format can be specifies in Codec property (see below).

Changing this property while recording, will close previous file, and create new one.

BSTR Codec

Audio codec name. This is read only value. Do not attempt to change it dirrectly. You need to call either ChooseCodec or Properties methods in order to select another audio codec.

BSTR DeviceName

Sound cars name, that control will use for recording. Empty string will advise the control to use default recording device. Wildcards * and ? are allowed.

VARIANT_BOOL Paused

Set this value to True in order to pause recording, or False to resume paused recording.

long Duration

Duration of the record, in seconds. This is read-only value. Do not attempt to alter it.

SAFEARRAY(BSTR) DeviceList

Array of strings that contains a full list of hardware devices available for recording in the given system.

LASTERR LastError

This specifies error code of the latest call to any method. This can be one of the following:

NamevalueDescription
LASTERR_SUCCESS0No error
LASTERR_CODEC1Could not create audio codec
LASTERR_WAVEIN2Could not open sound card for recording.
LASTERR_DEVICE_NOT_FOUND3Specified DeviceName is not valid
LASTERR_FILE4Could not create or write to file
LASTERR_MEMORY5Out of memory
LASTERR_INTERNAL6Internal error. Contact us if you ever received it.
LASTERR_UNREGISTERED7The control is unregistered. You need to call Register method to register it.

Methods

VARIANT_BOOL Start()

Starts sound volume monitoring. Starts recording if Paused=False. Returns True if both sound card and audio codec were opened successfully.

void Stop()

Stops sound volume monitoring, releases all system resources, closes the file.

VARIANT_BOOL ChooseCodec()

Pops up a standard Windows' dialog box that allows to choose audio codec. Returns True if user pressed Ok button on the dialog box.

VARIANT_BOOL Properties()

Pops up a Sound Control ActiveX tuning window. Returns True if user pressed Ok button on the dialog box.

VARIANT_BOOL Register(long Code1, long Code2, long Code3)

This function unlocks program to fully registered version without any restrinctions. Code1, Code2, Code2 are numbers you have got after filling in online order form. Returns True if specified numbers are correct, and program is registered.

void AboutBox()

Pops up About window with information about version, release date, and contact information about the control.

Events

void OnAudioVolume(long AudioVolume)

Container receives this event when sound card is opened. AudioVolume is current audio volume.

void OnStarted(void)

Container receives this event right after sound card was successfully opened.

void OnStopped(void)

Container receives this event right after sound card was closed.


Home · Online Help · Download · Order

Copyright © 1999-2020 SoftCab, Inc. All Rights Reserved · 0.00079 seconds