forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

G729 Prototypes

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
psPea



Joined: 01 Sep 2007
Posts: 67

PostPosted: Wed May 18, 2011 7:51 am    Post subject: G729 Prototypes Reply with quote

Code:
/*
 * PSP Software Development Kit - http://www.pspdev.org
 * -----------------------------------------------------------------------
 * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
 *
 * pspg729.h - Prototypes for the sceG729 library
 *
 * Copyright (c) 2011 Musa Mitchell <mowglisanu@gmail.com>
 *
 * $Id: $
 */

#ifndef __SCELIBG729_H__
#define __SCELIBG729_H__

#include <psptypes.h>

#ifdef __cplusplus
extern "C" {
#endif

#define G729_Facility_Error 0x80680000
#define G729_Error_Invalid_Arguement 0x80680001
#define G729_Error_Uninitialized 0x80680002

/**
 * sceG729EncodeInitResource
 *
 * @param encoderCount - The number of encoder resouces to initialize, max 4
 *
 * @return 0 on success, < 0 on error.
 */
SceInt32 sceG729EncodeInitResource(SceInt32 encoderCount);

/**
 * sceG729EncodeInit
 *
 * @param encoder - The encoder to use [0, 1, 2]
 *
 * @param unknown - [0, 1], pass 0
 *
 * @return sceG729Encode handle, < 0 on error.
 */
SceInt32 sceG729EncodeInit(SceInt32 encoder, SceInt32 unknown);

/**
 * sceG729EncodeCore
 *
 * @param handle - sceG729Encode handle
 *
 * @param source - The audio to be encoded, 160 bytes are encoded
 * @note source buffer must be half word aligned
 *
 * @param desination - The location to store the encoded audio
 *
 * @return The number of bits written to destination on success, < 0 on error.
 */
SceInt32 sceG729EncodeCore(SceInt32 handle, void *source, void *destination);

/**
 * sceG729EncodeReset
 *
 * @param handle - sceG729Encode handle
 *
 * @return 0 on success, < 0 on error.
 */
SceInt32 sceG729EncodeReset(SceInt32 handle);

/**
 * sceG729DecodeExit
 *
 * @param handle - sceG729Encode handle
 *
 * @return 0 on success, < 0 on error.
 */
SceInt32 sceG729EncodeExit(SceInt32 handle);

/**
 * sceG729EncodeTermResource
 *
 * @return 0 on sucess, < 0 on error.
 */
SceInt32 sceG729EncodeTermResource();

/**
 * sceG729DecodeInitResource
 *
 * @param decoderCount - The number of decoder resouces to initialize, max 4
 *
 * @return 0 on success, < 0 on error.
 */
SceInt32 sceG729DecodeInitResource(SceInt32 decoderCount);

/**
 * sceG729DecodeInit
 *
 * @return sceG729Decode handle, < 0 on error.
 */
SceInt32 sceG729DecodeInit();

/**
 * sceG729DecodeCore
 *
 * @param handle - sceG729Decode handle
 *
 * @param bitCount - The number of bits to be decoded at @source
 *
 * @param silence - Generate silence
 *
 * @param source - Location of data to be decoded
 *
 * @param destination - Location to hold decoded data, 160 bytes are decoded
 * @note destination buffer must be half word aligned
 *
 * @return The number of bits decoded, < 0 on error.
 */
SceInt32 sceG729DecodeCore(SceInt32 handle, SceInt32 bitCount, SceBool silence, void *source, void *destination);

/**
 * sceG729DecodeReset
 *
 * @param handle - sceG729Decode handle
 *
 * @return 0 on success, < 0 on error.
 */
SceInt32 sceG729DecodeReset(SceInt32 handle);

/**
 * sceG729DecodeExit
 *
 * @param handle - sceG729Decode handle
 *
 * @return 0 on success, < 0 on error.
 */
SceInt32 sceG729DecodeExit(SceInt32 handle);

/**
 * sceG729DecodeTermResource
 *
 * @return 0 on success, < 0 on error.
 */
SceInt32 sceG729DecodeTermResource();

#ifdef __cplusplus
}
#endif

#endif


Code:
   .set noreorder

#include "pspimport.s"

   IMPORT_START   "sceG729",0x00090000
   IMPORT_FUNC   "sceG729",0x13F1028A,sceG729DecodeExit
   IMPORT_FUNC   "sceG729",0x17C11696,sceG729DecodeInitResource
   IMPORT_FUNC   "sceG729",0x3489D1F3,sceG729DecodeCore
   IMPORT_FUNC   "sceG729",0x55E14F75,sceG729DecodeInit
   IMPORT_FUNC   "sceG729",0x5A409D1B,sceG729EncodeExit
   IMPORT_FUNC   "sceG729",0x74804D93,sceG729DecodeReset
   IMPORT_FUNC   "sceG729",0x890B86AE,sceG729DecodeTermResource
   IMPORT_FUNC   "sceG729",0x8C87A2CA,sceG729EncodeReset
   IMPORT_FUNC   "sceG729",0x94714D50,sceG729EncodeTermResource
   IMPORT_FUNC   "sceG729",0xAA1E5462,sceG729EncodeInitResource
   IMPORT_FUNC   "sceG729",0xCFCD367C,sceG729EncodeInit
   IMPORT_FUNC   "sceG729",0xDB7259D5,sceG729EncodeCore


g729
_________________
Click ME!
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group