webOS Userland
Native system APIs for webOS
lgnc_directaudio.h File Reference

DirectAudio API for playing audio stream. More...

Go to the source code of this file.

Classes

struct  LGNC_ADEC_DATA_INFO_T
 

Typedefs

typedef enum LGNC_ADEC_FMT_T LGNC_ADEC_FMT_T
 
typedef enum LGNC_ADEC_CH_INDEX_T LGNC_ADEC_CH_INDEX_T
 
typedef enum LGNC_ADEC_SAMPLING_FREQ_T LGNC_ADEC_SAMPLING_FREQ_T
 

Enumerations

enum  LGNC_ADEC_FMT_T {
  LGNC_ADEC_FMT_UNKNOWN = 0 , LGNC_ADEC_FMT_PCM = 1 , LGNC_ADEC_FMT_AC3 = 2 , LGNC_ADEC_FMT_AAC = 5 ,
  LGNC_ADEC_FMT_MP3 = 8 , LGNC_ADEC_FMT_NONE = 10
}
 Audio format. More...
 
enum  LGNC_ADEC_CH_INDEX_T { LGNC_ADEC_CH_INDEX_MAIN = 0 , LGNC_ADEC_CH_INDEX_BUF0 = 1 }
 
enum  LGNC_ADEC_SAMPLING_FREQ_T {
  LGNC_ADEC_SAMPLING_FREQ_4_KHZ = 4 , LGNC_ADEC_SAMPLING_FREQ_8_KHZ = 8 , LGNC_ADEC_SAMPLING_FREQ_11_025KHZ = 11 , LGNC_ADEC_SAMPLING_FREQ_12_KHZ = 12 ,
  LGNC_ADEC_SAMPLING_FREQ_16_KHZ = 16 , LGNC_ADEC_SAMPLING_FREQ_22_05KHZ = 22 , LGNC_ADEC_SAMPLING_FREQ_24_KHZ = 24 , LGNC_ADEC_SAMPLING_FREQ_32_KHZ = 32 ,
  LGNC_ADEC_SAMPLING_FREQ_44_1KHZ = 44 , LGNC_ADEC_SAMPLING_FREQ_48_KHZ = 48 , LGNC_ADEC_SAMPLING_FREQ_NONE = 0
}
 

Functions

int LGNC_DIRECTAUDIO_CheckBuffer (int *length)
 
int LGNC_DIRECTAUDIO_Close ()
 Close audio playback. More...
 
int LGNC_DIRECTAUDIO_Open (LGNC_ADEC_DATA_INFO_T *info)
 Open audio playback. More...
 
int LGNC_DIRECTAUDIO_Play (const void *data, unsigned int size)
 Play audio buffer. More...
 

Detailed Description

DirectAudio API for playing audio stream.

Enumeration Type Documentation

◆ LGNC_ADEC_FMT_T

Audio format.

Enumerator
LGNC_ADEC_FMT_PCM 

PCM.

◆ LGNC_ADEC_SAMPLING_FREQ_T

Enumerator
LGNC_ADEC_SAMPLING_FREQ_4_KHZ 

4000 Hz

LGNC_ADEC_SAMPLING_FREQ_8_KHZ 

8000 Hz

LGNC_ADEC_SAMPLING_FREQ_11_025KHZ 

11025 Hz

LGNC_ADEC_SAMPLING_FREQ_12_KHZ 

12000 Hz

LGNC_ADEC_SAMPLING_FREQ_16_KHZ 

16000 Hz

LGNC_ADEC_SAMPLING_FREQ_22_05KHZ 

22050 Hz

LGNC_ADEC_SAMPLING_FREQ_24_KHZ 

24000 Hz

LGNC_ADEC_SAMPLING_FREQ_32_KHZ 

32000 Hz

LGNC_ADEC_SAMPLING_FREQ_44_1KHZ 

44100 Hz

LGNC_ADEC_SAMPLING_FREQ_48_KHZ 

48000 Hz

Function Documentation

◆ LGNC_DIRECTAUDIO_Close()

int LGNC_DIRECTAUDIO_Close ( )

Close audio playback.

Returns
0 if succeeded

◆ LGNC_DIRECTAUDIO_Open()

int LGNC_DIRECTAUDIO_Open ( LGNC_ADEC_DATA_INFO_T info)

Open audio playback.

Parameters
infoAudio stream information
Returns
0 if succeeded

◆ LGNC_DIRECTAUDIO_Play()

int LGNC_DIRECTAUDIO_Play ( const void *  data,
unsigned int  size 
)

Play audio buffer.

Parameters
dataAudio buffer
sizeSize of audio buffer
Returns
0 if succeeded