juke_box_configure_music command

Adds a music title dynamically to the music catalog.

Input parameters

char music_title[31];

char player_name[100];

char player_params[100];

Output parameters

long rc;

Description

Use the juke_box_configure_music custom server action in your SendData state table action to add a tune to the catalog of music titles kept by the Juke_Box custom server.

When it has been added, the tune can be used by any state table.

Use this command only after the call has been set up, and before the call has been terminated.

On SendData, we recommend that you use a value of 10 seconds for the Timeout parameter.

Note: When the Juke_Box custom server stops, all music titles added to the music catalog dynamically are lost.

Parameters

music_title
This character string is the name by which the tune is known. Each music title must be unique. Only one occurrence of each music title can be used in the music catalog, so make sure that you do not try to dynamically define a music title that is already in the configuration file.

Music titles can be from 1 to 31 characters, and can include alphabetic characters (uppercase and lowercase), numeric characters, _, +, -, *, @, (, ), [, ], !, ?, &, <, >/\, single quote (‘), semicolon (;), colon (:), comma (,), period (.), and space.

player_name
This character string is the name of the music player which plays the tune on the music channel. This field must include a path name, either the full path name or a path name relative to the $DB/current_dir/ca_directory.
player_params
This character string defines the parameters passed to the music player. This field must contain all of the information needed by the music player to find the tune.

For parameters for pl_seg, see pl_segl_seg music player program. The format of this string depends on which music player is used. For parameters for pl_elem, see The pl_elem music player program.

Return codes

0
(JB_NO_ERROR)

Success. The music title was added to the music catalog.

1030
(JB_ERROR_NO_MEMORY)

This music title was not added to the music catalog. The Juke_Box custom server could not allocate enough memory in which to store the music title details.

1031
(JB_ERROR_CONFIGURED_ALREADY)

This music title is known already, but its definition does not match. The new definition is rejected, a juke_box_start_music request may be issued by the application, but the old definition of the music title is used. Stop and restart the Juke_Box custom server to delete all dynamic entries in the music catalog.