11#ifndef __LIBATRAC3_H__
12#define __LIBATRAC3_H__
21#define PSP_ATRAC_SUCCESS SCE_OK
23#define PSP_ATRAC_ERROR_PARAM_FAIL (0x80630001)
24#define PSP_ATRAC_ERROR_API_FAIL (0x80630002)
25#define PSP_ATRAC_ERROR_NO_ATRACID (0x80630003)
26#define PSP_ATRAC_ERROR_BAD_CODECTYPE (0x80630004)
27#define PSP_ATRAC_ERROR_BAD_ATRACID (0x80630005)
28#define PSP_ATRAC_ERROR_UNKNOWN_FORMAT (0x80630006)
29#define PSP_ATRAC_ERROR_UNMATCH_FORMAT (0x80630007)
30#define PSP_ATRAC_ERROR_BAD_DATA (0x80630008)
31#define PSP_ATRAC_ERROR_ALLDATA_IS_ONMEMORY (0x80630009)
32#define PSP_ATRAC_ERROR_UNSET_DATA (0x80630010)
34#define PSP_ATRAC_ERROR_READSIZE_IS_TOO_SMALL (0x80630011)
35#define PSP_ATRAC_ERROR_NEED_SECOND_BUFFER (0x80630012)
36#define PSP_ATRAC_ERROR_READSIZE_OVER_BUFFER (0x80630013)
37#define PSP_ATRAC_ERROR_NOT_4BYTE_ALIGNMENT (0x80630014)
38#define PSP_ATRAC_ERROR_BAD_SAMPLE (0x80630015)
39#define PSP_ATRAC_ERROR_WRITEBYTE_FIRST_BUFFER (0x80630016)
40#define PSP_ATRAC_ERROR_WRITEBYTE_SECOND_BUFFER (0x80630017)
41#define PSP_ATRAC_ERROR_ADD_DATA_IS_TOO_BIG (0x80630018)
43#define PSP_ATRAC_ERROR_UNSET_PARAM (0x80630021)
44#define PSP_ATRAC_ERROR_NONEED_SECOND_BUFFER (0x80630022)
45#define PSP_ATRAC_ERROR_NODATA_IN_BUFFER (0x80630023)
46#define PSP_ATRAC_ERROR_ALLDATA_WAS_DECODED (0x80630024)
49#define PSP_ATRAC_AT3PLUS (0x00001000)
50#define PSP_ATRAC_AT3 (0x00001001)
53#define PSP_ATRAC_ALLDATA_IS_ON_MEMORY (-1)
54#define PSP_ATRAC_NONLOOP_STREAM_DATA_IS_ON_MEMORY (-2)
55#define PSP_ATRAC_LOOP_STREAM_DATA_IS_ON_MEMORY (-3)
int sceAtracGetSoundSample(int atracID, int *piEndSample, int *piLoopStartSample, int *piLoopEndSample)
int sceAtracGetBitrate(int atracID, int *outBitrate)
Gets the bitrate.
int sceAtracSetLoopNum(int atracID, int nloops)
Sets the number of loops for this atrac ID.
int sceAtracGetStreamDataInfo(int atracID, u8 **writePointer, u32 *availableBytes, u32 *readOffset)
int sceAtracGetMaxSample(int atracID, int *outMax)
Gets the maximum number of samples of the atrac3 stream.
int sceAtracAddStreamData(int atracID, unsigned int bytesToAdd)
int sceAtracGetLoopStatus(int atracID, int *piLoopNum, u32 *puiLoopStatus)
int sceAtracDecodeData(int atracID, u16 *outSamples, int *outN, int *outEnd, int *outRemainFrame)
Decode a frame of data.
int sceAtracSetHalfwayBuffer(int atracID, u8 *pucBufferAddr, u32 uiReadByte, u32 uiBufferByte)
int sceAtracSetData(int atracID, u8 *pucBufferAddr, u32 uiBufferByte)
int sceAtracGetNextDecodePosition(int atracID, u32 *puiSamplePosition)
int sceAtracReleaseAtracID(int atracID)
It releases an atrac ID.
int sceAtracSetDataAndGetID(void *buf, SceSize bufsize)
Creates a new Atrac ID from the specified data.
int sceAtracResetPlayPosition(int atracID, u32 uiSample, u32 uiWriteByteFirstBuf, u32 uiWriteByteSecondBuf)
int sceAtracGetInternalErrorInfo(int atracID, int *piResult)
int sceAtracGetBufferInfoForReseting(int atracID, u32 uiSample, PspBufferInfo *pBufferInfo)
int sceAtracSetSecondBuffer(int atracID, u8 *pucSecondBufferAddr, u32 uiSecondBufferByte)
int sceAtracGetSecondBufferInfo(int atracID, u32 *puiPosition, u32 *puiDataByte)
int sceAtracGetRemainFrame(int atracID, int *outRemainFrame)
Gets the remaining (not decoded) number of frames.
int sceAtracGetNextSample(int atracID, int *outN)
Gets the number of samples of the next frame to be decoded.
int sceAtracGetChannel(int atracID, u32 *puiChannel)
int sceAtracSetHalfwayBufferAndGetID(u8 *pucBufferAddr, u32 uiReadByte, u32 uiBufferByte)
int sceAtracGetAtracID(u32 uiCodecType)
unsigned int SceSize
Definition pspkerneltypes.h:27
uint8_t u8
Definition psptypes.h:38
uint16_t u16
Definition psptypes.h:39
uint32_t u32
Definition psptypes.h:41
Definition pspatrac3.h:57
u32 uiReadPositionSecondBuf
Definition pspatrac3.h:66
u32 uiWritableByteFirstBuf
Definition pspatrac3.h:59
u8 * pucWritePositionFirstBuf
Definition pspatrac3.h:58
u32 uiMinWriteByteSecondBuf
Definition pspatrac3.h:65
u32 uiReadPositionFirstBuf
Definition pspatrac3.h:61
u32 uiMinWriteByteFirstBuf
Definition pspatrac3.h:60
u32 uiWritableByteSecondBuf
Definition pspatrac3.h:64
u8 * pucWritePositionSecondBuf
Definition pspatrac3.h:63