IBM Books

Image, Audio, and Video Extenders Administration and Programming

BitsPerSample


Image Audio Video
  X X

Returns the number of bits of data used to represent each sample of WAVE or AIFF audio in an audio, or in an audio track of a video.

Include file

audio
dmbaudio.h

video
dmbvideo.h

Syntax

>>-BitsPerSample--(--handle--)---------------------------------><
 

Parameters (data type)

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

Return values (data type)

Number of bits of data used to represent each sample of video or WAVE or AIFF audio (SMALLINT). Returns a null value for audio in other formats

Examples

Get the file name of all WAVE audios stored in the sound column of the employee table whose bits per sample is equal to 8:

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 FORMAT(SOUND)='WAVE'
      AND BITSPERSAMPLE(SOUND) = 8;


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