In this tutorial we will demonstrate the steps involved in configuring the audio output on the Connected versions of displays using Bluetooth as the audio source device.
Before proceeding you will want to watch the Connecting to a Device - Bluetooth Tutorial.
Download this example which was created in PowerVision 4.791.0 for a PV1100 Connected display and follow along with the video tutorial.
Fully Featured Bluetooth Audio Example Version 4.797 PV1100
Fully Featured Bluetooth Audio Example Version 7.78 PV1100
Fully Featured Bluetooth Audio Example Version 7.78 PV700
These examples demonstrates some of the other features available with source selection using a list, Volume Slider Control, and player features and status.
Audio Outputs
- Display hardware will have between 1 and 5 Zone Outputs.
- Outputs are stereo (Left and Right for each output).
- All zone volume is controlled by the master volume control.
- Independent zone control is not available nor Left/Right balance.
- Source audio is applied to all outputs evenly as well as left/right balance.
- On displays with three or more zones output #3 is a subwoofer filtered output, only low frequencies will pass through.
- Typically only Zone 1 (Channel 1) will be needed.
Amplifier Enable Outputs
- Only available on displays with the Stereo option
- Outputs are 500mA high side connected to battery voltage
- Output Setup
- Go to multi-media application
- select the internal output plugin and tuner plugin
- Output Control
- Use the action MediaApp->OutputOn(Amplifier/Subwoofer) to turn output on
- Use the action MediaApp->OutputOff(Amplifier/Subwoofer) to turn output off
- Output Channel Assignments
- Output 1 = Amplifier
- Output 2 = Subwoofer
- Output 3 = Not available
General Control Information
- Multi-Media features are controlled by firing actions associated with that application.
- The numeric or text values or status of these functions is located in the associated Lists and Media App variables.
- The List can not be written to by the user, only the application will pass values to the List.
- Not every element in a List can be controlled by an action, they will be set to a default value by the app.
Audio Setup
- Go to the Applications Tab -> Multi-Media Application Setup tab.
- Select the "Internal 3 - 5 Zone" or "Single Zone" Output Plugin Audio Device depending on the hardware options.
- Select the "Simple" Bluetooth Plugin Audio Device for this example, not available on all hardware.
- Select the "Internal" Tuner Plugin Audio Device which will be used on a future example, not available on all hardware.
- As each Audio Device is selected additional sources will be added to the Audio Sources List.
Audio Control
- Source Selection - Create a UserEvent and call the action MediaApp-SelectMediaSource, choose Bluetooth for this example. Many other sources are also available.
- Volume Control - Create a User Events to call the actions MediaApp->MasterVolumeUp and MasterVolumeDown. Volume change step sizes are 1, 5, and 10 percent. This action cannot be called at a rate faster than 100mSec. Wait for Media.MediaStartupComplete event to fire then start a 1 to 2 second timer before initializing or changing the volume settings.
- Media.VolumeAutoOffset - in Powervision versions 7.x and above set the default value of this variable to 30 then adjust to the preferred setting for the amplifier/speaker combination.
- Mute - Create User Events to call the actions MediaApp->EnableMute and DisableMute. All outputs and sources will be turned off when muted.
- Display Volume - Add a text gauge and bind it to the MasterAudio List, Volume column.
- Display Source Selected - Add a text widget and bind it to the MediaSourcesTpe list, Name column
- MasterAudioType List - this list contains the current volume setting. Operations to the list item do not change the volume level, only the actions Volume up/down will transfer the list value to the audio app.
Bluetooth Audio Player Control
- Connecting - Follow the tutorial on connecting to a Bluetooth device to establish a connection.
- Playing - After audio setup is complete and device is connected, audio should now be playing using the devices controls.
- Play/Pause - Create a user event to call the action MediaApp->Play or Pause. This will play or pause the currently selected source.
- Next/Previous - Create a user event to call the action MediaApp->Next or Previous. This will skip to the next or previous track on the currently selected source.
- Skip Ahead/Back - The skip ahead/back feature MediaApp->GoToSongPosition(%) is an action that will move the playback position pointer to a specific position in the current audio track in units of percent. Use the system variable Media.CurrentSongPercent to determine what percentage which value to use in the GoToSongPosition Action to skip ahead or back.
Bluetooth Audio Player Status
Status indication can be found in either Lists or in Media App system variables. List variables can be displayed on a text gauge or text string using List Binding, system variables can be displayed directly.
System Variables
- Media.CurrentSongDuration - Song Length in seconds
- Media.CurrentSongElapsed - Elapsed time in seconds
- Media.CurrentSongPercent - Current song position pointer in percent, use this to determine skip ahead/back percentages.
- Media.PlaybackStatus - Enumeration 0 = Not Playing, 1 = Playing, use this to determine which icon to display, play or pause.
List Variables - NowPlayingSongType
- Name - Name of the current song or audio track playing, 256 characters max (String)
- Artist - Name of artist, 256 characters max (String)
- Album - Name of album, 256 characters max (String)
- Track - Currently playing track number (Integer)
- TrackCount - Total number of tracks on album (Integer)
Comments
0 comments
Please sign in to leave a comment.