Subversion Repositories psp

[/] [trunk/] [neopop/] [System_PSP/] [psplib/] [audio.h] - Blame information for rev 145

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 44 jack
/** PSP helper library ***************************************/
2
/**                                                         **/
3
/**                          audio.h                        **/
4
/**                                                         **/
5
/** This file contains definitions for the audio rendering  **/
6 106 jack
/** library. It is based on the pspaudio library by Adresd  **/
7
/** and Marcus R. Brown, 2005.                              **/
8 44 jack
/**                                                         **/
9
/** Akop Karapetyan 2007                                    **/
10
/*************************************************************/
11
#ifndef _PSP_AUDIO_H
12
#define _PSP_AUDIO_H
13
 
14
#ifdef __cplusplus
15
extern "C" {
16
#endif
17 88 jack
 
18
#define PSP_AUDIO_SAMPLE_ALIGN(s) (((s) + 63) & ~63)
19
#define PSP_AUDIO_MAX_VOLUME      0x8000
20 44 jack
 
21
typedef struct
22
{
23
  short Left;
24
  short Right;
25
} PspSample;
26
 
27
typedef void (*pspAudioCallback)(void *buf, unsigned int *length, void *userdata);
28
 
29
int  pspAudioInit(int sample_count);
30 24 jack
void pspAudioSetVolume(int channel, int left, int right);
31
void pspAudioSetChannelCallback(int channel, pspAudioCallback callback, void *userdata);
32 44 jack
void pspAudioShutdown();
33 145 jack
int  pspAudioOutputBlocking(void *buf, unsigned int length);
34
int  pspAudioOutput(void *buf, unsigned int length);
35 88 jack
int  pspAudioGetSampleCount();
36 44 jack
 
37
#ifdef __cplusplus
38
}
39
#endif
40
 
41
#endif // _PSP_AUDIO_H
42