Intermec ck1 Reference Guide

Page of 390
Chapter 2 — Configuring the CK1 System 
26 
CK1 SDK Programmer’s Reference Manual 
 
 
 
 
 
 
 
 
 
 
 
 
 
Adjusting the System Volume of the Buzzer 
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
Adjust
devBuzzerSetSystemVolume()
devBuzzerAdjustSystemVolume()
devBuzzerSetSystemVolume() or 
devBuzzerRestoreSystemVolume() 
devBuzzerAdjustSystemVolume()