vitasdk
Documentation of the vitasdk

Detailed Description

Exports for User.


Using this library in your project

Include the header file in your project:

#include <psp2/atrac.h>


Link the library to the executable:

SceAtrac_stub


Load the required module:

int sceSysmoduleLoadModule(SceSysmoduleModuleId id)
Load a module.
@ SCE_SYSMODULE_ATRAC
Atrac module.
Definition: sysmodule.h:75



Functions

 VITASDK_BUILD_ASSERT_EQ (0xC, SceAtracDecoderGroup)
 
 VITASDK_BUILD_ASSERT_EQ (0x34, SceAtracContentInfo)
 
 VITASDK_BUILD_ASSERT_EQ (0x10, SceAtracStreamInfo)
 
int sceAtracQueryDecoderGroupMemSize (SceUInt32 atracType, const SceAtracDecoderGroup *pDecoderGroup)
 
int sceAtracCreateDecoderGroup (SceUInt32 atracType, const SceAtracDecoderGroup *pDecoderGroup, void *pvWorkMem, int initAudiodecFlag)
 
int sceAtracDeleteDecoderGroup (SceUInt32 atracType, int termAudiodecFlag)
 
int sceAtracGetDecoderGroupInfo (SceUInt32 atracType, SceAtracDecoderGroup *pCreatedDecoder, SceAtracDecoderGroup *pAvailableDecoder)
 
int sceAtracSetDataAndAcquireHandle (SceUChar8 *pucBuffer, SceUInt32 uiReadSize, SceUInt32 uiBufferSize)
 
int sceAtracReleaseHandle (int atracHandle)
 
int sceAtracDecode (int atracHandle, void *pOutputBuffer, SceUInt32 *pOutputSamples, SceUInt32 *pDecoderStatus)
 
int sceAtracGetStreamInfo (int atracHandle, SceAtracStreamInfo *pStreamInfo)
 
int sceAtracAddStreamData (int atracHandle, SceUInt32 addSize)
 
int sceAtracIsSubBufferNeeded (int atracHandle)
 
int sceAtracGetSubBufferInfo (int atracHandle, SceUInt32 *pReadPosition, SceUInt32 *pMinSubBufferSize, SceUInt32 *pDataSize)
 
int sceAtracSetSubBuffer (int atracHandle, SceUChar8 *pSubBuffer, SceUInt32 subBufferSize)
 
int sceAtracSetLoopNum (int atracHandle, int loopNum)
 
int sceAtracSetOutputSamples (int atracHandle, SceUInt32 outputSamples)
 
int sceAtracResetNextOutputPosition (int atracHandle, SceUInt32 resetSample)
 
int sceAtracGetContentInfo (int atracHandle, SceAtracContentInfo *pContentInfo)
 
int sceAtracGetLoopInfo (int atracHandle, int *pLoopNum, SceUInt32 *pLoopStatus)
 
int sceAtracGetOutputSamples (int atracHandle, SceUInt32 *pOutputSamples)
 
int sceAtracGetNextOutputPosition (int atracHandle, SceUInt32 *pNextOutputSample)
 
int sceAtracGetRemainSamples (int atracHandle, SceLong64 *pRemainSamples)
 
int sceAtracGetOutputableSamples (int atracHandle, SceLong64 *pOutputableSamples)
 
int sceAtracGetDecoderStatus (int atracHandle, SceUInt32 *pDecoderStatus)
 
int sceAtracGetVacantSize (int atracHandle, SceUInt32 *pVacantSize)
 
int sceAtracGetInternalError (int atracHandle, int *pInternalError)
 

Macros

#define SCE_ATRAC_ALIGNMENT_SIZE   (SCE_AUDIODEC_ALIGNMENT_SIZE)
 
#define SCE_ATRAC_ROUND_UP(size)   ((size + SCE_ATRAC_ALIGNMENT_SIZE - 1) & ~(SCE_ATRAC_ALIGNMENT_SIZE - 1))
 
#define SCE_ATRAC_TYPE_AT9   (0x2003U)
 
#define SCE_ATRAC_AT9_MAX_TOTAL_CH   (SCE_AUDIODEC_AT9_MAX_CH_IN_LIBRARY)
 
#define SCE_ATRAC_WORD_LENGTH_16BITS   (SCE_AUDIODEC_WORD_LENGTH_16BITS)
 
#define SCE_ATRAC_AT9_MAX_CH_IN_DECODER   (SCE_AUDIODEC_AT9_MAX_CH_IN_DECODER)
 
#define SCE_ATRAC_AT9_MAX_FRAME_SAMPLES   (SCE_AUDIODEC_AT9_MAX_SAMPLES)
 
#define SCE_ATRAC_MAX_OUTPUT_SAMPLES   (2048)
 
#define SCE_ATRAC_AT9_MAX_OUTPUT_FRAMES   (8)
 
#define SCE_ATRAC_AT9_MIN_LOOP_SAMPLES   (3072)
 
#define SCE_ATRAC_INFINITE_LOOP_NUM   (-1)
 
#define SCE_ATRAC_INFINITE_SAMPLES   (-1)
 

Data Structure Documentation

◆ SceAtracDecoderGroup

struct SceAtracDecoderGroup
Data Fields
SceUInt32 size
SceUInt32 wordLength
SceUInt32 totalCh

◆ SceAtracContentInfo

struct SceAtracContentInfo
Data Fields
SceUInt32 size
SceUInt32 atracType
SceUInt32 channel
SceUInt32 samplingRate
SceInt32 endSample
SceInt32 loopStartSample
SceInt32 loopEndSample
SceUInt32 bitRate
SceUInt32 fixedEncBlockSize
SceUInt32 fixedEncBlockSample
SceUInt32 frameSample
SceUInt32 loopBlockOffset
SceUInt32 loopBlockSize

◆ SceAtracStreamInfo

struct SceAtracStreamInfo
Data Fields
SceUInt32 size
SceUChar8 * pWritePosition
SceUInt32 readPosition
SceUInt32 writableSize

Macro Definition Documentation

◆ SCE_ATRAC_ALIGNMENT_SIZE

#define SCE_ATRAC_ALIGNMENT_SIZE   (SCE_AUDIODEC_ALIGNMENT_SIZE)

◆ SCE_ATRAC_ROUND_UP

#define SCE_ATRAC_ROUND_UP (   size)    ((size + SCE_ATRAC_ALIGNMENT_SIZE - 1) & ~(SCE_ATRAC_ALIGNMENT_SIZE - 1))

◆ SCE_ATRAC_TYPE_AT9

#define SCE_ATRAC_TYPE_AT9   (0x2003U)

◆ SCE_ATRAC_AT9_MAX_TOTAL_CH

#define SCE_ATRAC_AT9_MAX_TOTAL_CH   (SCE_AUDIODEC_AT9_MAX_CH_IN_LIBRARY)

◆ SCE_ATRAC_WORD_LENGTH_16BITS

#define SCE_ATRAC_WORD_LENGTH_16BITS   (SCE_AUDIODEC_WORD_LENGTH_16BITS)

◆ SCE_ATRAC_AT9_MAX_CH_IN_DECODER

#define SCE_ATRAC_AT9_MAX_CH_IN_DECODER   (SCE_AUDIODEC_AT9_MAX_CH_IN_DECODER)

◆ SCE_ATRAC_AT9_MAX_FRAME_SAMPLES

#define SCE_ATRAC_AT9_MAX_FRAME_SAMPLES   (SCE_AUDIODEC_AT9_MAX_SAMPLES)

◆ SCE_ATRAC_MAX_OUTPUT_SAMPLES

#define SCE_ATRAC_MAX_OUTPUT_SAMPLES   (2048)

◆ SCE_ATRAC_AT9_MAX_OUTPUT_FRAMES

#define SCE_ATRAC_AT9_MAX_OUTPUT_FRAMES   (8)

◆ SCE_ATRAC_AT9_MIN_LOOP_SAMPLES

#define SCE_ATRAC_AT9_MIN_LOOP_SAMPLES   (3072)

◆ SCE_ATRAC_INFINITE_LOOP_NUM

#define SCE_ATRAC_INFINITE_LOOP_NUM   (-1)

◆ SCE_ATRAC_INFINITE_SAMPLES

#define SCE_ATRAC_INFINITE_SAMPLES   (-1)

Enumeration Type Documentation

◆ SceAtracErrorCode

Enumerator
SCE_ATRAC_ERROR_INVALID_POINTER 
SCE_ATRAC_ERROR_INVALID_SIZE 
SCE_ATRAC_ERROR_INVALID_WORD_LENGTH 
SCE_ATRAC_ERROR_INVALID_TYPE 
SCE_ATRAC_ERROR_INVALID_TOTAL_CH 
SCE_ATRAC_ERROR_INVALID_ALIGNMENT 
SCE_ATRAC_ERROR_ALREADY_CREATED 
SCE_ATRAC_ERROR_NOT_CREATED 
SCE_ATRAC_ERROR_SHORTAGE_OF_CH 
SCE_ATRAC_ERROR_UNSUPPORTED_DATA 
SCE_ATRAC_ERROR_INVALID_DATA 
SCE_ATRAC_ERROR_READ_SIZE_IS_TOO_SMALL 
SCE_ATRAC_ERROR_INVALID_HANDLE 
SCE_ATRAC_ERROR_READ_SIZE_OVER_BUFFER 
SCE_ATRAC_ERROR_MAIN_BUFFER_SIZE_IS_TOO_SMALL 
SCE_ATRAC_ERROR_SUB_BUFFER_SIZE_IS_TOO_SMALL 
SCE_ATRAC_ERROR_DATA_SHORTAGE_IN_BUFFER 
SCE_ATRAC_ERROR_ALL_DATA_WAS_DECODED 
SCE_ATRAC_ERROR_INVALID_MAX_OUTPUT_SAMPLES 
SCE_ATRAC_ERROR_ADDED_DATA_IS_TOO_BIG 
SCE_ATRAC_ERROR_NEED_SUB_BUFFER 
SCE_ATRAC_ERROR_INVALID_SAMPLE 
SCE_ATRAC_ERROR_NO_NEED_SUB_BUFFER 
SCE_ATRAC_ERROR_INVALID_LOOP_STATUS 
SCE_ATRAC_ERROR_REMAIN_VALID_HANDLE 
SCE_ATRAC_ERROR_INVALID_LOOP_NUM 

◆ SceAtracDecoderStatus

Enumerator
SCE_ATRAC_DECODER_STATUS_ALL_DATA_WAS_DECODED 
SCE_ATRAC_DECODER_STATUS_ALL_DATA_IS_ON_MEMORY 
SCE_ATRAC_DECODER_STATUS_NONLOOP_PART_IS_ON_MEMORY 
SCE_ATRAC_DECODER_STATUS_LOOP_PART_IS_ON_MEMORY 

◆ SceAtracLoopStatus

Enumerator
SCE_ATRAC_LOOP_STATUS_NON_RESETABLE_PART 
SCE_ATRAC_LOOP_STATUS_RESETABLE_PART 

Function Documentation

◆ VITASDK_BUILD_ASSERT_EQ() [1/3]

VITASDK_BUILD_ASSERT_EQ ( 0xC  ,
SceAtracDecoderGroup   
)

◆ VITASDK_BUILD_ASSERT_EQ() [2/3]

VITASDK_BUILD_ASSERT_EQ ( 0x34  ,
SceAtracContentInfo   
)

◆ VITASDK_BUILD_ASSERT_EQ() [3/3]

VITASDK_BUILD_ASSERT_EQ ( 0x10  ,
SceAtracStreamInfo   
)

◆ sceAtracQueryDecoderGroupMemSize()

int sceAtracQueryDecoderGroupMemSize ( SceUInt32  atracType,
const SceAtracDecoderGroup pDecoderGroup 
)

◆ sceAtracCreateDecoderGroup()

int sceAtracCreateDecoderGroup ( SceUInt32  atracType,
const SceAtracDecoderGroup pDecoderGroup,
void *  pvWorkMem,
int  initAudiodecFlag 
)

◆ sceAtracDeleteDecoderGroup()

int sceAtracDeleteDecoderGroup ( SceUInt32  atracType,
int  termAudiodecFlag 
)

◆ sceAtracGetDecoderGroupInfo()

int sceAtracGetDecoderGroupInfo ( SceUInt32  atracType,
SceAtracDecoderGroup pCreatedDecoder,
SceAtracDecoderGroup pAvailableDecoder 
)

◆ sceAtracSetDataAndAcquireHandle()

int sceAtracSetDataAndAcquireHandle ( SceUChar8 pucBuffer,
SceUInt32  uiReadSize,
SceUInt32  uiBufferSize 
)

◆ sceAtracReleaseHandle()

int sceAtracReleaseHandle ( int  atracHandle)

◆ sceAtracDecode()

int sceAtracDecode ( int  atracHandle,
void *  pOutputBuffer,
SceUInt32 pOutputSamples,
SceUInt32 pDecoderStatus 
)

◆ sceAtracGetStreamInfo()

int sceAtracGetStreamInfo ( int  atracHandle,
SceAtracStreamInfo pStreamInfo 
)

◆ sceAtracAddStreamData()

int sceAtracAddStreamData ( int  atracHandle,
SceUInt32  addSize 
)

◆ sceAtracIsSubBufferNeeded()

int sceAtracIsSubBufferNeeded ( int  atracHandle)

◆ sceAtracGetSubBufferInfo()

int sceAtracGetSubBufferInfo ( int  atracHandle,
SceUInt32 pReadPosition,
SceUInt32 pMinSubBufferSize,
SceUInt32 pDataSize 
)

◆ sceAtracSetSubBuffer()

int sceAtracSetSubBuffer ( int  atracHandle,
SceUChar8 pSubBuffer,
SceUInt32  subBufferSize 
)

◆ sceAtracSetLoopNum()

int sceAtracSetLoopNum ( int  atracHandle,
int  loopNum 
)

◆ sceAtracSetOutputSamples()

int sceAtracSetOutputSamples ( int  atracHandle,
SceUInt32  outputSamples 
)

◆ sceAtracResetNextOutputPosition()

int sceAtracResetNextOutputPosition ( int  atracHandle,
SceUInt32  resetSample 
)

◆ sceAtracGetContentInfo()

int sceAtracGetContentInfo ( int  atracHandle,
SceAtracContentInfo pContentInfo 
)

◆ sceAtracGetLoopInfo()

int sceAtracGetLoopInfo ( int  atracHandle,
int *  pLoopNum,
SceUInt32 pLoopStatus 
)

◆ sceAtracGetOutputSamples()

int sceAtracGetOutputSamples ( int  atracHandle,
SceUInt32 pOutputSamples 
)

◆ sceAtracGetNextOutputPosition()

int sceAtracGetNextOutputPosition ( int  atracHandle,
SceUInt32 pNextOutputSample 
)

◆ sceAtracGetRemainSamples()

int sceAtracGetRemainSamples ( int  atracHandle,
SceLong64 pRemainSamples 
)

◆ sceAtracGetOutputableSamples()

int sceAtracGetOutputableSamples ( int  atracHandle,
SceLong64 pOutputableSamples 
)

◆ sceAtracGetDecoderStatus()

int sceAtracGetDecoderStatus ( int  atracHandle,
SceUInt32 pDecoderStatus 
)

◆ sceAtracGetVacantSize()

int sceAtracGetVacantSize ( int  atracHandle,
SceUInt32 pVacantSize 
)

◆ sceAtracGetInternalError()

int sceAtracGetInternalError ( int  atracHandle,
int *  pInternalError 
)