psl1ght
A free SDK for Sony's PS3 console
Loading...
Searching...
No Matches
audio.h
Go to the documentation of this file.
1
42#ifndef __LV2_AUDIO_H__
43#define __LV2_AUDIO_H__
44
45#include <sys/event_queue.h>
46
48#define AUDIO_BLOCK_SAMPLES 256
49
51#define AUDIO_STATUS_READY 1
53#define AUDIO_STATUS_RUN 2
55#define AUDIO_STATUS_CLOSE 0x1010
56
58#define AUDIO_PORT_2CH 2
60#define AUDIO_PORT_8CH 8
61
63#define AUDIO_PORT_INITLEVEL 0x1000
64
66#define AUDIO_BLOCK_8 8
68#define AUDIO_BLOCK_16 16
70#define AUDIO_BLOCK_32 32
71
72#ifdef __cplusplus
73extern "C" {
74#endif
75
109
134
139
144
150s32 audioPortOpen(audioPortParam *param,u32 *portNum);
151
156s32 audioPortStart(u32 portNum);
157
162s32 audioPortStop(u32 portNum);
163
169s32 audioGetPortConfig(u32 portNum,audioPortConfig *config);
170
175s32 audioPortClose(u32 portNum);
176
182s32 audioCreateNotifyEventQueue(sys_event_queue_t *eventQ,sys_ipc_key_t *queueKey);
183
189s32 audioSetNotifyEventQueue(sys_ipc_key_t queueKey);
190
196s32 audioRemoveNotifyEventQueue(sys_ipc_key_t queueKey);
197
198#ifdef __cplusplus
199 }
200#endif
201
202#endif
s32 audioSetNotifyEventQueue(sys_ipc_key_t queueKey)
Set the current event queue for audio events.
s32 audioInit()
Initialize audio subsystem.
s32 audioPortOpen(audioPortParam *param, u32 *portNum)
Open audio port.
s32 audioRemoveNotifyEventQueue(sys_ipc_key_t queueKey)
Disconnect the current event queue from the audio subsystem.
struct _audio_port_config audioPortConfig
Audio port config data structure.
s32 audioPortStop(u32 portNum)
Stop playing on audio port.
s32 audioPortClose(u32 portNum)
Close an opened audio port.
struct _audio_port_param audioPortParam
Audio port parameter data structure.
s32 audioQuit()
Initialize audio subsystem.
s32 audioCreateNotifyEventQueue(sys_event_queue_t *eventQ, sys_ipc_key_t *queueKey)
Create a notify event queue for audio events.
s32 audioPortStart(u32 portNum)
Start playing on audio port.
s32 audioGetPortConfig(u32 portNum, audioPortConfig *config)
Get config of opened audio port.
Event queue management functions.
Audio port config data structure.
Definition audio.h:112
u64 numBlocks
number of blocks
Definition audio.h:130
u32 status
audio port status
Definition audio.h:121
u32 audioDataStart
start address of audio port buffer
Definition audio.h:132
u32 portSize
port size
Definition audio.h:131
u64 channelCount
number of channels
Definition audio.h:122
u32 readIndex
index of currently read block in audio port buffer
Definition audio.h:113
Audio port parameter data structure.
Definition audio.h:78
u64 numBlocks
Number of blocks in audio buffer.
Definition audio.h:93
u64 numChannels
Number of channels.
Definition audio.h:85
u64 attrib
Special attributes.
Definition audio.h:99