Name

rd_trimaudio — Rivendell Trim Audio C Library Function

Synopsis

#include <rivwebcapi/rd_trimaudio.h>
int RD_TrimAudio(trimaudio[],  
 hostname[],  
 username[],  
 passwd[],  
 ticket[],  
 cartnumber,  
 cutnumber,  
 trimlevel,  
 user_agent[],  
 numrecs); 
struct rd_trimaudio * trimaudio[];
const char hostname[];
const char username[];
const char passwd[];
const char ticket[];
const unsigned cartnumber;
const unsigned cutnumber;
const int trimlevel;
const char user_agent[];
unsigned * numrecs;
 

Description

RD_TrimAudio is the function to use to get the time pointer to the first and last instance of a particular level in a cut.

This function lists the first and last instance of a db level in a cut.

Table 1. RD_TrimAudio function call fields

FIELD NAME FIELD TYPE MEANING REMARKS
*cuts Pointer to rd_trimaudio structure Memory location to store trimaudio information Mandatory
hostname Character Array Name Of Rivendell DB Host Mandatory
username Character Array Rivendell User Name Mandatory When NO Ticket Provided
passwd Character Array Rivendell User Password Mandatory When NO Ticket Provided
ticket Character Array Rivendell Authentification Ticket Mandatory When NO User/Password Pair Provided.
cartnumber unsigned integer Cart Number Mandatory
cutnumber unsigned integer Cut Number Mandatory
trimlevel integer Trim Level in 1/100 dB Mandatory
user_agent Character Array User Agent Value put into HTTP request Optional (default is Rivendell-C-API/x.x.x)
*numrecs pointer to integer memory location for number of records returned Mandatory

When successful function will return the number of records sent (numrecs) and a rd_trimaudio structure which is stored in the provided memory locations. The rd_trimaudio structure has the following fields:

	struct rd_trimaudio {
  	    unsigned cart_number;
  	    unsigned cut_number;
  	    int trimlevel;
  	    int starttrimpoint;
  	    int endtrimpoint;
	};

  

RETURN VALUE

On success, zero is returned. Using the provided parameters an rd_trimaudio structure is returned and the number of records is returned.

If a server error occurs a -1 is returned. If a client error occurs a specific error number is returned.

ERRORS

400 Missing Cart/Cut Number, Trim Level or Peak Data.

403 User Authentification Error.

404 Invalid Permissions or No Cart / Audio Exists.

nnn Unknown Error Occurred.