CA_Open_Music_Channel()

Purpose

Open a music channel.

Libraries

Blueworx Voice Response library (libvae.a)

Custom Server library (libca.a)

Syntax

int CA_Open_Music_Channel(
        MUSIC_CHANNEL_PARM_ST         * music_channel_parm_sp,
        CHANNEL_INFO_ST               * channel_info_sp
);

Description

This subroutine opens a music channel so that a custom server can write background music data to the digital trunk adapter. A music channel can be opened only once concurrently. The file descriptors for open music channels are not inherited by child processes, so the channel can only be played to and closed by the same process. Once open, the channel can only be closed using CA_Close_Music_Channel().

Parameters

music_channel_parm_sp
A pointer to a MUSIC_CHANNEL_PARM_ST input structure, filled in by the caller of the routine as described in MUSIC_CHANNEL_PARM_ST.
channel_info_sp
A pointer to a CHANNEL_INFO_ST output structure that will be filled in on return as described in CHANNEL_INFO_ST.

Return codes

0
Successful
-1
Unsuccessful (global error number CA_errno is set to indicate the error)

Error names

CA_FUNC_FAILED
CA_INV_ADDR
CA_INV_HIGH_WATER
CA_INV_LOW_WATER
CA_INV_MUSIC_TITLE
CA_INV_PACK
CA_NOT_INIT
CA_NO_CHANNEL_AVAIL
CA_NO_DEVICE
CA_TERMINATING

Related information

CA_Close_Music_Channel(), CA_Open_Channel(), CA_Play_Voice_Elements(), CA_Play_Voice_Stream(), CA_Poll().