PSPSDK 2024-12-16
Loading...
Searching...
No Matches
pspaudiolib.h
Go to the documentation of this file.
1/*
2 * PSP Software Development Kit - https://github.com/pspdev
3 * -----------------------------------------------------------------------
4 * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
5 *
6 * pspaudiolib.h - Audio library build on top of sceAudio, but to provide
7 * multiple thread usage and callbacks.
8 *
9 * Copyright (c) 2005 Adresd
10 * Copyright (c) 2005 Marcus R. Brown <mrbrown@ocgnet.org>
11 *
12 */
13#ifndef __AUDIOLIB_H__
14#define __AUDIOLIB_H__
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20#define PSP_NUM_AUDIO_CHANNELS 4
23#define PSP_NUM_AUDIO_SAMPLES 1024
24#define PSP_VOLUME_MAX 0x8000
25
26typedef void (* pspAudioCallback_t)(void *buf, unsigned int reqn, void *pdata);
27
36
37typedef int (* pspAudioThreadfunc_t)(int args, void *argp);
38
39int pspAudioInit();
40void pspAudioEndPre();
41void pspAudioEnd();
42
43void pspAudioSetVolume(int channel, int left, int right);
44void pspAudioSetChannelCallback(int channel, pspAudioCallback_t callback, void *pdata);
45int pspAudioOutBlocking(unsigned int channel, unsigned int vol1, unsigned int vol2, void *buf);
46
47#ifdef __cplusplus
48}
49#endif
50
51#endif
void pspAudioSetChannelCallback(int channel, pspAudioCallback_t callback, void *pdata)
Definition pspaudiolib.c:33
void(* pspAudioCallback_t)(void *buf, unsigned int reqn, void *pdata)
Definition pspaudiolib.h:26
void pspAudioEnd()
Definition pspaudiolib.c:147
int pspAudioOutBlocking(unsigned int channel, unsigned int vol1, unsigned int vol2, void *buf)
Definition pspaudiolib.c:41
int(* pspAudioThreadfunc_t)(int args, void *argp)
Definition pspaudiolib.h:37
void pspAudioSetVolume(int channel, int left, int right)
Definition pspaudiolib.c:27
int pspAudioInit()
Definition pspaudiolib.c:79
void pspAudioEndPre()
Definition pspaudiolib.c:140
Definition pspaudiolib.h:28
int threadhandle
Definition pspaudiolib.h:29
int handle
Definition pspaudiolib.h:30
pspAudioCallback_t callback
Definition pspaudiolib.h:33
int volumeleft
Definition pspaudiolib.h:31
int volumeright
Definition pspaudiolib.h:32
void * pdata
Definition pspaudiolib.h:34