AudioSubChannel Property

Summary
Gets the currently set audio subchannel.
Syntax
C#
C++/CLI
public int AudioSubChannel { get; } 
public: 
property int AudioSubChannel { 
   int get(); 
} 

Property Value

A TunerSubChannel enumeration value if default or not tuned; otherwise the current audio subchannel. For a list of frequencies for channels, refer to the Microsoft documentation on International Analog TV Tuning.

Remarks

Gets the currently set audio subchannel. This property is valid only for ATSC digital TV broadcasts.

Example
C#
using Leadtools; 
using Leadtools.Multimedia; 
using LeadtoolsMultimediaExamples.Fixtures; 
 
 
public void AudioSubChannelValueExample() 
{ 
   // reference the capture control 
   CaptureCtrl capturectrl = _form.CaptureCtrl; 
 
   // output file 
   string outFile = Path.Combine(LEAD_VARS.MediaDir, "TVTuner_AudioSubChannelValueExample.avi"); 
 
   try 
   { 
      int channel = 6; 
 
      // try set the digital video capture device 
      if (capturectrl.VideoDevices["Digital"] != null) 
         capturectrl.VideoDevices["Digital"].Selected = true; 
 
      // reference the TV Tuner 
      TVTuner tvtuner = capturectrl.TVTuner; 
 
      // check whether the TV tuner is valid 
      if (tvtuner != null) 
      { 
         tvtuner.SetInputType(0, TunerInputType.Antenna); 
         tvtuner.SetChannel(channel, -1, -1); 
      } 
 
      // get the current sub channel 
      int audioSubChannel = tvtuner.AudioSubChannel; 
 
      // set the result to what we expect 
      _result = (audioSubChannel == -1); 
   } 
   catch (Exception) 
   { 
      _result = false; 
   } 
 
   // we'll loop on the state and pump messages for this example. 
   // but you should not need to if running from a Windows Forms application. 
   while (capturectrl.State == CaptureState.Running) 
      Application.DoEvents(); 
} 
 
static class LEAD_VARS 
{ 
   public const string MediaDir = @"C:\LEADTOOLS23\Media"; 
} 
Requirements

Target Platforms

See Also

Reference

TVTuner Class

TVTuner Members

Help Version 23.0.2024.8.23
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Multimedia Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.