| ARRIS Enterprises, Inc. Confidential Information |
Volume
Controlling the volume on different outputs is performed through the
Initialization<sdk_root>/examples/example-html-portal/modules/audio/volume.js
The portal uses two custom configuration objects,
Configuration objects are created and handled through the
Setting the volumeThere are many ARRIS VIP Set Top Box models, which can have several different combinations of outputs, so the Audio Output Service provides methods to find and iterate over the available audio devices. The TOI API allows you to set individual audio levels on different connections. For example, the analog outputs and the SPDIF output could both have individual volume levels. This example portal however takes a simpler approach, and sets all adjustable output connections to the same level. <sdk_root>/examples/example-html-portal/modules/audio/volume.js
A more complex implementation may choose to leave the analog/SCART
volume at max level, in case a viewer is recording the analog output.
In this case, it is not desirable to have volume changes on the analog output,
but it is desirable to change the volume on the HDMI output (which we assume the
viewer is watching). Each Save to flash
Each time the volume is adjusted, the portal calls its <sdk_root>/examples/example-html-portal/modules/audio/volume.js
Here, both of the portals configuration objects,
Since a flash memory block can only be written to a finite number of times
before it wears out (approx. 100,000 write cycles), if the volume was written
to flash memory each time the remote control button was pressed it would result
in a LOT of writes to the flash memory, degrading its overall lifespan.
To prevent this, the KreaTV platform buffers up writes to the flash memory.
If you set the same object many times, in quick succession, like when zapping
channels or changing volume up and down, the writes will be batched together
and performed as one write operation. You can see when exactly the write occurs
if you watch the log closely. The
|