IBM Books

Image, Audio, and Video Extenders Administration and Programming

AlignValue


Image Audio Video
  X X

Returns the number of bytes per sample in a WAVE audio, or in an audio track of a video. A WAVE audio can store its data using one byte per sample (8-bit mono, referred to as "byte aligned"), two bytes per sample (8-bit stereo or 16-bit mono, referred to as "word aligned"), or four bytes per sample (16-bit stereo, referred to as "double-word aligned").

Include file

audio
dmbaudio.h

video
dmbvideo.h

Syntax

>>-AlignValue--(--handle--)------------------------------------><
 

Parameters (data type)

handle (DB2AUDIO or DB2VIDEO)
Column name or host variable that contains the handle of the audio.

Return values (data type)

Bytes per sample value of WAVE audio, or audio track in a video (SMALLINT). Values can be:

1
byte aligned

2
word aligned

4
double-word aligned

Null value
audio in other formats

Examples

Get the file name of all audios that are stored in the sound column of the employee table that are word aligned:

EXEC SQL BEGIN DECLARE SECTION;
 char hvAud_fname[251];
EXEC SQL END DECLARE SECTION;
 
EXEC SQL SELECT FILENAME(SOUND)
      INTO :hvAud_fname
      FROM EMPLOYEE
      WHERE ALIGNVALUE(SOUND) = 2;

Find the bytes per sample value of an audio track in a video; the video is stored in the video column of the employee table for Anita Jones:

EXEC SQL BEGIN DECLARE SECTION;
      short hvAlign_val;
EXEC SQL END DECLARE SECTION;
 
EXEC SQL SELECT ALIGNVALUE(VIDEO)
      INTO :hvAlign_val
      FROM EMPLOYEE
      WHERE NAME='Anita Jones';


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]