Defines an audio annotation object.
[SerializableAttribute()]
public class AnnAudioObject : Leadtools.Annotations.AnnImageObject, Leadtools.Annotations.IAnnPictureObject, System.ICloneable, System.IDisposable, System.Runtime.Serialization.ISerializable
<SerializableAttribute()>
Public Class AnnAudioObject
Inherits Leadtools.Annotations.AnnImageObject
Implements Leadtools.Annotations.IAnnPictureObject, System.ICloneable, System.IDisposable, System.Runtime.Serialization.ISerializable
[SerializableAttribute()]
public ref class AnnAudioObject : public Leadtools.Annotations.AnnImageObject, Leadtools.Annotations.IAnnPictureObject, System.ICloneable, System.IDisposable, System.Runtime.Serialization.ISerializable
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 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 (Deprecated). For more information about the automated annotation audio object, refer to Annotation Objects - Automated Features (Deprecated) and Automated Annotations - Audio Tab (Deprecated).
This example creates a new audio object at location 100, 200 and with dimensions of 400 x 600 and then adds it to a container.
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();
}
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
Products |
Support |
Feedback: AnnAudioObject Class - Leadtools.Annotations |
Introduction |
Help Version 19.0.2017.6.20
|
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.