LEADTOOLS Annotations (Leadtools.Annotations assembly)

AnnAudioObject Class

Show in webframe
Example 





Members 
Defines an audio annotation object.
Object Model
Syntax
Remarks
The audio annotation object is a scaled image that can be activated to play an audio (WAV) clip. The WAV file path is stored in the FileName property, so the WAV data itself is not stored in this object, only the physical path. In automation mode, when this audio object is clicked, the framework will try to locate and then play the WAV file stored in FileName. This object will use the default image of an audio speaker. To change this default image, change the AnnImageObject.Picture value.

The AnnAudioObject class inherits the the AnnImageObject class and accesses the common AnnImageObject.Picture property mentioned above through this inheritance.

For more information about the audio annotation object refer to AnnAudioObject. For more information about the automated annotation audio object, refer to Annotation Objects - Automated Features and Automated Annotations - Audio Tab.

Example
Copy Code  
Imports Leadtools
Imports Leadtools.Annotations
Imports Leadtools.Codecs
Imports Leadtools.WinForms

Private Sub AnnAudioObject_AnnAudioObject(ByVal container As AnnContainer, ByVal waveFileName As String)
   Dim audio As AnnAudioObject = New AnnAudioObject()
   audio.Bounds = New AnnRectangle(100, 200, 400, 600, AnnUnit.Pixel)
   audio.FileName = waveFileName
   container.Objects.Add(audio)
   ' play the audio to test it
   If (audio.CanPlay) Then
      audio.Play()
   End If
End Sub
using Leadtools;
using Leadtools.Annotations;
using Leadtools.Codecs;
using Leadtools.WinForms;

private void AnnAudioObject_AnnAudioObject(AnnContainer container, string waveFileName)
{
   AnnAudioObject audio = new AnnAudioObject();
   audio.Bounds = new AnnRectangle(100, 200, 400, 600, AnnUnit.Pixel);
   audio.FileName = waveFileName;
   container.Objects.Add(audio);
   // play the audio to test it
   if((audio.CanPlay))
      audio.Play();
}
Requirements

Target Platforms

See Also

Reference

AnnAudioObject Members
Leadtools.Annotations Namespace

 

 


Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.