Changing The Default Volume By Command Line Operation - Intermec CK1 Programmer's Reference Manual

Intermec ck1: reference guide
Hide thumbs Also See for CK1:
Table of Contents

Advertisement

Chapter 2 — Configuring the CK1 System
devBuzzerAdjustSystemVolume()
Adjusting the System Volume of the Buzzer
26
devBuzzerSetSystemVolume()
devBuzzerAdjustSystemVolume()
The system volume of the buzzer is the base magnitude of the volume of
the CK1. When you play a sound by calling the devBuzzerPlaySound()
function, the actual magnitude of the volume of the sound is the volume
parameter you sent in devBuzzerPlaySound() multiplied by the system
volume.
After the program calls devBuzzerAdjustSystemVolume(), you can call
devBuzzerRestoreSystemVolume(). The system volume goes back to the
value before the adjustment, so you do not have to remember the value
before the adjustment. Also, you can call devBuzzerSetSystemVolume() to
set the adjusted value as a default value after calling
BuzzerAdjustSystemVolume().
Since these APIs function both on CK1-execution (when the application
that calls the APIs is running on the CK1) and on host-simulation (when
the application that calls the APIs running on the host for simulation
purpose), you can see the difference between the two environments.

Changing the Default Volume by Command Line Operation

The kernel automatically runs /etc/config/es_set_config.sh when the CK1
boots. The /etc/config/es_set_config.sh gets the default volume for the
buzzer from /etc/config/default_buzzer and then directly controls the
buzzer according to the default volume. The changed default volume is
kept until you change. The related lines of the default volume setting in
/etc/config/es_set_config.sh are:
#!/bin/sh
echo "a `cat /etc/config/default_buzzer` > /proc/buzzer
Set
devBuzzerSetSystemVolume() or
devBuzzerRestoreSystemVolume()
Adjust
CK1 SDK Programmer's Reference Manual

Advertisement

Table of Contents
loading

Table of Contents