VComm Radio Transmitter Wave File Player

ID:  2057

Object Description

The VComm Radio Transmitter Wave File Player object can be used in conjunction with VComm Radio Objects to generate a waveform from a wave file and stream it through the radio's network transmission. The normal microphone audio stream can be muted or mixed with the generated waveform. Most audio effects that are added to the radio stream to simulate an effect, such as jamming and test tones, are added to the receive side of the audio stream. The DIS protocol specifies that all effects are to be added at the receiver, and all transmitters send their audio without any effects to improve interoperability. In some cases, however, it may be necessary to send the waveform effect out to the networked audio stream (e.g., jamming, HAVEQUICK MICKEY synch, etc.).

 

To use the object, connect the radio handle output of a radio/intercom object to the radio handle input of this object. The data that is present on the input pins is sent to the radio object and overrides the Networked Audio configuration values.

Special Notes

  1. The wave file format must be PCM, mono, 16-bits per sample, and the same sample rate that the user has specified for the audio transmission. The sample rate for a radio is specified in the V+ Run Time System's Configure menu (Networked Audio Tab, Transmit Sample Rate). The object will generate an error if the format is incorrect at run-time.

  2. If you use the  VComm Transmit Audio Format  object in conjunction with this object, it will sample the waveform at the rate specified on the VComm Transmit Audio Format object's XMIT SR pin.

  3. Loading large files while running V+ applications may result in a negative spare time during the time it takes to load the file. Therefore, use files that are small as possible while still maintaining the appropriate length for looped files.

  4. It is advisable to set the volume of the player to .5 or lower if the MIC MUTE is set to 0 since the file audio is being mixed with the normal audio stream and may cause the audio to clip. Otherwise the volume can be set to a maximum of 1.

  5. The format of the wave filename to be played is as follows:
    <
    PathName> <File ID>.wav

    where
       
    <PathName> is a combination of a directory name and a partial filename provided in the static data (see the example below).
       
    <File ID> is the value provided at the FILE ID pin (converted to a string)
       
    .wav is the filename extension.

    Note that there must be a blank between <PathName> and <FILE ID>.

Input Pins

HNDL

The HNDL pin accepts a Radio Handle from either the VComm GENERIC Radio, V8 DIS Only, VComm GENERIC Radio, V8 DIS/HLA, or VComm Simple Intercom objects.

VOL

The VOLume pin sets the audio output level for this object. The valid range of this parameter is 0.0 (no volume) to 1.0 (full volume).

FILE ID

The FILE ID pin can be any positive integer. It is part of the composite filename as defined in the Special Notes above. A value of 0 is the same as setting the ENABLE pin to 0.

MIC MUTE

The MIC MUTE pin controls whether the microphone is muted while this object is enabled. Any non-zero value will mute the microphone. A value of 0 allows microphone input to the audio stream.

LOOP

This LOOP pin will enable looping with any non-zero value. If the pin is 0, the wave file will play once and stop. This pin is sampled only during the time that the ENABLE pin transitions from zero to one. Changing the value has no effect once the player has started.

ENABLE

The ENABLE pin is used to turn the object on or off. The player is activated with any non-zero value. If the object is playing, returning this pin to zero will stop the player.

 

Output Pin

PLAYING

The PLAYING pin produces a 1 when a wave file is playing and a 0 otherwise. It will continue playing even if the radio's PTT has been disabled.

Static Data

PathName

This is a string which represents the path and partial filename of the wave file to be played. Note that a partial filename must be provided.

To set the PathName string:

Example

In this example, A DIS Only radio has a VComm Radio Transmitter Wave File Player object attached to it. The radio is transmitting with the microphone muted. The player is enabled and will loop the wave file at a volume of 0.2. The name of the file being played is

C:\Program Files\VPLus\VPLus Sample\Wavefiles\VComm Jammer 2.wav.

Note: Three other wave file examples are provided in the C:\Program Files\VPLus\VPLus Sample\Wavefiles\ folder:

  • VComm Jammer 1.wav

  • VComm Jammer 3.wav

  • VComm Jammer 4.wav