This is a very simple play application. It plays a file to a local timeslot. It normally keeps repeating the file until told to stop. The file is assumed to have no headers or other formatting of any kind - just the data. The test program ansrec generates these files directly, but for many formats the header is harmless (sounds like a short burst of noise).
Go to directory $(TiNG)/test.
You must have downloaded firmware modules as listed below.
Run locplay
with the appropriate options (the program is
gen-LINUX_V6/locplay or
gen-WINNT_V6/locplay
depending on which operating system you are using).
Command line options are:
-a 1
| use AGC |
-b <timeslot>
| background timeslot to add into each output. (See
Test program
timeslots). Note that this assumes that you have
already arranged for the desired background signal to
appear on this timeslot (for example with a copy
of locplay already running).
|
-F <format>
| format of the file to play. The known formats can
be listed by specifying a question mark
(? ).
|
-n <numchan>
| start playing this many channels (default = 1) |
-O
| play file once only and then exit (default is to keep repeating the file) |
-r
| Restart replay when it completes. |
-R <delay>
| Wait for a period before starting each
channel. The delay will be randomly selected each time a
channel is started and will be in the range
0..delay milliseconds.
This allows a test to be run which avoids the channels
all operating in step with one another.
|
-s <speed>
| play faster or slower (as a percentage) |
-t <timeslot>
| timeslot to use (see
Test program
timeslots). If you specify more than one channel,
they use consecutive timeslots starting at this one.
For example, the options "-n 3 -t48:20 "
play to timeslots 48:20 , 48:21 ,
and 48:22 .
|
-T <bits>
| set the data transfer threshold |
-v <volume>
| adjust volume of the playback by this (in dB) |
-X <maxoctets>
| Limit the length of all replays to this amount of data. |
-x <cardspec>
| Use these Prosody processor modules, specified as described in Test programs: Specifying Prosody Processor modules |
-y
| synchronised play - prepare channels but don't start them until the 'g' command is given |
<file> | name of file from which data is to be played. |
For example,
gen-WINNT_V6/locplay -x x:1.2.3.4/mykey -F ALawPCM@8000 -t 64:0 rec1.dat
would play data assumed to be A-law encoded speech from
rec1.dat
to timeslot 64:0
on the card with
address 1.2.3.4 and key mykey.
The firmware modules that are required depend on the options you specify. Here are the details:
Module | When needed |
---|---|
datafeed | always on Prosody X |
gainbg | If you use '-a 1 ' for AGC
or '-v ' to adjust the volume
|
fast | If you use '-s ' to play the file
faster than normal
|
slow | If you use '-s ' to play the file
slower than normal
|
outchan | always |
sixkout | when the file format is ACUBLKPCM@6000, ALawPCM@6000, OKIADPCM@6000, or ULawPCM@6000 |
playA | when the file format is ALawPCM@6000 or ALawPCM@8000 |
playima | when the file format is IMAADPCM |
playmu | when the file format is ULawPCM@6000 or ULawPCM@8000 |
playoki | when the file format is OKIADPCM@6000 or OKIADPCM@8000 |
sync | when the -y option is used
|
When this program starts, it starts as many channels as specified by
the -n
option, and then prints a prompt and waits for
commands. While waiting for commands any running channels will be
serviced, but status changes will not be reported. The commands are:
Character | Meaning |
---|---|
(i.e. blank line - no command) Print status | |
? | Print summary of possible commands |
+ | Start another channel |
a N | Set AGC for future channels to N |
g | go - allow channels held for
synchronisation by -y option to start
|
k N | Kill channel N, . |
K N | Kill channel N, without waiting. |
o N | Set 'once' option for future channels to N. |
Q | abort all channels. |
q | Quit - exit without waiting for channels to finish. |
s N | Set speed for future channels to N |
S | Shutdown - free all resources and quit. |
t timeslot | Set timeslot for future channels to timeslot |
T N | Set TiNGtrace
to N.
|
u | Update all running channels to use current agc, volume, and speed settings. |
v N | Set volume for future channels to N |
w | Quit - wait for all channels to finish before reading next command. |
x N | Set maximum octets for future channels to N |
# anything | do nothing - used for comments |
The status is shown in each prompt. The prompt starts with a character for each current channel. The character indicates the status of that channel.
Character | Status |
---|---|
* | Active - data was transferred since printing last prompt |
. | Idle - no data was transferred since printing last prompt |
- | Done - channel has finished |
Channel is no longer in use | |
u | Underrun occurred since last printing prompt |
The source code for this program is provided (locplay.c).
This is one of the Prosody test programs .