Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel
borderColor#3D3D3D
bgColor#F4F4F4
titleColor#3D3D3D
borderWidth0
titleBGColor#3D3D3D
borderStylesolid

ON THIS PAGE

Table of Contents
indent20px

Insert excerpt
BrightScript Version Navigation Menu
BrightScript Version Navigation Menu
nopaneltrue
This object allows individual control of audio outputs on the player.

Object Creation: The roAudioOutput object requires a single output parameter upon creation.

Code Block
CreateObject("roAudioOutput", output As String)

The output parameter can take the following strings:

  • “none”
  • “hdmi”
  • “usb”
  • “spdif”
  • "analog" 
  • “analog:N” (N specifies the port enumeration, which is useful for models with multiple analog-audio ports; you can also use "analog:1" to specify the analog output on a model with a single analog-audio port)
  • "earc" (AU335 only)
  • Support for multiple USB outputs using the USB port naming terminology. See roDeviceInfo-getusbtopology


You can create any number of roAudioOutput objects. There can be multiple instances of this object that represent the same audio output, but in these cases one object will override another.


Panel
borderColor#3D3D3D
bgColor#F4F4F4
titleColor#3D3D3D
borderWidth0
titleBGColor#3D3D3D
borderStylesolid

ON THIS PAGE

Table of Contents
indent20px



ifAudioOutput

SetVolume(a As Integer) As Boolean

Sets the volume of the specified output as a percentage represented by an integer between 0 and 100.

SetTone(treble As Integer, bass As Integer) As Boolean

Sets the treble and bass of the specified output. The treble and bass integers can range from -1000 to 1000, with 0 indicating no modification to the audio signal. Each increment represents a change of 0.01db.

SetMute(a As Boolean) As Boolean

Mutes the specified output if True. This method is set to False by default.

GetOutput() As String

Returns the string with which the roAudioOutput object was created.

SetAudioDelay(delay_in_milliseconds As Integer) As Boolean

Delays the audio for a specific audio output by lagging decoded samples before they reach that output. Delays are limited to 150ms or less. Currently, the system software only supports positive delays; therefore, if you need to set the audio ahead of the video, you will need to use roVideoPlayer.SetVideoDelay() instead.


The SetVolume() and SetMute() methods work in conjunction with the volume and mute functionality offered by roAudioPlayer. The roAudioPlayer volume settings affect the audio decoder volume. The audio stream is then sent to the assigned outputs, which have an additional level of volume control enabled by roAudioOutput.

The roAudioOutput object affects the absolute volume (as well as mute settings) for an audio output. If two players are streaming to the same output, both will be affected by any settings implemented through roAudioOutput.

Note
titleNote

To control which audio outputs connect to audio player outputs generated by roAudioOutput, use the SetPcmAudioOutputs() and SetCompressedAudioOutputs() methods, which can be used for roVideoPlayer and roAudioPlayer. See the roAudioPlayer entry for further explanation of these methods.



Example

To enable only HDMI-4 at 3840x2160x60p:

Code Block
mode=CreateObject("roVideoMode")
sm = CreateObject("roArray", 1, 1)
sm[0] = CreateObject("roAssociativeArray")
sm[0].name = "HDMI-4"
sm[0].video_mode="3840x2160x60p"
sm[0].transform="normal"
sm[0].display_x=0
sm[0].display_y=0
sm[0].enabled=true
mode.SetScreenModes(sm)

' Play full screen video with audio going to HDMI-4
rect = createobject("roRectangle",0,0,3840,2160)
output = createObject("roAudioOutput", "hdmi:4")
vplayer = createobject("roVideoPlayer")
vplayer.setrectangle(rect)
vplayer.setcompressedaudiooutputs(output)
vplayer.playfile("Example.mp4")