diff --git a/3rdParty/cri/Durango/include/cri_allocator.h b/3rdParty/cri/Durango/include/cri_allocator.h deleted file mode 100644 index e3c18997..00000000 --- a/3rdParty/cri/Durango/include/cri_allocator.h +++ /dev/null @@ -1,63 +0,0 @@ -#ifndef _CRI_ALLOCATOR_H_INCLUDED -#define _CRI_ALLOCATOR_H_INCLUDED -/**************************************************************************** - * * - * CRI Allocator * - * * - * 2006-01-05 written by M.Oshimi * - * * - ****************************************************************************/ - -/**************************************************************************** - * Include file - ****************************************************************************/ -#include -#include "cri_xpt.h" -#include "cri_heap.h" - -/**************************************************************************** - * Macro Constants - ****************************************************************************/ -#if defined(XPT_UNSUPPORT_CPLUSPLUS_THROW) -#define CRI_ALLOCATOR_CPLUSPLUS_THROW -#else -#define CRI_ALLOCATOR_CPLUSPLUS_THROW throw() -#endif - -/**************************************************************************** - * Class Declaration - ****************************************************************************/ -#ifdef __cplusplus - -class CriAllocator -{ -public: - static const CriSint32 DEFAULT_ALIGNMENT = CRIHEAP_DEFAULT_MEM_ALIGN; - - - static void* CRIAPI operator new(size_t size, CriHeap heap) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void* CRIAPI operator new(size_t size, CriHeap heap, CriHeapType heap_type) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void* CRIAPI operator new(size_t size, CriHeap heap, const CriChar8 *name, CriUint32 align=DEFAULT_ALIGNMENT) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void* CRIAPI operator new(size_t size, CriHeap heap, CriHeapType heap_type, const CriChar8 *name, CriUint32 align=DEFAULT_ALIGNMENT) CRI_ALLOCATOR_CPLUSPLUS_THROW; - - static void CRIAPI operator delete(void *p, size_t size); - - static void* CRIAPI operator new(size_t size, void *work, CriSint32 wksize) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void CRIAPI operator delete(void *p, void *work, CriSint32 wksize) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void* CRIAPI operator new(size_t size, void *work, CriSint32 wksize, CriUint32 align) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void CRIAPI operator delete(void *p, void *work, CriSint32 wksize, CriUint32 align) CRI_ALLOCATOR_CPLUSPLUS_THROW; - -#if !defined(XPT_TGT_BCB) - static void CRIAPI operator delete(void *p, CriHeap heap) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void CRIAPI operator delete(void *p, CriHeap heap, CriHeapType heap_type) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void CRIAPI operator delete(void *p, CriHeap heap, const CriChar8 *name, CriUint32 align) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void CRIAPI operator delete(void *p, CriHeap heap, CriHeapType heap_type, const CriChar8 *name, CriUint32 align) CRI_ALLOCATOR_CPLUSPLUS_THROW; -#endif - - static CriSint32 GetWorstExtraSize(CriUint32 align); -}; -#endif // _CRI_ALLOCATOR_H_INCLUDED - -#endif /* end of __cplusplus */ - -/* --- end of file --- */ diff --git a/3rdParty/cri/Durango/include/cri_error.h b/3rdParty/cri/Durango/include/cri_error.h deleted file mode 100644 index 6fdd5f43..00000000 --- a/3rdParty/cri/Durango/include/cri_error.h +++ /dev/null @@ -1,368 +0,0 @@ -#ifndef _CRI_ERROR_H_INCLUDED -#define _CRI_ERROR_H_INCLUDED -/**************************************************************************** - * - * CRI Middleware SDK - * - * Copyright (c) 2006-2009 CRI Middleware Co., Ltd. - * - * Library : CRI Error - * Module : - * File : cri_error.h - * - ****************************************************************************/ -/*! - * \file cri_error.h - */ -/*JP - * \addtogroup CRI_ERROR エラーハンドリング用関数群 - * @{ - */ -/*EN - * \addtogroup CRI_ERROR Functions for error handling - * @{ - */ - -/**************************************************************************** - * Include file * - ****************************************************************************/ -#include "cri_xpt.h" - -/**************************************************************************** - * MACRO CONSTANT * - ****************************************************************************/ - -/* バージョン番号 */ -/* Version number */ -#define CRIERROR_VER_NAME "CRI Error" -#define CRIERROR_VER_NUM "1.04.00" -#define CRIERROR_VER_OPTION - -/*JP - * \brief エラーコード - */ -/*EN - * \brief Error codes - */ -typedef enum { - CRIERR_OK = 0, /*JP< 正常終了 */ - /*EN< Succeeded */ - CRIERR_NG = -1, /*JP< エラーが発生 */ - /*EN< Error occurred */ - CRIERR_INVALID_PARAMETER = -2, /*JP< 引数が不正 */ - /*EN< Invalid argument */ - CRIERR_FAILED_TO_ALLOCATE_MEMORY = -3, /*JP< メモリの確保に失敗 */ - /*EN< Failed to allocate memory */ - CRIERR_UNSAFE_FUNCTION_CALL = -4, /*JP< 非スレッドセーフ関数の並列実行 */ - /*EN< Parallel execution of thread-unsafe function */ - CRIERR_FUNCTION_NOT_IMPLEMENTED = -5, /*JP< 未実装関数の実行 */ - /*EN< Function not implemented */ - CRIERR_LIBRARY_NOT_INITIALIZED = -6, /*JP< ライブラリが未初期化 */ - /*EN< Library not initialized */ - /* enum be 4bytes */ - CRIERR_ENUM_BE_SINT32 = 0x7FFFFFFF -} CriError; - -/*JP - * \brief エラー通知レベル - */ -/*EN - * \brief Error notification level - */ -typedef enum { - CRIERR_NOTIFY_ALL = 0, /*JP< 全てのエラーを通知 */ - /*EN< Notify all errors */ - CRIERR_NOTIFY_FATAL = 1, /*JP< エラーのみ通知(警告は無視) */ - /*EN< Notify error (Disregards warning) */ - /* enum be 4bytes */ - CRIERR_NOTIFY_ENUM_BE_SINT32 = 0x7FFFFFFF -} CriErrorNotificationLevel; - -/* エラーレベル */ -/* Error level */ -typedef enum { - CRIERR_LEVEL_ERROR = 0, - CRIERR_LEVEL_WARNING = 1, - /* enum be 4bytes */ - CRIERR_LEVEL_ENUM_BE_SINT32 = 0x7FFFFFFF -} CriErrorLevel; - -/**************************************************************************** - * PROCESS MACRO * - ****************************************************************************/ - -#if defined(CRIERROR_SIMPLIFY) - /* エラーの通知 */ - /* Notification of Error */ - #define criErr_NotifyError(id, msg) criErr_NotifyErrorSimple() - #define criErr_NotifyError1(id, msg, p1) criErr_NotifyErrorSimple() - #define criErr_NotifyError2(id, msg, p1, p2) criErr_NotifyErrorSimple() - #define criErr_NotifyErrorPrmArray(id, msg, p1, p2, pa) criErr_NotifyErrorSimple() - #define criErr_NotifyErrorGeneric(_error_id, _error_no) criErr_NotifyErrorSimple() - /* 警告の通知 */ - /* Notification of Warning */ - #define criErr_NotifyWarning(id, msg) criErr_NotifyWarningSimple() - #define criErr_NotifyWarning1(id, msg, p1) criErr_NotifyWarningSimple() - #define criErr_NotifyWarning2(id, msg, p1, p2) criErr_NotifyWarningSimple() - #define criErr_NotifyWarningPrmArray(id, msg, p1, p2, pa) criErr_NotifyWarningSimple() - #define criErr_NotifyWarningGeneric(_error_id, _error_no) criErr_NotifyWarningSimple() -#else - /* エラーの通知 */ - /* Notification of Error */ - #define criErr_NotifyError(id, msg) criErr_Notify(CRIERR_LEVEL_ERROR, id ":" msg) - #define criErr_NotifyError1(id, msg, p1) criErr_Notify1(CRIERR_LEVEL_ERROR, (id ":" msg), (CriUintPtr)(p1)) - #define criErr_NotifyError2(id, msg, p1, p2) criErr_Notify2(CRIERR_LEVEL_ERROR, (id ":" msg), (CriUintPtr)(p1), (CriUintPtr)(p2)) - #define criErr_NotifyErrorPrmArray(id, msg, p1, p2, pa) criErr_NotifyPrmArray(CRIERR_LEVEL_ERROR, (id ":" msg), (CriUintPtr)(p1), (CriUintPtr)(p2), (CriUintPtr *)(pa)) - #define criErr_NotifyErrorGeneric(_error_id, _error_no) criErr_NotifyGeneric(CRIERR_LEVEL_ERROR, _error_id, _error_no) - /* 警告の通知 */ - /* Notification of Warning */ - #define criErr_NotifyWarning(id, msg) criErr_Notify(CRIERR_LEVEL_WARNING, id ":" msg) - #define criErr_NotifyWarning1(id, msg, p1) criErr_Notify1(CRIERR_LEVEL_WARNING, (id ":" msg), (CriUintPtr)(p1)) - #define criErr_NotifyWarning2(id, msg, p1, p2) criErr_Notify2(CRIERR_LEVEL_WARNING, (id ":" msg), (CriUintPtr)(p1), (CriUintPtr)(p2)) - #define criErr_NotifyWarningPrmArray(id, msg, p1, p2, pa) criErr_NotifyPrmArray(CRIERR_LEVEL_WARNING, (id ":" msg), (CriUintPtr)(p1), (CriUintPtr)(p2), (CriUintPtr *)(pa)) - #define criErr_NotifyWarningGeneric(_error_id, _error_no) criErr_NotifyGeneric(CRIERR_LEVEL_WARNING, _error_id, _error_no) -#endif - -/**************************************************************************** - * Data type declaration * - ****************************************************************************/ - -/* Error Callback Function type */ -typedef void (CRIAPI *CriErrCbFunc)(const CriChar8 *errid, CriUint32 p1, CriUint32 p2, CriUint32 *parray); - -/**************************************************************************** - * 変数の宣言 * - * Variable Declaration * - ****************************************************************************/ -/* エラー出力省略用変数 */ -/* default argument of CriError */ -#ifdef __cplusplus -namespace criErr { - extern CriError ErrorContainer; -} -#endif /* __cplusplus */ - -/**************************************************************************** - * 関数の宣言 * - * Function Declaration * - ****************************************************************************/ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/*JP - * \brief エラーID文字列からエラーメッセージへ変換 - * \ingroup CRI_ERROR - * \param[in] errid エラーID文字列 - * \return エラーメッセージ - * \par 説明: - * エラーID文字列から詳細なエラーメッセージへ変換します。
- * \attention - * この関数は旧仕様の関数です。
- * 代わりに ::criErr_ConvertIdToMessage 関数を使用してください。 - * \sa criErr_ConvertIdToMessage - */ -/*EN - * \brief Convert error ID to error message - * \ingroup CRI_ERROR - * \param[in] errid error ID - * \return error message - * \par Explanation: - * This function converts error ID to detailed error message.
- * \attention - * This function is an obsolete one.
- * Please use the ::criErr_ConvertIdToMessage function instead. - * \sa criErr_ConvertIdToMessage - */ -const CriChar8* CRIAPI criErr_ConvertIdToMsg(const CriChar8 *errid); - -/*JP - * \brief エラーID文字列からエラーメッセージへ変換 - * \ingroup CRI_ERROR - * \param[in] errid エラーID文字列 - * \param[in] p1 補足情報1 - * \param[in] p2 補足情報2 - * \return エラーメッセージ - * \par 説明: - * エラーID文字列から詳細なエラーメッセージへ変換します。
- * \par 用例: - * \code - * void user_error_callback_func(const CriChar8 *errid, CriUint32 p1, CriUint32 p2, CriUint32 *parray); - * { - * const CriChar8 *errmsg; - * errmsg = criErr_ConvertIdToMessage(errid, p1, p2); - * printf("%s\n", errmsg); - * } - * \endcode - */ -/*EN - * \brief Convert error ID to error message - * \ingroup CRI_ERROR - * \param[in] errid error ID - * \param[in] p1 supplementary information 1 - * \param[in] p2 supplementary information 2 - * \return error message - * \par Explanation: - * This function converts error ID to detailed error message.
- * \par Example: - * \code - * void user_error_callback_func(const CriChar8 *errid, CriUint32 p1, CriUint32 p2, CriUint32 *parray); - * { - * const CriChar8 *errmsg; - * errmsg = criErr_ConvertIdToMessage(errid, p1, p2); - * printf("%s\n", errmsg); - * } - * \endcode - */ -const CriChar8* CRIAPI criErr_ConvertIdToMessage(const CriChar8 *errid, CriUint32 p1, CriUint32 p2); - -/*JP - * \brief エラーコールバック関数の登録 - * \ingroup CRI_ERROR - * \param[in] cbf エラーコールバック関数 - * \return なし - * \par 説明: - * エラーコールバック関数を登録します。
- * 登録された関数は、CRIミドルウエアライブラリ内でエラーが発生したときに呼び出されます。
- * 同時に登録できるエラーコールバック関数は1つです。
- * 登録後に再度本関数を呼び出した場合は現在の登録を上書きします。 - * \par 用例: - * \code - * void user_error_callback_func(const CriChar8 *errid, CriUint32 p1, CriUint32 p2, CriUint32 *parray); - * { - * const CriChar8 *errmsg; - * errmsg = criErr_ConvertIdToMessage(errid, p1, p2); - * printf("%s\n", errmsg); - * } - * - * void main(int ac, char *av[]) - * { - * : - * // エラーコールバックの登録 - * criErr_SetCallback(user_error_callback_func); - * : - * } - * \endcode - */ -/*EN - * \brief Register error callback function - * \ingroup CRI_ERROR - * \param[in] cbf error callback function - * \return NONE - * \par Explanation: - * This function registers an error callback function.
- * The registered function is called if an error occurs within the CRI middleware library. - * \par Example: - * \code - * void user_error_callback_func(const CriChar8 *errid, CriUint32 p1, CriUint32 p2, CriUint32 *parray); - * { - * const CriChar8 *errmsg; - * errmsg = criErr_ConvertIdToMessage(errid, p1, p2); - * printf("%s\n", errmsg); - * } - * - * void main(int ac, char *av[]) - * { - * : - * // Registers the error callback function - * criErr_SetCallback(user_error_callback_func); - * : - * } - * \endcode - */ -void CRIAPI criErr_SetCallback(CriErrCbFunc cbf); - -/*JP - * \brief エラー通知レベルの変更 - * \ingroup CRI_ERROR - * \param[in] level エラー通知レベル - * \return なし - * \par 説明: - * エラーコールバックに通知するエラーのレベルを変更します。 - */ -/*EN - * \brief Change error notification level - * \ingroup CRI_ERROR - * \param[in] level error notification level - * \return NONE - * \par Explanation: - * This function changes the level of error information that is notified to the error callback. - */ -void CRIAPI criErr_SetErrorNotificationLevel(CriErrorNotificationLevel level); - -/*JP - * \brief エラー発生回数の取得 - * \ingroup CRI_ERROR - * \param[in] level エラーレベル - * \return エラー発生回数 - * \par 説明: - * エラー発生回数を取得します。 - */ -/*EN - * \brief Retrieve error count - * \ingroup CRI_ERROR - * \param[in] level error level - * \return number of errors occured - * \par Explanation: - * This function retrieves the number of errors occured. - */ -CriUint32 CRIAPI criErr_GetErrorCount(CriErrorLevel level); - -/*JP - * \brief エラー発生回数のリセット - * \ingroup CRI_ERROR - * \param[in] level エラーレベル - * \return なし - * \par 説明: - * エラー発生回数のカウンタを0に戻します。 - */ -/*EN - * \brief Resets error count - * \ingroup CRI_ERROR - * \param[in] level error level - * \return NONE - * \par Explanation: - * This function resets the counter for number of errors occured. - */ -void CRIAPI criErr_ResetErrorCount(CriErrorLevel level); - -/* エラーコールバックを発生させる (内部関数) */ -/* Error notification (Internal functions) */ -void CRIAPI criErr_Notify(CriErrorLevel level, const CriChar8 *errid); -void CRIAPI criErr_Notify1(CriErrorLevel level, const CriChar8 *errid, CriUintPtr p1); -void CRIAPI criErr_Notify2(CriErrorLevel level, const CriChar8 *errid, CriUintPtr p1, CriUintPtr p2); -void CRIAPI criErr_NotifyPrmArray(CriErrorLevel level, const CriChar8 *errid, CriUintPtr p1, CriUintPtr p2, CriUintPtr *pa); -void CRIAPI criErr_NotifyGeneric(CriErrorLevel level, const CriChar8 *error_id, CriError error_no); -void CRIAPI criErr_NotifyErrorSimple(void); -void CRIAPI criErr_NotifyWarningSimple(void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -/*************************************************************************** - * 旧バージョンとの互換用 - * For compatibility with old versions - ***************************************************************************/ -#define criErr_Invoke(errid) criErr_Notify(CRIERR_LEVEL_ERROR, errid) -#define criErr_Invoke1(errid, p1) criErr_Notify1(CRIERR_LEVEL_ERROR, errid, p1) -#define criErr_Invoke2(errid, p1, p2) criErr_Notify2(CRIERR_LEVEL_ERROR, errid, p1, p2) -#define criErr_InvokePrmArray(errid, p1, p2, pa) criErr_NotifyPrmArray(CRIERR_LEVEL_ERROR, errid, p1, p2, pa) -#define criErr_InvokeGeneric(error_id, error_no) criErr_NotifyGeneric(CRIERR_LEVEL_ERROR, error_id, error_no) -#define criErr_Occur(id, msg) criErr_Notify(CRIERR_LEVEL_ERROR, id ":" msg) -#define criErr_Occur1(id, msg, p1) criErr_Notify1(CRIERR_LEVEL_ERROR, (id ":" msg), (CriUintPtr)(p1)) -#define criErr_Occur2(id, msg, p1, p2) criErr_Notify2(CRIERR_LEVEL_ERROR, (id ":" msg), (CriUintPtr)(p1), (CriUintPtr)(p2)) -#define criErr_OccurPrmArray(id, msg, p1, p2, pa) criErr_NotifyPrmArray(CRIERR_LEVEL_ERROR, (id ":" msg), (CriUintPtr)(p1), (CriUintPtr)(p2), (CriUintPtr*)(pa)) -#define criErr_OccurGeneric(_error_id, _error_no) criErr_NotifyGeneric(CRIERR_LEVEL_ERROR, _error_id, _error_no) - -/*EN - * @} - */ -/*JP - * @} - */ - -#endif // _CRI_ERROR_H_INCLUDED - -/* --- end of file --- */ diff --git a/3rdParty/cri/Durango/include/cri_heap.h b/3rdParty/cri/Durango/include/cri_heap.h deleted file mode 100644 index 49e85012..00000000 --- a/3rdParty/cri/Durango/include/cri_heap.h +++ /dev/null @@ -1,640 +0,0 @@ -#ifndef _CRI_HEAP_H_INCLUDED -#define _CRI_HEAP_H_INCLUDED -/**************************************************************************** - * * - * CRI Heap Manager "CriHeap" Library * - * * - * 2005-03-17 written by satouo * - * * - ****************************************************************************/ -/*! - * \file cri_heap.h - */ - -/**************************************************************************** - * インクルードファイル * - * Include file * - ****************************************************************************/ -#include "cri_xpt.h" - -#ifdef XPT_TGT_PC -#pragma pack(push) -#pragma pack(1) //The boundary value of structure is adjusted to 1 byte. -#endif - -/**************************************************************************** - * 定数マクロ * - * MACRO CONSTANT * - ****************************************************************************/ -/* Version number of CRIHEAP */ -#define CRIHEAP_NAME_STRINGS "CRI Heap" -#define CRIHEAP_VERSION_STRINGS "1.21.02" - -/* Default memory alignment */ -#define CRIHEAP_DEFAULT_MEM_ALIGN (8) - -/**************************************************************************** - * 列挙定数マクロ * - * ENUM CONSTANT * - ****************************************************************************/ -/*JP - * \brief メモリのタイプ - */ -/*EN - * \brief Types of heap - */ -typedef enum { - CRIHEAP_TYPE_FIX = (1), - CRIHEAP_TYPE_TEMPORARY = (2), - CRIHEAP_TYPE_DYNAMIC = (3), // unuse - CRIHEAP_TYPE_NONE = (0), - /* enum be 4bytes */ - CRIHEAP_TYPE_ENUM_BE_SINT32 = 0x7FFFFFFF -} CriHeapType; - -/**************************************************************************** - * データ型 * - * Data type declaration * - ****************************************************************************/ -/* CriHeapハンドル */ -/* CriHeap handle */ -#ifndef CRIHEAP_DEFINED -#define CRIHEAP_DEFINED - -/* internal */ -typedef struct CriHeapBlockTag { - struct CriHeapBlockTag *prevblock; - struct CriHeapBlockTag *nextblock; - CriSint32 memsize; - CriUint8 used; - CriUint8 type; - CriUint16 alignspc; - CriUint16 gap; - CriChar8 *nameadr; -} CriHeapBlock, *CriHeapBlockPtr; - -/*JP - * \brief CRI Heapハンドル - * \struct CriHeap - * \ingroup CRIHEAP_BASIC - * CRI Heapを用いてメモリアロケートを行うために必要なハンドルです。
- * このハンドルに対して、メモリアロケートやメモリフリーを行います。 - * \sa criHeap_Create(), criHeap_Destroy() - */ -/*EN - * \brief CRI Heap handle - * \struct CriHeap - * \ingroup CRIHEAP_BASIC - * \par Description: - * The heap handle. This data structure needs to exist through the life cycle of - * the heap. It allows the library to allocate and deallocate memory - * internally within the heap. Typically this handle gets allocated at the - * beginning of the heap memory that you've provided for the heap, but don't - * depend on this behavior. The heap itself is opaque. You can of course - * allocate multiple non-contiguous heaps, but these will be separate heap - * structures and a single allocation won't choose between them. - * - * \sa criHeap_Create(), criHeap_Destroy() - */ -typedef struct _criheap_struct { - struct _criheap_vfunctiontable *vtbl; - CriSint32 totalsize; - CriSint32 peaksize; - CriSint32 currentsize; - CriHeapBlock *topblock; - CriHeapBlock *taleblock; -} CriHeapObj, *CriHeap; - -/*JP - * \brief CRI Heap仮想関数テーブル - * \struct criHeapVirtualFunctionTable - * \ingroup CRIHEAP_BASIC - * 独自のメモリアロケート関数を実装する際に使用する仮想関数テーブル構造体です。
- * 各関数はマルチスレッドセーフである必要があります。
- * \par 備考: - * 3番目のアロケート関数は現在未使用です。 - */ -/*EN - * \brief CRI Heap Virtual Function Table - * \struct criHeapVirtualFunctionTable - * \ingroup CRIHEAP_BASIC - * \par Description: - * The virtual functions table for original allocation functions.
- * The third allocation function is not in use currently. - */ -typedef struct _criheap_vfunctiontable { - /*JP - * \brief メモリのアロケート(メモリ領域の先端から) - * \par 説明: - * criHeap_AllocFix関数呼び出し時に呼ばれます。 - * \sa criHeap_AllocFix() - */ - /*EN - * \brief Memory allocation (allocating from the top of the memory area) - * \par Description: - * Called from criHeap_AllocFix(). - * \sa criHeap_AllocFix() - */ - void *(*AllocFix)(CriHeap heap, CriSint32 size, const CriChar8 *name, CriSint32 align); - /*JP - * \brief メモリのアロケート(メモリ領域の終端から) - * \par 説明: - * criHeap_AllocFix関数呼び出し時に呼ばれます。 - * \sa criHeap_AllocTemporary() - */ - /*EN - * \brief Memory allocation (allocating from the tail of the memory area) - * \par Description: - * Called from criHeap_AllocTemporary(). - * \sa criHeap_AllocTemporary() - */ - void *(*AllocTemporary)(CriHeap heap, CriSint32 size, const CriChar8 *name, CriSint32 align); - /*JP - * \brief 未使用関数 - */ - /*EN - * \brief Unused - */ - void *(*AllocDynamic)(CriHeap heap, CriSint32 size, const CriChar8 *name, CriSint32 align); // unused - - /*JP - * \brief メモリのフリー - * \par 説明: - * criHeap_Free関数呼び出し時に呼ばれます。 - * \sa criHeap_Free() - */ - /*EN - * \brief Memory deallocation - * \par Description: - * Called from criHeap_Free(). - * \sa criHeap_Free() - */ - CriSint32 (*Free)(CriHeap heap, void *ptr); -} criHeapVirtualFunctionTable; - -#endif - - -/**************************************************************************** - * 関数の宣言 - * Function Declaration - ****************************************************************************/ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/*==========================================================================* - * ライブラリの初期化と終了処理 - * Initialize and Finalize of Library - *==========================================================================*/ -/*JP - * \brief CRI Heapライブラリの初期化 - * \ingroup CRIHEAP_BASIC - * \par 説明: - * CRI Heapライブラリを使用するために必要な初期化関数です。
- * CRI Heapを使用する際はあらかじめ本関数をコールする必要があります。 - * \sa criHeap_Finalize() - */ -/*EN - * \brief Initialize the heap manager. - * \ingroup CRIHEAP_BASIC - * \par Description: - * This function initializes the heap manager and prepares it to manage heaps. - * This function only has an effect the first time it is called in your program. - * Subsequent calls only increment an internal counter. This allows your - * program to call criHeap_Initialize() in pairs with criHeap_Finalize() - * throughout your program modules, and only the initial call to criHeap_Initialize() - * and the final call to criHeap_Finalize() will have any effect. - * \if ps2 - * \par PS2 only: - * This function does a sanity check to make sure that the size of the CriHeapObj - * data structure is a factor of 16. If it is not a factor of 16, this function - * hangs. - * \endif - * \sa criHeap_Finalize() - */ -void CRIAPI criHeap_Initialize(void); - -/*JP - * \brief CRI Heapライブラリの終了 - * \ingroup CRIHEAP_BASIC - * \par 説明: - * CRI Heapライブラリを終了するために必要な終了関数です。
- * CRI Heapの使用を終了する際は本関数をコールしてください。 - * \sa criHeap_Initialize() - */ -/*EN - * \brief Finalize the heap manager. - * \ingroup CRIHEAP_BASIC - * \par Description: - * This function finalizes the heap manager. If the criHeap_Initialize() function - * is called n times, then the nth time that criHeap_Finalize() - * is called, this function invalidates any heaps currently in use. Calling - * any heap function after the nth call to criHeap_Finalize() will - * have unpredictable results. - * \sa criHeap_Initialize() - */ -void CRIAPI criHeap_Finalize(void); - -/*==========================================================================* - * ハンドルの生成・解放 - *==========================================================================*/ -/*JP - * \brief CRI Heapハンドルの生成 - * \ingroup CRIHEAP_BASIC - * \param ptr メモリ領域のポインタ。 - * \param size メモリ領域のサイズ。 - * \return CRI Heapハンドル。
生成に失敗した場合は、NULLが返ります。 - * \par 説明: - * CRI Heapハンドルを生成します。
- * 本関数で与えるメモリ領域は、CRI Heap自身のハンドル領域やアロケート時に - * 確保されるメモリ領域となります。
- * 管理領域を含むため、メモリ領域すべてがアロケート出来ない点に注意してください。 - * 管理領域の目安は「1ハンドルあたりsizeof(CriHeapObj)」+「1アロケートあたり - * sizeof(CriHeapBlock)+各メモリアライメントに必要なサイズ」となります。 - * \code - * CriChar8 heap_buffer[0x2000]; - * CriHeap heap = criHeap_Create((void *)heap_buffer, sizeof(heap_buffer); - * \endcode - * \sa criHeap_Destroy() - */ -/*EN - * \brief Create a contiguous heap in memory. - * \ingroup CRIHEAP_BASIC - * \param ptr A pointer to the start of the memory region to use as a heap. - * \param size The size of the region to be used as a heap. - * \return A valid CriHeap handle if successful, or NULL if unsuccessful. - * \par Description: - * This function allows you to set aside a region of memory for this library's - * use as a "heap". Heap allocation is required before active playback - * can begin. - * This function will fail and return NULL if the size of the memory region - * is smaller than the CriHeapObj structure. - * \code - * CriChar8 heap_buffer[0x2000]; - * CriHeap heap = criHeap_Create((void *)heap_buffer, sizeof(heap_buffer); - * \endcode - * \sa criHeap_Destroy() - */ -CriHeap CRIAPI criHeap_Create(void *ptr, CriSint32 size); - -/*JP - * \brief 非スレッドセーフなCRI Heapハンドルの生成 - * \ingroup CRIHEAP_BASIC - * \param ptr メモリ領域のポインタ。 - * \param size メモリ領域のサイズ。 - * \return CRI Heapハンドル。
生成に失敗した場合は、NULLが返ります。 - * \par 説明: - * CRI Heapハンドルを生成します。
- * 本関数を使用して作成されたヒープは、排他制御が行なわれません。
- * 複数スレッドから同時に参照されるヒープの作成には、criHeap_Create関数をご利用ください。 - * \sa criHeap_Create(), criHeap_Destroy() - */ -/*EN - * \brief Create a contiguous heap in memory. - * \ingroup CRIHEAP_BASIC - * \param ptr A pointer to the start of the memory region to use as a heap. - * \param size The size of the region to be used as a heap. - * \return A valid CriHeap handle if successful, or NULL if unsuccessful. - * \par Description: - * This function creates a heap to use the static memory as dynamically allocatable memory. - * The heap created by using this function is not threadsafe. - * If heap will be accessed by multiple threads, you must create the heap by using the criHeap_Create function. - * \sa criHeap_Create(), criHeap_Destroy() - */ -CriHeap CRIAPI criHeap_CreateNoSerialize(void *ptr, CriSint32 size); - -/*JP - * \brief CRI Heapハンドルの解放 - * \ingroup CRIHEAP_BASIC - * \param heap CRI Heapハンドル。 - * \par 説明: - * CRI Heapハンドルを解放します。
criHeap_Create() で指定されたメモリ領域が - * 解放され、CRI Heapハンドルは無効となります。 - * \sa criHeap_Create() - */ -/*EN - * \brief Destroy a previously created heap. - * \ingroup CRIHEAP_BASIC - * \param heap A CriHeap handle previously created with criHeap_Create(). - * \par Description: - * This function frees all internal allocations previously performed on - * the heap and frees the memory. Internally, this function does in - * fact walk through the heap, finding and freeing all allocations, e.g. - * it is not stubbed. So calling this function on a trashed heap - * will have unpredictable results. - * \sa criHeap_Create() - */ -void CRIAPI criHeap_Destroy(CriHeap heap); - -/*==========================================================================* - * Allocation - *==========================================================================*/ -/*JP - * \brief メモリのアロケート(メモリ領域の先端から) - * \ingroup CRIHEAP_ALLOC - * \param heap CRI Heapハンドル。 - * \param size アロケートするメモリのサイズ。 - * \param name アロケートするメモリの名前。名前はデバッグ時に使用されます。 - * \param align アロケートするメモリのアライメント。 - * \return アロケートしたメモリへのポインタ。
アロケートに失敗した場合はNULLが返ります。 - * \par 説明: - * メモリ領域の先端側から確保するメモリアロケーション関数です。ヒープ領域内に\ref block_fix "Fixブロック"を作成します。
- * メモリの断片化を防ぐため、同じサイズ/アライメントの解放済み\ref block_fix "Fixブロック"を先端側から探して、再利用するように試みます。それが見つからない場合は、未使用の空き領域(\ref block_free "Freeブロック")を分割してメモリを取得します。 - * \code - * CriChar8 heap_buffer[0x2000]; - * CriHeap heap = criHeap_Create((void *)heap_buffer, sizeof(heap_buffer); - * void *memptr = criHeap_AllocFix(heap, 0x100, "forTexture1", 64); - * \endcode - * \sa criHeap_AllocTemporary(), criHeap_Free() - */ -/*EN - * \brief Memory allocation (allocating from the top of the memory area) - * \ingroup CRIHEAP_ALLOC - * \param heap CRI Heap handle - * \param size Memory block size to be allocated - * \param name Memory block name, which is used on debugging - * \param align Memory block alignment - * \return A pointer to the allocated memory block.
Returns NULL if unsuccessful. - * \par Description: - * This function allocates a memory block from the top of the memory area and creates a \ref block_fix "Fix block" in the heap area.
- * To prevent memory fragmentation, a released \ref block_fix "Fix block" with the same size and alignment is searched for in the heap area from the top to the bottom and tries to reused the block. And if not found, an unused free block (\ref block_free "Free block") is divided and a new block is allocated. - * \code - * CriChar8 heap_buffer[0x2000]; - * CriHeap heap = criHeap_Create((void *)heap_buffer, sizeof(heap_buffer); - * void *memptr = criHeap_AllocFix(heap, 0x100, "forTexture1", 64); - * \endcode - * \sa criHeap_AllocTemporary(), criHeap_Free() - */ -void * CRIAPI criHeap_AllocFix(CriHeap heap, CriSint32 size, const CriChar8 *name, CriSint32 align); - -/*JP - * \brief メモリのアロケート(メモリ領域の終端から) - * \ingroup CRIHEAP_ALLOC - * \param heap CRI Heapハンドル。 - * \param size アロケートするメモリのサイズ。 - * \param name アロケートするメモリの名前。名前はデバッグ時に使用されます。 - * \param align アロケートするメモリのアライメント。 - * \return アロケートしたメモリへのポインタ。
アロケートに失敗した場合はNULLが返ります。 - * \par 説明: - * メモリ領域の終端側から確保するメモリアロケーション関数です。ヒープ領域内に\ref block_temporary "Temporaryブロック"を作成します。
- * 要求したサイズ/アライメントをアロケート可能な解放済み\ref block_temporary "Temporaryブロック"を終端側から探して、分割または再利用するように試みます。それが見つからない場合は、未使用の空き領域(\ref block_free "Freeブロック")を分割してメモリを取得します。
- * ヒープ領域の終端側からメモリをアロケートするため、先端側での断片化を防ぐことが出来ます。
- * 主に、一時的に利用するメモリに使用します。 - * \sa criHeap_AllocFix(), criHeap_Free() - */ -/*EN - * \brief Memory allocation (allocating from the tail of the memory area) - * \ingroup CRIHEAP_ALLOC - * \param heap CRI Heap handle - * \param size Memory block size to be allocated - * \param name Memory block name, which is used on debugging - * \param align Memory block alignment - * \return A pointer to the allocated memory block.
Returns NULL if unsuccessful. - * \par Description: - * This function allocates a memory block from the bottom of the memory area and creates a \ref block_temporary "Temporary block" in the heap area.
- * A released \ref block_temporary "Temporary block" available with the requested size and alignment is searched for in the heap area from the bottom and tries to divide and to reuse the block. And if not found, an unused free block (\ref block_free "Free block") is divided and a new block is allocated.
- * Allocating from the bottom of the heap area will prevent fragmentation in the top of the heap area.
- * Temporary block is mainly used for the memory area that is temporarily used. - * \sa criHeap_AllocFix(), criHeap_Free() - */ -void * CRIAPI criHeap_AllocTemporary(CriHeap heap, CriSint32 size, const CriChar8 *name, CriSint32 align); - -/* DYNAMIC (unuse) */ -//void * CRIAPI criHeap_AllocDynamic(CriHeap heap, CriSint32 size, const CriChar8 *name, CriSint32 align); - -void * CRIAPI criHeap_Alloc(CriHeap heap, CriSint32 size, const CriChar8 *name, CriSint32 align, CriSint32 type); - -/*==========================================================================* - * Free - *==========================================================================*/ -/*JP - * \brief メモリのフリー - * \ingroup CRIHEAP_ALLOC - * \param heap CRI Heapハンドル。 - * \param ptr アロケートしたメモリのポインタ。 - * \return フリーされたメモリサイズ。 - * \par 説明: - * アロケートされたメモリをフリーします。
- * \code - * void *memptr = criHeap_AllocFix(heap, 0x100, "forTexture1", 64); - * criHeap_Free(heap, memptr); - * \endcode - * \sa criHeap_AllocFix(), criHeap_AllocTemporary() - */ -/*EN - * \brief Memory deallocation - * \ingroup CRIHEAP_ALLOC - * \param heap CRI Heap handle - * \param ptr The pointer to the allocated memory block - * \return Deallocated memory block size - * \par Description: - * This function deallocates the allocated memory block.
- * \code - * void *memptr = criHeap_AllocFix(heap, 0x100, "forTexture1", 64); - * criHeap_Free(heap, memptr); - * \endcode - * \sa criHeap_AllocFix(), criHeap_AllocTemporary() - */ -CriSint32 CRIAPI criHeap_Free(CriHeap heap, void *ptr); - -/*==========================================================================* - * 排他制御用関数 - *==========================================================================*/ -CriSint32 CRIAPI criHeap_EnterCriticalSection(void); -CriSint32 CRIAPI criHeap_LeaveCriticalSection(void); - -/*==========================================================================* - * その他の関数 - *==========================================================================*/ -/* For only internal use */ -CriSint32 CRIAPI criHeap_SwitchAllocFunctions(CriHeap heap); - -/*==========================================================================* - * デバッグ関連 - *==========================================================================*/ -/*JP - * \brief ピークメモリサイズの取得 - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heapハンドル。 - * \return 使用されたメモリの最大値。 - * \par 説明: - * 過去、使用されたメモリ量の最大値を返します。
- * 最大値はcriHeap_DebugResetPeakMemorySize() でリセットすることが出来ます。 - * \sa criHeap_DebugResetPeakMemorySize() - */ -/*EN - * \brief Returns peak memory usage of the heap. - * \ingroup CRIHEAP_DEBUG - * \param heap The heap previously allocated by criHeap_Create(). - * \return The maximum number of bytes used by the heap. - * \par Description: - * The amount of memory used by these libraries is variable and depends - * on the number of simultaneous streams being read, the seek and error - * frequency within the stream being read, video resolution and other - * factors. This function allows you to tune the allocation of the heap - * to achieve a required performance level while allocating minimal - * heap space for this library. To get accurate readings, this function - * should typically be called just before criHeap_Destroy(), and after - * exercising all the video and audio functions in your program. - */ -CriSint32 CRIAPI criHeap_DebugGetPeakMemorySize(CriHeap heap); - -/*JP - * \brief ピークメモリサイズのリセット - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heapハンドル。 - * \par 説明: - * ピークメモリサイズをリセットします。 - * \sa criHeap_DebugGetPeakMemorySize() - */ -/*EN - * \brief Reset peak memory size - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heap handle - * \par Description: - * The peak memory size is reset. - * \sa criHeap_DebugGetPeakMemorySize() - */ -void CRIAPI criHeap_DebugResetPeakMemorySize(CriHeap heap); - -/*JP - * \brief メモリブロック数の取得 - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heapハンドル。 - * \return メモリブロック数。 - * \par 説明: - * アロケートされたメモリのブロック数を返します。
- * CRI Heapハンドル生成直後は未使用のメモリブロックが1つ存在する状態 - * となります。また、フリーされた断片化されたメモリブロックもこの数に - * 含みます。 - * \sa criHeap_DebugGetUsedBlocks() - */ -/*EN - * \brief Get number of allocated memory blocks - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heap handle - * \return Number of allocated memory blocks - * \par Description: - * The number of allocated memory blocks is returned.
- * One unused memory block exists right after CRI Heap handle creation. - * The number of released fragmented memory blocks is also included. - * \sa criHeap_DebugGetUsedBlocks() - */ - CriSint32 CRIAPI criHeap_DebugGetNumBlocks(CriHeap heap); - -/*JP - * \brief 使用メモリブロック数の取得 - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heapハンドル。 - * \return 使用メモリブロック数。 - * \par 説明: - * アロケートされているメモリブロックの数を返します。 - * \sa criHeap_DebugGetNumBlocks() - */ -/*EN - * \brief Get number of used memory blocks - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heap - * \return Number of used memory blocks - * \par Description: - * The number of used memory blocks is returned.
- * \sa criHeap_DebugGetNumBlocks() - */ -CriSint32 CRIAPI criHeap_DebugGetUsedBlocks(CriHeap heap); - -/*JP - * \brief メモリブロック名の取得 - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heapハンドル。 - * \param ptr アロケートしたメモリのポインタ。 - * \return メモリブロック名。 - * \par 説明: - * アロケート時に設定したメモリブロック名へのポインタを返します。
- */ -/*EN - * \brief Get memory block name - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heap - * \param ptr A pointer to the allocated memory block - * \return Memory block name - * \par Description: - * The pointer to the memory block name specified on allocation is returned.
- */ -CriChar8 * CRIAPI criHeap_DebugGetBlockName(CriHeap heap, void *ptr); - -/* メモリブロック番号の取得 */ -//CriSint32 CRIAPI criHeap_DebugGetBlockNumberFromPointer(CriHeap heap, void *ptr); - -/* メモリブロック情報の取得 */ -//void CRIAPI criHeap_DebugGetBlockInformation(CriHeap heap, -// CriSint32 blocknumber, CriHeapBlock *heapblock); - -/* メモリブロック情報の表示 */ -//void CRIAPI criHeap_DebugPrintBlockInformation(CriHeap heap, -// CriSint32 blocknumber, CriHeapBlock *heapblock); - -/*JP - * \brief メモリブロック情報の表示 - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heapハンドル。 - * \par 説明: - * 現在のメモリブロック情報を表示します。
- * printf関数などの標準出力に表示を行います。 - */ -/*EN - * \brief Print memory block information - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heap - * \par Description: - * The current memory block information is displayed.
- * It is displayed on the standard output for the printf function. - */ - void CRIAPI criHeap_DebugPrintBlockInformationAll(CriHeap heap); - -/*JP - * \brief メモリアロケートサイズの取得 - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heapハンドル。 - * \par 説明: - * 現在のメモリアロケートサイズの合計値を返します。 - */ -/*EN - * \brief Get total allocation size - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heap - * \par Description: - * The total size of allocated memory blocks is returned. - */ -CriSint32 CRIAPI criHeap_DebugGetTotalAllocSize(CriHeap heap); - -/* フリーサイズの取得 */ -//CriSint32 CRIAPI criHeap_DebugGetTotalFreeSize(CriHeap heap); - -/* メモリアロケートサイズの取得(タイプ別) */ -CriSint32 CRIAPI criHeap_DebugGetAllocSize(CriHeap heap, CriSint32 type); - -/* ヒープヘッダサイズの取得 */ -CriSint64 CRIAPI criHeap_DebugGetHandleHeaderSize(CriHeap heap); - -/* メモリブロックヘッダサイズの取得 ptr: Allocated Pointer */ -CriSint64 CRIAPI criHeap_DebugGetMemBlockHeaderSize(void *ptr); - -/* 追加で必要となるサイズの最大値 */ -CriSint32 CRIAPI criHeap_DebugGetWorstExtraSize(CriSint32 alignment); - -/* criHeap_AllocFixでアロケート可能なサイズ */ -CriSint32 CRIAPI criHeap_DebugGetFixAllocatableSize(CriHeap heap, CriSint32 alignment); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#ifdef XPT_TGT_PC -#pragma pack(pop) -#endif - -#endif // _CRI_HEAP_H_INCLUDED - -/* end of file */ diff --git a/3rdParty/cri/Durango/include/cri_movie_core.h b/3rdParty/cri/Durango/include/cri_movie_core.h deleted file mode 100644 index d695a4df..00000000 --- a/3rdParty/cri/Durango/include/cri_movie_core.h +++ /dev/null @@ -1,2572 +0,0 @@ -/**************************************************************************** - * - * CRI Middleware SDK - * - * Copyright (c) 2005-2013 CRI Middleware Co., Ltd. - * - * Library : CRI Movie - * Module : Library User's Header - * File : cri_movie_core.h - * Date : 2013-09-27 - * Version : (see CRIMVPLY_VER) - * - ****************************************************************************/ -/*! - * \file cri_movie_core.h - */ -#ifndef CRI_MOVIE_CORE_H_INCLUDED /* Re-definition prevention */ -#define CRI_MOVIE_CORE_H_INCLUDED - -/* Version No. */ -#define CRIMVPLY_VER "3.40" -#define CRIMVPLY_NAME "criMvPly" - -/*************************************************************************** - * Include file - ***************************************************************************/ -#include -#include -#include - -/*************************************************************************** - * MACRO CONSTANT - ***************************************************************************/ - -/*EN - * \brief Audio OFF setting of Audio Track - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetAudioTrack() - */ -/*JP - * \brief オーディオ再生OFFの指定値 - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetAudioTrack() - */ -#define CRIMV_AUDIO_TRACK_OFF (-1) - -/*EN - * \brief Default setting of Audio Track - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetAudioTrack() - */ -/*JP - * \brief オーディオチャネルのデフォルト値 - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetAudioTrack() - */ -#define CRIMV_AUDIO_TRACK_AUTO (100) - -/*EN - * \brief Maximum number of PCM tracks in one audio stream - * \ingroup MDL_MV_OPTION - */ -/*JP - * \brief オーディオデータ内の最大PCMトラック数 - * \ingroup MDL_MV_OPTION - */ -#define CRIMV_PCM_BUFFER_MAX (8) - -/*EN - * \brief Subtitle OFF setting - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetSubtitleChannel() - */ -/*JP - * \brief 字幕再生OFFの指定値 - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetSubtitleChannel() - */ -#define CRIMV_SUBTITLE_CHANNEL_OFF (-1) - -/*EN - * \brief Maximum number of video tracks in a movie file - * \ingroup MDL_MV_OPTION - */ -/*JP - * \brief ムービファイル内の最大ビデオストリーム数 - * \ingroup MDL_MV_OPTION - */ -#define CRIMV_MAX_VIDEO_NUM (1) - -/*EN - * \brief Maximum number of audio tracks in a movie file - * \ingroup MDL_MV_OPTION - */ -/*JP - * \brief ムービファイル内の最大オーディオストリーム数 - * \ingroup MDL_MV_OPTION - */ -#define CRIMV_MAX_AUDIO_NUM (32) - -/*EN - * \brief Maximum number of alpha tracks in a movie file - * \ingroup MDL_MV_OPTION - */ -/*JP - * \brief ムービファイル内の最大アルファストリーム数 - * \ingroup MDL_MV_OPTION - */ -#define CRIMV_MAX_ALPHA_NUM (1) - -#if defined(XPT_TGT_PC) -/*EN - * \brief Number of extra threads for multicore decoding - * \ingroup MDL_MV_OPTION - * The number of additional decoding threads that CRI Movie library internally creates. - * The threads are intended to run on multiple processors in parallel. - * \sa CriMvEasyPlayer::SetUsableProcessors_PC() - */ -/*JP - * \brief マルチコアデコード用の追加のデコードスレッド数 - * \ingroup MDL_MV_OPTION - * CRI Movieライブラリが内部で作成する追加のデコードの数です。これらのスレッドは、マルチコアPC上で - * デコード処理を並列分散させるために作られます。 - * \sa CriMvEasyPlayer::SetUsableProcessors_PC() - */ -#define CRIMV_NUM_EXT_DECTHREAD_PC (3) - -/*EN - * \brief Default affnity mask of a thread - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetUsableProcessors_PC() - */ -/*JP - * \brief スレッドアフィニティマスクのデフォルト設定値 - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetUsableProcessors_PC() - */ -#define CRIMV_DEFAULT_AFFNITY_MASK_PC (0xFFFFFFFF) - - -/*EN - * \brief Default priority of a thread - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetUsableProcessors_PC() - */ -/*JP - * \brief スレッドのデフォルト優先度 - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetUsableProcessors_PC() - */ -#define CRIMV_DEFAULT_THREAD_PRIORITY_PC (0x8000000) -#endif - -/*EN - * \brief Default value of the read buffer size - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetReadBufferSize() - */ -/*JP - * \brief リードバッファサイズをデフォルト値 - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetReadBufferSize() - */ -#define CRIMV_READ_BUFFER_SIZE_AUTO (-1) - - -/*************************************************************************** - * Library Spec Defenition - ***************************************************************************/ - -/* */ - -/* 2007-09-06:URUSHI オーディオ処理のサブモジュール化 * - * MvPlyのオーディオ処理部分をCriMvPlyAmngという新たなクラスに切り出す。* - * CriMvPlyAmngはデマルチプレクサから全トラックデータを受け取って、 * - * トラックごとに割り振られたAdecに処理を渡します。 * - * 目的は以下の二つ * - * 1) オーディオトラックの動的切替 * - * 2) ループ再生での異なるAV尺の同期 */ - -#define NUM_MAX_ADEC (2) /* Adecの最大数 */ -/* ADECのインデックス定義 */ -/* このindexを使ってCriMvPlyAmngからAdecをコントロールしてください。 */ -#define MAIN_ADEC_IDX (0) // メイントラック用 -#define SUB_ADEC_IDX (1) // ボイストラック用 - -/* オーディオの動的切替機能をサポートするか */ -//#define ENABLE_DYNAMIC_AUDIO_SWITCH - -#if defined(ENABLE_DYNAMIC_AUDIO_SWITCH) - #define CRIMVPLYAMNG_TRACK_OFF (512) // 切り替え先トラック番号のデフォルト値(切替OFF) - - /* トラックの動的切替のための状態定義 */ - typedef enum _crimvplyamng_track_state { - CRIMVPLYAMNG_TRACK_STATE_FIXED = (1), // デフォルト - CRIMVPLYAMNG_TRACK_STATE_PREP_SWITCHING, // ユーザが切替を命令し、切替の準備段階(時刻判定のための基準時間をセット) - CRIMVPLYAMNG_TRACK_STATE_SWITCHING // 切替元と先の時刻判定を行なって切替を行なう状態 - } CriMvPlyAmngTrackState; -#endif - -/* 連結再生時、2個目以降のヘッダを取得できるようにするため */ -#define CRIMVPLY_HEAD_CONTAINER_NUM (2) - -/* 再読み込み閾値のデフォルト値 */ -#define CRIMV_DEFAULT_RELOAD_THRESHOLD (0.8f) // 0.8[sec] - -/* 再生準備中の貯金フレーム数デフォルト値 */ -#define CRIMV_DEFAULT_NUM_FRAMES_FOR_PREP (-1) /* デフォルト:不使用 (フレームプール数を採用) */ - -/* CriMvPly内部でキープするデリゲートスレッド設定用の配列数 */ -#if defined(XPT_TGT_PC) - #define CRIMV_DLGTHREAD_NUM (64) -#elif defined(XPT_TGT_XBOX360) - #define CRIMV_DLGTHREAD_NUM (6 - 1) // 6 HW thread - ユーザアイドルスレッド -#elif defined(XPT_TGT_VITA) - #define CRIMV_DLGTHREAD_NUM (2) -#elif defined(XPT_TGT_WIIU) - #define CRIMV_DLGTHREAD_NUM (2) -#endif - -/* 内部ワーク領域の確保にCRI Heapを使用しない */ -#define CRIMV_REMOVE_CRIHEAP - -/* 機種固有フレーム情報数 */ -#define CRIMV_FRAME_DETAILS_NUM (2) - -/* CriVavfios で指定する外部ファイルのパスの上限 */ -#if defined(XPT_TGT_IOS) - #define CRIMVPLY_VAVFIOS_MAX_FILEPATH (256) -#endif - -/*************************************************************************** - * Process MACRO - ***************************************************************************/ -#define criMv_SetDefaultHandleConfig(p_config) \ -{\ - (p_config)->readbuffer_size = 0;\ -} - -/*************************************************************************** - * Enum declaration - ***************************************************************************/ -/*EN - * \brief Speaker index of CRI Movie PCM output - * \ingroup MDL_MV_OPTION - */ -/*JP - * \brief CRI Movie のPCM出力のスピーカー配置 - * \ingroup MDL_MV_OPTION - */ -typedef enum { - CRIMV_PCM_BUFFER_L = 0, /*EN< The LEFT channel of CRI Movie output */ - /*JP< CRI Movie オーディオ出力の LEFT チャンネル */ - CRIMV_PCM_BUFFER_R = 1, /*EN< The RIGHT channel of CRI Movie output */ - /*JP< CRI Movie オーディオ出力の RIGHT チャンネル */ - CRIMV_PCM_BUFFER_LS = 2, /*EN< The Surround LEFT channel of CRI Movie output */ - /*JP< CRI Movie オーディオ出力の Surround LEFT チャンネル */ - CRIMV_PCM_BUFFER_RS = 3, /*EN< The Surround RIGHT channel of CRI Movie output */ - /*JP< CRI Movie オーディオ出力の Surround RIGHT チャンネル */ - CRIMV_PCM_BUFFER_C = 4, /*EN< The CENTER channel of CRI Movie output */ - /*JP< CRI Movie オーディオ出力の CENTER チャンネル */ - CRIMV_PCM_BUFFER_LFE = 5, /*EN< The LFE channel of CRI Movie output */ - /*JP< CRI Movie オーディオ出力の LFE チャンネル */ - CRIMV_PCM_BUFFER_EXT1 = 6, /*EN< The EXT1(Rear Left) channel of CRI Movie output */ - /*JP< CRI Movie オーディオ出力の EXT1(Rear Left) チャンネル */ - CRIMV_PCM_BUFFER_EXT2 = 7, /*EN< The EXT2(Rear Right) channel of CRI Movie output */ - /*JP< CRI Movie オーディオ出力の EXT2(Rear Right) チャンネル */ - - /* Keep enum 4bytes */ - CRIMV_PCM_BUFFER_MAKE_ENUM_SINT32 = 0x7FFFFFFF -} CriMvPcmBufferIndex; - - -/*EN - * \brief Composite mode of alpha movie - * \ingroup MDL_MV_OPTION - */ -/*JP - * \brief アルファムービの合成モード - * \ingroup MDL_MV_OPTION - */ -typedef enum { - CRIMV_COMPO_OPAQ = 0, /*EN< Opacity, no alpha value */ - /*JP< 不透明、アルファ情報なし */ - CRIMV_COMPO_ALPHFULL = 1, /*EN< Full alpha blending (8bits-alpha data) */ - /*JP< フルAlpha合成(アルファ用データが8ビット) */ - CRIMV_COMPO_ALPH3STEP = 2, /*EN< 3 Step Alpha */ - /*JP< 3値アルファ */ - CRIMV_COMPO_ALPH32BIT = 3, /*EN< Full alpha blending (32bits color + alpha data) */ - /*JP< フルAlpha、(カラーとアルファデータで32ビット) */ - CRIMV_COMPO_ALPH1BIT = 4, /*EN< Alpha blending (24bits color + 1->8bits alpha) */ - /*JP< フルAlpha、(カラーとアルファデータで32bit、値は2値) */ - CRIMV_COMPO_ALPH2BIT = 5, /*EN< Alpha blending (24bits color + 2->8bits alpha) */ - /*JP< フルAlpha、(カラーとアルファデータで32bit、値は4値) */ - CRIMV_COMPO_ALPH3BIT = 6, /*EN< Alpha blending (24bits color + 3->8bits alpha) */ - /*JP< フルAlpha、(カラーとアルファデータで32bit、値は8値) */ - CRIMV_COMPO_ALPH4BIT = 7, /*EN< Alpha blending (24bits color + 4->8bits alpha) */ - /*JP< フルAlpha、(カラーとアルファデータで32bit、値は16値)*/ - - /* Keep enum 4bytes */ - CRIMV_COMPO_MAKE_ENUM_SINT32 = 0x7FFFFFFF -} CriMvAlphaType; - - -/*EN - * \brief Result of the last video frame retrieval - * \ingroup MDL_MV_OPTION - */ -/*JP - * \brief 前回のビデオフレーム取得の結果 - * \ingroup MDL_MV_OPTION - */ -typedef enum { - CRIMV_LASTFRAME_OK = 0, /*EN< Succeeded */ - /*JP< 取得成功 */ - CRIMV_LASTFRAME_TIME_EARLY = 1, /*EN< Failed. The frame is not yet the time to draw */ - /*JP< 取得失敗。フレーム表示時刻が再生時間に達していなかった */ - CRIMV_LASTFRAME_DECODE_DELAY = 2, /*EN< Failed. The frame to draw is not decoded yet */ - /*JP< 取得失敗。ビデオフレームのデコードが間に合わなかった */ - CRIMV_LASTFRAME_DISCARDED = 3, /*EN< Failed. The video frame is discarded by app */ - /*JP< 取得失敗。アプリによって破棄された */ - //CRIMV_LASTFRAME_NO_INPUT_DATA = 4, //Not supported yet - //CRIMV_LASTFRAME_SKIPPED = 5, //Not supported yet - //CRIMV_LASTFRAME_DEMUX_STUCKED = 6, //Not supported yet - - /* Keep enum 4bytes */ - CRIMV_LASTFRAME_MAKE_ENUM_SINT32 = 0x7FFFFFFF -} CriMvLastFrameResult; - -#if defined(XPT_TGT_PS3PPU) -/*EN - * \brief Graphic Environment type for PS3 - * \ingroup MDL_MV_OPTION - */ -/*JP - * \brief PS3のグラフィック環境 - * \ingroup MDL_MV_OPTION - */ -typedef enum { - CRIMV_GRAPHIC_ENV_GCM = 0, /*EN< GCM. (or same ARGB 32bit texture format of GCM) */ - /*JP< GCM環境 (またはテクスチャフォーマットがGCMと同じ環境) */ - CRIMV_GRAPHIC_ENV_PSGL = 1, /*EN< PSGL. (or same ARGB 32bit texture format of PSGL) */ - /*JP< PSGL環境 (またはテクスチャフォーマットがPSGLと同じ環境) */ - - /* Keep enum 4bytes */ - CRIMV_GRAPHIC_ENV_MAKE_ENUM_SINT32 = 0x7FFFFFFF -} CriMvGraphicEnv; -#endif - - -/* CRI Movie Interanl handle status - * - * The possible legal states of a CriMvPly handle. Over the course of your application - * the CriMvPly handle will walk through the following states in roughly the following - * order. In states that are waiting states, you can request the - * CriMvPly handle to advance to the next state by calling the criMvPly_IncrementState() - * function. You can check the status of a valid CriMvPly handle at any time - * by calling criMvPly_GetStatus(). - * - * It is not possible to jump from a state to an arbitrary other state. Normal play - * proceeds from the CRIMVPLY_STATUS_STOP state through the CRIMV_PLY_STATUS_PLAYEND - * state in that order. Premature termination can be requested with the criMvPly_Stop() - * function. - * - * \sa criMvPly_IncrementState(), criMvPly_GetStatus(), criMvPly_Stop() - */ -typedef enum { - CRIMVPLY_STATUS_STOP = 0, /* Standstill. No processing is occurring. - * CriMvPly handles are created into this state. - */ - /* 停止中 */ - CRIMVPLY_STATUS_DECHDR = 1, /* The CriMvPly structure is now parsing the header - * of the file, including information on height and width - * of the video stream. - */ - /* ヘッダ解析中 */ - CRIMVPLY_STATUS_WAIT_PREP = 2, /* The header has been decoded and criMvPly_GetStreamingParameters() - * will now provide valid values. Typically you will call - * criMvPly_AllocateWorkBuffer() with this information at this point. - */ - /* PREP状態へのIncrementState待ち
- AllocateWorkBufferしてから次へいくこと */ - CRIMVPLY_STATUS_PREP = 3, /* Transition to this state to acknowledge to the - * CriMvPly handle that you have allocated your work buffers. */ - /* 再生準備中 */ - CRIMVPLY_STATUS_WAIT_PLAYING = 4, /* The audio and video decoders are now ready to begin playback.*/ - /* PLAYING状態へのIncrementState待ち
- この状態で既にビデオとオーディオのデコード結果は取得できる。*/ - CRIMVPLY_STATUS_PLAYING = 5, /* The decoders are currently decoding and playing output. */ - /* 再生中 */ - CRIMVPLY_STATUS_WAIT_PLAYEND = 6, /* The library is waiting for you to acknowledge the end of the movie. You - * have informed the CriMvPly structure that an end-of-file condition exists, - * but final frames of video and audio may still be pending in your application. */ - /* PLAYEND状態へのIncrementState待ち */ - CRIMVPLY_STATUS_PLAYEND = 7, /* You have acknowledged the end of the movie. Teardown can occur at this point. */ - /* 再生終了 */ - CRIMVPLY_STATUS_STOP_PROCESSING = 8, /* A request to stop has been received by the CriMvPly structure, - * that is, you have called criMvPly_Stop(), and a stop is now pending. */ - /* 停止処理中 */ - CRIMVPLY_STATUS_WAIT_STOP = 9, /* The CriMvPly handle has acknowledged the stop request and - * you may now call criMvPly_IncrementState() to transition to - * the CRIMVPLY_STATUS_STOP state. */ - /* STOP状態へのIncrementState待ち */ - CRIMVPLY_STATUS_ERROR = 10, /* An error has occurred. */ - /* エラー */ - - /* Keep enum 4bytes */ - CRIMVPLY_STATUS_MAKE_ENUM_SINT32 = 0x7FFFFFFF -} CriMvPlyStatus; - - -/* Sofdec2 */ -typedef enum { - CRIMVPLY_META_FLAG_OFF = 0x0000, - CRIMVPLY_META_FLAG_CUE = 0x0001, - CRIMVPLY_META_FLAG_SEEK = 0x0002, - CRIMVPLY_META_FLAG_ALL = CRIMVPLY_META_FLAG_CUE + CRIMVPLY_META_FLAG_SEEK, - - /* Keep enum 4bytes */ - CRIMVPLY_META_FLAG_MAKE_ENUM_SINT32 = 0x7FFFFFFF -} CriMvMetaFlag; - -/* Color Conversion*/ -typedef enum{ - CRIMV_COLORSPACE_CONVERSION_TYPE_ITU_R_BT601_LIMITED = 0, - CRIMV_COLORSPACE_CONVERSION_TYPE_ITU_R_BT601_FULLRANGE = 1, - - /* Keep enum 4bytes */ - CRIMV_COLORSPACE_CONVERSION_TYPE_ENUM_SINT32 = 0x7FFFFFFF -}CriMvColorSpaceConversionType; - -typedef void *(*CriMvMetaDataWorkMallocFunc)(void *obj, CriUint32 size); -typedef void (*CriMvMetaDataWorkFreeFunc)(void *obj, void *mem); - -/* OUTER_FRAMEPOOL_WORK */ -#define CriMvFramepoolWorkMallocFunc CriMvMetaDataWorkMallocFunc -#define CriMvFramepoolWorkFreeFunc CriMvMetaDataWorkFreeFunc - -/*************************************************************************** - * Data type declaration - ***************************************************************************/ - -/*EN - * \brief Audio parameters - * \ingroup MDL_MV_INFO - * - * \sa CriMvStreamingParameters, CriMvWaveInfo - */ -/*JP - * \brief オーディオパラメータ - * \ingroup MDL_MV_INFO - * - * オーディオストリームのパラメータ - * \sa CriMvStreamingParameters, CriMvWaveInfo - */ -typedef struct { - CriUint32 sampling_rate; /*EN< Sampling rate */ - /*JP< サンプリング周波数 */ - CriUint32 num_channel; /*EN< Number of channels. Monaural = 1, Stereo = 2 */ - /*JP< オーディオチャネル数 */ - CriUint32 total_samples; /*EN< Total number of samples */ - /*JP< 総サンプル数 */ - CriUint32 output_buffer_samples; /*EN< Output wave buffer size */ - /*JP< サウンド出力バッファのサンプル数 */ - CriUint32 codec_type; /*EN< Codec type */ - /*JP< コーデック種別 */ - -} CriMvAudioParameters; - -/*EN - * \brief Video Parameters - * \ingroup MDL_MV_INFO - * \sa CriMvStreamingParameters - */ -/*JP - * \brief ビデオパラメータ - * \ingroup MDL_MV_INFO - * ビデオストリームのパラメータ - * \sa CriMvStreamingParameters - */ -typedef struct { - CriUint32 max_width; /*EN< Maximum video width for stream. (multiple of 8) */ - /*JP< ムービ最大幅(8の倍数) */ - CriUint32 max_height; /*EN< Maximum video height for stream. (multiple of 8)*/ - /*JP< ムービ最大高さ(8の倍数) */ - CriUint32 disp_width; /*EN< Width of the image to draw. */ - /*JP< 表示したい映像の横ピクセル数(左端から) */ - CriUint32 disp_height; /*EN< Height of the image to draw. */ - /*JP< 表示したい映像の縦ピクセル数(上端から) */ - CriUint32 num_frame_pool; /*EN< Number of frame pools required for stream */ - /*JP< フレームプール数 */ - CriUint32 framerate; /*EN< Frame rate per second [x1000]. */ - /*JP< フレームレート[x1000] */ - CriUint32 framerate_n; /*EN< Frame rate (in rational as numerator). framerate_n/framerate_d = framerate */ /* UTODO: 変数名 */ - /*JP< フレームレートの分子(有理数形式)。framerate_n/framerate_d = framerate */ - CriUint32 framerate_d; /*EN< Frame rate (in rational as denominator). */ - /*JP< フレームレートの分母(有理数形式)。 */ - CriUint32 total_frames; /*EN< Total number of video frames */ - /*JP< 総フレーム数 */ - - CriUint32 material_width; /*EN< Width of the video source resolustion before encoding. */ - /*JP< エンコード前のビデオ素材の横ピクセル数 */ - CriUint32 material_height; /*EN< Height of the video source resolustion before encoding. */ - /*JP< エンコード前のビデオ素材の縦ピクセル数 */ - CriUint32 screen_width; /*EN< Screen width set by encoding and cropping. - * This parameter is only available when you encoded the movie with "Widescreen TV Support" option. - * Normally this value is 0. */ - /*JP< エンコード時に指定したスクリーン幅。 - * この値はエンコード時に「ワイドテレビ支援機能」を使用した場合のみ有効になります。 - * 通常は0です。 */ - - CriUint32 codec_type; /*EN< Video Codec Type. If you encoded the movie for PS2, this value is 2. - * Normally this value is 1 or 0(no info). - * If the codec_type is 1, the CRI Movie for ONLY PS2 can play the movie file. */ - /*JP< ビデオコーデック種別。PS2用にエンコードした場合 2になります。 - * 通常は 1または 0(情報無し)です。 - * コーデック種別が2のムービは、PS2版ライブラリで「のみ」再生可能です。 */ - CriUint32 codec_dc_option; /*EN< Video Codec DC Option. If you encoded the movie for PS2, this value is 10. - * Normally this value is 11 or 0(no info). - * If the codec_type is 11, the CRI Movie for PS2 can NOT play the movie file. */ - /*JP< ビデオコーデックのDCオプション種別。PS2用にエンコードした場合10になります。 - * 通常は11または 0(情報無し)です。 - * コーデックDCオプションが11のムービは、PS2版ライブラリ「では」再生できません。 */ - CriUint32 color_conversion_type; /*EN< Color space converion type. Fullrange or Limited.*/ - /*JP< 色変換タイプ。 */ - CriSint32 capacity_of_picsize; /*EN< Capacity size of video pictures. */ - /*JP< ピクチャサイズ上限値 */ - CriUint32 average_bitrate; /*EN< Average bitrate. */ - /*JP< 平均ビットレート */ -} CriMvVideoParameters; - -/*EN - * \brief Alpha Parameters - * \ingroup MDL_MV_INFO - * \sa CriMvStreamingParameters - */ -/*JP - * \brief アルファパラメータ - * \ingroup MDL_MV_INFO - * アルファストリームのパラメータ - * \sa CriMvStreamingParameters - */ -typedef struct { - CriUint32 max_width; /*EN< Maximum alpha width for stream */ - /*JP< アルファフレームの最大幅 */ - CriUint32 max_height; /*EN< Maximum alpha height for stream */ - /*JP< アルファフレームの最大高さ */ - CriUint32 disp_width; /*EN< valid alpha width */ - /*JP< アルファフレームの実有効幅 */ - CriUint32 disp_height; /*EN< valid alpha height */ - /*JP< アルファフレームの実有効高さ */ - CriUint32 framerate; /*EN< Frame rate per second [x1000]. */ - /*JP< アルファのフレームレート[x1000] */ - CriUint32 framerate_n; /*EN< Frame rate (in rational as numerator). framerate_n/framerate_d = framerate */ /* UTODO: 変数名 */ - /*JP< フレームレートの分子(有理数形式)。framerate_n/framerate_d = framerate */ - CriUint32 framerate_d; /*EN< Frame rate (in rational as denominator). */ - /*JP< フレームレートの分母(有理数形式)。 */ - CriUint32 total_frames; /*EN< Total number of alpha frames */ - /*JP< 総フレーム数 */ - CriMvAlphaType alpha_type; /*EN< Alpha Composite Type. */ - /*JP< アルファ合成種別。 */ - CriUint32 codec_type; /*EN< Internal use only. Do not access this */ - /*JP< ライブラリ内部使用変数 */ - CriUint32 color_conversion_type; /*EN< Color space converion type. Fullrange or Limited.*/ - /*JP< 色変換タイプ。 */ - CriSint32 capacity_of_picsize; /*EN< Capacity size of video pictures. */ - /*JP< ピクチャサイズ上限値 */ - CriUint32 average_bitrate; /*EN< Average bitrate. */ - /*JP< 平均ビットレート */ -} CriMvAlphaParameters; - - -/*EN - * \brief Streaming Parameters - * \ingroup MDL_MV_INFO - * This structure includes streaming parameters and playing parameters. - * \sa CriMvEasyPlayer::GetMovieInfo() - */ -/*JP - * \brief ストリーミング再生パラメータ - * \ingroup MDL_MV_INFO - * ストリーミング再生パラメータ。
- * ストリーム自体の情報と、再生のために必要なパラメータの両方を含んでいる。 - * \sa CriMvEasyPlayer::GetMovieInfo() - */ -typedef struct { - /* Stream */ - CriUint32 is_playable; /*EN< Flag of the movie file is playable or not. 1 is playable. 0 is not playable.*/ - /*JP< 再生可能フラグ(1: 再生可能、0: 再生不可) */ - CriFloat32 buffering_time; /*EN< Amount of time to buffer in the stream, in seconds */ - /*JP< 読み込みデータのバッファリング時間。単位[sec]。 */ - CriUint32 max_bitrate; /*EN< Maximum bits per second for stream. This value includes video and audio both. */ - /*JP< 最大ビットレート(絵と音の合計) */ - CriUint32 max_chunk_size; /*EN< Maximum chunk size of incoming stream (USF) file */ - /*JP< 最大USFチャンクサイズ */ - CriUint32 min_buffer_size; /*EN< Minimum buffer size for reading */ - /*JP< 最低限必要な読み込みバッファサイズ。
オーディオとビデオの合計 */ - CriSint32 read_buffer_size; /*EN< Input buffer size for reading data */ - /*JP< リードバッファサイズ */ - /* Video */ - CriUint32 num_video; /*EN< Number of simultaneous video streams */ - /*JP< ビデオデコーダの数。現在は1固定。*/ - CriMvVideoParameters video_prm[CRIMV_MAX_VIDEO_NUM]; /*EN< Video parameters see CriMvVideoParameters struct for details */ - /*JP< ビデオパラメータ */ - /* Audio */ - CriUint32 num_audio; /*EN< Number of simultaneous audio streams */ - /*JP< オーディオデコーダの数。現在は1固定。*/ - CriSint32 track_play_audio; /*EN< Track of audio playback. */ - /*JP< 再生するオーディオチャネル番号。-1指定で再生無し。 */ - CriMvAudioParameters audio_prm[CRIMV_MAX_AUDIO_NUM]; /*EN< Audio parameters see CriMvAudioParameters struct for details */ - /*JP< オーディオパラメータ */ - /* Subtitle */ - CriUint32 num_subtitle; /*EN< Number of subtitles */ - /*JP< 字幕チャネル数 */ - CriSint32 channel_play_subtitle; /*EN< Channel for playing subtitles */ - /*JP< 再生する字幕チャネル番号 */ - CriUint32 max_subtitle_size; /*EN< Maximum size of subtitle data */ - /*JP< 字幕データの最大サイズ*/ - - /* Composite mode */ - CriUint32 num_alpha; /*EN< Number of alpha channels (current spec allows only one) */ - /*JP< アルファデコーダの数。現在は1固定。 */ - CriMvAlphaParameters alpha_prm[CRIMV_MAX_ALPHA_NUM]; /*EN< Alpha parameters see CriMvAlphaParameters struct for details */ - /*JP< アルファパラメータ */ - - CriBool seekinfo_flag; /*EN< Flag of the movie file inclues seek info */ - /*JP< シーク情報フラグ */ - CriUint32 format_ver; /*EN< Format version */ - /*JP< フォーマットバージョン */ -} CriMvStreamingParameters; - - -/*EN - * \brief Input Buffer Information - * \ingroup MDL_MV_INFO - * \sa CriMvEasyPlayer::GetInputBufferInfo(), - * CriMvEasyPlayer::SetReloadThresholdTime(), CriMvEasyPlayer::SetBufferingTime() - */ -/*JP - * \brief 入力バッファ情報 - * \ingroup MDL_MV_INFO - * \sa CriMvEasyPlayer::GetInputBufferInfo(), - * CriMvEasyPlayer::SetReloadThresholdTime(), CriMvEasyPlayer::SetBufferingTime() - */ -typedef struct { - CriUint32 buffer_size; /*EN< Input buffer size [byte] */ - /*JP< 入力バッファサイズ[byte] */ - CriUint32 data_size; /*EN< Data size in input buffer[byte] */ - /*JP< 入力バッファにあるデータサイズ[byte] */ - CriUint32 reload_threshold; /*EN< Re-load threshold. When data size is less than re-load threshold, next read is requested. */ - /*JP< 再読み込み閾値[byte]。データサイズがこの値以下になると読み込みを行います。 */ -} CriMvInputBufferInfo; - - -// TEMP: for internal use -typedef struct { - CriUint8 *imageptr; - CriUint32 bufsize; // [Byte] - CriUint32 line_pitch; // [Byte] - CriUint32 line_size; // [Byte] - CriUint32 num_lines; -} CriMvImageBufferInfo; - -/*EN - * \brief Video Frame Information - * \ingroup MDL_MV_INFO - * \sa CriMvEasyPlayer::GetFrameOnTimeAs32bitARGB(), CriMvEasyPlayer::GetFrameOnTimeAsYUVBuffers, - * CriMvEasyPlayer::GetFrameOnTimeAsYUV422(), CriMvEasyPlayer::DiscardNextFrame() - */ -/*JP - * \brief ビデオフレーム情報 - * \ingroup MDL_MV_INFO - * ビデオフレーム情報 - * \sa CriMvEasyPlayer::GetFrameOnTimeAs32bitARGB(), CriMvEasyPlayer::GetFrameOnTimeAsYUVBuffers, - * CriMvEasyPlayer::GetFrameOnTimeAsYUV422(), CriMvEasyPlayer::DiscardNextFrame() - */ -typedef struct { - CriUint8 *imageptr; /*EN< Pointer to image data */ - /*JP< 画像データのポインタ */ - CriSint32 frame_id; /*EN< Frame ID ot the playback */ - /*JP< フレーム識別ID(ループ/連結再生時は通算) */ - CriUint32 width; /*EN< Width of movie frame [pixel] (multiple of 8) */ - /*JP< ムービの横幅[pixel] (8の倍数) */ - CriUint32 height; /*EN< Height of movie frame [pixel] (multiple of 8) */ - /*JP< ムービの高さ[pixel] (8の倍数) */ - CriUint32 pitch; /*EN< Pitch of movie frame [byte]*/ - /*JP< ムービのピッチ[byte] */ - CriUint32 disp_width; /*EN< Width of the image to draw. */ - /*JP< 表示したい映像の横ピクセル数(左端から) */ - CriUint32 disp_height; /*EN< Height of the image to draw. */ - /*JP< 表示したい映像の縦ピクセル数(上端から) */ - CriUint32 framerate; /*EN< Frames per second times 1000 */ - /*JP< フレームレートの1000倍の値 */ - CriUint32 framerate_n; /*EN< Frame rate (in rational as numerator). framerate_n/framerate_d = framerate */ /* UTODO: 変数名 */ - /*JP< フレームレートの分子(有理数形式)。framerate_n/framerate_d = framerate */ - CriUint32 framerate_d; /*EN< Frame rate (in rational as denominator). */ - /*JP< フレームレートの分母(有理数形式)。 */ - CriUint64 time; /*EN< Frame time ('time / tunit' indicates time in seconds) */ - /*JP< 時刻。time / tunit で秒を表す。 */ - CriUint64 tunit; /*EN< Unit of time measurement */ - /*JP< 時刻単位 */ - CriUint32 cnt_concatenated_movie; /*EN< Number of concatenated movie data */ - /*JP< ムービの連結回数 */ - CriSint32 frame_id_per_data; /*EN< Frame ID of the movie data */ - /*JP< ムービデータごとのフレーム番号 */ - - CriBool csc_flag; /*EN< This is temporary variable. Please don't access. */ - /*JP< テスト中の変数です。アクセスしないでください。 */ - - CriMvAlphaType alpha_type; /*EN< Composite mode */ - /*JP< アルファの合成モード*/ - - void *details_ptr[CRIMV_FRAME_DETAILS_NUM]; // for internal use - - CriSint32 num_images; // TEMP: for internal use - CriMvImageBufferInfo image_info[4]; // TEMP: for internal use - - CriUint32 color_conversion_type; /*EN< Color space converion type. Fullrange or Limited.*/ - /*JP< 色変換タイプ。 */ - CriUint32 total_frames_per_data; /* EN< Total frames of the movie data*/ - /*JP< ムービデータ単位の総フレーム数 */ -} CriMvFrameInfo; - -/*EN - * \brief Subtitle Information - * \ingroup MDL_MV_INFO - * \sa CriMvEasyPlayer::GetSubtitleOnTime() - */ -/*JP - * \brief 字幕情報 - * \ingroup MDL_MV_INFO - * \sa CriMvEasyPlayer::GetSubtitleOnTime() - */ -typedef struct { - CriUint8 *dataptr; /*EN< Pointer to subtitle data */ - /*JP< 字幕データのポインタ */ - CriUint32 data_size; /*EN< Size of subtitle data */ - /*JP< 字幕データサイズ */ - CriSint32 channel_no; /*EN< Channel number of subtitle data */ - /*JP< 字幕データのチャネル番号 */ - CriUint64 time_unit; /*EN< Unit of time measurement */ - /*JP< 時刻単位 */ - CriUint64 in_time; /*EN< Display start time */ - /*JP< 表示開始時刻*/ - CriUint64 duration_time; /*EN< Display duration time */ - /*JP< 表示持続時間 */ - CriUint32 cnt_concatenated_movie; /*EN< Number of concatenated movie data */ - /*JP< ムービの連結回数 */ - CriUint64 in_time_per_data; /*EN< Display start time per movie data*/ - /*JP< ムービデータごとに表示開始時刻*/ -} CriMvSubtitleInfo; - -/*EN - * \brief Event Point Info - * \ingroup MDL_MV_INFO - * Event point info is the each timing info was embeded to movie data as cue point info. - * \sa CriMvEasyPlayer::GetCuePointInfo() - */ -/*JP - * \brief イベントポイント情報 - * \ingroup MDL_MV_INFO - * キューポイント機能でムービデータに埋め込まれた個々のタイミング情報です。 - * \sa CriMvEasyPlayer::GetCuePointInfo() - */ -typedef struct { - CriChar8 *cue_name; /*EN< The name string of event point. Char code depends on cue point text. */ - /*JP< イベントポイント名。文字コードはキューポイント情報テキストに従います。 */ - CriUint32 size_name; /*EN< The data size of name string */ - /*JP< イベントポイント名のデータサイズ */ - CriUint64 time; /*EN< Timer counter */ - /*JP< タイマカウント */ - CriUint64 tunit; /*EN< Counter per 1 second. "count / unit" indicates the timer on the second time scale. */ - /*JP< 1秒あたりのタイマカウント値。count ÷ unit で秒単位の時刻となります。 */ - CriSint32 type; /*EN< Event point type */ - /*JP< イベントポイント種別 */ - CriChar8 *param_string; /*EN< The string of user parameters. Char code depends on cue point text. */ - /*JP< ユーザパラメータ文字列。文字コードはキューポイント情報テキストに従います。 */ - CriUint32 size_param; /*EN< The data size of user parameters string */ - /*JP< ユーザパラメータ文字列のデータサイズ */ - CriUint32 cnt_callback; /*EN< The counter of calling cue point callback. */ - /*JP< キューポイントコールバックの呼び出しカウンタ */ -} CriMvEventPoint; - -/*EN - * \brief Cue Point Info - * \ingroup MDL_MV_INFO - * Cue point info includes the number of event points and the list. - * \sa CriMvEasyPlayer::GetCuePointInfo() - */ -/*JP - * \brief キューポイント情報 - * \ingroup MDL_MV_INFO - * キューポイント情報は、イベントポイントの個数と一覧です。
- * \sa CriMvEasyPlayer::GetCuePointInfo() - */ -typedef struct { - CriUint32 num_eventpoint; /*EN< The number of event points */ - /*JP< イベントポイント個数 */ - CriMvEventPoint *eventtable; /*EN< The list of event points */ - /*JP< イベントポイント一覧 */ -} CriMvCuePointInfo; - -/*EN - * \brief YUV Texture Buffer Parameters - * \ingroup MDL_MV_INFO - * The output buffer parameters for CriMvEasyPlayer::GetFrameOnTimeAsYUVBuffers(). - * CriMvEasyPlayer::GetFrameOnTimeAsYUVBuffers() outputs data for pixel shader.
- * If an application doesn't play alpha movie, CRI Movie library doesn't use alpha buffer parameters.
- * \sa CriMvEasyPlayer::GetFrameOnTimeAsYUVBuffers() - */ -/*JP - * \brief YUV個別バッファ情報 - * \ingroup MDL_MV_INFO - * CriMvEasyPlayer::GetFrameOnTimeAsYUVBuffers() の出力バッファ情報です。
- * CriMvEasyPlayer::GetFrameOnTimeAsYUVBuffers() はPixel Shader 向けのデコード結果を出力します。
- * アルファムービ再生を行わない場合(不透明の通常再生)は、Alphaテクスチャ関連のパラメータは使用しません。
- * \sa CriMvEasyPlayer::GetFrameOnTimeAsYUVBuffers() - */ -typedef struct { - CriUint8 *y_imagebuf; /*EN< Pointer to the buffer of Y texture */ - /*JP< Yテクスチャのバッファポインタ */ - CriUint32 y_bufsize; /*EN< Size of the buffer of Y texture [byte] */ - /*JP< Yテクスチャのバッファサイズ[byte] */ - CriUint32 y_pitch; /*EN< Pitch of the buffer of Y texture [byte] */ - /*JP< Yテクスチャのピッチ[byte] */ - CriUint8 *u_imagebuf; /*EN< Pointer to the buffer of U texture */ - /*JP< Uテクスチャのバッファポインタ */ - CriUint32 u_bufsize; /*EN< Size of the buffer of U texture [byte] */ - /*JP< Uテクスチャのバッファサイズ[byte] */ - CriUint32 u_pitch; /*EN< Pitch of the buffer of U texture [byte] */ - /*JP< Uテクスチャのピッチ[byte] */ - CriUint8 *v_imagebuf; /*EN< Pointer to the buffer of V texture */ - /*JP< Vテクスチャのバッファポインタ */ - CriUint32 v_bufsize; /*EN< Size of the buffer of V texture [byte] */ - /*JP< Vテクスチャのバッファサイズ[byte] */ - CriUint32 v_pitch; /*EN< Pitch of the buffer of V texture [byte] */ - /*JP< Vテクスチャのピッチ[byte] */ - CriUint8 *a_imagebuf; /*EN< Pointer to the buffer of Alpha texture */ - /*JP< Alphaテクスチャのバッファポインタ */ - CriUint32 a_bufsize; /*EN< Size of the buffer of Alpha texture [byte] */ - /*JP< Alphaテクスチャのバッファサイズ[byte] */ - CriUint32 a_pitch; /*EN< Pitch of the buffer of Alpha texture [byte] */ - /*JP< Alphaテクスチャのピッチ[byte] */ -} CriMvYuvBuffers; - - -/*EN - * \brief Playback Information - * \ingroup MDL_MV_INFO - * The output playback information of CriMvEasyPlayer::GetPlaybackInfo(). - * These parameters represents current movie playback information such as decode delay of movie data and - * interval of video frames retrieval. - * \sa CriMvEasyPlayer::GetPlaybackInfo() - */ -/*JP - * \brief 再生情報 - * \ingroup MDL_MV_INFO - * CriMvEasyPlayer::GetPlaybackInfo() の出力再生情報です。
- * フレームの取得間隔やデコードの遅延などの現在再生しているムービの再生情報を表します。
- * \sa CriMvEasyPlayer::GetPlaybackInfo() - */ -typedef struct { - CriUint64 cnt_app_loop; /*EN< Loop count of application. Precisely, this is a number of calls of CriMvEasyPlayer::Update(). The count up will start after app is able to acquire the first video frame */ - /*JP< アプリケーションのループカウント。具体的には CriMvEasyPlayer::Update() の呼び出し回数になります。最初のフレームが取得可能になるとカウントが始まります。*/ - CriUint64 cnt_frame_interval[4]; /*EN< Interval of video frames retrieval. These values are count up when CriMvEasyPlayer::IsNextFrameOnTime() returns TRUE. - * - * The interval of video frames retrieval indicates a number of the loop count when your application calls CriMvEasyPlayer::IsNextFrameOnTime() in the main loop. - * In case that the application waits for vertical retrace, 1 interval equals about 16.7 msec. - * The index of array represents the count of intervals as follows: - * - *
Index Interval of video frames retrieval - *
0 Every main loop - *
1 2 main loops - *
2 3 main loops - *
3 4 or more main loops - *
- * With these values, you can check if the application gets video frames with appropriate intervals. Please use the values as measuring playback smoothness - * - * In order to use these values, the application must meet the following conditions: - * - The main loop should work periodically and stably (Ideally sync with vertical retrace) - * - The application should call CriMvEasyPlayer::IsNextFrameOnTime() once in everly main loop - * - * For example, if the application runs at 59.94fps by waiting for vertical retrace and a framerate of playing movie file is 29.97fps, - * only cnt_frame_interval[1] should be increased. - */ - /*JP< フレームの取得間隔。これらの値は、 CriMvEasyPlayer::IsNextFrameOnTime() がTRUEを返した時にカウントアップされます。
- * - * フレームの取得間隔とは、アプリケーションがメインループ内でフレーム取得関数を読んだ時のループの回数を意味します。 - * メインループがVSyncと同期している場合は、1 Interval = 約16.7msecということになります。 - * 配列のインデックスは、以下のように取得間隔を表します。
- * - *
インデックス フレームの取得間隔 - *
0 毎メインループ - *
1 2 メインループ - *
2 3 メインループ - *
3 4 メインループ以上 - *
- * これらの値を見ることで、アプリが正しい間隔でフレームを取得できたのかどうかをチェックすることができます。ムービが滑らかに再生できているかの目安にしてください。
- * - * ただし前提として、以下の条件をアプリが満たしている必要があります。 - * - アプリがVSyncなど、一定の周期で安定して動作している - * - メインループ内で毎回 CriMvEasyPlayer::IsNextFrameOnTime() を呼び出す - * - * 上記の条件下において、例えばアプリが59.94fpsで動作している状態で、フレームレートが29.97fpsのムービを再生した場合、cnt_frame_interval[1]のみが増え続けれれば - * 正しい間隔でフレームの取得が出来たことになります。 - */ - CriUint64 cnt_time_early; /*EN< A count of how many times CriMvEasyPlayer::IsNextFrameOnTime() returns FALSE due to the determination if it is the time to provide the next video frame */ - /*JP< CriMvEasyPlayer::IsNextFrameOnTime() が、フレーム表示時刻判定によりFALSEを返した回数。*/ - CriUint64 cnt_decode_delay; /*EN< A count of how many times CriMvEasyPlayer::IsNextFrameOnTime() returns FALSE due to the delay of decoding movie data */ - /*JP< CriMvEasyPlayer::IsNextFrameOnTime()が、ビデオフレームのデコード遅延によりFALSEを返した回数 */ - CriFloat32 time_max_delay; /*EN< Maximum delay time [msec] of the actual time a video frame retrieved against the original time should be retrieved */ - /*JP< ビデオフレームを取得した実際の時刻と、本来表示すべき時刻との最大遅延時間 [msec]。 */ - CriFloat32 time_average_delay; /*EN< Average delay time [msec] of the actual time a video frame retrieved against the original time should be retrieved */ - /*JP< ビデオフレームを取得した実際の時刻と、本来表示すべき時刻との平均遅延時間 [msec]。 */ -} CriMvPlaybackInfo; - -#if defined(XPT_TGT_PS3PPU) -/*EN - * \brief Parameters of SPURS and PPU for decoding - * \ingroup MDL_MV_BASIC - * - * \sa CriMv::SetupSpursParameters_PS3(), CriMv::CalcSpursWorkSize_PS3() - */ -/*JP - * \brief デコードに使うSPURSおよびPPUのパラメータ - * \ingroup MDL_MV_BASIC - * - * \sa CriMv::SetupSpursParameters_PS3(), CriMv::CalcSpursWorkSize_PS3() - */ -typedef struct { - void *spurs_handler; /*EN< SPURS handler */ - /*JP< SPURSハンドル */ - void *spurs_work; /*EN< SPURS work area. The size is spurs_worksize. The alignment is 128 byte. */ - /*JP< SPURS用ワークバッファ。バッファサイズは spurs_worksize で128バイト境界。 */ - CriSint32 spurs_worksize; /*EN< SPURS work size. This size is calculated by CriMv::CalcSpursWorkSize_PS3 function. */ - /*JP< SPURS用ワークサイズ。CriMv::CalcSpursWorkSize_PS3 関数で取得した値。 */ - CriSint32 spurs_max_contention; /*EN< SPURS max contention */ - /*JP< SPURS でムービデコード用に使うSPUの最大数 */ - CriUint8 *spurs_task_priority; /*EN< SPURS task priority x 8 */ - /*JP< SPURS のタスクプライオリティ配列。配列要素は8個。 */ - - CriUint32 ppu_num; /*EN< The number of PPU for decoding (0-2) */ - /*JP< The number of PPU for decoding (0-2) */ - CriSint32 ppu_thread_prio; /*EN< PPU Thread Priority. This priority is used for decoding thread in the case of ppu_num equal 2. */ - /*JP< PPU Thread Priority. この値は ppu_num に2を指定した場合に作成するスレッドに使われる。 */ -} CriMvProcessorParameters_PS3; - -// [NOT SUPPORT on normal library] -// for SPU Thread -typedef struct { - CriUint32 ppu_num; /* The number of PPU for decoding (0-2) */ - CriSint32 ppu_prio; /* PPU Thread Priority */ - CriUint32 spu_num; /* The number of SPU for decoding (0-6) */ - CriSint32 spu_grp_prio; /* SPU Thread Group Priority */ -} CriMvSpuThreadParameters_PS3; - -#endif - -#if defined(XPT_TGT_XBOX360) -/*EN - * \brief Parameters of Xbox360 processors for decoding - * \ingroup MDL_MV_BASIC - * - * \sa CriMvEasyPlayer::SetUsableProcessors_XBOX360() - */ -/*JP - * \brief デコードに使うXbox360プロセッサのパラメータ - * \ingroup MDL_MV_BASIC - * - * \sa CriMvEasyPlayer::SetUsableProcessors_XBOX360() - */ -typedef struct { - CriBool processor0_flag; /*EN< Processor 0 (Core 0, Thread 0) usable flag */ - /*JP< プロセッサ0 (コア0スレッド0) 使用可能フラグ */ - CriBool processor1_flag; /*EN< Processor 1 (Core 0, Thread 1) usable flag */ - /*JP< プロセッサ1 (コア0スレッド1) 使用可能フラグ */ - CriBool processor2_flag; /*EN< Processor 2 (Core 1, Thread 0) usable flag */ - /*JP< プロセッサ2 (コア1スレッド0) 使用可能フラグ */ - CriBool processor3_flag; /*EN< Processor 3 (Core 1, Thread 1) usable flag */ - /*JP< プロセッサ3 (コア1スレッド1) 使用可能フラグ */ - CriBool processor4_flag; /*EN< Processor 4 (Core 2, Thread 0) usable flag */ - /*JP< プロセッサ4 (コア2スレッド0) 使用可能フラグ */ - CriBool processor5_flag; /*EN< Processor 5 (Core 2, Thread 1) usable flag */ - /*JP< プロセッサ5 (コア2スレッド1) 使用可能フラグ */ - CriSint32 thread_priority; /*EN< Priority of decoding threads on the active processors */ - /*JP< 各プロセッサ上でデコード処理を行うスレッドの優先度 */ -} CriMvProcessorParameters_XBOX360; -#endif - -#if defined(XPT_TGT_VITA) -/*EN - * \brief AVC Decoder Parameters - * \ingroup MDL_MV_BASIC - * - * \sa CriMv::SetupAvcDecoderParameters_VITA() - */ -/*JP - * \brief AVCデコーダパラメータ - * \ingroup MDL_MV_BASIC - * - * \sa CriMv::SetupAvcDecoderParameters_VITA() - */ -typedef struct { - CriUint32 horizontal; /*EN< Maximum width for decoding (in pixel) */ - /*JP< 最大デコード画像の横幅 (単位:ピクセル) */ - CriUint32 vertical; /*EN< Maximum height for decoding (in pixel) */ - /*JP< 最大デコード画像の高さ (単位:ピクセル) */ - CriUint32 n_ref_frames; /*EN< Maximum reference frames on decoding (default:3) */ - /*JP< デコード時の最大参照画像の枚数 */ - CriUint32 n_decoders; /*EN< Maximum number of avc decoders (max:1) */ - /*JP< 同時に使用するAVCでコーダの最大数 (1固定) */ - -} CriMvAvcDecoderParameters_VITA; -#endif - -/*--------------------------------------------------------------------------*/ -/* */ -/*--------------------------------------------------------------------------*/ -typedef enum { - CRIMV_PCM_FORMAT_SINT16 = 0, - CRIMV_PCM_FORMAT_FLOAT32 = 1, - - /* Keep enum 4bytes */ - CRIMV_PCM_FORMAT__MAKE_ENUM_SINT32 = 0x7FFFFFFF -} CriMvPcmFormat; -/* - * \brief 16bit wave data information - * \ingroup MDL_MV_INFO - * Information about a 16-bit waveform. - */ -/* 16bit Waveform 情報 */ -typedef struct { - CriUint32 num_channel; /* Number of Channels. monaural = 1, stereo = 2 */ - /* Number of Channels. monaural = 1, stereo = 2 */ - CriUint32 num_samples; /* Number of sample */ - /* サンプル数 */ - CriUint32 sampling_rate; /* Sampling rate */ - /* サンプリング周波数 */ -} CriMvWaveInfo; - -/* オーディオヘッダ */ -typedef struct { - /* ストリーミングパラメータと共通 */ - CriUint32 sampling_rate; - CriUint32 num_channel; - CriUint32 total_samples; - CriUint32 codec_type; - - CriUint32 metadata_count; - CriUint32 metadata_size; - - /* ヘッダ固有 */ - CriUint32 a_input_xsize; -} CriMvPlyAudioHeader; - -/* ビデオヘッダ */ -typedef struct { - /* ヘッダ固有 */ - CriUint32 width; - CriUint32 height; - CriUint32 disp_width; - CriUint32 disp_height; - CriUint32 framerate_n; - CriUint32 framerate_d; - CriUint32 total_frames; - - CriUint32 material_width; /* width of video original source. 0 means no info. */ - CriUint32 material_height; /* height of video original source. 0 means no info. */ - CriUint32 screen_width; /* screen width for Wii */ - - CriUint32 codec_type; - CriUint32 codec_dc_option; /* 11 or 10 */ - - CriUint32 metadata_count; - CriUint32 metadata_size; - - CriUint32 pre_padding; - CriUint32 color_conversion_type; - CriSint32 max_picture_size; - CriSint32 average_bitrate; -} CriMvPlyVideoHeader; - -/* サブタイトルヘッダ */ -typedef struct { - CriBool is_subtitle_data; - CriUint32 num_channel; - CriUint64 time_unit; - CriUint32 max_subtitle_size; -} CriMvPlySubtitleHeader; - -/* キューポイントヘッダ */ -typedef struct { - CriBool is_cuepoint_data; - CriUint32 metadata_count; - CriUint32 metadata_size; - CriUint32 num_eventpoint; - CriUint64 time_unit; -} CriMvPlyCuePointHeader; - -/* アルファヘッダ */ -typedef struct { - /* ヘッダ固有 */ - CriUint32 width; - CriUint32 height; - CriUint32 disp_width; - CriUint32 disp_height; - CriUint32 framerate_n; - CriUint32 framerate_d; - CriUint32 total_frames; - - CriMvAlphaType alpha_type; - CriUint32 codec_type; - - CriUint32 metadata_count; - CriUint32 metadata_size; - - CriUint32 pre_padding; - CriUint32 color_conversion_type; - CriSint32 max_picture_size; - CriSint32 average_bitrate; -} CriMvPlyAlphaHeader; - -/* アルファのみのフレーム情報 */ -typedef struct { - CriUint8 *imageptr; /*EN< Pointer to image data */ - /*JP< 画像データのポインタ */ - CriSint32 frame_id; /*EN< Frame ID */ - /*JP< フレーム識別ID */ - CriUint32 width; /*EN< Width of movie frame [pixel] */ - /*JP< ムービの横幅[pixel] */ - CriUint32 height; /*EN< Height of movie frame [pixel] */ - /*JP< ムービの高さ[pixel] */ - CriUint32 disp_width; /*EN< Width of image [pixel] */ - /*JP< 有効な映像の横幅[pixel] */ - CriUint32 disp_height; /*EN< Height of image [pixel] */ - /*JP< 有効な映像の高さ[pixel] */ - CriUint32 pitch; /*EN< Pitch of movie frame [byte]*/ - /*JP< ムービのピッチ[byte] */ - CriUint64 time; /*EN< Frame time ('time / tunit' indicates time in seconds) */ - /*JP< 時刻。time / tunit で秒を表す。 */ - CriUint64 tunit; /*EN< Unit of time measurement */ - /*JP< 時刻単位 */ - CriSint32 frame_id_per_data; /*EN< Frame ID of the movie data */ - /*JP< ムービデータごとのフレーム番号 */ - CriMvAlphaType alpha_type; /*EN< Composite mode */ - /*JP< アルファの合成モード*/ - void *detail_ptr; /* TEMP: for internal use */ - CriUint32 color_conversion_type; /*EN< Color space converion type. Fullrange or Limited.*/ - /*JP< 色変換タイプ。 */ -} CriMvAlphaFrameInfo; - -// 内部管理用。ムービ情報をユーザに渡す時はこれとほぼ同じだろうか。 -/* Information of USF File */ -typedef struct { - CriBool is_usf_file; - CriUint32 max_chunk_size; - CriUint32 min_buffer_size; - CriUint32 bitrate; - CriUint32 format_version; - /* Video */ - CriUint32 num_video; - CriMvPlyVideoHeader videohead[CRIMV_MAX_VIDEO_NUM]; - /* Audio */ - CriUint32 num_audio; - CriMvPlyAudioHeader audiohead[CRIMV_MAX_AUDIO_NUM]; - /* Subtitle */ - CriUint32 num_subtitle; - CriMvPlySubtitleHeader subtitlehead; - /* Alpha */ - CriUint32 num_alpha; - CriMvPlyAlphaHeader alphahead[CRIMV_MAX_ALPHA_NUM]; - /* CuePoint */ - CriUint32 num_cuepoint; - CriMvPlyCuePointHeader cuepointhead; -} CriMvPlyHeaderInfo; - -/* Video Elementary Stream */ -typedef struct { - CriUint32 fcid; - CriSint32 track_no; // チャンクのチャネル番号 - void *vdec; -} CriMvPlyVideo; - -typedef struct { - CriUint32 fcid; - CriSint32 track_no; // チャンクのチャネル番号 - void *dec; -} CriMvPlyAlpha; - -/* ムービヘッダを管理するための構造体 */ -typedef struct { - CriMvPlyHeaderInfo info; - CriBool write_new_head_flag; // CRIDが見つかって次のヘッダを書き込む準備ができたか? - CriUint32 num_remaining_adec_head; // 必要な残りのオーディオヘッダの数 - CriUint32 num_remaining_vdec_head; // 必要な残りのビデオのヘッダの数 - CriUint32 num_remaining_subtitle_head; // 必要な残りの字幕のヘッダの数 - CriUint32 num_remaining_alpha_head; // 必要な残りのアルファのヘッダ数 - CriUint32 num_remaining_cuepoint_head; // 必要な残りのキューポイントのヘッダ数 - /* 2010-08-19: TEMP: CONCAT_KAI: Don't refer this member. */ - CriUint64 accumulated_tcount; -} CriMvHeaderInfoContainer; - -typedef struct { - CriBool is_play_audio; - CriUint32 fcid; - CriUint32 track_no; // チャンクのチャネル番号 - void *adec; // 実際のオーディオコーデック - CriUint32 num_channel; // データのチャネル数 - CriUint32 sampling_rate; // サンプリング周波数 - CriUint32 output_buffer_samples; - CriSj sji; // UNI - CriSj sjo[CRIMV_PCM_BUFFER_MAX]; // RBF - CriUint32 sjo_bufsize[CRIMV_PCM_BUFFER_MAX]; - CriBool term_supply; // データ供給終了通知フラグ - CriBool is_working; // コンテンツチャンク処理中 - -#if defined(ENABLE_DYNAMIC_AUDIO_SWITCH) - CriUint32 next_track_no; // ユーザが指定した切替先のトラック番号 - CriUint32 last_track_switch_time; // 切替元のトラックの最後にチャンクをとった時刻 - CriUint32 last_track_switch_tunit; // 上記時刻の単位 (in Hz?) - CriMvPlyAmngTrackState switch_state; // トラック切替による状態 -#endif -} *CriMvPlyAdec, CriMvPlyAdecObj; - -typedef struct { - - CriMvPlyAdec mvply_adecs[NUM_MAX_ADEC]; - CriSint32 num_adecs; - CriUint32 size_smpl; - CriSj sji; - CriUint32 chunk_num_per_server; - - CriBool (*cbfunc_nofify_found_header)(void *usrobj, CriChunk *ckc, CriUint8 chno); - void *usrobj_nofify_found_header; - -} *CriMvPlyAmng, CriMvPlyAmngObj; - - -/* シークブロック情報 */ -typedef struct { - CriSint32 top_frame_id; -} CriMvSeekBlockInfo; - -/* ストリーマ用情報 */ -typedef struct { - CriUint32 max_chunk_size; - CriUint32 average_bitrate; -} CriMvStreamerInfo; - - -/* ハンドル作成用コンフィグ構造体 */ -typedef struct { - CriUint32 readbuffer_size; -} CriMvHandleConfig; - - -/*JP CRI Movie ハンドル */ -/*EN - * A handle for a single movie. If multiple movies are to be played simultaneously, - * create a CriMvPly handle for each movie. - * - * \sa criMvPly_Create(), criMvPly_Destroy() */ -typedef struct { - /*** Member variable is ***/ - CriBool used; - CriMvPlyStatus stat; - CriBool request_stop; - CriBool restrain_supply; - CriBool term_supply; - void *cs_work; - void *cshn; - /* USF Header */ - - CriMvHeaderInfoContainer headinfo_container[CRIMVPLY_HEAD_CONTAINER_NUM]; - Uint16 cur_dechead_idx; - CriUint32 cnt_dechead; /* ヘッダ解析ごとに更新 */ - CriUint32 cnt_concat; /* GetFrameで更新 */ - - CriMvPlyHeaderInfo headinfo; - CriUint32 num_headck; /* ヘッダ解析処理したチャンク数 */ - CriFloat32 def_buffering_time; - CriUint32 def_max_stream; - CriUint32 def_sound_output_buffer_samples; - CriSint32 def_track_play_audio; /* -1 でオーディオ再生無し */ - -#if defined(XPT_TGT_XBOX360) || defined(XPT_TGT_PC) || defined(XPT_TGT_VITA) || defined(XPT_TGT_WIIU) - CriSint32 def_num_dlg_threads; - CriUint32 def_processor_mask; - CriUint32 def_affinity_masks[CRIMV_DLGTHREAD_NUM]; - CriSint32 def_thread_priorities[CRIMV_DLGTHREAD_NUM]; -#endif - - CriBool is_prepare_work; - CriMvStreamingParameters stmprm; /* ストリーミングパラメータの記録 */ - /* Demultiplexer */ - CriSint32 inputtype; /* ストリーミングかメモリか?メモリ=ユニSJ再生 */ - CriBool is_usf_data; /* 入力ファイルはUSFファイルか? */ - void *demux; /* USFデマルチプレクサハンドル */ - CriUint32 max_demuxout; /* デマルチプレクサ出力の最大種別数 */ - CriUint32 num_demuxout; /* デマルチプレクサ出力に設定済みの種別数 */ - CriSj headanaly_in_sj; // RBF - CriSj headanaly_out_sj; // UNI - CriSj read_sj; // RBF - CriChunk readck; - - CriSj memplay_sj; // UNI (for memory playback) - CriChunk movie_on_mem; /* メモリ指定のムービデータ記憶用(1個) */ - CriUint32 offset_content; /* メモリ指定先頭データのコンテンツ本体までのサイズ */ - - /* === ハンドル作成時に確保 === */ - CriHeap heap_gen; - /* ヘッダ解析用の読み込み領域 */ - CriUint32 headanaly_bufsize; - /* ハンドル内部メモリは最初に10kbyte確保して使いまわす。具体的にはヘッダ解析用。 */ - CriHeap local_heap; /* ハンドル内部専用Heap */ - CriSint32 local_bufsize; /* ハンドル内部専用Heap用のバッファサイズ */ - CriUint8 *local_bufptr; /* ハンドル内部専用Heap用のバッファポインタ */ - /* === メタワークバッファ (ヘッダ解析時に確保) === */ - CriHeap heap_meta; - /* === ワークバッファ作成時に確保 === */ - CriHeap heap_core; - /* 読み込みバッファ */ - CriUint32 size_readbuf_main; - CriUint32 size_readbuf_ext; - /* Video Decoder */ - CriMvPlyVideo video; - CriUint32 framerate_n; - CriUint32 framerate_d; - /* Audio Decoder */ - CriMvPlyAmng audio_mngr; - CriMvPcmFormat pcmfmt; - CriUint32 size_smpl; - CriHeap heap_audio2; - /* Subtitle */ - CriSj sjo_subtitle; - CriSint32 concat_subtitle_cnt; /* 字幕の連結処理回数 */ - CriSint32 ch_subtitle; /* 字幕の連結処理回数 */ - /* Alpha */ - CriMvPlyAlpha alpha; - - /* 折り返しチャンク対応用(使うかどうかに関係なく変数だけは定義する) */ - CriUint32 bufsize_read_main; /* 入力SJのバッファ本体サイズ */ - CriUint32 bufsize_read_ext; /* 入力SJののりしろサイズ */ - CriUint8 *read_sj_bufptr; /* 入力RBSJの先頭バッファアドレス */ - - /* ストリーミングパラメータに入れるという手段もアリかも? */ - CriSint32 seek_frame_id; /* シークしたいフレームID(GOPの途中の可能性あり) */ - CriSint32 video_gop_top_id; /* シーク後のビデオGOP先頭フレームID : 0以下でシーク無し */ - CriSint32 alpha_gop_top_id; /* シーク後のアルファGOP先頭フレームID : 0以下でシーク無し */ - CriBool seek_video_prep_flag; /* シーク再生のビデオ準備完了フラグ(GOP途中まで進んだか?) */ - CriBool seek_alpha_prep_flag; /* シーク再生のアルファ準備完了フラグ(GOP途中まで進んだか?) */ - CriBool seek_audio_prep_flag; /* シーク再生のオーディオ準備完了フラグ(シーク指定時刻まで捨てたか?) */ - - CriSint32 dechdr_stage; /* DECHDRの進み具合 */ - CriSint32 sji_meta_bufsize; /* メタデータ用入力バッファサイズ */ - CriSj sji_meta; /* メタデータ用入力SJ */ - CriUint32 cnt_meta_ck; /* メタデータ用入力SJ */ - void *video_seektbl_ptr; - CriUint32 video_seektbl_size; - CriSint32 video_gop_num; - void *alpha_seektbl_ptr; - CriUint32 alpha_seektbl_size; - CriSint32 alpha_gop_num; - - void *audio_header_ptr[CRIMV_MAX_AUDIO_NUM]; - CriUint16 audio_header_size[CRIMV_MAX_AUDIO_NUM]; - - void *cuepoint_meta_ptr; - CriUint32 cuepoint_meta_size; - CriMvCuePointInfo cuepoint_info; - - CriMvInputBufferInfo ibuf_info; - CriFloat32 reload_sec_threshold; - - CriSint32 num_frames_for_prep; - - /* For Sofdec2 */ - CriHeap heap_playback; - CriMvMetaDataWorkMallocFunc cbfunc_meta_alloc; - CriMvMetaDataWorkFreeFunc cbfunc_meta_free; - void* usrobj_meta_data; - void* meta_data_work_allocated; /* ユーザアロケータで確保されたメタデータワーク */ - void* event_table_work_allocated; /* ユーザアロケータで確保されたイベントテーブル */ - CriMvStreamerInfo streamer_info; - - /* OUTER_FRAMEPOOL_WORK */ - CriMvFramepoolWorkMallocFunc cbfunc_framepool_alloc; - CriMvFramepoolWorkFreeFunc cbfunc_framepool_free; - void* usrobj_framepool; - void* framepool_work_allocated; /* ユーザアロケータで確保されたフレームプールワーク(解放必要) */ - void* framepool_work_set; /* 直接バッファ指定されたフレームプールワーク(解放不要) */ - - /* For Debug */ - volatile CriUint8 end_sequence_info; - CriUint64Adr header_ptr; - CriSint64 header_size; - CriUint64Adr body_ptr; - CriSint64 body_size; - - CriBool sync_flag; - - CriBool error_flag; - -#if defined(XPT_TGT_IOS) - CriChar8 vavfios_filepath[CRIMVPLY_VAVFIOS_MAX_FILEPATH]; -#endif - - /* For Tools */ - void *extended_mvinfo_config; - - /* ハンドル作成コンフィグ関連 */ - CriBool use_hn_config_flag; /* ハンドル作成コンフィグ指定があったかどうか */ - CriMvHandleConfig hn_config; - -} *CriMvPly, CriMvPlyObj; - -/*************************************************************************** - * Function Declaration - ***************************************************************************/ - -#ifdef __cplusplus -extern "C" { -#endif - -/* ライブラリ初期化 */ -/* - * \brief ライブラリの初期化 - * \param なし - * \return なし - * \par 説明: - * ライブラリの初期化を行います。
- * 複数回連続で初期化した場合は、最初の1回のみ初期化処理を実行します。 - */ -/* - * \ingroup MODULE_INIT - * \brief Initialize library - * - * This function initializes the CRI Movie library, including internal audio, - * streaming and video subsystems. This function must be - * called before any other function in this library will work properly. - * This function initializes only the first time it is called; if it is - * called again, it simply increments an internal counter and returns; it - * does not re-initialize, nor does it create an error condition. - * - * Therefore, it is safe to call criMvPly_Initialize() and criMvPly_Finalize() - * at the beginning and end, respectively, within each of the independent - * modules in your program. If you match these functions call for call, - * only the first criMvPly_Initialize() function and the last criMvPly_Finalize() - * functions should have any effect. - * - * \sa criMvPly_Finalize() - */ -void CRIAPI criMvPly_Initialize(void); - -/* ライブラリ終了 */ -/* - * \brief ライブラリ終了 - * \param なし - * \return なし - * \par 説明: - * ライブラリの終了処理を行います。
- * 複数回初期化をしていた場合は、同じ回数だけ終了処理を実行してください。 - */ -/* - * \ingroup MODULE_INIT - * \brief Finalize library - * - * This function deallocates any resources in use by the library. - * It should be called the same number of times that the criMvPly_Initialize() - * function is called. If the criMvPly_Initialize() function is called n - * times, on the nth time the criMvPly_Finalize() function is called, - * criMvPly_Finalize() releases any resources allocated by CRI Movie. - * - * Therefore, it is safe to call criMvPly_Initialize() and criMvPly_Finalize() - * at the beginning and end, respectively, within each of the independent - * modules in your program. If you match these functions call for call, - * only the first criMvPly_Initialize() function and the last criMvPly_Finalize() - * functions should have any effect. - * - * \sa criMvPly_Initialize() - */ -void CRIAPI criMvPly_Finalize(void); - -/* ハンドル作成 */ -/* - * \brief ハンドル作成 - * \param heap : メモリ確保に使用するHeapハンドル - * \return CriMvPlyハンドル - * \par 説明: - * CRI Movie ハンドルを作成します。
- * 必要なハンドル管理領域はHeapハンドルを使って自動的に確保します。
- * 作成直後のハンドル状態はSTOP状態です。 - */ -/* - * \ingroup MODULE_INIT - * \brief Create a handle - * \param heap A valid CriHeap handle - * \return A valid CriMvPly handle, or NULL if the handle cannot be allocated - * - * This function creates a CriMvPly handle in the CRIMVPLY_STATUS_STOP state. - * Memory for the handle is allocated from the CriHeap structure that you provide. - * Any memory allocation failure during this function results in a text error message to output, and the program hangs. - * Make sure to initialize and create your heap with criHeap_Initialize() and - * criHeap_Create() before calling this function. - * - * \sa CriMvPly, CriMvPlyStatus, criHeap_Initialize(), criHeap_Create() - */ -CriMvPly CRIAPI criMvPly_Create(CriHeap heap); - -/* コンフィグ指定のハンドル作成 */ -/* config がNULL指定の場合はコンフィグ指定無しと同様 */ -CriMvPly CRIAPI criMvPly_CreateWithConfig(CriHeap heap, CriMvHandleConfig *config); - -/* ハンドル破棄 */ -/* - * \brief ハンドル破棄 - * \param mvply : CRI Movie ハンドル - * \return なし - * \par 説明: - * CRI Movie ハンドルの破棄を行います。
- * ハンドル作成時に引数で指定したHeapハンドルを使って、ハンドル管理領域を解放します。
- * ワークバッファを確保したままの場合は、ワークバッファ確保時に指定したHeapハンドルを使ってワークバッファも解放します。
- * ハンドルの破棄は、ハンドル状態がSTOPかPLAYENDの時にしか実行できません。 - */ -/* - * \ingroup MODULE_INIT - * \brief Destroy a handle - * \param mvply A valid CriMvPly handle to be destroyed - * - * This function destroys the CriMvPly handle previously created - * with criMvPly_Create(). - * - * You can only destroy the handle if it is in either the CRIMVPLY_STATUS_STOP or the - * the CRIMVPLY_STATUS_PLAYEND states. Attempting to destroy the handle in - * any other state will produce an error message. You can check the status of - * the handle at any time with criMvPly_GetStatus(). - * - * Any work buffers allocated via criMvPly_AllocateWorkBuffer(), if they are - * still associated with the handle, are freed when criMvPly_Destroy() is called. - * - * \sa CriMvPly, CriMvPlyStatus, criMvPly_GetStatus(), criMvPly_AllocateWorkBuffer() - */ -void CRIAPI criMvPly_Destroy(CriMvPly mvply); - -/* ストリーミングパラメータの取得 */ -/* - * \brief ストリーミングパラメータの取得 - * \param mvply : CRI Movie ハンドル - * \param stmprm : ストリーミングパラメータ - * \return なし - * \par 説明: - * ヘッダ解析の結果をもとに、ムービ再生に必要なストリーミングパラメータを取得します。
- * ハンドル状態がWAIT_PREPになると取得できるようになります。
- * このパラメータをもとにcriMvPly_AllocateWorkBuffer関数を呼び出すことができます。
- * 必要ならばこのパラメータの値を変更して、例えば音ありムービで音を再生しない、といったことも可能です。
- */ -/* - * \ingroup MODULE_BUFFER - * \brief Get streaming parameters - * \param mvply A valid CriMvPly handle - * \param stmprm An empty CriMvStreamingParameters structure to be filled with data - * - * This function permits you to get detailed information about the stream and - * dynamically allocate resources just before the video and audio sequence - * begins playback. - * - * This function does nothing if the current state of the CriMvPly handle is - * CRIMVPLY_STATUS_DECHDR or CRIMVPLY_STATUS_STOP. The only useful state in - * which to call criMvPly_GetStreamingParameters() is the CRIMVPLY_WAIT_PREP - * status. When the CriMvPly handle is in the CRIMVPLY_WAIT_PREP status, - * calling this function will cause the CriMvStreamingParameters field to be - * filled with data. - * - * Some of the CriMvStreamingParameters, such as buffering time and the - * maximum number of files to read, are copied from the CriMvPly structure. - * However, maximum bitrate, video size, audio stream rate and channel - * info are calculated from the incoming stream. - * - * After calling criMvPly_GetStreamingParameters(), you can programmatically - * override any of the fields in the CriMvStreamingParameters struct yourself - * before calling criMvPly_AllocateWorkBuffer() with it. For example, you might - * need to read a stream containing both audio and video, but only output the - * video from the stream. In this case you could allocate trivial audio buffers - * for output by modifying the CriMvStreamingParameters struct accordingly after - * calling this function. - * - * \sa criMvPly_AllocateWorkBuffer(), CriMvPly, CriMvStreamingParameters - */ - void CRIAPI criMvPly_GetStreamingParameters(CriMvPly mvply, CriMvStreamingParameters *stmprm); - -/* ワークバッファの確保 */ -/* - * \brief ワークバッファの確保 - * \param mvply : CRI Movie ハンドル - * \param heap : - * \param stmprm : ストリーミングパラメータ - * \return なし - * \par 説明: - * 引数のHeapハンドルを使って、読み込みバッファやビデオ/オーディオのワークバッファを確保します。
- * この関数を呼び出し可能なのは、STOP状態かWAIT_PREP状態の時のみです。
- * 同じハンドルに対して2度呼び出すと、1度目のワークバッファを全て解放してから、改めてワークバッファを確保します。
- * criMvPly_Start関数よりも先にワークバッファを確保しておくこともできます。 - */ -/* - * \ingroup MODULE_BUFFER - * \brief Allocate internal streaming work buffers - * \param mvply A CriMvPly handle - * \param heap A CriHeap handle - * \param stmprm An initialized CriMvStreamingParameters structure - * - * This function allocates internal streaming buffers for the CriMvPly movie - * player from the CriHeap. The amount of memory required is based - * on the maximum bitrate of the stream, the requested buffering time, the - * maximum chunk size, and the height and width of the incoming video frame. - * However, a small amount of memory is allocated for the - * video and audio decoders from the CriHeap as well. - * - * The CriHeap handle passed as a parameter to this function need not - * be the same CriHeap handle you passed to the criMvPly_Create() function. - * You may prefer to use either one or two heaps. - * - * This function can be called only if the CriMvPly handle is in the - * CRIMVPLY_STATUS_STOP or the CRIMVPLY_STATUS_WAIT_PREP status. Calling - * this function any other time will produce an error message. - * - * If this function is called twice without calling criMvPly_FreeWorkBuffer(), - * it releases the previously allocated buffers before allocating them again. - * - * This function must be called sometime before criMvPly_Start(). - * - * \if ps2 - * \par PS2 only: - * The PS2 implementation of this function additionally allocates buffers for - * internal DMA tags. If these allocations fail due to lack of memory, the - * library will hang. - * \endif - * - * \sa CriMvPly, CriHeap, CriMvPlyStatus, CriMvStreamingParameters, criMvPly_FreeWorkBuffer(), - * criMvPly_Start() - */ -CriBool CRIAPI criMvPly_AllocateWorkBuffer(CriMvPly mvply, CriHeap heap, CriMvStreamingParameters *stmprm); - -/* ワークバッファの解放 */ -/* - * \brief ワークバッファの解放 - * \param mvply : CRI Movie ハンドル - * \return なし - * \par 説明: - * criMvPly_AllocateWorkBuffer関数で確保したワークバッファを全て解放します。
- * この関数を呼び出し可能なのは、STOP/WAIT_PREP/PLAYEND状態の時のみです。
- * CRI Movie Ver.0.60 では未実装です。 - */ -/* - * \ingroup MODULE_BUFFER - * \brief Release streaming work buffer - * \param mvply A valid CriMvPly handle - * - * This function releases streaming work buffers allocated from the CriHeap - * previously associated with criMvPly_AllocateWorkBuffer(). - * This function should only be called at CRIMVPLY_STATUS_STOP, - * CRIMVPLY_STATUS_WAIT_PREP or CRIMVPLY_STATUS_PLAYEND states. However, this - * function does not verify the current stream status before releasing - * all the buffers; it merely deallocates them. Expect interesting crashes - * if you call this function while playing a movie. - * - * You can verify the current CriMvPly handle status with criMvPly_GetStatus() if - * necessary. - * - */ -void CRIAPI criMvPly_FreeWorkBuffer(CriMvPly mvply); - -/* 再生するオーディオチャネルの設定 */ -/* - * \brief 再生するオーディオチャネルの設定 - * \param mvply : CRI Movie ハンドル - * \param ch : オーディオチャネル番号 - * \return なし - * \par 説明: - * CriMvStreamingParameters構造体のメンバ track_play_audioのデフォルト値を設定します。
- * criMvPly_GetStreamingParameters関数でCriMvStreamingParameters構造体を取得したときにこの値が格納されます。
- * 何も設定していない場合、buffering_timeには0が入います。 - * -1を指定するとオーディオを再生しない設定になります。 - */ -void CRIAPI criMvPly_SetAudioTrack(CriMvPly mvply, CriSint32 track); - -/* バッファリング時間(単位[sec])の設定 */ -/* - * \brief バッファリング時間(単位[sec])の設定 - * \param mvply : CRI Movie ハンドル - * \param time : バッファリング時間 - * \return なし - * \par 説明: - * CriMvStreamingParameters構造体のメンバbuffering_timeのデフォルト値を設定します。
- * criMvPly_GetStreamingParameters関数で CriMvStreamingParameters構造体を取得したときにこの値が格納されます。
- * 何も設定していない場合、buffering_timeには1.0秒が入っています。 - */ -/* - * \ingroup MODULE_BUFFER - * \brief Set default buffering time (unit[sec]) - * \param mvply A valid CriMvPly handle - * \param time Buffering time in seconds - * - * This function tells the CriMvPly handle how much time of the stream to buffer in - * memory. Buffering is necessary to cover seeks, error retries, latency and - * other various hiccups in most data sources. - * - * This value is stored in the buffering_time field of the CriMvStreamingParameters - * struct. It is set to a default of 1.0 seconds when the CriMvPly handle is created. - * This is typically safe for most DVD type file systems. - * - * \sa CriMvPly, CriMvStreamingParameters - */ -//void CRIAPI criMvPly_SetBufferingTime(CriMvPly mvply, CriFloat32 time); - -/* 同時読み込みファイル数の設定 */ -/* - * \brief 同時読み込みファイル数の設定 - * \param mvply : CRI Movie ハンドル - * \param max_stm : 同時読み込みファイル数 - * \return なし - * \par 説明: - * CriMvStreamingParameters構造体のメンバmax_simultaneous_read_filesのデフォルト値を設定します。
- * criMvPly_GetStreamingParameters関数で CriMvStreamingParameters構造体を取得したときにこの値が格納されます。
- * 何も設定していない場合、max_simultaneous_read_filesには1が入っています。 - */ -/* - * \ingroup MODULE_BUFFER - * \brief Set maximum number of simultaneous streams - * \param mvply A valid CriMvPly handle - * \param max_stm The maximum number of simultaneous streams - * - * This function sets the default value of the "max_simultaneous_read_files" field of - * the CriMvStreamingParameters struct. Currently, setting this value has no effect. - */ -//void CRIAPI criMvPly_SetMaxSimultaneousStreams(CriMvPly mvply, CriUint32 max_stm); - -/* サウンド出力バッファサンプル数の設定 */ -/* - * \brief GetWave16で要求する最大サンプル数の設定 - * \param mvply : CRI Movie ハンドル - * \param max_smpl : 最大サンプル数 - * \return なし - * \par 説明: - * CriMvAudioParameters構造体のメンバoutput_buffer_samplesのデフォルト値を設定します。
- * criMvPly_GetStreamingParameters関数で CriMvStreamingParameters構造体を取得したときにこの値が格納されます。
- * 何も設定していない場合、output_buffer_samplesには16*1024が入っています。 - */ -/* - * \ingroup MODULE_AUDIO - * \brief Set default sound output buffer samples - * \param mvply A valid CriMvPly handle - * \param smpls : sound output buffer samples - * - * This function sets the default value of the "output_buffer_samples" field in the - * CriMvAudioParameters struct. The default value is 16384, which is set when - * criMvPly_Create() is called. - * - * This function only has an effect if it is called before the - * criMvPly_AllocateWorkBuffer() function is called, since this is when the audio - * output buffer is allocated. - * - * \sa CriMvAudioParameters, criMvPly_Create(), criMvPly_AllocateWorkBuffer(), - * criMvPly_GetWave16() - */ -//void criMvPly_SetMaxSamplesOfGetWave16(CriMvPly mvply, CriUint32 max_smpl); -void CRIAPI criMvPly_SetSoundOutputBufferSamples(CriMvPly mvply, CriUint32 smpls); - -/* ハンドル状態の取得 */ -/* - * \brief ハンドル状態の取得 - * \param mvply : CRI Movie ハンドル - * \return ハンドル状態 - * \par 説明: - * ハンドル状態を取得します。 - */ -/* - * \ingroup MODULE_STATE - * \brief Get the handle status - * \param mvply A valid CriMvPly handle - * \return One of the CriMvPlyStatus enum values - * - * This function gets the current status of the CRI Movie handle. Check the - * following link for possible return values. - * - * \sa CriMvPlyStatus - */ -CriMvPlyStatus CRIAPI criMvPly_GetStatus(CriMvPly mvply); - -/* WAIT状態から次の状態への遷移通知 */ -/* - * \brief WAIT状態から次の状態への遷移通知 - * \param mvply : CRI Movie ハンドル - * \return なし - * \par 説明: - * ハンドル状態をWAIT_**** 状態から次の状態に遷移させます。状態に応じて次のように使用します。
- * ・WAIT_PREP 状態 : criMvPly_AllocateWorkBuffer関数でワークを確保しおわったら呼び出してください。
- * ・WAIT_PLAYING 状態 : ビデオフレーム、オーディオデータを取得して表示・出力の準備ができたら、 - * 出力を開始して、本関数を呼び出してください。
- * ・WAIT_PLAYEND 状態 : 最後のビデオフレームの表示、最後のオーディオデータの出力が終了したら呼び出してください。
- * ・WAIT_STOP 状態 : ビデオやオーディオの出力が停止してもいい状態になったら、呼び出してください。
- * 本関数を呼び出すと各状態は即座に次の状態に遷移します。
- * 本関数を WAIT_**** 以外の状態で呼び出しても、状態は何も変わりません。 - */ -/* - * \ingroup MODULE_STATE - * \brief Notify transition from WAIT status - * \param mvply A valid CriMvPly handle - * - * This function notifies the CriMvPly handle that your application is ready to - * go from the current WAIT state to the next state. There are exactly four states - * in which it is appropriate to call this function: - * - * - CRIMVPLY_STATUS_WAIT_PREP After your application has allocated buffers with - * criMvPly_AllocateWorkBuffer() - * - CRIMVPLY_STATUS_WAIT_PLAYING After your application has prerolled stream data (if - * necessary) - * - CRIMVPLY_STATUS_WAIT_PLAYEND After your application has displayed the last frames of audio and - * video from the stream - * - CRIMVPLY_STATUS_WAIT_STOP After your application suspends playback from the stream - * - * You can check the current status of the CriMvPly handle by calling the criMvPly_GetStatus() - * function. This function has no effect if called in states other than those listed above. - * - * \sa CriMvPly, CriMvPlyStatus - */ -void CRIAPI criMvPly_IncrementState(CriMvPly mvply); - -/* 状態の更新 */ -/* - * \brief CriMvPlyモジュールのサーバ関数 - * \param mvply : CRI Movie ハンドル - * \return なし - * \par 説明: - * 主にデマルチプレクサ内部のデータの更新を行います。
- * 本関数はアプリケーションのメインスレッド側でで毎回呼び出すようにしてください。
- */ -void CRIAPI criMvPly_Update(CriMvPly mvply); - -/* 再生開始 */ -/* - * \brief 再生開始 - * \param mvply : CRI Movie ハンドル - * \return 再生開始できた場合はCRI_TRUE, 失敗した場合はCRI_FALSE - * \par 説明: - * 再生のための処理を開始します。
- * 本関数呼出し後、ハンドル状態はDECHDRに遷移します。
- */ -/* - * \ingroup MODULE_STATE - * \brief Start of playback processing - * \param mvply A valid CriMvPly handle - * - * This function initiates playback processing. This function should be called - * after the CriMvPly handle is created and the data source has been opened, - * but before the work buffers are allocated with criMvPly_AllocateWorkBuffer(). - * This function sets the current status of the CriMvPly handle to - * CRIMVPLY_STATUS_DECHDR, which prepares it to decode the header information - * from the data source. - * - * \sa CriMvPly, CriMvPlyStatus, criMvPly_AllocateWorkBuffer() - */ -CriBool CRIAPI criMvPly_Start(CriMvPly mvply); - -/* 再生停止リクエスト(即時復帰) */ -/* - * \brief 再生停止リクエスト(即時復帰) - * \param mvply : CRI Movie ハンドル - * \return なし - * \par 説明: - * 再生停止のリクエストを発行して即時復帰します。
- * 本関数呼出し後、ハンドル状態はSTOP_PROCESSING状態に遷移します。
- * 停止のための処理が終わると、ハンドル状態がWAIT_STOPに遷移します。
- * WAIT_STOP状態になったら、criMvPly_IncrementState関数でSTOP状態に遷移させて、 - * アプリケーションの停止処理を行ってください。 - */ -/* - * \ingroup MODULE_STATE - * \brief Non-blocking request to stop playback - * \param mvply A currently playing CriMvPly handle - * - * This function records a request to terminate playback. Termination of - * playback is not synchronous to this function; this function sets the current - * state of the CriMvPly handle to CRIMVPLY_STATUS_STOP_PROCESSING. After - * movie processing is halted, the state of the handle transitions to - * CRIMWPLY_STATUS_WAIT_STOP. - * - * This function is useful for prematurely terminating a movie, e.g. "press - * X to skip this movie". - * - * Video frames will keep being delivered until you detect a CRIMVPLY_STATUS_WAIT_STOP - * state in the CriMvPly handle, and then call criMvPly_IncrementState to transition - * back to the CRIMVPLY_STATUS_STOP state. - * - * \note Pausing is not accomplished through this function. The system clock, including - * whether or not to pause or advance frames, is controlled entirely through user - * code. So the effect of "pausing" a CriMvPly handle can be accomplished by simply - * not updating your system clock as long as your pause is in effect. - * - * \sa CriMvPly, CriMvPlyStatus - */ -void CRIAPI criMvPly_Stop(CriMvPly mvply); - -/* サーバ処理(ハンドル指定) */ -/* - * \brief サーバ処理(ハンドル指定) - * \param mvply : CRI Movie ハンドル - * \return なし - * \par 説明: - * CRI Movie ハンドルを指定してサーバ処理を実行します。
- * 各WAIT_**** 状態への状態遷移はサーバ関数内で実行されます。 - */ -/* - * \ingroup MODULE_VIDEO - * \brief Execute heartbeat functions for a handle - * \param mvply A valid CriMvPly handle - * - * This function executes heartbeat functions for the specified CriMvPly handle only, - * including handoff and parsing of input buffers and audio decoding. Additionally, - * it checks for buffer situations in which the CriMvPly handle should transition to - * one of the four WAIT states of CriMvPlyStatus, and it makes these transitions if - * necessary. - * - * However, video decoding does NOT occur in criMvPly_Execute(). - * - * Expect that criMvPly_Execute() will take a relatively low CPU load. Typically, - * this function should be called on every vertical blank. However, it may be called - * more frequently in a CriMvPly wait state, in conjunction with criMvPly_IncrementState(), - * in order to "force" a transition into the next state without waiting for - * another vertical blank. This type of transition is not generically - * necessary. - * - * \sa CriMvPly, CriMvPlyStatus, criMvPly_ExecuteAll() - */ -void CRIAPI criMvPly_Execute(CriMvPly mvply); - -/* ファイル読み込みバッファの空きチャンク取得 */ -/* - * \brief ファイル読み込みバッファの空きチャンク取得 - * \param mvply : CRI Movie ハンドル - * \param ck : チャンク - * \return なし - * \par 説明: - * ファイル読み込みバッファの空き領域を取得します。
- * 取得した空き領域(チャンクと呼びます)は、データ書き込みを通知するさいに - * そのまま使用しますので、アプリケーションで記憶してください。
- * 1度に取得できるチャンクは1つのみです。
- * チャンクが取得できたか否かは、チャンクのサイズで判定できます。
- * データの書き込みが終わったら、criMvPly_PutInputChunk関数で書き込みサイズを通知してください。
- */ -/* - * \ingroup MODULE_SUPPLY - * \brief Get a free chunk from file reading buffer - * \param mvply A valid CriMvPly handle - * \param ck A CriChunk structure to be filled with data by this function - * - * This function selects an empty internal buffer for your data source to read its data into. - * An area of this type is referred to as a "chunk." - * After calling this function, the ck->data and ck->size - * fields will provide a valid pointer and size, respectively, that your data - * source should copy its data into. - * If no buffers can internally be allocated, this function will return 0 as the - * ck->size field. If this occurs, your program should choke input until a free - * buffer can be allocated. - * Typical data sources are native file reading, sequential memory access, or - * playback from a network source. - * The ck->size field is dynamically calculated when criMvPly_AllocateWorkBuffer() - * is called; it is calculated based on expected data rate and video resolutions - * embedded in the stream file. - * - * After you receive a valid chunk from criMvPly_GetInputChunk(), - * you can fill the provided chunk up to the ck->size limit. After you - * fill the chunk with valid data, call the criMvPly_PutInputChunk() function - * to queue the data for processing. The functions criMvPly_GetInputChunk() and - * criMvPly_PutInputChunk() should be called in equal pairs; calling these - * functions out of order will produce odd results. No dynamic chunk reordering - * is permitted; serial calls with out-of-order chunks will be - * flagged at run-time as an error. - * - * This function will only return a valid chunk if the CriMvPly handle is in - * one of two playback states: CRIMVPLY_STATUS_PLAY or CRIMVPLY_STATUS_DECHDR. - * You can verify the current playback state with criMvPly_GetStatus(). - * - * \sa criMvPly_GetStatus(), criMvPly_PutInputChunk(), criMvPly_AllocateWorkBuffer(), - * CriChunk, CriMvPlyStatus - */ -void CRIAPI criMvPly_GetInputChunk(CriMvPly mvply, CriChunk *ck); - -/* ファイル読み込みバッファへのデータ書き込み通知 */ -/* - * \brief ファイル読み込みバッファへのデータ書き込み通知 - * \param mvply : CRI Movie ハンドル - * \param ck : - * \param inputsize : - * \return なし - * \par 説明: - * criMvPly_GetInputChunk関数で取得した空き領域(チャンクと呼びます)に - * データを書き込み終わったら、引数inputsizeにデータサイズを入れて本関数を呼び出してください。
- * その際、チャンクは criMvPly_GetInputChunk関数で取得したものと同じチャンクを必ず指定してください。 - */ -/* - * \ingroup MODULE_SUPPLY - * \brief Put a data chunk into file read buffer - * \param mvply A valid CriMvPly handle - * \param ck A CriChunk structure containing source data - * \param inputsize The number of bytes actually supplied - * - * This function informs the CriMvPly handle that the CriChunk structure - * now contains valid data from the data source. Typically, you would call - * this function after your asynchronous file read reports that the buffer is - * full of data. - * - * The inputsize field should contain the number of bytes actually provided. - * This value can be less than or equal to ck->size. In an end-of-file condition, - * be sure to supply the actual number of bytes remaining in the file, and not - * merely the size of the input buffer, to criMvPly_PutInputChunk(). - * Do not modify the contents of the CriChunk after calling this function; - * instead, call criMvPly_GetInputChunk() to get a new chunk for further input. - * - * This function invalidates the CriChunk provided if the function is called - * while the CriMvPly handle is in the CRIMVPLY_STATUS_STOP, the - * CRIMVPLY_STATUS_WAIT_PREP, or the CRIMVPLY_STATUS_STOP_PROCESSING state. - * You can verify the current playback state with criMvPly_GetStatus(). - * - * After you receive a valid chunk from criMvPly_GetInputChunk(), - * you can fill the provided chunk up to the ck->size limit. After you call - * fill the chunk with valid data, call the criMvPly_PutInputChunk() function - * to queue the data for processing. The function criMvPly_GetInputChunk() and - * criMvPly_PutInputChunk() should be called in equal pairs; calling these - * functions out of order will produce odd results. No dynamic chunk reordering - * is permitted; serial calls with out-of-order chunks will be - * flagged at run-time as an error. - * - * After putting the final chunk of data in the stream, call - * criMvPly_TerminateSupply() to indicate that an end-of-file condition exists. - * - * \sa criMvPly_GetStatus(), criMvPly_GetInputChunk(), criMvPly_AllocateWorkBuffer(), - * criMvPly_TerminateSupply(), CriChunk, CriMvPlyStatus - */ -void CRIAPI criMvPly_PutInputChunk(CriMvPly mvply, CriChunk *ck, CriUint32 inputsize); - -/* ファイル読み込み終了の通知 */ -/* - * \brief ファイル読み込み終了の通知 - * \param mvply : CRI Movie ハンドル - * \return なし - * \par 説明: - * 再生したい全てのデータを読み込んで、 criMvPly_PutInputChunk関数で通知し終わったら、 - * 本関数でファイル読み込み終了の通知を必ず行ってください。
- * 終了を通知された時点で読み込みバッファに書き込まれた全てのデータをデコードし終わると、 - * ハンドル状態はWAIT_PLAYENDに遷移します。
- * 本関数を呼び出さない限り、WAIT_PLAYEND状態になることはありません。 - */ -/* - * \ingroup MODULE_SUPPLY - * \brief Notify end of reading data - * \param mvply A valid CriMvPly structure - * - * After you put all the source data into the CriMvPly handle with - * criMvPly_PutInputChunk(), indicate the end of the movie file by calling - * criMvPly_TerminateSupply(). After calling this function, the CriMvPly - * handle's status is changed by the library to CRIMVPLY_STATUS_WAIT_PLAYEND - * and the library completes processing of whatever frames it has internally - * buffered. - * - * If you do not call this function, the CriMvPly handle will never transition - * to the CRIMVPLY_STATUS_WAIT_PLAYEND state, making teardown impossible. - * - * \sa criMvPly_PutInputChunk(), CriMvPly, CriMvPlyStatus - */ -void CRIAPI criMvPly_TerminateSupply(CriMvPly mvply); - -#if 0//defined(XPT_TGT_EE) -/* RGB32フォーマットのビデオフレームの取得 */ -/* - * \if ps2 - * \brief RGB32フォーマットのビデオフレームの取得 - * \param mvply : CRI Movie ハンドル - * \param imagebuf : ビデオフレームバッファ - * \param bufsize : バッファサイズ - * \param frameinfo : フレーム情報 - * \return 取得できた場合はTRUE, できなかった場合はFALSE - * \par 説明: - * 引数で指定したバッファに、PS2のマクロブロック並びRGBA32フォーマットでフレームを取得します。
- * 引数CriMvFrameInfo構造体には、取得したフレームについての情報が格納されます。
- * フレームが取得できるのは、ハンドル状態がWAIT_PLAYING/PLAYINGの時のみです。
- * それ以外の状態で呼び出す、または入力データ不足の場合には、本関数はフレームの取得に失敗し、即座に復帰します。
- * フレームが取得できなかった場合は、関数値でFALSEが返ります。
- * 実際のビデオデコード処理も本関数内で動くため、フレーム取得できる場合には、処理の重い関数となります。 - * \endif - */ -/* - * \if ps2 - * \ingroup MODULE_VIDEO - * \brief Get a video frame in PS2 macroblock RGB32 format - * \param mvply A valid CriMvPly handle - * \param imagebuf a pointer to the video buffer in memory to receive the frame - * \param bufsize video buffer size in bytes - * \param frameinfo Information about the decoded frame - * \return returns true if a frame has been copied into the buffer, false otherwise - * - * This function finds and decodes the current frame, if any, to the imagebuf buffer. - * The format of this buffer is specific to the PS2. This function will only return - * a valid frame if the CriMvPly handle is in the CRIMVPLY_STATUS_WAIT_PLAYING or the - * CRIMVPLY_STATUS_PLAYING state. - * - * This function is an EE-intensive activity, and the amount of time required - * is variable, depending on the complexity and size of the video frame being decoded. - * Therefore the preferred method of calling this function is in a low priority thread, - * separate from your I/O, buffer management, and criMvPly_Execute() routines. - * - * If this function returns true, the preferred display time of the video frame is calculated - * as: - * - * \code - * frameinfo.time / frameinfo.tunit - * \endcode - * - * Humans notice audio stuttering much more readily than a dropped video frame during - * a video decode process. If the frame reported by criMvPly_GetFrameRGBA32_PS2() - * arrives after your system clock says the frame should be displayed, you should - * simply drop the frame without bothering to DMA it to video memory. - * - * Here is an example showing how to drop frames in this case: - * - * \dontinclude crimvt01_simple_playback_ps2.c - * \skip Get video frame - * \until *tutor_update_video_frame_on_display_time* - * - * It is not preferred, but it is possible, to call this function in a single-threaded - * playback model. In this case, it is important to allocate more heap space - * and service the CriMvPly handle with criMvPly_Execute() or criMvPly_ExecuteAll() - * frequently, as well as criMvPly_GetWave16() frequently. This helps to cover - * for the case where other I/O needs to occur when a frame is currently being decoded by - * criMvPly_GetFrameRGBA32_PS2(). - * - * \image html crimvply_getframergba32_ps2.png The DMA reordering step on PS2 - * - * In order to get acceptable performance on the PS2, a macroblock reordering step - * must take place during the DMA transfer from EE RAM to video RAM. - * \endif - */ -CriBool CRIAPI criMvPly_GetFrameRGBA32_PS2(CriMvPly mvply, CriUint8 *imagebuf, CriUint32 bufsize, CriMvFrameInfo *frameinfo); - -CriBool CRIAPI criMvPly_DecodeFrameRGBA32_PS2(CriMvPly mvply, CriUint8 *imagebuf, CriUint32 bufsize, CriMvFrameInfo *frameinfo); -#endif - -#if defined(XPT_TGT_PC) || defined(XPT_TGT_XBOX360) || defined(XPT_TGT_WII) || defined(XPT_TGT_SH7269) || defined(XPT_TGT_TRGP6K) -/* - * \if pc - * \ingroup MODULE_VIDEO - * \brief Get a video frame in YUV422 format - * \param mvply A valid CriMvPly handle - * \param imagebuf A pointer to the video buffer in memory to receive the frame - * \param pitch Number of bytes in one row of the video buffer - * \param bufsize Video buffer size in bytes - * \param frameinfo Information about the decoded frame - * \return returns true if a frame has been copied into the buffer, false otherwise - * - * This function finds and decodes the current frame, if any, to the imagebuf buffer. - * This function will only return a valid frame if the CriMvPly handle is in the - * CRIMVPLY_STATUS_WAIT_PLAYING or the CRIMVPLY_STATUS_PLAYING state. - * - * This function is a CPU-intensive activity, and the amount of time required - * is variable, depending on the complexity and size of the video frame being decoded. - * Therefore the preferred method of calling this function is in a low priority thread, - * separate from your I/O, buffer management, and criMvPly_Execute() routines. - * - * If this function returns true, the preferred display time of the video frame is calculated - * as: - * - * \code - * frameinfo.time / frameinfo.tunit - * \endcode - * - * It is not preferred, but it is possible, to call this function in a single-threaded - * playback model. In this case, it is important to allocate more heap space - * and service the CriMvPly handle with criMvPly_Execute() or criMvPly_ExecuteAll() - * frequently, as well as criMvPly_GetWave16() frequently. - * - * \endif - */ -CriBool CRIAPI criMvPly_GetFrameYUV422(CriMvPly mvply, CriUint8 *imagebuf, CriUint32 pitch, CriUint32 bufsize, CriMvFrameInfo *frameinfo); -#endif - -/* 16bit WAVEフォーマットのオーディオデータ取得 */ -/* - * \brief 16bit WAVEフォーマットのオーディオデータ取得 - * \param mvply : CRI Movie ハンドル - * \param nch : チャネル数 - * \param waveptr : オーディオデータバッファ - * \param wavesmpl : 要求サンプル数(<バッファサイズ) - * \param waveinfo : 16bit Waveform 情報 - * \return 取得できたサンプル数 - * \par 説明: - * 16bitのWAVEフォーマットでオーディオデータを取得します。引数waveptrには、nch分のバッファポインタを格納した - * 配列を指定してください。
- * 引数CriMvWaveInfo構造体には、取得したオーディオデータについての情報が格納されます。
- * 入力データ不足などで要求されたサンプル数のデコードができない場合もあります。
- * (未実装機能) 本関数の処理が重くなってでも、なるべく要求された多くのオーディオデータを取得するモード。 - */ -/* - * \ingroup MODULE_AUDIO - * \brief Get 16bit wave audio data - * \param mvply A currently playing CriMvPly handle - * \param nch The number of audio channels to get in this call - * \param waveptr An array of audio data buffers to copy audio data into - * \param wavesmpl The number of requested wave data samples (must be less than buffer size) - * \param waveinfo A structure filled by this function with info about this wave - * \return The number of wave data samples actually copied into the buffer - * - * This function copies currently decoding audio data into your output buffer - * for you to send to the audio output. The output format is a sixteen-bit PCM - * format. The data provided is "current", e.g. you should try to minimize latency. - * while delivering the audio data to the output device. - * - * This function will return an empty audio buffer if the input to the CriMvPly - * handle is starving for data, or if criMvPly_Execute() or criMvPly_ExecuteAll() - * has not been called recently. - * - * Note that this function actually copies data. However, the expected bandwidth - * for moving audio data in memory is minimal -- about 176400 bytes per second for - * a stereo stream, which is typically a fraction of 1% of the bandwidth available - * on modern game systems. - * - * For debugging tips on stuttering, see \ref crim_section_stuttering . - */ -CriUint32 CRIAPI criMvPly_GetWave16(CriMvPly mvply, CriUint32 nch, CriSint16 *waveptr[], - CriUint32 wavesmpl, CriMvWaveInfo *waveinfo); -CriUint32 CRIAPI criMvPly_GetWave32(CriMvPly mvply, CriUint32 nch, CriFloat32 *waveptr[], - CriUint32 wavesmpl, CriMvWaveInfo *waveinfo); - - -#if defined(XPT_TGT_EE) -/* スクラッチパッドRAM使用設定 */ -/* スクラッチパッドRAMの使用設定(ハンドル作成前に呼び出すこと) */ -/* - * \brief スクラッチパッドRAM使用設定 - * \param sw : - * \return なし - * \par 説明: - * スクラッチパッドRAMの使用設定を行います。
- * デフォルトはOFFです。 - */ -/* - * \if ps2 - * \ingroup MODULE_INIT - * \brief Enable or disable PS2 scratch pad (SPRAM) usage - * \param sw : ON to enable scratch pad use, OFF to disable - * - * This function determines whether the video decode step uses the PS2 - * SPRAM memory area for its work. The performance of this library is - * increased by around 30% when using SPRAM; however, this use might - * conflict with graphics engines that depend on exclusive access to SPRAM. - * However, on the PS2, the video decode step occurs synchronously to the - * criMvPly_GetFrameRGBA32_PS2() function, so you can take appropriate external - * locking measures to intelligently synchronize SPRAM utilization. - * The value set by criMvPly_SetUseScratchPadRAM_PS2() is internally checked - * exactly once, during the criMvPly_Create() step; calling this function - * after criMvPly_Create() has no effect. The default setting for this - * function is OFF. - * \endif - */ -void CRIAPI criMvPly_SetUseScratchPadRAM_PS2(CriBool sw); -#endif - - -/* メモリからの再生開始 */ -/* - * \brief メモリからの再生開始 - * \param mvply : CRI Movie ハンドル - * \param memptr : メモリ上のムービデータの先頭アドレス - * \param memsize : メモリ上のムービデータのサイズ - * \return なし - * \par 説明: - * メモリからのムービ再生を開始します。
- * 本関数の呼び出し前に、あらかじめムービデータの全てをメモリ上に読み込んでおいてください。 - */ -/* - * \ingroup MODULE_STATE - * \brief Start playback from movie file on memory - * \param mvply A currently playing CriMvPly handle - * \param memptr A address of movie file - * \param memsize The size of movie file - * - * Start playback from memory.
- * Please read movie file to memory before playback. - */ -void CRIAPI criMvPly_StartMemory(CriMvPly mvply, CriUint8* memptr, CriUint32 memsize); - - -/* - * YUV個別バッファへのフレーム取得 - */ -/* - * \if xbox360 - * \ingroup MODULE_VIDEO - * \brief Get a video frame to Y,U,V independently texture buffers - * \param mvply A valid CriMvPly handle - * \param yuvbuffers Information about Y,U,V independently texture buffers - * \param frameinfo Information about the decoded frame - * \return returns true if a frame has been copied into the buffer, false otherwise - * - * This function finds and decodes the current frame, if any, to the Y,U,V texture buffers. - * This function will only return a valid frame if the CriMvPly handle is in the - * CRIMVPLY_STATUS_WAIT_PLAYING or the CRIMVPLY_STATUS_PLAYING state. - * \endif - */ -CriBool CRIAPI criMvPly_GetFrameYUVBuffers(CriMvPly mvply, CriMvYuvBuffers *yuvbuffers, CriMvFrameInfo *frameinfo); - - -/* - * ビデオのデコード - */ -/* - * \ingroup MODULE_VIDEO - * \param mvply The movie player handle - * \return returns the number of decoded frames - * - */ -CriUint32 CRIAPI criMvPly_DecodeVideo(CriMvPly mvply); - -/* - * ヘッダのデコード - */ -/* - * - * \ingroup MODULE_VIDEO - * \param mvply The movie player handle - * - */ -void CRIAPI criMvPly_DecodeHeader(CriMvPly mvply); - -/* - * デコードスキップ指示 - * \par 説明: - * この関数を実行した回数だけ、その後のデコード時に自動的に1枚Bピクチャをスキップする。
- * スキップ指示を出した次のフレームからは、実際のスキップが実行されていなくても - * 表示時刻はスキップしたものとして補正される。 - */ -/* - * \ingroup MODULE_VIDEO - * \param mvply The movie player handle - * \return returns the number of decoded frames - * - * After calling SkipFrame function, Decoding function skip B-picture. - * To avoid that application judge continuous wrong skip, After calling - * SkipFrame function, next frame time will be adjusted. - */ -void CRIAPI criMvPly_SkipFrame(CriMvPly mvply); - - -#if 0 -/* - * YUVA8フォーマットのフレーム取得 - */ -/* - * \if ps3 - * \ingroup MODULE_VIDEO - * \brief Get a video frame in YUVA8 format. - * \param mvply A valid CriMvPly handle - * \param imagebuf A pointer to the video buffer in memory to receive the frame - * \param pitch Number of bytes in one row of the video buffer - * \param bufsize Video buffer size in bytes - * \param frameinfo Information about the decoded frame - * \return returns true if a frame has been copied into the buffer, false otherwise - * - * This function finds and decodes the current frame, if any, to the imagebuf buffer. - * This function will only return a valid frame if the CriMvPly handle is in the - * CRIMVPLY_STATUS_WAIT_PLAYING or the CRIMVPLY_STATUS_PLAYING state. - * \endif - */ -CriBool CRIAPI criMvPly_GetFrameYUVA8_PS3(CriMvPly mvply, CriUint8 *imagebuf, CriUint32 pitch, CriUint32 bufsize, CriMvFrameInfo *frameinfo); -#endif - -/* - * ARGB8888フォーマットでフレーム取得 - */ -/* - * \if ps3 - * \ingroup MODULE_VIDEO - * \brief Get a video frame in ARGB8888 format. - * \param mvply A valid CriMvPly handle - * \param imagebuf A pointer to the video buffer in memory to receive the frame - * \param pitch Number of bytes in one row of the video buffer - * \param bufsize Video buffer size in bytes - * \param frameinfo Information about the decoded frame - * \return returns true if a frame has been copied into the buffer, false otherwise - * - * This function finds and decodes the current frame, if any, to the imagebuf buffer. - * This function will only return a valid frame if the CriMvPly handle is in the - * CRIMVPLY_STATUS_WAIT_PLAYING or the CRIMVPLY_STATUS_PLAYING state. - * \endif - */ -CriBool CRIAPI criMvPly_GetFrameARGB8888(CriMvPly mvply, CriUint8 *imagebuf, CriUint32 pitch, CriUint32 bufsize, CriMvFrameInfo *frameinfo); -void CRIAPI criMvPly_InitializeFrameARGB8888(void); - - -#if defined(XPT_TGT_IPHONE) || defined(XPT_TGT_WINMO) || defined(XPT_TGT_ANDROID) || defined(XPT_TGT_CQSH2A) || defined(XPT_TGT_ACRODEA) || defined(XPT_TGT_NACL) || defined(XPT_TGT_SH7269) || defined(XPT_TGT_TRGP6K) -/* - * RGB565フォーマットでフレーム取得 - */ -/* - * \ingroup MODULE_VIDEO - * \brief Get a video frame in RGB565 format - */ -CriBool CRIAPI criMvPly_GetFrameRGB565(CriMvPly mvply, CriUint8 *imagebuf, CriUint32 pitch, CriUint32 bufsize, CriMvFrameInfo *frameinfo); -void CRIAPI criMvPly_InitializeFrameRGB565(void); -#endif - -/* - * 次のフレームの情報だけ取得する - */ -/* - * \ingroup MODULE_VIDEO - * \brief Get a information of next video frame (without actual video frame). - */ -CriUint8* CRIAPI criMvPly_GetNextFrameInfo(CriMvPly mvply, CriMvFrameInfo *frameinfo); - -/* - * 次のフレームを捨てる - */ -CriBool CRIAPI criMvPly_DiscardNextFrame(CriMvPly mvply, CriMvFrameInfo *frameinfo); - -/* - * 再生準備完了状態(PREPからWAIT_PLAYING)になるまでに貯金するフレーム数の指定 - * この関数を呼び出さなければ、貯金フレーム数 = フレームプール数 - */ -void CRIAPI criMvPly_SetNumberOfFramesForPrep(CriMvPly mvply, CriSint32 nframes); - -/* - * For Debug use. - */ -void CRIAPI criMvPly_SetSeekPosition(CriMvPly mvply, CriSint32 seek_frame_id, CriSint32 video_gop_top_id); -void CRIAPI criMvPly_SetSeekAlphaPosition(CriMvPly mvply, CriSint32 alpha_gop_top_id); -void CRIAPI criMvPly_CalcSeekPosition(CriMvPly mvply, void *seektbl_ptr, CriUint32 seektbl_size, Sint32 frame_id, Uint64 *offset, Sint32 *gop_top_id); - -/* for specific use */ -/* ボディアドレスの設定 */ -void CRIAPI criMvPly_SetBodyData(CriMvPly mvply, const CriUint64Adr body_ptr, CriSint64 body_size); - -/* 入力SJおよびバッファサイズの取得(バッファサイズ、リロードサイズはNULL指定で省略) */ -CriSj CRIAPI criMvPly_GetInputSj(CriMvPly mvply, CriUint32 *buffer_size, CriUint32 *reload_threshold); - -/* 名前&タイプ指定によるイベントポイント情報の取得 */ -//Bool criMvPly_SearchEventPointByName(CriMvPly mvply, Char8 *cue_name, Sint32 type, CriMvEventPoint *eventinfo); -/* イベントポイント情報からフレームIDへの変換 */ -//Sint32 criMvPly_CalcFrameIdFromCuePoint(CriMvPly mvply, CriMvEventPoint *eventinfo); - -CriBool CRIAPI criMvPly_AttachSubAudio(CriMvPly mvply, CriHeap heap, CriUint32 track); -CriUint32 CRIAPI criMvPly_GetSubAudioWave16(CriMvPly mvply, CriUint32 nch, CriSint16 *waveptr[], CriUint32 wavesmpl, CriMvWaveInfo *waveinfo); -CriUint32 CRIAPI criMvPly_GetSubAudioWave32(CriMvPly mvply, CriUint32 nch, CriFloat32 *waveptr[], CriUint32 wavesmpl, CriMvWaveInfo *waveinfo); -void CRIAPI criMvPly_DetachSubAudio(CriMvPly mvply); - -void CRIAPI criMvPly_GetSubtitle(CriMvPly mvply, CriUint8 *bufptr, CriUint32 bufsize, CriMvSubtitleInfo *info); -void CRIAPI criMvPly_GetNextSubtitleInfo(CriMvPly mvply, CriMvSubtitleInfo *info); - -/* 入力バッファのデータ量を見る[byte] */ -CriUint32 CRIAPI criMvPly_PeekInputBufferData(CriMvPly mvply); -/* メモリ上のムービを入力SJに追加する */ -void CRIAPI criMvPly_AddInputMemory(CriMvPly mvply, CriUint8* memptr, CriUint32 memsize); - - -/* 取得できるオーディオデータのサンプル数を調べる */ -CriUint32 CRIAPI criMvPly_GetDataSizeMainAudio(CriMvPly mvply, CriUint32 nch); -/* 取得できるオーディオデータのサンプル数を調べる */ -CriUint32 CRIAPI criMvPly_GetDataSizeSubAudio(CriMvPly mvply, CriUint32 nch); - -/* メインのオーディオの再生が終了しているかどうかを調べる */ -CriBool CRIAPI criMvPly_IsEndMainAudioPlayback(CriMvPly mvply); -/* サブのオーディオの再生が終了しているかどうかを調べる */ -CriBool CRIAPI criMvPly_IsEndSubAudioPlayback(CriMvPly mvply); - -/* メインオーディオが活動中かどうかを調べる (デコード中かつ出力バッファがある状態) */ -CriBool CRIAPI criMvPly_IsActiveMainAudioPlayback(CriMvPly mvply); - -/* ワーク確保前に設定変更すること */ -void CRIAPI criMvPly_SetPcmFormat(CriMvPly mvply, CriMvPcmFormat pcmfmt); - -#if defined(XPT_TGT_PC) -/* [PC] マルチプロセッサの指定 */ -void CRIAPI criMvPly_SetProcessorParameters_PC(CriMvPly mvply, Sint32 thread_num, Uint32 *affinity_masks, Sint32 *priorities); -#endif - -#if defined(XPT_TGT_WIIU) -/* */ -void criMvPly_SetMultiCoreDecode_WIIU(CriBool sw); -#endif - -#if defined(XPT_TGT_XBOX360) -/* [Xbox360] マルチプロセッサの指定 */ -void CRIAPI criMvPly_SetProcessorParameters_XBOX360(CriMvPly mvply, Sint32 thread_num, CriUint32 processor_mask, CriSint32 *priorities); -#endif - -#if defined(XPT_TGT_PS3PPU) -/* [PS3] SPURSの指定 */ -void CRIAPI criMvPly_SetupSpursParameters_PS3(CriMvProcessorParameters_PS3 *processor_param); - /* [PS3] SPUスレッドによるマルチプロセッサの指定 */ -void CRIAPI criMvPly_SetupSpuThreadParameters_PS3(CriMvSpuThreadParameters_PS3 *spu_thread_param); -#endif - -#if defined(XPT_TGT_PS3PPU) -void CRIAPI criMvPly_SetGraphicEnv(CriMvGraphicEnv env); -CriMvGraphicEnv CRIAPI criMvPly_GetGraphicEnv(void); -#endif - -/* フレームプール情報の取得 */ -void CRIAPI criMvPly_GetFramePoolInfo(CriMvPly mvply, CriSint32 *num_input, CriUint32* num_data, CriUint32* num_ref, CriUint32* num_hold, CriUint32* num_free); - -/* 再生中でも字幕チャネルを切り替える */ -void CRIAPI criMvPly_SetSubtitleChannel(CriMvPly mvply, CriSint32 chno); - -/* ポインタだけ取得してフレームプール内のバッファをロックする */ -CriBool CRIAPI criMvPly_LockFrameBuffer(CriMvPly mvply, CriMvYuvBuffers *yuvbuffers, CriMvFrameInfo *frameinfo); -/* ロックしていたフレームプールを解放する */ -CriBool CRIAPI criMvPly_UnlockFrameBuffer(CriMvPly mvply, CriMvFrameInfo *frameinfo); - -/* - * For Sofdec2 - */ -CriMvPly CRIAPI criMvPly_CreateWithWork(void *work, CriSint32 size, CriMvHandleConfig *config); -CriSint32 CRIAPI criMvPly_CalcHandleWorkSize(CriMvHandleConfig *config); -CriSint32 CRIAPI criMvPly_CalcPlaybackWorkSize(CriMvPly mvply, CriMvStreamingParameters *stmprm); -CriBool CRIAPI criMvPly_AllocateWorkBufferWithWork(CriMvPly mvply, void *work ,Sint32 work_size, CriMvStreamingParameters *stmprm); -void CRIAPI criMvPly_SetMetaDataWorkAllocator(CriMvPly mvply, CriMvMetaDataWorkMallocFunc allocfunc, CriMvMetaDataWorkFreeFunc freefunc, void *usrobj, CriMvMetaFlag meta_flag); -CriSint32 criMvPly_CalcSubAudioWorkSize(CriMvPly mvply, const CriMvAudioParameters *aprm); -CriBool criMvPly_CopyFrameYUVBuffers(CriMvPly mvply, CriMvYuvBuffers *yuvbuffers, - const CriMvFrameInfo *frameinfo,const CriMvAlphaFrameInfo *alpha_frameinfo); -CriBool criMvPly_CopyFrameARGB8888Buffer(CriMvPly mvply, CriUint8 *dst_buf, CriUint32 dst_pitch, CriUint32 dst_bufsize, - const CriMvYuvBuffers *src_bufs, const CriMvFrameInfo *src_vinf, const CriMvAlphaFrameInfo *src_ainf); -#if defined(XPT_TGT_IPHONE) || defined(XPT_TGT_WINMO) || defined(XPT_TGT_ANDROID) || defined(XPT_TGT_CQSH2A) || defined(XPT_TGT_ACRODEA) || defined(XPT_TGT_NACL) || defined(XPT_TGT_SH7269) || defined(XPT_TGT_TRGP6K) || defined(XPT_TGT_TRGP6K) -CriBool criMvPly_CopyFrameRGB565Buffer(CriMvPly mvply, CriUint8 *dst_buf, CriUint32 dst_pitch, CriUint32 dst_bufsize, - const CriMvYuvBuffers *src_bufs, const CriMvFrameInfo *src_vinf, const CriMvAlphaFrameInfo *src_ainf); -#endif -CriBool criMvPly_LockAlphaFrameBuffer(CriMvPly mvply, CriMvYuvBuffers *yuvbuffers, CriMvAlphaFrameInfo *alpha_frameinfo); -CriBool criMvPly_UnlockAlphaFrameBuffer(CriMvPly mvply, CriMvAlphaFrameInfo *alpha_frameinfo); -CriSint32 criMvPly_GetNumPictureData(CriMvPly mvply); -const CriMvPlyHeaderInfo* criMvPly_GetCurrentStreamInfo(CriMvPly mvply); -/* for debug */ -CriBool CRIAPI criMvPly_GetAlphaFrame(CriMvPly mvply, CriUint8 *imagebuf, CriUint32 pitch, CriMvAlphaFrameInfo *alpha_frameinfo); - -/* OUTER_FRAMEPOOL_WORK */ -/* フレームプール用ワーク計算。ハンドルはNULL指定OK。 */ -CriSint32 criMvPly_CalcFramepoolWorkSize(CriMvPly mvply, const CriMvStreamingParameters *stmprm); -/* フレームプール用ワーク設定 */ -void criMvPly_SetFramepoolWork(CriMvPly mvply, void *work, CriSint32 work_size); -/* フレームプール用ワークアロケータ設定 */ -void criMvPly_SetFramepoolWorkAllocator(CriMvPly mvply, CriMvFramepoolWorkMallocFunc allocfunc, CriMvFramepoolWorkFreeFunc freefunc, void *usrobj); - -/* シークブロック情報の取得 */ -/* <入力> - * - seektbl_ptr : UTFアドレス - * - seektbl_size : UTFサイズ - * - num_seekblock : 出力配列の要素数 - * <出力> - * - blockinfo : シークブロック情報配列へのポインタ(num_seekblock分の領域を確保して渡すこと) - */ -void criMvPly_GetSeekBlockInfo(CriMvPly mvply, void *seektbl_ptr, CriUint32 seektbl_size, CriSint32 num_seekblock, CriMvSeekBlockInfo *blockinfo); - -/* フレームレートの強制指定 */ -void criMvPly_SetVideoFramerate(CriMvPly mvply, CriUint32 framerate_n, CriUint32 framerate_d); - -/* 同期有無の設定 */ -void criMvPly_SetSyncFlag(CriMvPly mvply, CriBool sync_flag); - -/* 再生可能かの問い合わせ */ -CriBool criMvPly_IsPlayable(CriMvPly mvply, const CriMvStreamingParameters *stmprm); - -#ifdef __cplusplus -} -#endif - -#endif /* CRI_MOVIE_CORE_H_INCLUDED */ diff --git a/3rdParty/cri/Durango/include/cri_sj.h b/3rdParty/cri/Durango/include/cri_sj.h deleted file mode 100644 index 28b29424..00000000 --- a/3rdParty/cri/Durango/include/cri_sj.h +++ /dev/null @@ -1,189 +0,0 @@ -/**************************************************************************** - * - * CRI Middleware SDK - * - * Copyright (c) 2006-2010 CRI Middleware Co., Ltd. - * - ****************************************************************************/ - -#ifndef _CRI_SJ_H_INCLUDED -#define _CRI_SJ_H_INCLUDED -/**************************************************************************** - * * - * CRI Stream Joint "CriSj" Library * - * * - * 2005-06-21 written by M.Oshimi * - * * - ****************************************************************************/ - -/**************************************************************************** - * Include file * - ****************************************************************************/ -#include "cri_xpt.h" -#include "cri_heap.h" - -/**************************************************************************** - * MACRO CONSTANT * - ****************************************************************************/ - -/* Version number of CriSj */ -#define CRISJ_NAME_STRINGS "CRI Stream Joint" -#define CRISJ_VERSION_STRINGS "1.01.00" - -#define CRISJUNI_MAX_LINE (4) -#define CRICHUNK_MAX_SIZE (0xffffffff) - -/*********************************************************************** - * Process MACRO - ***********************************************************************/ - -/**************************************************************************** - * Data type declaration * - ****************************************************************************/ - -/* ストリームライン */ -typedef enum { - CRISJ_LINE_FREE = (0), - CRISJ_LINE_DATA = (1), - CRISJ_LINE_HOLD = (2), - CRISJ_LINE_EXTRA = (3), - /* enum be 4bytes */ - CRISJ_LINE_ENUM_BE_SINT32 = 0x7FFFFFFF -} CriSjLine; - -/* チャンク */ -#ifndef TYPEDEF_CRICHUNK -#define TYPEDEF_CRICHUNK -typedef struct { - CriUint8 *data; /* データ */ - CriUint32 size; /* バイト数 */ -} CriChunk; -#endif - -/* CriSjハンドル */ -/* CriSj handle */ -typedef struct { - struct _crisj_function_table *vtbl; - const CriChar8 *name; -} CriSjObj, *CriSj; - -typedef struct _crisj_function_table { - /* ハンドルの消去 */ - void (*Destroy)(CriSj sj); - /* リセット */ - void (*Reset)(CriSj sj); - /* チャンクの取得 (FIFOの先頭から取得) */ - void (*GetChunk)(CriSj sj, CriSjLine id, CriUint32 nbyte, CriChunk *ck); - /* チャンクを戻す (FIFOの先頭に挿入) */ - void (*UngetChunk)(CriSj sj, CriSjLine id, CriChunk *ck); - /* チャンクを挿入 (FIFOの最後に挿入) */ - void (*PutChunk)(CriSj sj, CriSjLine id, CriChunk *ck); - /* ラインから取得できる総バイト数の取得 */ - CriUint32 (*GetTotalSize)(CriSj sj, CriSjLine id); -} CriSjVirtualFunctionTable; - -typedef enum { - CRISJ_UNIMODE_SEPARATE = (0), - CRISJ_UNIMODE_JOIN = (1), - /* enum be 4bytes */ - CRISJ_UNIMODE_ENUM_BE_SINT32 = 0x7FFFFFFF -} CriSjUniversalMode; - - -typedef struct CriSjRbfConfig { - CriBool use_cs; - CriUint32 buffer_size; - CriUint32 extra_size; - CriUint32 alignment; - const CriChar8 *buffer_name; -} CriSjRbfConfig; - -typedef struct CriSjMemConfig { - CriBool use_cs; - CriUint8 *data; - CriUint32 data_size; -} CriSjMemConfig; - -typedef struct CriSjUniConfig { - CriBool use_cs; - CriSjUniversalMode mode; - CriUint32 num_chunks; -} CriSjUniConfig; - -/**************************************************************************** - * Function Declaration * - ****************************************************************************/ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* リングバッファ型SJの作成 */ -CriSint32 CRIAPI criSjRbf_CalculateWorkSize(const CriSjRbfConfig* config); -CriSj CRIAPI criSjRbf_Create(const CriSjRbfConfig *config, void *work, CriSint32 work_size); -CriSj CRIAPI criSjRbf_CreateByHeap(const CriSjRbfConfig *config, CriHeap heap, CriHeapType heap_type); - -/* 常駐メモリ型SJの作成 */ -CriSint32 CRIAPI criSjMem_CalculateWorkSize(const CriSjMemConfig* config); -CriSj CRIAPI criSjMem_Create(const CriSjMemConfig *config, void *work, CriSint32 work_size); -CriSj CRIAPI criSjMem_CreateByHeap(const CriSjMemConfig *config, CriHeap heap, CriHeapType heap_type); - -/* ユニバーサルSJの作成 */ -CriSint32 CRIAPI criSjUni_CalculateWorkSize(const CriSjUniConfig* config); -CriSj CRIAPI criSjUni_Create(const CriSjUniConfig *config, void *work, CriSint32 work_size); -CriSj CRIAPI criSjUni_CreateByHeap(const CriSjUniConfig *config, CriHeap heap, CriHeapType heap_type); -/* チェインプール数の取得 */ -CriSint32 CRIAPI criSjUni_GetNumChainPool(CriSj sj); - -void CRIAPI criSj_Destroy(CriSj sj); -void CRIAPI criSj_Reset(CriSj sj); -void CRIAPI criSj_GetChunk(CriSj sj, CriSjLine line, CriUint32 nbyte, CriChunk *ck); -void CRIAPI criSj_UngetChunk(CriSj sj, CriSjLine line, CriChunk *ck); -void CRIAPI criSj_PutChunk(CriSj sj, CriSjLine line, CriChunk *ck); -CriUint32 CRIAPI criSj_GetTotalSize(CriSj sj, CriSjLine line); -void CRIAPI criSj_SplitChunk(CriChunk *ck, CriUint32 nbyte, CriChunk *ck1, CriChunk *ck2); - -/*** -* New APIs -***/ - -CriUint32 CRIAPI criSj_GetInputFreeSize(CriSj sj); -void CRIAPI criSj_GetInputChunk(CriSj sj, CriChunk *ck); -void CRIAPI criSj_PutInputChunk(CriSj sj, CriChunk *ck, CriUint32 input_size); -CriUint32 CRIAPI criSj_GetOutputDataSize(CriSj sj); -void CRIAPI criSj_GetOutputChunk(CriSj sj, CriChunk *ck); -void CRIAPI criSj_PutOutputChunk(CriSj sj, CriChunk *ck, CriUint32 output_size); - -CriUint32 CRIAPI criSj_PutOutputChunk2(CriSj sj, CriChunk *ck1, CriChunk *ck2, CriUint32 output_size); - - -/*** -* Old Interface (for compatibility) -***/ -typedef struct _CriSjConfig { - CriBool use_cs; - CriHeapType heap_type; -} CriSjConfig; - -CriSj CRIAPI criSj_CreateRingBuffer(CriHeap heap, CriUint32 bsize, CriUint32 xsize, CriUint32 align); -CriSj CRIAPI criSj_CreateNamedRingBuffer(CriHeap heap, CriUint32 bsize, CriUint32 xsize, CriUint32 align, const CriChar8 *bname); -CriSj CRIAPI criSj_CreateRingBufferWithConfig(CriHeap heap, CriUint32 bsize, CriUint32 xsize, CriUint32 align, const CriSjConfig *config); -CriSj CRIAPI criSj_CreateNamedRingBufferWithConfig(CriHeap heap, CriUint32 bsize, CriUint32 xsize, CriUint32 align, const CriChar8 *bname, const CriSjConfig *config); -CriSint32 CRIAPI criSjRbf_GetRequiredMemorySizeWithConfig(CriUint32 bsize, CriUint32 xsize, CriUint32 align, const CriSjConfig *config); - -CriSj CRIAPI criSj_CreateMemory(CriHeap heap, CriUint8 *data, CriUint32 dtsize, CriUint32 align); -CriSj CRIAPI criSj_CreateMemoryWithConfig(CriHeap heap, CriUint8 *data, CriUint32 dtsize, CriUint32 align, const CriSjConfig *config); -CriSint32 CRIAPI criSjMem_GetRequiredMemorySizeWithConfig(CriUint32 align, const CriSjConfig *config); - -CriSj CRIAPI criSj_CreateUniversal(CriHeap heap, CriSjUniversalMode mode, CriUint32 nchunk); -CriSj CRIAPI criSj_CreateUniversalWithConfig(CriHeap heap, CriSjUniversalMode mode, CriUint32 nchunk, const CriSjConfig *config); -CriSint32 CRIAPI criSjUni_GetRequiredMemorySizeWithConfig(CriSjUniversalMode mode, CriUint32 nchunk, const CriSjConfig *config); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#endif - -/* end of file */ diff --git a/3rdParty/cri/Durango/include/cri_xpt.h b/3rdParty/cri/Durango/include/cri_xpt.h deleted file mode 100644 index 56d5759b..00000000 --- a/3rdParty/cri/Durango/include/cri_xpt.h +++ /dev/null @@ -1,26 +0,0 @@ -/**************************************************************************** - * - * CRI Middleware SDK - * - * Copyright (c) 2004-2009 CRI Middleware Co., Ltd. - * - * Library : CRI Middleware Library - * Module : CRI Common Header for XboxOne - * File : cri_xpt.h - * Date : 2013-03-04 - * Version : 1.16 - * - ****************************************************************************/ -#ifndef CRI_INCL_CRI_XPT_H -#define CRI_INCL_CRI_XPT_H - -#define XPT_TGT_XBOXONE -#define XPT_CCS_LEND -#define XPT_SUPPORT_MULTICHANNEL -#define CRI_TARGET_STR "XboxOne" - -#include "cri_xpts_durango.h" -#include "cri_xpt_post.h" - -#endif /* CRI_INCL_CRI_XPT_H */ -/* End Of File */ diff --git a/3rdParty/cri/Durango/include/cri_xpt_post.h b/3rdParty/cri/Durango/include/cri_xpt_post.h deleted file mode 100644 index de333b7b..00000000 --- a/3rdParty/cri/Durango/include/cri_xpt_post.h +++ /dev/null @@ -1,256 +0,0 @@ -/***************************************************************************** - * - * CRI Middleware SDK - * - * Copyright (c) 1998-2012 CRI Middleware Co., Ltd. - * - * Library : CRI Middleware Library - * Module : CRI Common Header / Post-Process - * File : cri_xpt_post.h - * Date : 2012-05-15 - * Version : 2.07 - * - *****************************************************************************/ -#ifndef CRI_INCL_CRI_XPT_POST_H -#define CRI_INCL_CRI_XPT_POST_H - - -/***************************************************************************** - * }N` - * Macro definition - *****************************************************************************/ - -/* RpC̐ÓIAT[g - * C++ BoostSTATIC_ASSERTƓ̋@\CŎB - * ^ł邱Ƃ؂BȔꍇ̓RpCG[NāAR - * pC~B - * Static Asart when compiling - * This function is equal to STATIC_ASSERT of C++ Boost, and is imprementated - * by C language. If the condition is false, a compiler error is caused and - * it stop compiling. - */ -#define XPT_STATIC_ASSERT(cond) extern int xpt_static_assert_array[(cond)?1:-1] - - -/***************************************************************************** - * RpCIvV̌ - * Compiler option test - *****************************************************************************/ - -/* enum^̌ - * @enum^int^ɐ邱Ƃ؂B - * @K؂ȃG[bZ[W\̂ŁA”\ȂRpCIvVɂ - * @`FbNsBs”\ȏꍇAėpIȐÓIAT[gɂ`FbNB - * Enum type test - * It is verified that the enum type adjusts to the int type. - * To display an appropriate error message, it checks the compiler option - * if possible. General static asart test works if it is impossible. - */ -#if defined(__MWERKS__) /* CodeWarrior */ - //#if !__option(enumsalwaysint) - // #error ERROR cri_xpt_post.h : Compiler option 'Enums Always Int' should be ON. - //#endif -#elif defined(__GNUC__) - //#if Compiler option -fshort-enums is used - // #error ERROR cri_xpt_post.h : Compiler option '-fshort-enums' should not be used. - //#endif -#endif -//typedef enum {XPT_TEST_ENUM_0, XPT_TEST_ENUM_1, XPT_TEST_ENUM_2} XptTestEnum; -//XPT_STATIC_ASSERT(sizeof(XptTestEnum) == sizeof(Uint32)); /* enum should be 4byte. */ - -/***************************************************************************** - * 萔}N - * Macros of constant value - *****************************************************************************/ - -/* NULL |C^^ */ -#if !defined(CRI_NULL) -#ifdef __cplusplus -#define CRI_NULL (0) -#else -#define CRI_NULL ((void *)0) -#endif -#endif - -/* _萔PiUA^j */ -#if !defined(CRI_FALSE) -#define CRI_FALSE (0) -#endif -#if !defined(CRI_TRUE) -#define CRI_TRUE (1) -#endif - -/* _萔QiXCb`j */ -#if !defined(CRI_OFF) -#define CRI_OFF (0) -#endif -#if !defined(CRI_ON) -#define CRI_ON (1) -#endif - -/* ʔ̒萔iAsj */ -#if !defined(CRI_OK) -#define CRI_OK (0) /* */ -#endif -#if !defined(CRI_NG) -#define CRI_NG (-1) /* s */ -#endif - -/***************************************************************************** - * |C^܂64rbgAhXi[ł鐮^ - * l: |C^32bitROMAhX64bit̊‹ŁA҂𓧉ߓIɈB - * The integer type which can hold an pointer or an address up to 64 bits. - * NOTE: In the environment of pointer 32bit and ROM address space 64bit, - * this type can treat both transparently. - *****************************************************************************/ - -#if !defined(_TYPEDEF_CriUint64Adr) -#define _TYPEDEF_CriUint64Adr -typedef CriUint64 CriUint64Adr; /* |C^܂64rbgAhXi[ł鐮^ */ -#endif - -#if !defined(CRI_PTR_TO_UINT64ADR) -#define CRI_PTR_TO_UINT64ADR(ptr) ((CriUint64Adr)(ptr)) /* Convert pointer to CriUint64Adr */ -#endif - -#if !defined(CRI_UINT64ADR_TO_PTR) -#define CRI_UINT64ADR_TO_PTR(uint64adr) ((void *)(CriUintPtr)(uint64adr)) /* Convert CriUint64Adr to pointer */ -#endif - -#if !defined(CRI_XPT_DISABLE_UNPREFIXED_TYPE) - -/***************************************************************************** - * ݊ێ̂߂̒萔}N - * Macros for compatibility with old version - *****************************************************************************/ - -/* NULL |C^^ */ -#if !defined(NULL) -#define NULL (CRI_NULL) -#endif - -/* _萔PiUA^j */ -#if !defined(FALSE) -#define FALSE (CRI_FALSE) -#endif -#if !defined(TRUE) -#define TRUE (CRI_TRUE) -#endif - -/* _萔QiXCb`j */ -#if !defined(OFF) -#define OFF (CRI_OFF) -#endif -#if !defined(ON) -#define ON (CRI_ON) -#endif - -/* ʔ̒萔iAsj */ -#if !defined(OK) -#define OK (CRI_OK) -#endif -#if !defined(NG) -#define NG (CRI_NG) -#endif - -/***************************************************************************** - * ݊ێ̂߂̃f[^^錾 - * Types for compatibility with old version - *****************************************************************************/ - -#if !defined(_TYPEDEF_Uint8) -#define _TYPEDEF_Uint8 -typedef CriUint8 Uint8; /* ȂPoCg */ -#endif - -#if !defined(_TYPEDEF_Sint8) -#define _TYPEDEF_Sint8 -typedef CriSint8 Sint8; /* ‚PoCg */ -#endif - -#if !defined(_TYPEDEF_Uint16) -#define _TYPEDEF_Uint16 -typedef CriUint16 Uint16; /* ȂQoCg */ -#endif - -#if !defined(_TYPEDEF_Sint16) -#define _TYPEDEF_Sint16 -typedef CriSint16 Sint16; /* ‚QoCg */ -#endif - -#if !defined(_TYPEDEF_Uint32) -#define _TYPEDEF_Uint32 -typedef CriUint32 Uint32; /* ȂSoCg */ -#endif - -#if !defined(_TYPEDEF_Sint32) -#define _TYPEDEF_Sint32 -typedef CriSint32 Sint32; /* ‚SoCg */ -#endif - -#if !defined(_TYPEDEF_Uint64) -#define _TYPEDEF_Uint64 -typedef CriUint64 Uint64; /* ȂWoCg */ -#endif - -#if !defined(_TYPEDEF_Sint64) -#define _TYPEDEF_Sint64 -typedef CriSint64 Sint64; /* ‚WoCg */ -#endif - -#if !defined(_TYPEDEF_Uint128) -#define _TYPEDEF_Uint128 -typedef CriUint128 Uint128; /* Ȃ16oCg */ -#endif - -#if !defined(_TYPEDEF_Sint128) -#define _TYPEDEF_Sint128 -typedef CriSint128 Sint128; /* ‚16oCg */ -#endif - -#if !defined(_TYPEDEF_Float16) -#define _TYPEDEF_Float16 -typedef CriFloat16 Float16; /* QoCg */ -#endif - -#if !defined(_TYPEDEF_Float32) -#define _TYPEDEF_Float32 -typedef CriFloat32 Float32; /* SoCg */ -#endif - -#if !defined(_TYPEDEF_Float64) -#define _TYPEDEF_Float64 -typedef CriFloat64 Float64; /* WoCg */ -#endif - -#if !defined(_TYPEDEF_Fixed32) -#define _TYPEDEF_Fixed32 -typedef CriFixed32 Fixed32; /* Œ菬_32rbg */ -#endif - -/* X11 APIixtrapproto.hjƂ̋p */ -#if !defined(_TYPEDEF_Bool) && !defined(Bool) -#define _TYPEDEF_Bool -typedef CriBool Bool; /* _^i_萔lɂƂj */ -#endif - -#if !defined(_TYPEDEF_Char8) -#define _TYPEDEF_Char8 -typedef CriChar8 Char8; /* ^ */ -#endif - -#if !defined(_TYPEDEF_SintPtr) -#define _TYPEDEF_SintPtr -typedef CriSintPtr SintPtr; -#endif - -#if !defined(_TYPEDEF_UintPtr) -#define _TYPEDEF_UintPtr -typedef CriUintPtr UintPtr; -#endif - -#endif /* CRI_XPT_DISABLE_UNPREFIXED_TYPE */ - -#endif /* CRI_INCL_CRI_XPT_POST_H */ - -/* end of file */ diff --git a/3rdParty/cri/Durango/include/cri_xpts_durango.h b/3rdParty/cri/Durango/include/cri_xpts_durango.h deleted file mode 100644 index f2e676ab..00000000 --- a/3rdParty/cri/Durango/include/cri_xpts_durango.h +++ /dev/null @@ -1,132 +0,0 @@ -/**************************************************************************** - * - * CRI Middleware SDK - * - * Copyright (c) 1998-2011 CRI Middleware Co., Ltd. - * - * Library : CRI Middleware Library - * Module : CRI Common Header for XboxOne - * File : cri_xpts_xboxone.h - * Date : 2013-03-04 - * Version : 2.05 - * - ****************************************************************************/ - -#ifndef CRI_INCL_CRI_XPTS_H -#define CRI_INCL_CRI_XPTS_H - -/***************************************************************************** - * 基本データ型宣言 - *****************************************************************************/ - -#if !defined(_TYPEDEF_CriUint8) -#define _TYPEDEF_CriUint8 -typedef unsigned __int8 CriUint8; /* 符号なし1バイト整数 */ -#endif - -#if !defined(_TYPEDEF_CriSint8) -#define _TYPEDEF_CriSint8 -typedef signed __int8 CriSint8; /* 符号つき1バイト整数 */ -#endif - -#if !defined(_TYPEDEF_CriUint16) -#define _TYPEDEF_CriUint16 -typedef unsigned __int16 CriUint16; /* 符号なし2バイト整数 */ -#endif - -#if !defined(_TYPEDEF_CriSint16) -#define _TYPEDEF_CriSint16 -typedef signed __int16 CriSint16; /* 符号つき2バイト整数 */ -#endif - -#if !defined(_TYPEDEF_CriUint32) -#define _TYPEDEF_CriUint32 -typedef unsigned __int32 CriUint32; /* 符号なし4バイト整数 */ -#endif - -#if !defined(_TYPEDEF_CriSint32) -#define _TYPEDEF_CriSint32 -typedef signed __int32 CriSint32; /* 符号つき4バイト整数 */ -#endif - -#if !defined(_TYPEDEF_CriUint64) -#define _TYPEDEF_CriUint64 -typedef unsigned __int64 CriUint64; /* 符号なし8バイト整数 */ -#endif - -#if !defined(_TYPEDEF_CriSint64) -#define _TYPEDEF_CriSint64 -typedef signed __int64 CriSint64; /* 符号つき8バイト整数 */ -#endif - -#if !defined(_TYPEDEF_CriUint128) -#define _TYPEDEF_CriUint128 -typedef struct { /* 符号なし16バイト整数 */ - CriUint64 h; /* 上位64ビット */ - CriUint64 l; /* 下位64ビット */ -} CriUint128; -#endif - -#if !defined(_TYPEDEF_CriSint128) -#define _TYPEDEF_CriSint128 -typedef struct { /* 符号つき16バイト整数 */ - CriSint64 h; /* 上位64ビット */ - CriUint64 l; /* 下位64ビット */ -} CriSint128; -#endif - -#if !defined(_TYPEDEF_CriFloat16) -#define _TYPEDEF_CriFloat16 -typedef signed __int16 CriFloat16; /* 2バイト実数 */ -#endif - -#if !defined(_TYPEDEF_CriFloat32) -#define _TYPEDEF_CriFloat32 -typedef float CriFloat32; /* 4バイト実数 */ -#endif - -#if !defined(_TYPEDEF_CriFloat64) -#define _TYPEDEF_CriFloat64 -typedef double CriFloat64; /* 8バイト実数 */ -#endif - -#if !defined(_TYPEDEF_CriFixed32) -#define _TYPEDEF_CriFixed32 -typedef signed __int32 CriFixed32; /* 固定小数点32ビット */ -#endif - -#if !defined(_TYPEDEF_CriBool) -#define _TYPEDEF_CriBool -typedef CriSint32 CriBool; /* 論理型(論理定数を値にとる) */ -#endif - -#if !defined(_TYPEDEF_CriChar8) -#define _TYPEDEF_CriChar8 -typedef char CriChar8; /* 文字型 */ -#endif - -/***************************************************************************** - * ポインタを格納可能な整数型 - *****************************************************************************/ - -#if !defined(_TYPEDEF_CriSintPtr) -#define _TYPEDEF_CriSintPtr -typedef signed __int64 CriSintPtr; -#endif - -#if !defined(_TYPEDEF_CriUintPtr) -#define _TYPEDEF_CriUintPtr -typedef unsigned __int64 CriUintPtr; -#endif - -/***************************************************************************** - * 呼び出し規約 - *****************************************************************************/ - -#if !defined(CRIAPI) -#define CRIAPI __cdecl -#endif - -#endif /* CRI_INCL_CRI_XPTS_H */ - -/* end of file */ diff --git a/3rdParty/cri/PS4/include/cri_allocator.h b/3rdParty/cri/PS4/include/cri_allocator.h deleted file mode 100644 index e3c18997..00000000 --- a/3rdParty/cri/PS4/include/cri_allocator.h +++ /dev/null @@ -1,63 +0,0 @@ -#ifndef _CRI_ALLOCATOR_H_INCLUDED -#define _CRI_ALLOCATOR_H_INCLUDED -/**************************************************************************** - * * - * CRI Allocator * - * * - * 2006-01-05 written by M.Oshimi * - * * - ****************************************************************************/ - -/**************************************************************************** - * Include file - ****************************************************************************/ -#include -#include "cri_xpt.h" -#include "cri_heap.h" - -/**************************************************************************** - * Macro Constants - ****************************************************************************/ -#if defined(XPT_UNSUPPORT_CPLUSPLUS_THROW) -#define CRI_ALLOCATOR_CPLUSPLUS_THROW -#else -#define CRI_ALLOCATOR_CPLUSPLUS_THROW throw() -#endif - -/**************************************************************************** - * Class Declaration - ****************************************************************************/ -#ifdef __cplusplus - -class CriAllocator -{ -public: - static const CriSint32 DEFAULT_ALIGNMENT = CRIHEAP_DEFAULT_MEM_ALIGN; - - - static void* CRIAPI operator new(size_t size, CriHeap heap) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void* CRIAPI operator new(size_t size, CriHeap heap, CriHeapType heap_type) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void* CRIAPI operator new(size_t size, CriHeap heap, const CriChar8 *name, CriUint32 align=DEFAULT_ALIGNMENT) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void* CRIAPI operator new(size_t size, CriHeap heap, CriHeapType heap_type, const CriChar8 *name, CriUint32 align=DEFAULT_ALIGNMENT) CRI_ALLOCATOR_CPLUSPLUS_THROW; - - static void CRIAPI operator delete(void *p, size_t size); - - static void* CRIAPI operator new(size_t size, void *work, CriSint32 wksize) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void CRIAPI operator delete(void *p, void *work, CriSint32 wksize) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void* CRIAPI operator new(size_t size, void *work, CriSint32 wksize, CriUint32 align) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void CRIAPI operator delete(void *p, void *work, CriSint32 wksize, CriUint32 align) CRI_ALLOCATOR_CPLUSPLUS_THROW; - -#if !defined(XPT_TGT_BCB) - static void CRIAPI operator delete(void *p, CriHeap heap) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void CRIAPI operator delete(void *p, CriHeap heap, CriHeapType heap_type) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void CRIAPI operator delete(void *p, CriHeap heap, const CriChar8 *name, CriUint32 align) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void CRIAPI operator delete(void *p, CriHeap heap, CriHeapType heap_type, const CriChar8 *name, CriUint32 align) CRI_ALLOCATOR_CPLUSPLUS_THROW; -#endif - - static CriSint32 GetWorstExtraSize(CriUint32 align); -}; -#endif // _CRI_ALLOCATOR_H_INCLUDED - -#endif /* end of __cplusplus */ - -/* --- end of file --- */ diff --git a/3rdParty/cri/PS4/include/cri_error.h b/3rdParty/cri/PS4/include/cri_error.h deleted file mode 100644 index 6fdd5f43..00000000 --- a/3rdParty/cri/PS4/include/cri_error.h +++ /dev/null @@ -1,368 +0,0 @@ -#ifndef _CRI_ERROR_H_INCLUDED -#define _CRI_ERROR_H_INCLUDED -/**************************************************************************** - * - * CRI Middleware SDK - * - * Copyright (c) 2006-2009 CRI Middleware Co., Ltd. - * - * Library : CRI Error - * Module : - * File : cri_error.h - * - ****************************************************************************/ -/*! - * \file cri_error.h - */ -/*JP - * \addtogroup CRI_ERROR エラーハンドリング用関数群 - * @{ - */ -/*EN - * \addtogroup CRI_ERROR Functions for error handling - * @{ - */ - -/**************************************************************************** - * Include file * - ****************************************************************************/ -#include "cri_xpt.h" - -/**************************************************************************** - * MACRO CONSTANT * - ****************************************************************************/ - -/* バージョン番号 */ -/* Version number */ -#define CRIERROR_VER_NAME "CRI Error" -#define CRIERROR_VER_NUM "1.04.00" -#define CRIERROR_VER_OPTION - -/*JP - * \brief エラーコード - */ -/*EN - * \brief Error codes - */ -typedef enum { - CRIERR_OK = 0, /*JP< 正常終了 */ - /*EN< Succeeded */ - CRIERR_NG = -1, /*JP< エラーが発生 */ - /*EN< Error occurred */ - CRIERR_INVALID_PARAMETER = -2, /*JP< 引数が不正 */ - /*EN< Invalid argument */ - CRIERR_FAILED_TO_ALLOCATE_MEMORY = -3, /*JP< メモリの確保に失敗 */ - /*EN< Failed to allocate memory */ - CRIERR_UNSAFE_FUNCTION_CALL = -4, /*JP< 非スレッドセーフ関数の並列実行 */ - /*EN< Parallel execution of thread-unsafe function */ - CRIERR_FUNCTION_NOT_IMPLEMENTED = -5, /*JP< 未実装関数の実行 */ - /*EN< Function not implemented */ - CRIERR_LIBRARY_NOT_INITIALIZED = -6, /*JP< ライブラリが未初期化 */ - /*EN< Library not initialized */ - /* enum be 4bytes */ - CRIERR_ENUM_BE_SINT32 = 0x7FFFFFFF -} CriError; - -/*JP - * \brief エラー通知レベル - */ -/*EN - * \brief Error notification level - */ -typedef enum { - CRIERR_NOTIFY_ALL = 0, /*JP< 全てのエラーを通知 */ - /*EN< Notify all errors */ - CRIERR_NOTIFY_FATAL = 1, /*JP< エラーのみ通知(警告は無視) */ - /*EN< Notify error (Disregards warning) */ - /* enum be 4bytes */ - CRIERR_NOTIFY_ENUM_BE_SINT32 = 0x7FFFFFFF -} CriErrorNotificationLevel; - -/* エラーレベル */ -/* Error level */ -typedef enum { - CRIERR_LEVEL_ERROR = 0, - CRIERR_LEVEL_WARNING = 1, - /* enum be 4bytes */ - CRIERR_LEVEL_ENUM_BE_SINT32 = 0x7FFFFFFF -} CriErrorLevel; - -/**************************************************************************** - * PROCESS MACRO * - ****************************************************************************/ - -#if defined(CRIERROR_SIMPLIFY) - /* エラーの通知 */ - /* Notification of Error */ - #define criErr_NotifyError(id, msg) criErr_NotifyErrorSimple() - #define criErr_NotifyError1(id, msg, p1) criErr_NotifyErrorSimple() - #define criErr_NotifyError2(id, msg, p1, p2) criErr_NotifyErrorSimple() - #define criErr_NotifyErrorPrmArray(id, msg, p1, p2, pa) criErr_NotifyErrorSimple() - #define criErr_NotifyErrorGeneric(_error_id, _error_no) criErr_NotifyErrorSimple() - /* 警告の通知 */ - /* Notification of Warning */ - #define criErr_NotifyWarning(id, msg) criErr_NotifyWarningSimple() - #define criErr_NotifyWarning1(id, msg, p1) criErr_NotifyWarningSimple() - #define criErr_NotifyWarning2(id, msg, p1, p2) criErr_NotifyWarningSimple() - #define criErr_NotifyWarningPrmArray(id, msg, p1, p2, pa) criErr_NotifyWarningSimple() - #define criErr_NotifyWarningGeneric(_error_id, _error_no) criErr_NotifyWarningSimple() -#else - /* エラーの通知 */ - /* Notification of Error */ - #define criErr_NotifyError(id, msg) criErr_Notify(CRIERR_LEVEL_ERROR, id ":" msg) - #define criErr_NotifyError1(id, msg, p1) criErr_Notify1(CRIERR_LEVEL_ERROR, (id ":" msg), (CriUintPtr)(p1)) - #define criErr_NotifyError2(id, msg, p1, p2) criErr_Notify2(CRIERR_LEVEL_ERROR, (id ":" msg), (CriUintPtr)(p1), (CriUintPtr)(p2)) - #define criErr_NotifyErrorPrmArray(id, msg, p1, p2, pa) criErr_NotifyPrmArray(CRIERR_LEVEL_ERROR, (id ":" msg), (CriUintPtr)(p1), (CriUintPtr)(p2), (CriUintPtr *)(pa)) - #define criErr_NotifyErrorGeneric(_error_id, _error_no) criErr_NotifyGeneric(CRIERR_LEVEL_ERROR, _error_id, _error_no) - /* 警告の通知 */ - /* Notification of Warning */ - #define criErr_NotifyWarning(id, msg) criErr_Notify(CRIERR_LEVEL_WARNING, id ":" msg) - #define criErr_NotifyWarning1(id, msg, p1) criErr_Notify1(CRIERR_LEVEL_WARNING, (id ":" msg), (CriUintPtr)(p1)) - #define criErr_NotifyWarning2(id, msg, p1, p2) criErr_Notify2(CRIERR_LEVEL_WARNING, (id ":" msg), (CriUintPtr)(p1), (CriUintPtr)(p2)) - #define criErr_NotifyWarningPrmArray(id, msg, p1, p2, pa) criErr_NotifyPrmArray(CRIERR_LEVEL_WARNING, (id ":" msg), (CriUintPtr)(p1), (CriUintPtr)(p2), (CriUintPtr *)(pa)) - #define criErr_NotifyWarningGeneric(_error_id, _error_no) criErr_NotifyGeneric(CRIERR_LEVEL_WARNING, _error_id, _error_no) -#endif - -/**************************************************************************** - * Data type declaration * - ****************************************************************************/ - -/* Error Callback Function type */ -typedef void (CRIAPI *CriErrCbFunc)(const CriChar8 *errid, CriUint32 p1, CriUint32 p2, CriUint32 *parray); - -/**************************************************************************** - * 変数の宣言 * - * Variable Declaration * - ****************************************************************************/ -/* エラー出力省略用変数 */ -/* default argument of CriError */ -#ifdef __cplusplus -namespace criErr { - extern CriError ErrorContainer; -} -#endif /* __cplusplus */ - -/**************************************************************************** - * 関数の宣言 * - * Function Declaration * - ****************************************************************************/ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/*JP - * \brief エラーID文字列からエラーメッセージへ変換 - * \ingroup CRI_ERROR - * \param[in] errid エラーID文字列 - * \return エラーメッセージ - * \par 説明: - * エラーID文字列から詳細なエラーメッセージへ変換します。
- * \attention - * この関数は旧仕様の関数です。
- * 代わりに ::criErr_ConvertIdToMessage 関数を使用してください。 - * \sa criErr_ConvertIdToMessage - */ -/*EN - * \brief Convert error ID to error message - * \ingroup CRI_ERROR - * \param[in] errid error ID - * \return error message - * \par Explanation: - * This function converts error ID to detailed error message.
- * \attention - * This function is an obsolete one.
- * Please use the ::criErr_ConvertIdToMessage function instead. - * \sa criErr_ConvertIdToMessage - */ -const CriChar8* CRIAPI criErr_ConvertIdToMsg(const CriChar8 *errid); - -/*JP - * \brief エラーID文字列からエラーメッセージへ変換 - * \ingroup CRI_ERROR - * \param[in] errid エラーID文字列 - * \param[in] p1 補足情報1 - * \param[in] p2 補足情報2 - * \return エラーメッセージ - * \par 説明: - * エラーID文字列から詳細なエラーメッセージへ変換します。
- * \par 用例: - * \code - * void user_error_callback_func(const CriChar8 *errid, CriUint32 p1, CriUint32 p2, CriUint32 *parray); - * { - * const CriChar8 *errmsg; - * errmsg = criErr_ConvertIdToMessage(errid, p1, p2); - * printf("%s\n", errmsg); - * } - * \endcode - */ -/*EN - * \brief Convert error ID to error message - * \ingroup CRI_ERROR - * \param[in] errid error ID - * \param[in] p1 supplementary information 1 - * \param[in] p2 supplementary information 2 - * \return error message - * \par Explanation: - * This function converts error ID to detailed error message.
- * \par Example: - * \code - * void user_error_callback_func(const CriChar8 *errid, CriUint32 p1, CriUint32 p2, CriUint32 *parray); - * { - * const CriChar8 *errmsg; - * errmsg = criErr_ConvertIdToMessage(errid, p1, p2); - * printf("%s\n", errmsg); - * } - * \endcode - */ -const CriChar8* CRIAPI criErr_ConvertIdToMessage(const CriChar8 *errid, CriUint32 p1, CriUint32 p2); - -/*JP - * \brief エラーコールバック関数の登録 - * \ingroup CRI_ERROR - * \param[in] cbf エラーコールバック関数 - * \return なし - * \par 説明: - * エラーコールバック関数を登録します。
- * 登録された関数は、CRIミドルウエアライブラリ内でエラーが発生したときに呼び出されます。
- * 同時に登録できるエラーコールバック関数は1つです。
- * 登録後に再度本関数を呼び出した場合は現在の登録を上書きします。 - * \par 用例: - * \code - * void user_error_callback_func(const CriChar8 *errid, CriUint32 p1, CriUint32 p2, CriUint32 *parray); - * { - * const CriChar8 *errmsg; - * errmsg = criErr_ConvertIdToMessage(errid, p1, p2); - * printf("%s\n", errmsg); - * } - * - * void main(int ac, char *av[]) - * { - * : - * // エラーコールバックの登録 - * criErr_SetCallback(user_error_callback_func); - * : - * } - * \endcode - */ -/*EN - * \brief Register error callback function - * \ingroup CRI_ERROR - * \param[in] cbf error callback function - * \return NONE - * \par Explanation: - * This function registers an error callback function.
- * The registered function is called if an error occurs within the CRI middleware library. - * \par Example: - * \code - * void user_error_callback_func(const CriChar8 *errid, CriUint32 p1, CriUint32 p2, CriUint32 *parray); - * { - * const CriChar8 *errmsg; - * errmsg = criErr_ConvertIdToMessage(errid, p1, p2); - * printf("%s\n", errmsg); - * } - * - * void main(int ac, char *av[]) - * { - * : - * // Registers the error callback function - * criErr_SetCallback(user_error_callback_func); - * : - * } - * \endcode - */ -void CRIAPI criErr_SetCallback(CriErrCbFunc cbf); - -/*JP - * \brief エラー通知レベルの変更 - * \ingroup CRI_ERROR - * \param[in] level エラー通知レベル - * \return なし - * \par 説明: - * エラーコールバックに通知するエラーのレベルを変更します。 - */ -/*EN - * \brief Change error notification level - * \ingroup CRI_ERROR - * \param[in] level error notification level - * \return NONE - * \par Explanation: - * This function changes the level of error information that is notified to the error callback. - */ -void CRIAPI criErr_SetErrorNotificationLevel(CriErrorNotificationLevel level); - -/*JP - * \brief エラー発生回数の取得 - * \ingroup CRI_ERROR - * \param[in] level エラーレベル - * \return エラー発生回数 - * \par 説明: - * エラー発生回数を取得します。 - */ -/*EN - * \brief Retrieve error count - * \ingroup CRI_ERROR - * \param[in] level error level - * \return number of errors occured - * \par Explanation: - * This function retrieves the number of errors occured. - */ -CriUint32 CRIAPI criErr_GetErrorCount(CriErrorLevel level); - -/*JP - * \brief エラー発生回数のリセット - * \ingroup CRI_ERROR - * \param[in] level エラーレベル - * \return なし - * \par 説明: - * エラー発生回数のカウンタを0に戻します。 - */ -/*EN - * \brief Resets error count - * \ingroup CRI_ERROR - * \param[in] level error level - * \return NONE - * \par Explanation: - * This function resets the counter for number of errors occured. - */ -void CRIAPI criErr_ResetErrorCount(CriErrorLevel level); - -/* エラーコールバックを発生させる (内部関数) */ -/* Error notification (Internal functions) */ -void CRIAPI criErr_Notify(CriErrorLevel level, const CriChar8 *errid); -void CRIAPI criErr_Notify1(CriErrorLevel level, const CriChar8 *errid, CriUintPtr p1); -void CRIAPI criErr_Notify2(CriErrorLevel level, const CriChar8 *errid, CriUintPtr p1, CriUintPtr p2); -void CRIAPI criErr_NotifyPrmArray(CriErrorLevel level, const CriChar8 *errid, CriUintPtr p1, CriUintPtr p2, CriUintPtr *pa); -void CRIAPI criErr_NotifyGeneric(CriErrorLevel level, const CriChar8 *error_id, CriError error_no); -void CRIAPI criErr_NotifyErrorSimple(void); -void CRIAPI criErr_NotifyWarningSimple(void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -/*************************************************************************** - * 旧バージョンとの互換用 - * For compatibility with old versions - ***************************************************************************/ -#define criErr_Invoke(errid) criErr_Notify(CRIERR_LEVEL_ERROR, errid) -#define criErr_Invoke1(errid, p1) criErr_Notify1(CRIERR_LEVEL_ERROR, errid, p1) -#define criErr_Invoke2(errid, p1, p2) criErr_Notify2(CRIERR_LEVEL_ERROR, errid, p1, p2) -#define criErr_InvokePrmArray(errid, p1, p2, pa) criErr_NotifyPrmArray(CRIERR_LEVEL_ERROR, errid, p1, p2, pa) -#define criErr_InvokeGeneric(error_id, error_no) criErr_NotifyGeneric(CRIERR_LEVEL_ERROR, error_id, error_no) -#define criErr_Occur(id, msg) criErr_Notify(CRIERR_LEVEL_ERROR, id ":" msg) -#define criErr_Occur1(id, msg, p1) criErr_Notify1(CRIERR_LEVEL_ERROR, (id ":" msg), (CriUintPtr)(p1)) -#define criErr_Occur2(id, msg, p1, p2) criErr_Notify2(CRIERR_LEVEL_ERROR, (id ":" msg), (CriUintPtr)(p1), (CriUintPtr)(p2)) -#define criErr_OccurPrmArray(id, msg, p1, p2, pa) criErr_NotifyPrmArray(CRIERR_LEVEL_ERROR, (id ":" msg), (CriUintPtr)(p1), (CriUintPtr)(p2), (CriUintPtr*)(pa)) -#define criErr_OccurGeneric(_error_id, _error_no) criErr_NotifyGeneric(CRIERR_LEVEL_ERROR, _error_id, _error_no) - -/*EN - * @} - */ -/*JP - * @} - */ - -#endif // _CRI_ERROR_H_INCLUDED - -/* --- end of file --- */ diff --git a/3rdParty/cri/PS4/include/cri_heap.h b/3rdParty/cri/PS4/include/cri_heap.h deleted file mode 100644 index 49e85012..00000000 --- a/3rdParty/cri/PS4/include/cri_heap.h +++ /dev/null @@ -1,640 +0,0 @@ -#ifndef _CRI_HEAP_H_INCLUDED -#define _CRI_HEAP_H_INCLUDED -/**************************************************************************** - * * - * CRI Heap Manager "CriHeap" Library * - * * - * 2005-03-17 written by satouo * - * * - ****************************************************************************/ -/*! - * \file cri_heap.h - */ - -/**************************************************************************** - * インクルードファイル * - * Include file * - ****************************************************************************/ -#include "cri_xpt.h" - -#ifdef XPT_TGT_PC -#pragma pack(push) -#pragma pack(1) //The boundary value of structure is adjusted to 1 byte. -#endif - -/**************************************************************************** - * 定数マクロ * - * MACRO CONSTANT * - ****************************************************************************/ -/* Version number of CRIHEAP */ -#define CRIHEAP_NAME_STRINGS "CRI Heap" -#define CRIHEAP_VERSION_STRINGS "1.21.02" - -/* Default memory alignment */ -#define CRIHEAP_DEFAULT_MEM_ALIGN (8) - -/**************************************************************************** - * 列挙定数マクロ * - * ENUM CONSTANT * - ****************************************************************************/ -/*JP - * \brief メモリのタイプ - */ -/*EN - * \brief Types of heap - */ -typedef enum { - CRIHEAP_TYPE_FIX = (1), - CRIHEAP_TYPE_TEMPORARY = (2), - CRIHEAP_TYPE_DYNAMIC = (3), // unuse - CRIHEAP_TYPE_NONE = (0), - /* enum be 4bytes */ - CRIHEAP_TYPE_ENUM_BE_SINT32 = 0x7FFFFFFF -} CriHeapType; - -/**************************************************************************** - * データ型 * - * Data type declaration * - ****************************************************************************/ -/* CriHeapハンドル */ -/* CriHeap handle */ -#ifndef CRIHEAP_DEFINED -#define CRIHEAP_DEFINED - -/* internal */ -typedef struct CriHeapBlockTag { - struct CriHeapBlockTag *prevblock; - struct CriHeapBlockTag *nextblock; - CriSint32 memsize; - CriUint8 used; - CriUint8 type; - CriUint16 alignspc; - CriUint16 gap; - CriChar8 *nameadr; -} CriHeapBlock, *CriHeapBlockPtr; - -/*JP - * \brief CRI Heapハンドル - * \struct CriHeap - * \ingroup CRIHEAP_BASIC - * CRI Heapを用いてメモリアロケートを行うために必要なハンドルです。
- * このハンドルに対して、メモリアロケートやメモリフリーを行います。 - * \sa criHeap_Create(), criHeap_Destroy() - */ -/*EN - * \brief CRI Heap handle - * \struct CriHeap - * \ingroup CRIHEAP_BASIC - * \par Description: - * The heap handle. This data structure needs to exist through the life cycle of - * the heap. It allows the library to allocate and deallocate memory - * internally within the heap. Typically this handle gets allocated at the - * beginning of the heap memory that you've provided for the heap, but don't - * depend on this behavior. The heap itself is opaque. You can of course - * allocate multiple non-contiguous heaps, but these will be separate heap - * structures and a single allocation won't choose between them. - * - * \sa criHeap_Create(), criHeap_Destroy() - */ -typedef struct _criheap_struct { - struct _criheap_vfunctiontable *vtbl; - CriSint32 totalsize; - CriSint32 peaksize; - CriSint32 currentsize; - CriHeapBlock *topblock; - CriHeapBlock *taleblock; -} CriHeapObj, *CriHeap; - -/*JP - * \brief CRI Heap仮想関数テーブル - * \struct criHeapVirtualFunctionTable - * \ingroup CRIHEAP_BASIC - * 独自のメモリアロケート関数を実装する際に使用する仮想関数テーブル構造体です。
- * 各関数はマルチスレッドセーフである必要があります。
- * \par 備考: - * 3番目のアロケート関数は現在未使用です。 - */ -/*EN - * \brief CRI Heap Virtual Function Table - * \struct criHeapVirtualFunctionTable - * \ingroup CRIHEAP_BASIC - * \par Description: - * The virtual functions table for original allocation functions.
- * The third allocation function is not in use currently. - */ -typedef struct _criheap_vfunctiontable { - /*JP - * \brief メモリのアロケート(メモリ領域の先端から) - * \par 説明: - * criHeap_AllocFix関数呼び出し時に呼ばれます。 - * \sa criHeap_AllocFix() - */ - /*EN - * \brief Memory allocation (allocating from the top of the memory area) - * \par Description: - * Called from criHeap_AllocFix(). - * \sa criHeap_AllocFix() - */ - void *(*AllocFix)(CriHeap heap, CriSint32 size, const CriChar8 *name, CriSint32 align); - /*JP - * \brief メモリのアロケート(メモリ領域の終端から) - * \par 説明: - * criHeap_AllocFix関数呼び出し時に呼ばれます。 - * \sa criHeap_AllocTemporary() - */ - /*EN - * \brief Memory allocation (allocating from the tail of the memory area) - * \par Description: - * Called from criHeap_AllocTemporary(). - * \sa criHeap_AllocTemporary() - */ - void *(*AllocTemporary)(CriHeap heap, CriSint32 size, const CriChar8 *name, CriSint32 align); - /*JP - * \brief 未使用関数 - */ - /*EN - * \brief Unused - */ - void *(*AllocDynamic)(CriHeap heap, CriSint32 size, const CriChar8 *name, CriSint32 align); // unused - - /*JP - * \brief メモリのフリー - * \par 説明: - * criHeap_Free関数呼び出し時に呼ばれます。 - * \sa criHeap_Free() - */ - /*EN - * \brief Memory deallocation - * \par Description: - * Called from criHeap_Free(). - * \sa criHeap_Free() - */ - CriSint32 (*Free)(CriHeap heap, void *ptr); -} criHeapVirtualFunctionTable; - -#endif - - -/**************************************************************************** - * 関数の宣言 - * Function Declaration - ****************************************************************************/ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/*==========================================================================* - * ライブラリの初期化と終了処理 - * Initialize and Finalize of Library - *==========================================================================*/ -/*JP - * \brief CRI Heapライブラリの初期化 - * \ingroup CRIHEAP_BASIC - * \par 説明: - * CRI Heapライブラリを使用するために必要な初期化関数です。
- * CRI Heapを使用する際はあらかじめ本関数をコールする必要があります。 - * \sa criHeap_Finalize() - */ -/*EN - * \brief Initialize the heap manager. - * \ingroup CRIHEAP_BASIC - * \par Description: - * This function initializes the heap manager and prepares it to manage heaps. - * This function only has an effect the first time it is called in your program. - * Subsequent calls only increment an internal counter. This allows your - * program to call criHeap_Initialize() in pairs with criHeap_Finalize() - * throughout your program modules, and only the initial call to criHeap_Initialize() - * and the final call to criHeap_Finalize() will have any effect. - * \if ps2 - * \par PS2 only: - * This function does a sanity check to make sure that the size of the CriHeapObj - * data structure is a factor of 16. If it is not a factor of 16, this function - * hangs. - * \endif - * \sa criHeap_Finalize() - */ -void CRIAPI criHeap_Initialize(void); - -/*JP - * \brief CRI Heapライブラリの終了 - * \ingroup CRIHEAP_BASIC - * \par 説明: - * CRI Heapライブラリを終了するために必要な終了関数です。
- * CRI Heapの使用を終了する際は本関数をコールしてください。 - * \sa criHeap_Initialize() - */ -/*EN - * \brief Finalize the heap manager. - * \ingroup CRIHEAP_BASIC - * \par Description: - * This function finalizes the heap manager. If the criHeap_Initialize() function - * is called n times, then the nth time that criHeap_Finalize() - * is called, this function invalidates any heaps currently in use. Calling - * any heap function after the nth call to criHeap_Finalize() will - * have unpredictable results. - * \sa criHeap_Initialize() - */ -void CRIAPI criHeap_Finalize(void); - -/*==========================================================================* - * ハンドルの生成・解放 - *==========================================================================*/ -/*JP - * \brief CRI Heapハンドルの生成 - * \ingroup CRIHEAP_BASIC - * \param ptr メモリ領域のポインタ。 - * \param size メモリ領域のサイズ。 - * \return CRI Heapハンドル。
生成に失敗した場合は、NULLが返ります。 - * \par 説明: - * CRI Heapハンドルを生成します。
- * 本関数で与えるメモリ領域は、CRI Heap自身のハンドル領域やアロケート時に - * 確保されるメモリ領域となります。
- * 管理領域を含むため、メモリ領域すべてがアロケート出来ない点に注意してください。 - * 管理領域の目安は「1ハンドルあたりsizeof(CriHeapObj)」+「1アロケートあたり - * sizeof(CriHeapBlock)+各メモリアライメントに必要なサイズ」となります。 - * \code - * CriChar8 heap_buffer[0x2000]; - * CriHeap heap = criHeap_Create((void *)heap_buffer, sizeof(heap_buffer); - * \endcode - * \sa criHeap_Destroy() - */ -/*EN - * \brief Create a contiguous heap in memory. - * \ingroup CRIHEAP_BASIC - * \param ptr A pointer to the start of the memory region to use as a heap. - * \param size The size of the region to be used as a heap. - * \return A valid CriHeap handle if successful, or NULL if unsuccessful. - * \par Description: - * This function allows you to set aside a region of memory for this library's - * use as a "heap". Heap allocation is required before active playback - * can begin. - * This function will fail and return NULL if the size of the memory region - * is smaller than the CriHeapObj structure. - * \code - * CriChar8 heap_buffer[0x2000]; - * CriHeap heap = criHeap_Create((void *)heap_buffer, sizeof(heap_buffer); - * \endcode - * \sa criHeap_Destroy() - */ -CriHeap CRIAPI criHeap_Create(void *ptr, CriSint32 size); - -/*JP - * \brief 非スレッドセーフなCRI Heapハンドルの生成 - * \ingroup CRIHEAP_BASIC - * \param ptr メモリ領域のポインタ。 - * \param size メモリ領域のサイズ。 - * \return CRI Heapハンドル。
生成に失敗した場合は、NULLが返ります。 - * \par 説明: - * CRI Heapハンドルを生成します。
- * 本関数を使用して作成されたヒープは、排他制御が行なわれません。
- * 複数スレッドから同時に参照されるヒープの作成には、criHeap_Create関数をご利用ください。 - * \sa criHeap_Create(), criHeap_Destroy() - */ -/*EN - * \brief Create a contiguous heap in memory. - * \ingroup CRIHEAP_BASIC - * \param ptr A pointer to the start of the memory region to use as a heap. - * \param size The size of the region to be used as a heap. - * \return A valid CriHeap handle if successful, or NULL if unsuccessful. - * \par Description: - * This function creates a heap to use the static memory as dynamically allocatable memory. - * The heap created by using this function is not threadsafe. - * If heap will be accessed by multiple threads, you must create the heap by using the criHeap_Create function. - * \sa criHeap_Create(), criHeap_Destroy() - */ -CriHeap CRIAPI criHeap_CreateNoSerialize(void *ptr, CriSint32 size); - -/*JP - * \brief CRI Heapハンドルの解放 - * \ingroup CRIHEAP_BASIC - * \param heap CRI Heapハンドル。 - * \par 説明: - * CRI Heapハンドルを解放します。
criHeap_Create() で指定されたメモリ領域が - * 解放され、CRI Heapハンドルは無効となります。 - * \sa criHeap_Create() - */ -/*EN - * \brief Destroy a previously created heap. - * \ingroup CRIHEAP_BASIC - * \param heap A CriHeap handle previously created with criHeap_Create(). - * \par Description: - * This function frees all internal allocations previously performed on - * the heap and frees the memory. Internally, this function does in - * fact walk through the heap, finding and freeing all allocations, e.g. - * it is not stubbed. So calling this function on a trashed heap - * will have unpredictable results. - * \sa criHeap_Create() - */ -void CRIAPI criHeap_Destroy(CriHeap heap); - -/*==========================================================================* - * Allocation - *==========================================================================*/ -/*JP - * \brief メモリのアロケート(メモリ領域の先端から) - * \ingroup CRIHEAP_ALLOC - * \param heap CRI Heapハンドル。 - * \param size アロケートするメモリのサイズ。 - * \param name アロケートするメモリの名前。名前はデバッグ時に使用されます。 - * \param align アロケートするメモリのアライメント。 - * \return アロケートしたメモリへのポインタ。
アロケートに失敗した場合はNULLが返ります。 - * \par 説明: - * メモリ領域の先端側から確保するメモリアロケーション関数です。ヒープ領域内に\ref block_fix "Fixブロック"を作成します。
- * メモリの断片化を防ぐため、同じサイズ/アライメントの解放済み\ref block_fix "Fixブロック"を先端側から探して、再利用するように試みます。それが見つからない場合は、未使用の空き領域(\ref block_free "Freeブロック")を分割してメモリを取得します。 - * \code - * CriChar8 heap_buffer[0x2000]; - * CriHeap heap = criHeap_Create((void *)heap_buffer, sizeof(heap_buffer); - * void *memptr = criHeap_AllocFix(heap, 0x100, "forTexture1", 64); - * \endcode - * \sa criHeap_AllocTemporary(), criHeap_Free() - */ -/*EN - * \brief Memory allocation (allocating from the top of the memory area) - * \ingroup CRIHEAP_ALLOC - * \param heap CRI Heap handle - * \param size Memory block size to be allocated - * \param name Memory block name, which is used on debugging - * \param align Memory block alignment - * \return A pointer to the allocated memory block.
Returns NULL if unsuccessful. - * \par Description: - * This function allocates a memory block from the top of the memory area and creates a \ref block_fix "Fix block" in the heap area.
- * To prevent memory fragmentation, a released \ref block_fix "Fix block" with the same size and alignment is searched for in the heap area from the top to the bottom and tries to reused the block. And if not found, an unused free block (\ref block_free "Free block") is divided and a new block is allocated. - * \code - * CriChar8 heap_buffer[0x2000]; - * CriHeap heap = criHeap_Create((void *)heap_buffer, sizeof(heap_buffer); - * void *memptr = criHeap_AllocFix(heap, 0x100, "forTexture1", 64); - * \endcode - * \sa criHeap_AllocTemporary(), criHeap_Free() - */ -void * CRIAPI criHeap_AllocFix(CriHeap heap, CriSint32 size, const CriChar8 *name, CriSint32 align); - -/*JP - * \brief メモリのアロケート(メモリ領域の終端から) - * \ingroup CRIHEAP_ALLOC - * \param heap CRI Heapハンドル。 - * \param size アロケートするメモリのサイズ。 - * \param name アロケートするメモリの名前。名前はデバッグ時に使用されます。 - * \param align アロケートするメモリのアライメント。 - * \return アロケートしたメモリへのポインタ。
アロケートに失敗した場合はNULLが返ります。 - * \par 説明: - * メモリ領域の終端側から確保するメモリアロケーション関数です。ヒープ領域内に\ref block_temporary "Temporaryブロック"を作成します。
- * 要求したサイズ/アライメントをアロケート可能な解放済み\ref block_temporary "Temporaryブロック"を終端側から探して、分割または再利用するように試みます。それが見つからない場合は、未使用の空き領域(\ref block_free "Freeブロック")を分割してメモリを取得します。
- * ヒープ領域の終端側からメモリをアロケートするため、先端側での断片化を防ぐことが出来ます。
- * 主に、一時的に利用するメモリに使用します。 - * \sa criHeap_AllocFix(), criHeap_Free() - */ -/*EN - * \brief Memory allocation (allocating from the tail of the memory area) - * \ingroup CRIHEAP_ALLOC - * \param heap CRI Heap handle - * \param size Memory block size to be allocated - * \param name Memory block name, which is used on debugging - * \param align Memory block alignment - * \return A pointer to the allocated memory block.
Returns NULL if unsuccessful. - * \par Description: - * This function allocates a memory block from the bottom of the memory area and creates a \ref block_temporary "Temporary block" in the heap area.
- * A released \ref block_temporary "Temporary block" available with the requested size and alignment is searched for in the heap area from the bottom and tries to divide and to reuse the block. And if not found, an unused free block (\ref block_free "Free block") is divided and a new block is allocated.
- * Allocating from the bottom of the heap area will prevent fragmentation in the top of the heap area.
- * Temporary block is mainly used for the memory area that is temporarily used. - * \sa criHeap_AllocFix(), criHeap_Free() - */ -void * CRIAPI criHeap_AllocTemporary(CriHeap heap, CriSint32 size, const CriChar8 *name, CriSint32 align); - -/* DYNAMIC (unuse) */ -//void * CRIAPI criHeap_AllocDynamic(CriHeap heap, CriSint32 size, const CriChar8 *name, CriSint32 align); - -void * CRIAPI criHeap_Alloc(CriHeap heap, CriSint32 size, const CriChar8 *name, CriSint32 align, CriSint32 type); - -/*==========================================================================* - * Free - *==========================================================================*/ -/*JP - * \brief メモリのフリー - * \ingroup CRIHEAP_ALLOC - * \param heap CRI Heapハンドル。 - * \param ptr アロケートしたメモリのポインタ。 - * \return フリーされたメモリサイズ。 - * \par 説明: - * アロケートされたメモリをフリーします。
- * \code - * void *memptr = criHeap_AllocFix(heap, 0x100, "forTexture1", 64); - * criHeap_Free(heap, memptr); - * \endcode - * \sa criHeap_AllocFix(), criHeap_AllocTemporary() - */ -/*EN - * \brief Memory deallocation - * \ingroup CRIHEAP_ALLOC - * \param heap CRI Heap handle - * \param ptr The pointer to the allocated memory block - * \return Deallocated memory block size - * \par Description: - * This function deallocates the allocated memory block.
- * \code - * void *memptr = criHeap_AllocFix(heap, 0x100, "forTexture1", 64); - * criHeap_Free(heap, memptr); - * \endcode - * \sa criHeap_AllocFix(), criHeap_AllocTemporary() - */ -CriSint32 CRIAPI criHeap_Free(CriHeap heap, void *ptr); - -/*==========================================================================* - * 排他制御用関数 - *==========================================================================*/ -CriSint32 CRIAPI criHeap_EnterCriticalSection(void); -CriSint32 CRIAPI criHeap_LeaveCriticalSection(void); - -/*==========================================================================* - * その他の関数 - *==========================================================================*/ -/* For only internal use */ -CriSint32 CRIAPI criHeap_SwitchAllocFunctions(CriHeap heap); - -/*==========================================================================* - * デバッグ関連 - *==========================================================================*/ -/*JP - * \brief ピークメモリサイズの取得 - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heapハンドル。 - * \return 使用されたメモリの最大値。 - * \par 説明: - * 過去、使用されたメモリ量の最大値を返します。
- * 最大値はcriHeap_DebugResetPeakMemorySize() でリセットすることが出来ます。 - * \sa criHeap_DebugResetPeakMemorySize() - */ -/*EN - * \brief Returns peak memory usage of the heap. - * \ingroup CRIHEAP_DEBUG - * \param heap The heap previously allocated by criHeap_Create(). - * \return The maximum number of bytes used by the heap. - * \par Description: - * The amount of memory used by these libraries is variable and depends - * on the number of simultaneous streams being read, the seek and error - * frequency within the stream being read, video resolution and other - * factors. This function allows you to tune the allocation of the heap - * to achieve a required performance level while allocating minimal - * heap space for this library. To get accurate readings, this function - * should typically be called just before criHeap_Destroy(), and after - * exercising all the video and audio functions in your program. - */ -CriSint32 CRIAPI criHeap_DebugGetPeakMemorySize(CriHeap heap); - -/*JP - * \brief ピークメモリサイズのリセット - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heapハンドル。 - * \par 説明: - * ピークメモリサイズをリセットします。 - * \sa criHeap_DebugGetPeakMemorySize() - */ -/*EN - * \brief Reset peak memory size - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heap handle - * \par Description: - * The peak memory size is reset. - * \sa criHeap_DebugGetPeakMemorySize() - */ -void CRIAPI criHeap_DebugResetPeakMemorySize(CriHeap heap); - -/*JP - * \brief メモリブロック数の取得 - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heapハンドル。 - * \return メモリブロック数。 - * \par 説明: - * アロケートされたメモリのブロック数を返します。
- * CRI Heapハンドル生成直後は未使用のメモリブロックが1つ存在する状態 - * となります。また、フリーされた断片化されたメモリブロックもこの数に - * 含みます。 - * \sa criHeap_DebugGetUsedBlocks() - */ -/*EN - * \brief Get number of allocated memory blocks - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heap handle - * \return Number of allocated memory blocks - * \par Description: - * The number of allocated memory blocks is returned.
- * One unused memory block exists right after CRI Heap handle creation. - * The number of released fragmented memory blocks is also included. - * \sa criHeap_DebugGetUsedBlocks() - */ - CriSint32 CRIAPI criHeap_DebugGetNumBlocks(CriHeap heap); - -/*JP - * \brief 使用メモリブロック数の取得 - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heapハンドル。 - * \return 使用メモリブロック数。 - * \par 説明: - * アロケートされているメモリブロックの数を返します。 - * \sa criHeap_DebugGetNumBlocks() - */ -/*EN - * \brief Get number of used memory blocks - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heap - * \return Number of used memory blocks - * \par Description: - * The number of used memory blocks is returned.
- * \sa criHeap_DebugGetNumBlocks() - */ -CriSint32 CRIAPI criHeap_DebugGetUsedBlocks(CriHeap heap); - -/*JP - * \brief メモリブロック名の取得 - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heapハンドル。 - * \param ptr アロケートしたメモリのポインタ。 - * \return メモリブロック名。 - * \par 説明: - * アロケート時に設定したメモリブロック名へのポインタを返します。
- */ -/*EN - * \brief Get memory block name - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heap - * \param ptr A pointer to the allocated memory block - * \return Memory block name - * \par Description: - * The pointer to the memory block name specified on allocation is returned.
- */ -CriChar8 * CRIAPI criHeap_DebugGetBlockName(CriHeap heap, void *ptr); - -/* メモリブロック番号の取得 */ -//CriSint32 CRIAPI criHeap_DebugGetBlockNumberFromPointer(CriHeap heap, void *ptr); - -/* メモリブロック情報の取得 */ -//void CRIAPI criHeap_DebugGetBlockInformation(CriHeap heap, -// CriSint32 blocknumber, CriHeapBlock *heapblock); - -/* メモリブロック情報の表示 */ -//void CRIAPI criHeap_DebugPrintBlockInformation(CriHeap heap, -// CriSint32 blocknumber, CriHeapBlock *heapblock); - -/*JP - * \brief メモリブロック情報の表示 - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heapハンドル。 - * \par 説明: - * 現在のメモリブロック情報を表示します。
- * printf関数などの標準出力に表示を行います。 - */ -/*EN - * \brief Print memory block information - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heap - * \par Description: - * The current memory block information is displayed.
- * It is displayed on the standard output for the printf function. - */ - void CRIAPI criHeap_DebugPrintBlockInformationAll(CriHeap heap); - -/*JP - * \brief メモリアロケートサイズの取得 - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heapハンドル。 - * \par 説明: - * 現在のメモリアロケートサイズの合計値を返します。 - */ -/*EN - * \brief Get total allocation size - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heap - * \par Description: - * The total size of allocated memory blocks is returned. - */ -CriSint32 CRIAPI criHeap_DebugGetTotalAllocSize(CriHeap heap); - -/* フリーサイズの取得 */ -//CriSint32 CRIAPI criHeap_DebugGetTotalFreeSize(CriHeap heap); - -/* メモリアロケートサイズの取得(タイプ別) */ -CriSint32 CRIAPI criHeap_DebugGetAllocSize(CriHeap heap, CriSint32 type); - -/* ヒープヘッダサイズの取得 */ -CriSint64 CRIAPI criHeap_DebugGetHandleHeaderSize(CriHeap heap); - -/* メモリブロックヘッダサイズの取得 ptr: Allocated Pointer */ -CriSint64 CRIAPI criHeap_DebugGetMemBlockHeaderSize(void *ptr); - -/* 追加で必要となるサイズの最大値 */ -CriSint32 CRIAPI criHeap_DebugGetWorstExtraSize(CriSint32 alignment); - -/* criHeap_AllocFixでアロケート可能なサイズ */ -CriSint32 CRIAPI criHeap_DebugGetFixAllocatableSize(CriHeap heap, CriSint32 alignment); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#ifdef XPT_TGT_PC -#pragma pack(pop) -#endif - -#endif // _CRI_HEAP_H_INCLUDED - -/* end of file */ diff --git a/3rdParty/cri/PS4/include/cri_movie.h b/3rdParty/cri/PS4/include/cri_movie.h deleted file mode 100644 index 7259993f..00000000 --- a/3rdParty/cri/PS4/include/cri_movie.h +++ /dev/null @@ -1,4402 +0,0 @@ -/**************************************************************************** - * - * CRI Middleware SDK - * - * Copyright (c) 2006-2013 CRI Middleware Co., Ltd. - * - * Library : CRI Movie - * Module : Library User's Header - * File : cri_movie.h - * Date : 2013-11-27 - * Version : (see CRIMOVIE_VER) - * - ****************************************************************************/ -/*! - * \file cri_movie.h - */ -#ifndef CRI_MOVIE_H_INCLUDED /* Re-definition prevention */ -#define CRI_MOVIE_H_INCLUDED - -/* Version No. */ -#define CRIMOVIE_VER "3.50" -#define CRIMOVIE_NAME "CRI Movie" - -/*************************************************************************** - * Include file - ***************************************************************************/ -#include -#include -#include -#include -#include -#include - -/*************************************************************************** - * MACRO CONSTANT - ***************************************************************************/ -/*EN - * \brief Maximum length of a filename that can be opened by EasyPlayer - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetFile() - */ -/*JP - * \brief EasyPlayerに指定可能なファイル名の最大長さ - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetFile() - */ -#define CRIMV_MAX_FILE_NAME (256) - -/*EN - * \brief Default audio track setting used by AttachSubAudioInterface(), ReplaceCenterVoice() - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::ReplaceCenterVoice(), CriMvEasyPlayer::AttachSubAudioInterface() - */ -/*JP - * \brief サブオーディオ(またはセンターボイス)のデフォルト値 - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::ReplaceCenterVoice(), CriMvEasyPlayer::AttachSubAudioInterface() - */ -#define CRIMV_CENTER_VOICE_OFF (-1) - - -/*************************************************************************** - * Variable Declaration - ***************************************************************************/ -namespace CriMv { - extern CriError ErrorContainer; -} - -/*************************************************************************** - * Prototype Functions - ***************************************************************************/ -/*EN - * \brief CRI Movie Namespace - * \ingroup MDL_MV_BASIC - * \par - * Namespace for all CRI Movie methods, constants, and declarations - */ -/*JP - * \brief CRI Movie Namespace - * \ingroup MDL_MV_BASIC - * \par - * Namespace for all CRI Movie methods, constants, and declarations - */ -namespace CriMv { - - /*EN - * \brief Returns the version number and build information of CRI Movie - * \param none - * \return A string constant - * - * Returns the version number and build information of CRI Movie as a constant - * string, in the form - * - * "CRI Movie/{PLATFORM} {VERSION} Build:{BUILD DATE}" - */ - /*JP - * \brief CRI Movieのバージョン番号やビルド情報を返します。 - * \return ライブラリ情報文字列 - * - */ - const CriChar8* CRIAPI GetLibraryVersionString(void); - - /*EN - * \brief Initialize the CRI Movie library - * \param err Optional error code - * - * Does one-time initialization of the CRI Movie library.
- * This function must be successfully called before calling CriMvEasyPlayer::Create().
- *
- * In general, all CRI Movie APIs are available after calling CriMv::Initialize(), - * until CriMv::Finalize() is called. However, there are some methods that set options - * for the library as a whole which must be called before CriMv::Initialize():
- *
- * It is safe to call CriMv::Initialize() more than once, as long as your application calls - * CriMv::Finalize() once for each call to CriMv::Initialize(). Multiple calls will not - * have an effect on the library, other than to increment or decrement an internal counter. - * - * \sa CriMv::Finalize() - */ - /*JP - * \brief CRI Movieライブラリの初期化 - * \param err エラー情報(省略可) - * - * CRI Movie ライブラリを初期化します。
- * CriMvEasyPlayer::Create 関数よりも先に呼び出してください。
- *
- * 原則として全ての CRI Movie ライブラリ関数は初期化後、終了関数呼び出しまでの間にのみ使用します。
- * ただし、いくつかの設定関数は初期化関数よりも先に呼び出す必要があるものがあります。 - * 詳細は各設定関数の説明を参照してください。 - *
- * 初期化関数を複数回呼び出した場合、2回目以降の呼び出しでは呼び出し回数を記録するだけで再初期化は行いません。
- * この場合、正しく終了処理を行うには同じ回数だけ終了関数を呼び出す必要があります。 - * 初期化関数と終了関数は必ず対で呼び出すように実装してください。
- * - * \sa CriMv::Finalize() - */ - void CRIAPI Initialize(CriError &err = CriMv::ErrorContainer); - - /* MEMO: - * If an application calls this function instead of CriMv::Initialize(), - * an application need to call CriMv::SetupMovieHandleWork() before CriMv::InitializeMana(). - */ - void CRIAPI InitializeMana(CriError &err = CriMv::ErrorContainer); - - /*EN - * \brief Initialize 32bit ARGB frame conversion - * - * This function initializes 32bit ARGB frame conversion.
- * When an application uses CriMvEasyPlayer::GetFrameOnTimeAs32bitARGB(), - * please call this function after CriMv::Initialize().
- * - * \sa CriMvEasyPlayer::GetFrameOnTimeAs32bitARGB() - */ - /*JP - * \brief 32bitARGB用フレーム変換の初期化 - * - * 32bitARGB用フレーム変換処理を初期化します。
- * CriMvEasyPlayer::GetFrameOnTimeAs32bitARGB() を使用する場合は CRI Movie ライブラリの - * 初期化後に必ず呼び出してください。
- * - * \sa CriMvEasyPlayer::GetFrameOnTimeAs32bitARGB() - */ - void CRIAPI InitializeFrame32bitARGB(void); - -#if defined(XPT_TGT_IPHONE) || defined(XPT_TGT_WINMO) || defined(XPT_TGT_ANDROID) || defined(XPT_TGT_CQSH2A) || defined(XPT_TGT_ACRODEA) || defined(XPT_TGT_NACL) || defined(XPT_TGT_SH7269) || defined(XPT_TGT_PC) || defined(XPT_TGT_TRGP6K) - void CRIAPI InitializeFrameRGB565(void); -#endif - - /*EN - * \brief De-initializes the CRI Movie library - * \param err Optional error code - * - * This function finalize whole CRI Movie library.
- * An application needs to destroy all CriMvEasyPlayer handles and decoding threads before callign CriMv::Finalize().
- *
- * In principle, all CRI Movie library APIs are enabled after CriMv::Initialize() until CriMv::Finalize().
- * But there are some APIs for parameter setting, which need to be called after CriMv::Finalize(). - * For details, refer to each explanations of setting APIs. - *
- * \remarks - * CriMv::Finalize() must be called once for each call to CriMv::Initialize(). When the - * internal initialization count reaches 0, the library will be finalized. - * - * \sa CriMv::Initialize() - */ - /*JP - * \brief CRI Movieライブラリの終了 - * \param err エラー情報(省略可) - * - * CRI Movie ライブラリを終了します。
- * この関数を呼び出す前に、全ての CriMvEasyPlayer ハンドルおよびデコードスレッドを破棄してください。
- *
- * 原則として全ての CRI Movie ライブラリ関数は初期化後、終了関数呼び出しまでの間にのみ使用します。
- * ただし、いくつかの設定関数は終了関数よりも後に呼び出す必要があるものがあります。 - * 詳細は各設定関数の説明を参照してください。 - *
- * 初期化関数を複数回呼び出した場合、正しく終了処理を行うには同じ回数だけ終了関数を呼び出す必要があります。 - * 初期化関数と終了関数は必ず対で呼び出すように実装してください。
- * - * \sa CriMv::Initialize() - */ - void CRIAPI Finalize(CriError &err = CriMv::ErrorContainer); - -#if !defined(XPT_TGT_EE) - /*EN - * \brief Calculates the work buffer size needed for the given number of movie handles - * \param max_num Maximum number of movie handles desired - * \param err Optional error code - * \return The necessary work buffer size, in bytes - * - * Each active movie handle requires an internal work buffer. If your application - * needs to have multiple movies open at one time, it should determine how many handles - * it needs, allocate a buffer of the size returned by this function, and pass it to - * CriMv::SetupMovieHandleWork().
- * - * Each CriMvEasy object uses a movie handle. Alpha movie playback uses two handles. - * If you need to play aplha movies, be sure to double the number of handles requested. - * - * \remarks - * The number of movie handles must be set before calling CriMv::Initialize(). - * - * \sa CriMv::SetupMovieHandleWork() - */ - /*JP - * \brief マルチハンドル用ワークバッファサイズの計算 - * \param max_num 最大ハンドル数(不透明ムービの再生時) - * \param err エラー情報(省略可) - * \return ワークサイズ - * - * 同時に使用する CriMvEasyPlayer ハンドルの最大数を増加させる場合に必要なワークバッファ - * サイズを計算します。 - * - * アルファムービを再生するとハンドル資源を2つ消費します。 - * もし複数のアルファムービ再生を行いたい場合は、最大ハンドル数は倍にして指定してください。 - * - * \sa CriMv::SetupMovieHandleWork() - */ - CriUint32 CRIAPI CalcMovieHandleWork(CriUint32 max_num, CriError &err = CriMv::ErrorContainer); - - /*EN - * \brief Increases the default number of available movie handles - * \param max_num Maximium number of movie handles - * \param workbuf Work buffer - * \param worksize Size of work buffer - * \param err Optional error code - * - * Call this function if your application needs to increase the maximum number of open movies - * beyond the default. Note that playing an alpha movie requires a second handle.
- * - * The default number of movie handles depends on the platform.
- * - * The work buffer must be allocated based on the size returned by CriMv::CalcMovieHandleWork().
- * - * \remarks - * This function must be called before calling CriMv::Initialize(). - * - * \sa CriMv::CalcMovieHandleWork() - */ - /*JP - * \brief マルチハンドル用ワークバッファの設定 - * \param max_num 最大ハンドル数(不透明ムービの再生時) - * \param workbuf ワークバッファアドレス - * \param worksize ワークバッファサイズ - * \param err エラー情報(省略可) - * - * 同時に使用する CriMvEasyPlayer ハンドルの最大数を増加させるためのワークバッファを設定します。 - * なお、ワークバッファを指定しない場合のハンドル数上限は機種によって異なります。 - * - * ワークバッファの設定は、 CriMv::Initialize() の呼び出しに実行してください。 - * - * \sa CriMv::CalcMovieHandleWork() - */ - void CRIAPI SetupMovieHandleWork(CriUint32 max_num, void *workbuf, CriUint32 worksize, CriError &err = CriMv::ErrorContainer); - - /*EN - * \brief Get max number of movie handles - * \param err Optional error code - * \return Max number of movie handles you set by CriMv::SetupMovieHandleWork(). - * - * Returns the maximum number of movie handles that are available to CRI Movie.
- * - * Note that this is not necessarily equal to the number of movies that can be - * opened at a time. In general, each movie will use one handle; however, - * alpha channel movies uses two handles. - * - * \sa CriMv::SetupMovieHandleWork(), CriMv::CalcMovieHandleWork() - */ - /*JP - * \brief 最大ハンドル数の取得 - * \param err エラー情報(省略可) - * \return CriMv::SetupMovieHandleWork() で設定した最大ハンドル数 - * - * CriMv::CalcMovieHandleWork() で最大ハンドル数を増加させた場合に、 - * 設定した最大ハンドル数を取得します。 - * - * \sa CriMv::SetupMovieHandleWork(), CriMv::CalcMovieHandleWork() - */ - CriUint32 CRIAPI GetMaxNumberOfHandles(CriError &err = CriMv::ErrorContainer); -#endif - - /* For Sofdec2 */ - CriSint32 CRIAPI CalcHandleWorkSize(CriMvHandleConfig *config, CriError &err = CriMv::ErrorContainer); - void CRIAPI SetDelayDestroySubmodules(CriBool sw); -} - -/*************************************************************************** - * CLASS - ***************************************************************************/ -/*EN - * \brief File Reading Interface Class for EasyPlayer - * \ingroup MDL_IF_READER - * \par - * You can implement your own streaming filesystem for movie playback by deriving - * from this class.
- * - * Pass an instance of this subclass to CriMvEasyPlayer::Create().
- * - * This class is designed for asynchronous operation. All functions are pure virtual. - * - * \sa CriMvEasyPlayer::Create() - */ -/*JP - * \brief ファイル読み込みインタフェース for EasyPlayer - * \ingroup MDL_IF_READER - * - * このクラスを定義することで、自前のファイルシステムを使ってEasyPlayerの - * ストリーミング再生が可能になります。
- * 全ての関数は純粋仮想関数として定義されているので、全ての関数を必ず実装してください。 - * - * \sa CriMvEasyPlayer::Create() - */ -class CriMvFileReaderInterface -{ -public: - /*EN Status of an asynchronous operation */ - /*JP 非同期処理ステータス */ - enum AsyncStatus { - ASYNC_STATUS_STOP, /*EN< No action */ - /*JP< 何もしていない状態。*/ - ASYNC_STATUS_BUSY, /*EN< Currently processing */ - /*JP< 処理中 */ - ASYNC_STATUS_COMPLETE, /*EN< Processing completed */ - /*JP< 処理終了 */ - ASYNC_STATUS_ERROR, /*EN< An error occured */ - /*JP< エラー */ - - /* Keep enum 4bytes */ - ASYNC_STATUS_MAKE_ENUM_SINT32 = 0x7FFFFFFF - }; - /*EN Offset values for Seek() */ - /*JP シーク開始位置 */ - enum SeekOrigin { - SEEK_FROM_BEGIN, /*EN< Start of file */ - /*JP< ファイル先頭 */ - SEEK_FROM_CURRENT, /*EN< Current position in file */ - /*JP< ファイルの現在位置 */ - SEEK_FROM_END, /*EN< End of file */ - /*JP< ファイル終端 */ - - /* Keep enum 4bytes */ - SEEK_FROM_MAKE_ENUM_SINT32 = 0x7FFFFFFF - }; - /*EN - * \brief Opens a file asynchronously - * \param fname Name of file to open - * - * Initiates a file open request, and returns immediately. - * - * To determine success or failure, call CriMvFileReaderInterface::GetOpenStatus().
- * - * \remarks - * CRI Movie may call CriMvFileReaderInterface::Read() and CriMvFileReaderInterface::Close() - * before CriMvFileReaderInterface::GetOpenStatus() returns ASYNC_STATUS_COMPLETE. - * - * \sa CriMvFileReaderInterface::GetOpenStatus() - */ - /*JP - * \brief ファイル名によるファイルオープン(即時復帰) - * \param fname ファイル名の文字列 - * - * ファイル名指定でファイルのオープン要求を出します。
- * この関数は即時復帰の関数として呼び出されます。
- * オープン処理が終わったかどうかは CriMvFileReaderInterface::GetOpenStatus関数 - * でチェックできるようにしてください。
- * CRI Movie ライブラリはオープン処理が終わる(= CriMvFileReaderInterface::GetOpenStatus関数が - * ASYNC_STATUS_COMPLETEを返す)前に、リード、クローズの要求を呼び出す可能性があります。 - * - * \sa CriMvFileReaderInterface::GetOpenStatus() - */ - /* pure */ virtual void Open(CriChar8 *fname)=0; - - /*EN - * \brief Closes a file asynchronously - * - * Initiates a file close request, and returns immediately.
- * - * To determine success or failure, call CriMvFileReaderInterface::GetCloseStatus().
- * - * \sa CriMvFileReaderInterface::GetCloseStatus() - */ - /*JP - * \brief ファイルのクローズ(即時復帰) - * - * オープン済みのファイルのクローズ要求を出します。
- * この関数は即時復帰の関数として呼び出されます。
- * クローズ処理が終わったかどうかは CriMvFileReaderInterface::GetCloseStatus() - * でチェックできるようにしてください。 - * - * \sa CriMvFileReaderInterface::GetCloseStatus() - */ - /* pure */ virtual void Close(void)=0; - - /*EN - * \brief Reads from a file - * \param buffer Buffer to read into - * \param req_size Size of the buffer - * - * Initiates a file read request, and returns immediately.
- * - * The buffer must be available and writable until the read request completes.
- * - * To determine success or failure, call CriMvFileReaderInterface::GetReadStatus().
- * - * To determine the number of bytes actually read, call CriMvFileReaderInterface::GetReadSize() - * after CriMvFileReaderInterface::GetReadStatus() has returned ASYNC_STATUS_COMPLETE. - * - * \remarks - * CRI Movie may call CriMvFileReaderInterface::Close() before - * CriMvFileReaderInterface::GetReadStatus() returns ASYNC_STATUS_COMPLETE. - * - * \sa CriMvFileReaderInterface::GetReadStatus(), CriMvFileReaderInterface::GetReadSize() - */ - /*JP - * \brief 読み込み要求(即時復帰) - * \param buffer 書き出しバッファのポインタ。読み込み要求サイズを満たすだけのバッファを確保しておく必要があります。 - * \param req_size 読み込み要求サイズ。単位はバイト単位です。 - * - * ファイルの読み込み要求を出します。
- * この関数は即時復帰の関数として呼び出されます。
- * リード処理が終わったかどうかは CriMvFileReaderInterface::GetReadStatus() - * でチェックできるようにしてください。
- * CRI Movie ライブラリはリード処理が終わる(= CriMvFileReaderInterface::GetReadStatus()が - * ASYNC_STATUS_COMPLETEを返す)前に、クローズ要求を呼び出す可能性があります。
- * この関数は読み込んだサイズを返しません。
- * 読み込み済みサイズは、 CriMvFileReaderInterface::GetReadStatus()が ASYNC_STATUS_COMPLETEを - * 返したあとに CriMvFileReaderInterface::GetReadSize()で返すように実装してください。 - * - * \sa CriMvFileReaderInterface::GetReadStatus(), CriMvFileReaderInterface::GetReadSize() - */ - /* pure */ virtual void Read(CriUint8 *buffer, CriSint64 req_size)=0; - - /*EN - * \brief Gets asynchronous status of a call to CriMvFileReaderInterface::Open() - * - * \return Status of the call - * - * While the Open() call is in process, this will return ASYNC_STATUS_BUSY.
- * If the call fails, this will return ASYNC_STATUS_ERROR.
- * On success, this will return ASYNC_STATUS_COMPLETE.
- * - * \sa CriMvFileReaderInterface::Open() - */ - /*JP - * \brief オープンコマンドの状態取得 - * \return オープンコマンドの処理状態。 - * - * CriMvFileReaderInterface::Open関数の処理状態を取得します。 - * - * \sa CriMvFileReaderInterface::Open() - */ - /* pure */ virtual CriMvFileReaderInterface::AsyncStatus GetOpenStatus(void)=0; - - /*EN - * \brief Gets asynchronous status of a call to CriMvFileReaderInterface::Close() - * - * \return Status of the call - * - * While the Close() call is in process, this will return ASYNC_STATUS_BUSY.
- * If the call fails, this will return ASYNC_STATUS_ERROR.
- * On success, this will return ASYNC_STATUS_COMPLETE.
- * - * \sa CriMvFileReaderInterface::Close() - */ - /*JP - * \brief クローズコマンドの状態取得 - * \return クローズコマンドの処理状態。 - * - * CriMvFileReaderInterface::Close関数の処理状態を取得します。 - * - * \sa CriMvFileReaderInterface::Close() - */ - /* pure */ virtual CriMvFileReaderInterface::AsyncStatus GetCloseStatus(void)=0; - - /*EN - * \brief Gets asynchronous status of a call to CriMvFileReaderInterface::Read() - * - * \return Status of the call - * - * While the Read() call is in process, this will return ASYNC_STATUS_BUSY.
- * If the call fails, this will return ASYNC_STATUS_ERROR.
- * On success, this will return ASYNC_STATUS_COMPLETE.
- * - * \sa CriMvFileReaderInterface::Read() - */ - /*JP - * \brief リードコマンドの状態取得 - * \return リードコマンドの処理状態。 - * - * CriMvFileReaderInterface::Read関数の処理状態を取得します。 - * - * \sa CriMvFileReaderInterface::Read() - */ - /* pure */ virtual CriMvFileReaderInterface::AsyncStatus GetReadStatus(void)=0; - - /*EN - * \brief Gets the number of bytes read by a successful call to CriMvFileReaderInterface::Read() - * - * \return Number of bytes read - * - * Once CriMvFileReaderInterface::GetReadStatus() returns ASYNC_STATUS_COMPLETE, this - * function can be called to determine the number of bytes read by - * CriMvFileReaderInterface::Read().
- * - * If no call to Read() has been made, this function will return 0.
- * - * If called multiple times after completing the read, the same value will be returned each time. - * - * \sa CriMvFileReaderInterface::Read(), CriMvFileReaderInterface::GetReadStatus() - */ - /*JP - * \brief 前回読み込み要求に対する読み込み完了サイズ - * \return 読み込み完了サイズ。単位はByte。 - * - * 前回の読み込み要求に対して読み込み完了したサイズを返します。 - * まだ読み込みが1度も要求されていない場合は0を返します。 - * 読み込み完了後に繰り返しこの関数が呼び出された場合は、すべて同じ値を返します。 - * - * \sa CriMvFileReaderInterface::Read(), CriMvFileReaderInterface::GetReadStatus() - */ - /* pure */ virtual CriSint64 GetReadSize(void)=0; - - /*EN - * \brief Seeks to a new position in the file - * - * \param size Number of bytes to seek relative to \a offset - * \param offset Starting position of seek - * \return The offset, in bytes, from the previous file position. - * - * If \a offset is SEEK_FROM_BEGIN, seeking will start from the beginning of the file.
- * If \a offset is SEEK_FROM_CURRENT, seeking will start from the current file position.
- * If \a offset is SEEK_FROM_END, seeking will start from the end of the file.
- * - * \sa CriMvFileReaderInterface::SeekOrigin - */ - /*JP - * \brief シーク - * \param size シークサイズ - * \param offset シークの開始位置 - * \return 実際にシークした距離。Byte単位。 - * - * \sa CriMvFileReaderInterface::SeekOrigin - * - */ - /* pure */ virtual CriSint64 Seek(CriSint64 size, CriMvFileReaderInterface::SeekOrigin offset)=0; - - /*EN - * \brief Gets the file size - * - * \return File size, in bytes - * - * This function can safely be called once CriMvFileReaderInterface::Open() has completed - * successfully. - * - * \sa CriMvFileReaderInterface::Open(), CriMvFileReaderInterface::GetOpenStatus() - */ - /*JP - * \brief ファイルサイズの取得 - * \return ファイルサイズ[byte]. - * - * この関数はファイルオープンの終了後に呼び出されます。 - * - * \sa CriMvFileReaderInterface::Open(), CriMvFileReaderInterface::GetOpenStatus() - */ - /* pure */ virtual CriSint64 GetFileSize(void)=0; - -protected: - virtual ~CriMvFileReaderInterface(void) {} -}; - -/*EN - * \brief Sound Interface Class for EasyPlayer - * \ingroup MDL_IF_SOUND - * - * \par - * A class derived from CriMvSoundInterface is required in order to play sound in CRI Movie. - * Pass an instance of this subclass to CriMvEasyPlayer::Create().
- * - * If you do not need audio output, you can pass NULL instead. However, if you do, - * you can not use a movie timer of type MVEASY_TIMER_AUDIO. See CriMvEasyPlayer::SetMasterTimer() - * for more details.
- * - * Sound data must be provided in either 32 or 16 bit PCM format. - * - * All functions are pure virtual. - * - * \sa CriMvEasyPlayer::Create(), CriMvEasyPlayer::SetMasterTimer(), CriMvEasyPlayer::TimerType - */ -/*JP - * \brief サウンド出力インタフェース - * \ingroup MDL_IF_SOUND - * - * \sa CriMvEasyPlayer::Create(), CriMvEasyPlayer::SetMasterTimer(), CriMvEasyPlayer::TimerType - */ -class CriMvSoundInterface -{ -public: - /*EN - * \brief The status of the Sound Module - * - * This is the return value of CriMvSoundInterface::GetStatus().
- * - * After CriMvSoundInterface::Start() is called, the state transitions to MVEASY_SOUND_STATUS_EXEC.
- * While the state is MVEASY_SOUND_STATUS_EXEC, the sound module calls the callback function - * to retrieve sound data as needed.
- * When the EasyPlayer is stopped, or transits to MVEASY_STATUS_PLAYEND, - * CRI Movie will call CriMvSoundInterface::Stop(). Then, CRI Movie waits for - * CriMvSoundInterface::GetStatus() to return MVEASY_SOUND_STATUS_STOP, - * and calls CriMvSoundInterface::DestroyOutput(). - * - * \sa CriMvSoundInterface::GetStatus(), CriMvSoundInterface::Start(), - * CriMvSoundInterface::Stop(), CriMvSoundInterface::DestroyOutput() - */ - /*JP - * \brief サウンドモジュールの状態 - * - * サウンドモジュールの状態を表す列挙型です。
- * CriMvEasyPlayer::GetStatus() の関数値です。
- * CriMvSoundInterface::Start() が呼び出されるとMVEASY_SOUND_STATUS_EXEC状態になります。
- * MVEASY_SOUND_STATUS_EXEC状態の間は、サウンド出力モジュールはコールバック関数を呼び出します。
- * CRI Movie ライブラリは再生終了または再生停止指示を受けた場合、まず CriMvSoundInterface::Stop()を呼び出します。
- * その後、STOP状態になるのを待ってから CriMvSoundInterface::DestroyOutput()を呼び出します。 - * - * \sa CriMvSoundInterface::GetStatus(), CriMvSoundInterface::Start(), - * CriMvSoundInterface::Stop(), CriMvSoundInterface::DestroyOutput() - */ - enum Status { - MVEASY_SOUND_STATUS_STOP, /*EN< No sound processing is happening. */ - /*JP< CRI Movie のサウンド出力をしていない状態 */ - MVEASY_SOUND_STATUS_EXEC, /*EN< Sound data is being retrieved and processed. */ - /*JP< CRI Movie のサウンド出力中 */ - MVEASY_SOUND_STATUS_ERROR, /*EN< An error has occurred. */ - /*JP< エラー状態 */ - - /* Keep enum 4bytes */ - MVEASY_SOUND_STATUS_MAKE_ENUM_SINT32 = 0x7FFFFFFF - }; - - /*EN - * \brief PCM audio data format - * - * CRI Movie only operates on PCM encoded data. Two formats are supported: 32 bit floating - * point values, and 16 bit integer values. - * - * Return one of these values from CriMvSoundInterface::GetPcmFormat(). - * According to the returned format, CRI Movie calls a SetCallback for the specified PCM format. - * - * \sa CriMvSoundInterface::GetPcmFormat(), CriMvSoundInterface::SetCallbackGetFloat32PcmData(), - * CriMvSoundInterface::SetCallbackGetSint16PcmData() - */ - /*JP - * \brief PCMデータフォーマット - * - * PCMの出力フォーマットはPcmFormat型で定義されたいずれかでなければいけません。
- * EasyPlayerは CriMvSoundInterface::GetPcmFormat()で取得できるデータ型のみ使用します。
- * アプリケーションはこのクラスの全ての関数を実装しなければいけないので、使わないフォーマット - * のコールバック登録関数はカラ関数として実装してください。 - * - * \sa CriMvSoundInterface::GetPcmFormat(), CriMvSoundInterface::SetCallbackGetFloat32PcmData(), - * CriMvSoundInterface::SetCallbackGetSint16PcmData() - */ - enum PcmFormat { - MVEASY_PCM_FLOAT32, /*EN< PCM data is in 32 bit floating point format. */ - /*JP< 32bit 浮動小数型のPCMフォーマット */ - MVEASY_PCM_SINT16, /*EN< PCM data is in 16 bit integer format. */ - /*JP< 16bit 整数型のPCMフォーマット */ - - /* Keep enum 4bytes */ - MVEASY_PCM_MAKE_ENUM_SINT32 = 0x7FFFFFFF - }; - - /*EN - * \brief Creates a sound output module - * \param heap Handle to a CriHeap object - * \param channel Number of sound channels (1 = monaural, 2 = stereo, 6 = 5.1ch) - * \param samplerate Sample rate of audio data (ex. 48000 = 48k) - * \return TRUE if the sound module was created successfully - * \return FALSE if there was an error - * - * Creates a CRI Movie sound output module and prepares it for use. Memory for the module - * is taken from the provided CriHeap object.
- * - * CRI Movie calls this method once it has determined that a movie has an active audio track - * and has analyzed the number of channels (mono, stereo, 5.1ch, etc.) and the sample rate. - * - */ - /*JP - * \brief サウンド出力の作成 - * \param heap メモリハンドル - * \param channel 出力するサウンドのチャネル数 (1=monaural, 2=stereo, 6=5.1ch) - * \param samplerate サンプリングレート (ex. 48k = 48000) - * \return 作成結果。成功の場合はTRUE、失敗の場合はFALSEが返ります。 - * - * サウンド出力を作成します。
- * この関数は CRI Movie が再生するサウンドが決定したあとに、そのサウンドのチャネル数や - * サンプリングレートを引数として実行されます。 - * - */ - /* pure */ virtual CriBool CreateOutput(CriHeap heap, CriUint32 channel, CriUint32 samplerate)=0; - - /*EN - * \brief Destroys the sound output module - * - * Deletes the sound output module that was created by - * CriMvSoundInterface::CreateOutput().
- * - * CRI Movie calls this method once CriMvSoundInterface::GetStatus() returns MVEASY_SOUND_STATUS_STOP. - * - */ - /*JP - * \brief サウンド出力の破棄 - * - * サウンド出力を破棄します。
- * この関数はサウンド出力が MVEASY_SOUND_STATUS_STOP 状態になった後に呼び出されます。 - * - */ - /* pure */ virtual void DestroyOutput(void)=0; - - /*EN - * \brief Gets the PCM format of audio data - * \return The type of PCM format supported by this CriMvSoundInterface instance - * - * CRI Movie supports audio data in one of two PCM formats: 32 bit floating point (MVEASY_PCM_FLOAT32) - * or 16 bit integer (MVEASY_PCM_SINT16). EasyPlayer uses the return value from this method to - * determine which format is being used, and will call the appropriate callback function to retrieve - * data samples. - * - * \sa CriMvSoundInterface::PcmFormat - */ - /*JP - * \brief PCMデータフォーマットの取得 - * \return CriMvSoundInterface が使用するPCMフォーマットを返します。 - * - * EasyPlayerはこの関数によって、出力するPCMフォーマットを判断します。 - * - * \sa CriMvSoundInterface::PcmFormat - */ - /* pure */ virtual PcmFormat GetPcmFormat(void)=0; - - /*EN - * \brief Sets the callback function for retrieving 32 bit floating point PCM sound samples - * \param func Function that is called when CriMvSoundInterface gets PCM data (32bit float) - * \param obj Pointer to user-specifed data, passed as the first argument to the callback - * - * Sets a function that CriMvSoundInterface will call when it needs audio data in 32 bit floating point - * PCM format. This callback function takes 4 arguments:
- * - * - \a obj: The user-specified \a obj parameter passed to SetCallbackGetFloat32PcmData().
- * - \a nch: The number of audio channels. Mono is 1, stereo is 2, 5.1 channel is 6.
- * - \a pcmbuf: An array of buffers to hold the returned PCM data. There must be one element of - * this array for each channel.
- * - \a req_nsmpl: The number of samples requested. Each buffer must be large enough to hold this - * many samples (i.e. \a nch * \a req_nsmpl). - * - * \remarks - * The maximum number of channels is CRIMV_PCM_BUFFER_MAX - * - * \sa CriMvSoundInterface::SetCallbackGetSint16PcmData() - */ - /*JP - * \brief 32bit形式でPCMデータを取得するコールバック関数の登録 - * \param func CriMvSoundInterface がPCMデータを要求する際に呼びだすコールバック関数 - * \param obj コールバック関数を実行する際に第一引数に指定するオブジェクト変数 - * - * CriMvSoundInterface がEasyPlayerにPCMデータを要求する際に呼び出すコールバック関数を登録します。 - * コールバック関数は4つの引数を持っています。
- * - "obj" はコールバック関数内で使用するオブジェクトです。 - * コールバック関数を呼び出す際は、関数登録時に指定されたobjを必ずこの引数に入れてください。
- * - "nch" は CriMvSoundInterface が要求するオーディオのチャネル数です。モノラルなら1。ステレオなら2。5.1chなら6となります。
- * - "pcmbuf" はPCMデータを格納するためのバッファポインタ配列です。
- * バッファの実体は CriMvSoundInterface で準備してください。バッファの数は"nch"と同じでなければいけません。
- * - "req_nsmpl" は CriMvSoundInterface が要求するPCMデータの最大サンプル数です。
- * "pcmbuf"で指定した各バッファ実体には、このサンプル数が書き込まれても大丈夫なだけの領域を必ず準備してください。
- * - * 登録されたコールバック関数を呼び出すタイミングは CriMvSoundInterface の任意となります。 - * - * \sa CriMvSoundInterface::SetCallbackGetSint16PcmData() - */ - /* pure */ virtual void SetCallbackGetFloat32PcmData(CriUint32 (*func)(void *obj, CriUint32 nch, CriFloat32 *pcmbuf[], CriUint32 req_nsmpl), void *obj)=0; - - /*EN - * \brief Sets the callback function for retrieving 16 bit integer PCM sound samples - * \param func Function that will be called when 16 bit integer PCM data is needed - * \param obj Pointer to user-specifed data, passed as the first argument to the callback - * - * Sets a function that CriMvSoundInterface will call when it needs audio data in 16 bit integer - * PCM format. This callback function takes 4 arguments:
- * - * - \a obj: The user-specified \a obj parameter passed to SetCallbackGetSint16PcmData().
- * - \a nch: The number of audio channels. Mono is 1, stereo is 2, 5.1 channel is 6.
- * - \a pcmbuf: An array of buffers to hold the returned PCM data. There must be one element of - * this array for each channel.
- * - \a req_nsmpl: The number of samples requested. Each buffer must be large enough to hold this - * many samples (i.e. \a nch * \a req_nsmpl). - * - * \remarks - * The maximum number of channels is CRIMV_PCM_BUFFER_MAX (currently 8) - * - * \sa CriMvSoundInterface::SetCallbackGetFloat32PcmData() - */ - /*JP - * \brief 16bit形式でPCMデータを取得するコールバック関数の登録 - * \param func CriMvSoundInterface がPCMデータを要求する際に呼びだすコールバック関数 - * \param obj コールバック関数を実行する際に第一引数に指定するオブジェクト変数 - * - * PCMフォーマットが違う以外は、 CriMvSoundInterface::SetCallbackGetFloat32PcmData() と同じです。 - * - * \sa CriMvSoundInterface::SetCallbackGetFloat32PcmData() - */ - /* pure */ virtual void SetCallbackGetSint16PcmData(CriUint32 (*func)(void *obj, CriUint32 nch, CriSint16 *pcmbuf[], CriUint32 req_nsmpl), void *obj)=0; - - /*EN - * \brief Starts sound output - * - * CRI Movie will call this method when it needs to start playing sound. The PCM data callback function - * has to be called after this function until movie playback is finished.
- * - * Your sound module should begin incrementing its playback time when this method is called. - * - * \remarks - * On success, this should set the status to CriMvSoundInterface::MVEASY_SOUND_STATUS_EXEC. - */ - /*JP - * \brief サウンド出力の開始 - * - * サウンド出力を開始します。PCMデータ取得用コールバック関数は、本関数の呼出し後から実行してください。 - */ - /* pure */ virtual void Start(void)=0; - - /*EN - * \brief Stops sound output - * - * CRI Movie will call this when the movie playback stops, or the status changes to MVEASY_STATUS_PLAYEND.
- * - * When EasyPlayer wants to pause and restart playback, it will call CriMvSoundInterface::Pause() - * instead of this method.
- * - * Your sound module should set its playback time to 0 when this method is called. - * - * \remarks - * This should set the status to CriMvSoundInterface::MVEASY_SOUND_STATUS_STOP. - * - * \sa CriMvSoundInterface::Pause(), CriMvSoundInterface::Start() - */ - /*JP - * \brief サウンド出力の停止 - * - * サウンド出力を停止します。再開できるようにする必要はありません。
- * EasyPlayerが再開処理を行いたい場合は、本関数ではなく、 CriMvSoundInterface::Pause()を呼び出します。
- * CriMvSoundInterface::Stop() 呼出し後は、コルーバック関数を呼ばないように実装してください。 - * - * \sa CriMvSoundInterface::Pause(), CriMvSoundInterface::Stop() - */ - /* pure */ virtual void Stop(void)=0; - - /*EN - * \brief Gets status of sound module - * \return The module status - * - * This must return one of the enumerated values in CriMvSoundInterface::Status.
- * - * While this method returns CriMvSoundInterface::MVEASY_SOUND_STATUS_EXEC, EasyPlayer will call the - * PCM data callback.
- * When a movie has finished playing and this method returns CriMvSoundInterface::MVEASY_SOUND_STATUS_STOP, - * EasyPlayer will call CriMvSoundInterface::DestroyOutput(). - * - * \sa CriMvSoundInterface::Status - */ - /*JP - * \brief サウンドモジュールの状態取得 - * - * サウンドモジュールの状態を取得します。 - * - * \sa CriMvSoundInterface::Status - */ - /* pure */ virtual Status GetStatus(void)=0; - - /*EN - * \brief Pauses or resumes sound output - * \param sw Pause or resume playback. - * - * If \a sw is 1 (ON), output will be paused.
- * If \a sw is 0 (OFF), output will be resumed.
- * - * Temporarily pauses or resumes sound output.
- * - * When you pause sound output, you must pause your playback timer as well. - */ - /*JP - * \brief サウンド出力の一時停止または再開 - * \param sw ポーズスイッチ。ポーズONの場合は1、ポーズOFF(レジューム)の場合は0を指定します。 - * - * 本関数の動作は引数に依存します。
- * 引数 sw がON(1)なら、一時停止。引数 sw がOFF(0)ならサウンド出力再開です。 - */ - /* pure */ virtual void Pause(CriBool sw)=0; - - /*EN - * \brief Gets the time, in seconds, that sound has been playing - * \param count Playback time counter - * \param unit Counter increment per second - * - * CRI Movie calls this method periodically for some damn reason.
- *
- * The time, in seconds, is specified by \a count / \a unit.
- * - * For example, if \a count was 500 and \a unit was 1000, that would be 0.5 seconds.
- * - * \remarks - * Before Start() is called, and after Stop() is called, \a count should be 0. - */ - /*JP - * \brief 再生時刻の取得 - * \param count タイマカウント - * \param unit 1秒あたりのタイマカウント値。count ÷ unit で秒単位の時刻となります。 - * - * タイマ時刻を取得します。時刻はcountとunitの二つの変数で表現します。
- * count ÷ unit で秒単位の時刻となるような値を返します。
- * 再生開始前( CriMvSoundInterface::Start()呼び出し前)および - * 再生停止後( CriMvSoundInterface::Stop()呼び出し後)は、時刻0(タイマカウントが0)を返します。 - */ - /* pure */ virtual void GetTime(CriUint64 &count, CriUint64 &unit)=0; // sec = count / unit. - -protected: - virtual ~CriMvSoundInterface(void) {} -}; - -/*EN - * \brief System Timer Interface Class for EasyPlayer - * \ingroup MDL_IF_TIMER - * - * If you want to synchronize video frames with something other than the audio track, or if you - * need to play a movie that does not have an audio track, you will need to pass an instance of - * a class derived from CriMvSystemTimerInterface to CriMvEasyPlayer::Create().
- * - * If you do not need any special timer facilities, you can pass NULL to CriMvEasyPlayer::Create() instead.
- * - * All functions are pure virtual. - * - * \sa CriMvEasyPlayer::Create(), CriMvEasyPlayer::SyncMasterTimer() - */ -/*JP - * \brief システムタイマーインタフェース for EasyPlayer - * \ingroup MDL_IF_TIMER - * - * システムタイマーは音無しムービ再生時に、ビデオフレームの送出タイミングを調整するために使用されます。
- * このクラスを定義することで、自前のタイマシステムを使ってEasyPlayerのストリーミング再生が可能になります。
- * 全ての関数は純粋仮想関数として定義されているので、全ての関数を必ず実装してください。 - * - * \sa CriMvEasyPlayer::Create(), CriMvEasyPlayer::SyncMasterTimer() - */ -class CriMvSystemTimerInterface -{ -public: - /*EN - * \brief Starts timer and resets it to 0 - * - * When this method is called, your internal counter should initialize itself to 0 and start - * normal operation. - */ - /*JP - * \brief タイマ開始 - * - * タイマのカウントを開始します。この関数が呼ばれた時が時刻0となります。 - */ - /* pure */ virtual void Start(void)=0; - - /*EN - * \brief Stops the timer and resets it to 0 - * - * When this method is called, your internal counter should stop incrementing, and re-initialize - * itself to 0. After this method has been called, CriMvSystemTimerInterface::GetTime() must - * return a time of 0 seconds. - */ - /*JP - * \brief タイマ停止 - * - * タイマのカウントを停止します。この関数が呼ばれたあとに、そのタイマを再開することはありません。 - */ - /* pure */ virtual void Stop(void)=0; - - /*EN - * \brief Pauses or resumes the timer - * - * \param sw Pause or resume timer operation. - * - * If \a sw is 1 (ON), the timer will be paused.
- * If \a sw is 0 (OFF), the timer will be resumed.
- * - * Temporarily pauses or resumes the timer.
- * - * When you pause the timer, you must maintain the previous value of the counter. - */ - /*JP - * \brief タイマの一時停止または再開 - * \param sw ポーズスイッチ。ON(1)なら一時停止、OFF(0)なら再開。 - * - * 本関数の動作は引数に依存します。
- * 引数 sw がON(1)なら、一時停止。引数 sw がOFF(0)ならタイマカウント再開です。 - */ - /* pure */ virtual void Pause(CriBool sw)=0; - - /*EN - * \brief Gets the time, in seconds, that the timer has been running - * - * \param count Timer counter - * \param unit Counter increment per second - * - * CRI Movie calls this method periodically to synchronize video playback with the - * movie's internal framerate.
- *
- * The time, in seconds, is specified by \a count / \a unit.
- * - * For example, if \a count was 500 and \a unit was 1000, that would be 0.5 seconds.
- * - * \remarks - * Before Start() is called, and after Stop() is called, \a count should be 0. - */ - /*JP - * \brief 経過時刻の取得 - * \param count タイマカウント - * \param unit 1秒あたりのタイマカウント値。count ÷ unit で秒単位の時刻となります。 - * - * タイマ時刻を取得します。時刻はcountとunitの二つの変数で表現します。
- * count ÷ unit で秒単位の時刻となるような値を返します。
- * 再生開始前( CriMvSystemTimerInterface::Start()呼び出し前)および - * 再生停止後( CriMvSystemTimerInterface::Stop()呼び出し後)は、時刻0(タイマカウントが0)を返します。 - */ - /* pure */ virtual void GetTime(CriUint64 &count, CriUint64 &unit)=0; - -protected: - virtual ~CriMvSystemTimerInterface(void) {} -}; - - -/*EN - * \brief EasyPlayer Interface class for CRI Movie - * \ingroup MDL_EASY_PLAYER - */ -/*JP - * \brief EasyPlayerインタフェース - * \ingroup MDL_EASY_PLAYER - */ -class CriMvEasyPlayer : public CriAllocator -{ -public: - /*EN - * \brief The possible states an EasyPlayer handle can be in. - * - * An EasyPlayer handle takes on various states, depending on where it is in the decoding process. - * You can check the status of a valid EasyPlayer handle at any time by calling CriMvEasyPlayer::GetStatus(). - * - * An EasyPlayer handle is created in the MVEASY_STATUS_STOP state. During movie playback, the status - * transitions through various states from MVEASY_STATUS_STOP to MVEASY_STATUS_PLAYEND. - * - * An application does not need to check all states. At a minimum, it only needs to check for - * MVEASY_STATUS_STOP, MVEASY_STATUS_PLAYING, MVEASY_STATUS_PLAYEND, - * and MVEASY_STATUS_ERROR. - * - * If an application calls CriMvEasyPlayer::DecodeHeader(), the status of the EasyPlayer handle will change to - * MVEASY_STATUS_WAIT_PREP when CRI Movie has finished analyzing the movie information. The EasyPlayer - * handle will remain in this state until the application calls CriMvEasyPlayer::Prepare() or - * CriMvEasyPlayer::Start(). Once the state has changed to MVEASY_STATUS_WAIT_PREP, information - * about the movie can be retrieved by calling CriMvEasyPlayer::GetMovieInfo(). - * - * If an application calls CriMvEasyPlayer::Prepare(), the EasyPlayer handle status will change to - * MVEASY_STATUS_READY once CRI Movie has finished buffering enough input and decoded output for playback. - * The handle will remain in this state until CriMvEasyPlayer::Start() is called. This allows the application - * to better control playback timing, since a movie can immediately start playing. - * - * Once CriMvEasyPlayer::Start() is called and the movie is actively playing, the status will alternate - * between MVEASY_STATUS_PLAYING and MVEASY_STATUS_PREP, as CRI Movie plays back frames and decodes - * new ones. - * - * When the movie has finished playing normally, the status of the EasyPlayer handle will automatically change - * to MVEASY_STATUS_PLAYEND. If the movie is in looping mode, however, once the movie reaches the - * end, it will start playing from the beginning and the status will not change to MVEASY_STATUS_PLAYEND. - * - * When CriMvEasyPlayer::Stop() is called, the status of the handle will change to MVEASY_STATUS_STOP - * once it has finished any decoding and playback that is in progress. This does not happen immediately, - * but will take a few cycles. - * - * If there are any problems during playback, for instance insufficient memory or invalid input data, the - * status will change to MVEASY_STATUS_ERROR. When the handle is in state MVEASY_STATUS_ERROR, - * the application must call CriMvEasyPlayer::Stop() and wait until the state changes to MVEASY_STATUS_STOP - * before doing anything else with the handle. - * - * Once the state is MVEASY_STATUS_STOP or MVEASY_STATUS_PLAYEND, the handle can be deleted by - * calling CriMvEasyPlayer::Destroy(). - * - * \attention - * As of CRI Movie version 2.00, the handling of the MVEASY_STATUS_ERROR state has changed. Previously, - * a handle could be destroyed when it was in the MVEASY_STATUS_ERROR state. Now, an application - * must call CriMvEasyPlayer::Stop() and wait for the MVEASY_STATUS_STOP state before destroying - * the handle. - * - * \sa CriMvEasyPlayer::GetStatus(), CriMvEasyPlayer::Start(), CriMvEasyPlayer::DecodeHeader(), - * CriMvEasyPlayer::Prepare(), CriMvEasyPlayer::GetMovieInfo(), CriMvEasyPlayer::Stop(), - * CriMvEasyPlayer::Destroy() - */ - /*JP - * \brief EasyPlayerハンドル状態 - * - * EasyPlayer のハンドル状態です。 - * ハンドル状態は CriMvEasyPlayer::GetStatus() でいつでも取得することが出来ます。
- * ハンドル作成直後は MVEASY_STATUS_STOP 状態です。 - * - * ハンドル状態は MVEASY_STATUS_STOP から MVEASY_STATUS_PLAYEND まで順に遷移していきます。
- * アプリケーションがムービを再生するにあたって、必ずしもこの全ての状態をチェックする必要はありません。
- * 最低限、MVEASY_STATUS_STOP, MVEASY_STATUS_PLAYING, MVEASY_STATUS_PLAYEND, MVEASY_STATUS_ERROR さえ - * チェックすれば、ムービの再生を行うことができます。 - * - * EasyPlayer ハンドル作成後、ムービの解像度などが既に確定している場合は、アプリケーションは - * CriMvEasyPlayer::Start() を直接呼び出すことができます。この場合、ハンドル状態は自動的に - * MVEASY_STATUS_PLAYEND まで遷移していきます。 - * - * 最初に CriMvEasyPlayer::DecodeHeader() を呼び出した場合は、ヘッダ解析が終了するとハンドル状態は - * MVEASY_STATUS_WAIT_PREP となり、アプリケーションから CriMvEasyPlayer::Prepare() または - * CriMvEasyPlayer::Start() が呼ばれるまで待機します。 - * - * MVEASY_STATUS_WAIT_PREP状態以降、 CriMvEasyPlayer::GetMovieInfo() でムービ情報を取得することができます。
- * CriMvEasyPlayer::Prepare() を呼び出した場合は、ヘッダ解析およびデータのバッファリングが終わると、 - * ハンドル状態は MVEASY_STATUS_READY となり、アプリケーションから CriMvEasyPlayer::Start() が - * 呼ばれるまで待機します。これによって再生開始のタイミングを調整することができます。 - * - * 再生が終了すると自動的に MVEASY_STATUS_PLAYEND になります。 - * - * CriMvEasyPlayer::Stop() を呼び出した場合は、デコーダの停止処理が終わったあとに MVEASY_STATUS_STOP - * 状態になります。 CriMvEasyPlayer::Stop() 終了直後に停止状態になるとは限りません。 - * - * メモリ不足やデータエラーなど何らかの問題が発生した場合は MVEASY_STATUS_ERROR 状態となります。
- * MVEASY_STATUS_ERROR 状態になった場合は CriMvEasyPlayer::Stop() を呼び出してハンドル状態が - * MVEASY_STATUS_STOP 状態に遷移させてください。
- * - * CriMvEasyPlayer::Destroy() は MVEASY_STATUS_STOP, MVEASY_STATUS_PLAYEND の - * いずれかの状態の時のみ呼び出すことができます。 - * - * \attention - * CRI Movie Ver.2.00 で MVEASY_STATUS_ERROR 状態についての仕様が変更になりました。
- * MVEASY_STATUS_ERROR 状態でハンドル破棄が出来なくなり、 CriMvEasyPlay::Stop() を呼び出す必要があります。 - * - * \sa CriMvEasyPlayer::GetStatus(), CriMvEasyPlayer::Start(), CriMvEasyPlayer::DecodeHeader(), - * CriMvEasyPlayer::Prepare(), CriMvEasyPlayer::GetMovieInfo(), CriMvEasyPlayer::Stop(), - * CriMvEasyPlayer::Destroy() - */ - enum Status { - MVEASY_STATUS_STOP, /*EN< Standstill. No processing is happening. - * EasyPlayer handles are created in this state. */ - /*JP< 停止中 */ - MVEASY_STATUS_DECHDR, /*EN< The EasyPlayer handle is now parsing the movie header, - * including information about the width and height of the video stream. */ - /*JP< ヘッダ解析中 */ - MVEASY_STATUS_WAIT_PREP, /*EN< The EasyPlayer handle is a waiting for the work buffer to be allocated. */ - /*JP< バッファリング開始待機中 */ - MVEASY_STATUS_PREP, /*EN< The EasyPlayer handle is now buffering video and audio data. */ - /*JP< 再生準備中 */ - MVEASY_STATUS_READY, /*EN< Ready to start playback. */ - /*JP< 再生待機 */ - MVEASY_STATUS_PLAYING, /*EN< The decoders are currently decoding and playing output. */ - /*JP< 再生中 */ - MVEASY_STATUS_PLAYEND, /*EN< The end of the movie has been reached. */ - /*JP< 再生終了 */ - MVEASY_STATUS_ERROR, /*EN< An error has occurred. */ - /*JP< エラー */ - - /* Keep enum 4bytes */ - MVEASY_STATUS_MAKE_ENUM_SINT32 = 0x7FFFFFFF - }; - - /*EN - * \brief Supported timer types; used to synchronize video frames. - */ - /*JP - * \brief タイマ種別 - */ - enum TimerType { - MVEASY_TIMER_NONE, /*EN< No synchronization. The output is available as soon as - * each frame is decoded. */ - /*JP< ビデオフレームは時刻同期をしません。デコードが終わったフレーム - * はすぐに取得することができます。 */ - MVEASY_TIMER_SYSTEM, /*EN< Video frames synchronize to the system timer.
- * You must provide an instance of CriMvSystemTimerInterface to - * CriMvEasyPlayer::Create(). */ - /*JP< ビデオフレームはシステム時刻に同期します。システム時刻はアプリケーション - * が CriMvSystemTimerInterface としてCriMvEasyハンドルに設定する必要があります。 */ - MVEASY_TIMER_AUDIO, /*EN< Video frames synchronize with the movie's audio data.
- * You must provide an instance of CriMvSoundInterface to CriMvEasyPlayer::Create().
- * If the movie does not have audio, video frames will synchronize with the system timer. */ - /*JP< ビデオフレームはムービのオーディオ時刻に同期します。 - * アプリケーションは GetTime関数を含む CriMvSoundInterface をCriMvEasy - * ハンドルに設定する必要があります。もしもムービデータにオーディオが含まれて - * いない場合は、ビデオはシステム時刻に同期します。 */ - - /* Keep enum 4bytes */ - MVEASY_TIMER_MAKE_ENUM_SINT32 = 0x7FFFFFFF - }; - - /*EN - * \ingroup MODULE_INIT - * - * \brief Creates an EasyPlayer handle - * - * \param heap Handle to a CriHeap object - * \param freader File input interface - * \param stimer System timer interface - * \param sound Sound module interface - * \param err Optional error code - * - * \return A valid CriMvEasyPlayer handle, or NULL if the handle cannot be allocated - * - * Creates and initialize a new EasyPlayer handle. Its status is initially MVEASY_STATUS_STOP. - * Memory for the handle is allocated from the provided CriHeap object. - * - * If memory allocation fails, this function will return NULL. Be sure to initialize and create - * your heap with criHeap_Initialize() and criHeap_Create() before calling this function. - * - * \remarks - * CriMv::Initialize() must be called before calling this function. - * - */ - /*JP - * \ingroup MODULE_INIT - * \brief EasyPlayerハンドルの作成 - * \param heap CriHeapハンドル - * \param freader ファイル読み込みインタフェース - * \param stimer システムタイマインタフェース - * \param sound サウンドインタフェース - * \param err エラー情報 - * \return CriMvEasyハンドルを返します。エラーが発生した場合は、NULLを返します。 - * - * 本関数は CriMv::Initialize() 呼び出しよりもに実行してください。
- * ハンドル作成後はハンドル状態はMVEASY_STATUS_STOPとなります。
- * ハンドル確保に必要なメモリは全て、引数で渡された CriHeap を使って確保されます。
- * メモリ不足などでエラーが発生した場合は、本関数はNULLを返します。 - * - */ - static CriMvEasyPlayer* CRIAPI Create(CriHeap heap, - CriMvFileReaderInterface *freader, - CriMvSystemTimerInterface *stimer, - CriMvSoundInterface *sound, - CriError &err=CriMv::ErrorContainer); - /*EN - * \ingroup MODULE_INIT - * \brief Destroy a handle - * \param err Optional error code - * - * \ingroup MODULE_INIT - * - * \brief Destroys an EasyPlayer handle - * \param err Optional error code - * - * Destroys an EasyPlayer handle previously created with CriMvEasyPlayer::Create(), and frees its resources. - * - * An EasyPlayer handle can only be destroyed when it is in the MVEASY_STATUS_STOP or MVEASY_STATUS_PLAYEND state. - * Attempting to destroy a handle when it is in any other state will cause an error. - * - * Any work buffers allocated via CriHeap, if still associated with the handle, are freed by this call. - * - * \sa CriMvEasyPlayer::Create(), CriMvEasyPlayer::Status, CriMvEasyPlayer::GetStatus() - */ - /*JP - * \ingroup MODULE_INIT - * \brief EasyPlayerハンドルの破棄 - * \param err エラー情報(省略可) - * - * CriMvEasyPlayer::Create()で作成したEasyPlayerハンドルを破棄します。 - * - * ハンドル状態が MVEASY_STATUS_STOP 、 MVEASY_STATUS_PLAYEND の時にのみハンドルを破棄することができます。
- * それ以外の状態で呼び出した場合は、エラーになります。
- * - * ハンドル状態が MVEASY_STATUS_ERROR だった場合は、CriMvEasyPlayer::Stop() を呼び出して - * MVEASY_STATUS_STOP 状態になってからハンドル破棄してください。
- * ハンドル状態は CriMvEasyPlayer::GetStatus() で確認することができます。 - * - * ハンドル作成時に指定したCriHeapによって確保されたメモリで未解放の全ては、 - * この関数の呼び出しによって解放されます。 - * - * \sa CriMvEasyPlayer::Create(), CriMvEasyPlayer::Status, CriMvEasyPlayer::GetStatus() - */ - void Destroy(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_BASIC - * - * \brief Returns status of an EasyPlayer handle. - * \param err Optional error code - * \return Handle status - * - * Returns the current status of an EasyPlayer handle. The status will be one of the values - * defined by CriMvEasyPlayer::Status. - * - * \sa CriMvEasyPlayer::Status - */ - /*JP - * \ingroup MODULE_BASIC - * \brief ハンドル状態の取得 - * \param err エラー情報(省略可) - * \return ハンドル状態 CriMvEasyPlayer::Status - * - * ハンドル状態を取得します。 - * - * \sa CriMvEasyPlayer::Status - */ - Status GetStatus(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_BASIC - * - * \brief Executes heatbeat functions for an EasyPlayer handle - * \param err Optional error code - * - * Performs regular processing for an EasyPlayer handle, including handoff and parsing of input - * buffers, and audio decoding. Additionally, it checks for situations where the handle state - * should change to one of the values defined by CriMvEasyPlayer::Status, and changes state as - * necessary. - * - * This function and CriMvEasyPlayer::ExecuteDecode() should be called periodically during movie - * playback or when waiting for CriMvEasyPlayer::DecodeHeader() to complete. It takes a relatively - * low CPU load, and should typically be called on every vertical blank. - * - * \remarks - * Note that this function does not perform any video decoding. Decoding is done in - * CriMvEasyPlayer::ExecuteDecode(). - * - * \sa CriMvEasyPlayer::Status, CriMvEasyPlayer::ExecuteDecode(), CriMvEasyPlayer::DecodeHeader() - */ - /*JP - * \ingroup MODULE_BASIC - * \brief EasyPlayerサーバ関数 - * \param err エラー情報(省略可) - * - * ムービのヘッダ解析や入力バッファ制御、オーディオデコード等を行います。
- * EasyPlayer ハンドルの状態遷移もこの関数で行います。
- * この関数はビデオのデコードは行いません。そのためCPU負荷はあまり高くなりません。
- * 本関数はアプリケーションのメインループで毎回呼び出すようにしてください。 - * - * \sa CriMvEasyPlayer::Status - */ - void Update(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_BASIC - * - * \brief Synchronizes the master timer of an EasyPlayer handle. - * \param err Optional error code - * - * Synchronizes the timing of video frames to the master timer used by this EasyPlayer handle. - * If the master timer is of type MVEASY_TIMER_AUDIO and the movie does not have audio, - * EasyPlayer will use the system timer that was set when the handle was created. - * - * \sa CriMvEasyPlayer::TimerType, CriMvEasyPlayer::SetMasterTimer(), CriMvSystemTimerInterface - */ - /*JP - * \ingroup MODULE_BASIC - * \brief マスタタイマへの同期 - * \param err エラー情報(省略可) - * - * ムービ再生時刻をマスタタイマに同期させます。
- * マスタタイマは CriMvEasyPlayer::SetMasterTimer() によって指定されたタイマを使います。
- * タイマ種別として MVEASY_TIMER_AUDIO が指定されていて、再生するムービにオーディオが - * 含まれていない場合は、ハンドル作成時のシステムタイマを使用します。 - * - * この関数は、ハンドル作成時に指定したシステムタイマインタフェースの - * CriMvSystemTimerInterface::GetTime() を呼び出します。 - * - * \sa CriMvEasyPlayer::TimerType, CriMvEasyPlayer::SetMasterTimer(), CriMvSystemTimerInterface - */ - void SyncMasterTimer(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_BASIC - * - * \brief Decodes a video frame - * \param err Optional error code - * \return \a TRUE If the movie is currently in a playback state - * \return \a FALSE If the movie is not playing - * - * Performs the actual video decoding. Each call to this function decodes a single frame. - * It does not return until the frame has been decoded. - * - * Video decoding can impose a very heavy CPU load, so calling this function from an application's - * main thread may cause your application to miss the vertical blank interval. To avoid this situation, - * ExecuteDecode() can be called from a separate, lower-priority thread. See the Mutithreaded Decoding - * tutorial for a full explanation. - * - * The return value describes the movie playback state. If TRUE, the movie is currently playing - * (or decoding the movie header) or ready to play. If FALSE, playback has not yet been started, - * or playback has finished. - * - * If a decoding thread is used, an application must wait until this function returns FALSE before destroying - * the thread. Otherwise, the handle state will not transition to MVEASY_STATUS_STOP or MVEASY_STATUS_PLAYEND, - * and the EasyPlayer handle cannot be destroyed. - * - * \attention - * ExecuteDecode() is the only CRI Movie function that is safe to call from a separate thread. - * No other CRI Movie functions should be considered to be thead-safe. - * - */ - /*JP - * \ingroup MODULE_BASIC - * \brief ビデオデコード - * \param err エラー情報(省略可) - * \return ムービ再生中はTRUE 、再生終了また停止後はFALSEを返します。 - * - * ビデオデータのデコードを行います。
- * 本関数は1ピクチャ分のデコードを終わるまで終了しません。
- * ピクチャデコードは負荷の高い処理なので、アプリケーションのメインスレッドから呼び出すと処理落ちが発生する可能性があります。
- * その場合は、メインスレッドよりも優先度の低い別スレッドから呼び出すようにしてください。 - * - * 本関数の返り値は、ムービ再生の実行中かどうかを表しています。
- * デコード用スレッドを終了する場合は、返り値がFALSEになるのを待たなければいけません。
- * 返り値がTRUEの間にデコードスレッドを終了してしまうと、ハンドルの状態が MVEASY_STATUS_STOP や - * MVEASY_STATUS_PLAYEND に遷移できず、ハンドル破棄が出来なくなります。
- * - */ - CriBool ExecuteDecode(CriError &err=CriMv::ErrorContainer); - - /* 再生制御 */ - /*EN - * \ingroup MODULE_CONTROL - * - * \brief Sets the name of the movie file to play - * \param fname Name of the movie file - * \param err Optional error code - * - * Sets the name of the movie file to play, but does not open the file. The length of the filename - * (including path) is limited to CRIMV_MAX_FILE_NAME characters. EasyPlayer copies this - * string to internal memory, so a temporary variable can be used. - * - * If an application plays the same movie repeatedly, it only needs to call this function once. - * - * Multiple calls to this function will overwrite previous values. Calling CriMvEasyPlayer::SetData() - * will clear any filename set by this function. - * - * \remarks - * This function can only be called when the handle status is MVEASY_STATUS_STOP or MVEASY_STATUS_PLAYEND, - * or from the file request callback. See CriMvEasyPlayer::SetFileRequestCallback() for details. - * - * \remarks - * Calling this function does not open the file. The file is opened by a call to CriMvEasyPlayer::Update(). - * - * \sa CriMvEasyPlayer::SetFileRequestCallback(), CriMvEasyPlayer::SetData() - */ - /*JP - * \ingroup MODULE_CONTROL - * - * \brief 再生ファイルの指定 - * \param fname ムービファイルパス - * \param err エラー情報(省略可) - * - * 再生するムービのファイルパスを設定します。ファイルパスの最大長は CRIMV_MAX_FILE_NAME バイトです。
- * EasyPlayerは内部でこのファイルパスをコピーするので、引数で渡した文字列は破棄してもかまいません。 - * - * 同じファイルを繰り返し再生する場合は、この関数を再度呼び出す必要はありません。 - * - * この関数を呼び出した直後にもう一度この関数を呼び出すと、前回のファイル情報は新しいファイル情報に上書きされます。 - * CriMvEasyPlayer::SetData()関数を呼び出した場合は、事前に設定したファイル情報がクリアされます。 - * - * \para 備考1: - * この関数はハンドル状態が MVEASY_STATUS_STOP もしくは MVEASY_STATUS_PLAYEND時のみ呼び出し可能です。 - * またはファイル要求コールバック関数内でもこの関数を呼び出すことができます。詳細は CriMvEasyPlayer::SetFileRequestCallback()関数を - * 参照してください。 - * - * \para 備考2: - * この関数の内部ではファイルのオープン要求はしません。ファイルのオープン処理は CriMvEasyPlayer::Update() 関数の中で行われます。 - * - * \sa CriMvEasyPlayer::SetFileRequestCallback(), CriMvEasyPlayer::SetData(), CriMvEasyPlayer::SetFileRange() - */ - void SetFile(CriChar8 *fname, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_CONTROL - * - * \brief Sets in-memory movie data - * \param dataptr Pointer to movie data - * \param datasize Size of data, in bytes - * \param err Optional error code - * - * Sets the in-memory data buffer for this EasyPlayer handle to point to the provided buffer, - * but does not attempt to read that buffer. After this call, the memory pointed to by \a dataptr - * belongs to CRI Movie and must remain valid until playback is complete. - * - * If an application plays the same movie data repeatedly, it only needs to call this function once. - * - * Multiple calls to this function will overwrite previous values. Calling CriMvEasyPlayer::SetFile() - * will clear any pointer set by this function. - * - * \remarks - * This function can only be called when the handle status is MVEASY_STATUS_STOP or MVEASY_STATUS_PLAYEND, - * or from the file request callback. See CriMvEasyPlayer::SetFileRequestCallback() for details. - * - * \remarks - * Calling this function does not attempt to reference the memory. The memory read is initiated by a call - * to CriMvEasyPlayer::DecodeHeader(), CriMvEasyPlayer::Prepare() or CriMvEasyPlayer::Start(). - * - * \sa CriMvEasyPlayer::SetFileRequestCallback(), CriMvEasyPlayer::SetFile(), CriMvEasyPlayer::SetFileRange() - */ - /*JP - * \ingroup MODULE_CONTROL - * \brief メモリ上データの指定 - * \param dataptr データポインタ - * \param datasize データサイズ - * \param err エラー情報(省略可) - * - * この関数はEasyPlayerのハンドル状態がMVEASY_STATUS_STOPかMVEASY_STATUS_PLAYENDの時に呼び出してください。
- * または、ファイル要求コールバックの内部で呼び出すことができます。
- * - * 本関数を繰り返し呼び出した場合は、メモリ情報は上書きされます。
- * CriMvEasyPlayer::SetFile()を呼び出した場合は、本関数で指定したメモリ情報はハンドル内から消去されます。 - * - * 同じハンドルで同じムービデータを繰り返し再生する場合は、本関数の呼び出しは省略することができます。 - * - * 指定されたメモリ領域に実際にアクセスするのは、 CriMvEasyPlayer::DecodeHeader(), CriMvEasyPlayer::Prepare(), - * CriMvEasyPlayer::Start() のいずれかが呼び出された時以降です。
- * - * \sa CriMvEasyPlayer::SetFileRequestCallback(), CriMvEasyPlayer::SetFile(), CriMvEasyPlayer::SetFileRange() - */ - void SetData(CriUint8 *dataptr, CriUint32 datasize, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_CONTROL - * \brief Set a pack file and pass offset and range of movie file to an EasyPlayer handle - * \param fname File name string pointer of the pack file - * \param offset offset in byte to movie data in the packing file [in bytes] - * \param range size of movie data from the offset in the packing file [in bytes] - * \param err Optional error code - * - * Sets the name of the pack file that contains the movie file to play. - * EasyPlayer tries to read data from 'offset' through 'range' in the pack file as the movie data. - * Passing a negative value as range, EasyPlayer reads data until the end of the pack file. - * - * The length of file name is limited until CRIMV_MAX_FILE_NAME. - * EasyPlayer handle copies the file name string into the handle. - * You can use a temporary variable as the file name string. - * - * If an application plays the same movie repeatedly, it only needs to call this function once. - * - * Multiple calls to this function will overwrite previous values. Calling CriMvEasyPlayer::SetData() - * will clear any filename set by this function. - * - * \remarks - * This function can only be called when the handle status is MVEASY_STATUS_STOP or MVEASY_STATUS_PLAYEND, - * or from the file request callback. See CriMvEasyPlayer::SetFileRequestCallback() for details. - * - * \remarks - * Calling this function does not open the file. The file is opened by a call to CriMvEasyPlayer::Update(). - * - * \sa CriMvEasyPlayer::SetFileRequestCallback(), CriMvEasyPlayer::SetData(), CriMvEasyPlayer::SetFile() - */ - /*JP - * \ingroup MODULE_CONTROL - * - * \brief 再生したいムービファイルを含むパックファイルの指定 - * \param fname パックファイル名 (パスを含む) - * \param offset パックファイル内のムービデータまでのオフセット (単位: バイト) - * \param range パックファイル内のムービデータのサイズ (単位:バイト) - * \param err エラー情報(省略可) - * - * 再生するムービを含むパックファイルを指定します。引数で指定した offset 位置から range サイズ分までをパックファイル内に含まれるムービデータみなします。 - * rangeに負値を入力するとパックファイルの終端までをムービとして読み込みます。 - * - * パックファイルのファイルパスの最大長は CRIMV_MAX_FILE_NAME バイトです。 - * EasyPlayerは内部でこのファイルパスをコピーするので、引数で渡した文字列は破棄してもかまいません。 - * - * 同じファイルを繰り返し再生する場合は、この関数を再度呼び出す必要はありません。 - * - * この関数を呼び出した直後に、もう一度この関数を呼び出すと、前回のファイル情報は新しいファイル情報に上書きされます。 - * CriMvEasyPlayer::SetData()関数を呼び出した場合は、事前に設定したファイル情報がクリアされます。 - * - * \para 備考1: - * この関数はハンドル状態が MVEASY_STATUS_STOP もしくは MVEASY_STATUS_PLAYEND時のみ呼び出し可能です。 - * またはファイル要求コールバック関数内でもこの関数を呼び出すことができます。詳細は CriMvEasyPlayer::SetFileRequestCallback()関数を - * 参照してください。 - * - * \para 備考2: - * この関数の内部ではファイルのオープン要求はしません。ファイルのオープン処理は CriMvEasyPlayer::Update() 関数の中で行われます。 - * - * \sa CriMvEasyPlayer::SetFileRequestCallback(), CriMvEasyPlayer::SetData(), CriMvEasyPlayer::SetFile() - */ - void SetFileRange(CriChar8 *fname, CriUint64 offset, CriSint64 range, CriError &err=CriMv::ErrorContainer); - - /* 前回のムービデータをもう一度登録する(ファイル要求コールバック関数でのみ呼ぶこと) */ - void SetPreviousDataAgain(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_CONTROL - * - * \brief Reads movie header and analyzes movie information - * \param err Optional error code - * - * This function opens the movie file, reads the header, and starts to analyze the movie data. - * It does not start movie playback. - * - * When this function is called, the handle status changes to MVEASY_STATUS_DECHDR. Once EasyPlayer - * has finished reading the header and analyzing the movie, the status changes to MVEASY_STATUS_WAIT_PREP. - * When the status is MVEASY_STATUS_WAIT_PREP, CriMvEasyPlayer::GetMovieInfo() can be successfully called. - * - * To continue playback, call CriMvEasyPlayer::Prepare() or CriMvEasyPlayer::Start() when the handle status - * is MVEASY_STATUS_WAIT_PREP. - * - * \remarks - * This function can only be called when the handle status is MVEASY_STATUS_STOP or MVEASY_STATUS_PLAYEND. - * - * \remarks - * You must either call CriMvEasyPlayer::SetFile() or CriMvEasyPlayer::SetData(), or provide a file request - * callback with CriMvEasyPlayer::SetFileRequestCallback(), before calling this function. - * - * \remarks - * Once this function has been called, CriMvEasyPlayer::ExecuteDecode() and CriMvEasyPlayer::Update() must be - * called periodically in order for this function to have any effect. Otherwise, the handle status will - * never change. - * - * \sa CriMvEasyPlayer::GetStatus(), CriMvEasyPlayer::Prepare(), CriMvEasyPlayer::Start(), - * CriMvEasyPlayer::SetFileRequestCallback(), - * CriMvEasyPlayer::ExecuteDecode(), CriMvEasyPlayer::Update() - */ - /*JP - * \ingroup MODULE_CONTROL - * \brief ムービヘッダ解析 - * \param err エラー情報(省略可) - * - * ムービの再生は開始せず、ヘッダ解析のみ行って待機するための関数です。
- * この関数を使用してヘッダ解析を事前に済ませることにより、再生開始前にムービの解像度やオーディオの情報を - * 得ることができます。
- * 本関数を呼び出すと、EasyPlayerのハンドル状態はMVEASY_STATUS_STOP → MVEASY_STATUS_DECHDR と遷移していき、 - * ヘッダ解析が完了するとMVEASY_STATUS_WAIT_PREPとなります。
- * ムービ情報を取得するには、ハンドル状態がMVEASY_STATUS_WAIT_PREPになったあとに CriMvEasyPlayer::GetMovieInfo() - * を実行してください。
- * - * ハンドル状態がMVEASY_STATUS_WAIT_PREPの時に、 CriMvEasyPlayer::Prepare() か CriMvEasyPlayer::Start() を - * 呼ぶことで再生処理を続けることができます。
- * - * 本関数は EasyPlayerのハンドル状態がMVEASY_STATUS_STOPかMVEASY_STATUS_PLAYENDの時に呼び出してください。 - * - * 本関数を呼び出す前に CriMvEasyPlayer::SetFile() か CriMvEasyPlayer::SetData() でムービデータを指定してください。
- * ただし、ファイル要求コールバック関数を登録している場合は事前のムービデータ設定は省略することだきます。 - * - * \sa CriMvEasyPlayer::GetStatus(), CriMvEasyPlayer::Prepare(), CriMvEasyPlayer::Start(), CriMvEasyPlayer::SetFileRequestCallback() - */ - void DecodeHeader(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_CONTROL - * - * \brief Reads movie header, analyzes movie information, and buffers data. - * \param err Optional error code - * - * This function opens the movie file and gets it ready for immediate playback, by reading and analyzing - * the header and decoding and buffering video data. It allows a movie to start playing immediately when - * CriMvEasyPlayer::Start() is called, without an initial delay. - * - * When this function is called, the handle status changes to MVEASY_STATUS_DECHDR. Once EasyPlayer - * has finished reading and analyzing the movie data, the status changes to MVEASY_STATUS_PREP and EasyPlayer - * begins decoding video data. When the initial video data has been decoded and buffered, the status changes to - * MVEASY_STATUS_READY. - * - * The amount of data that is buffered, in seconds, is based on the value set by CriMvEasyPlayer::SetBufferingTime(). - * By default, this is 1 second. - * - * When the status is MVEASY_STATUS_READY, movie playback will start imediately when CriMvEasyPlayer::Start() - * is called. - * - * \remarks - * Unless you CriMvEasyPlayer::DecodeHeader() first, this function can only be called when the handle status - * is MVEASY_STATUS_STOP or MVEASY_STATUS_PLAYEND. - * - * \remarks - * You must either call CriMvEasyPlayer::SetFile() or CriMvEasyPlayer::SetData(), or provide a file request - * callback with CriMvEasyPlayer::SetFileRequestCallback(), before calling this function. - * - * \remarks - * Once this function has been called, CriMvEasyPlayer::ExecuteDecode() and CriMvEasyPlayer::Update() must be - * called periodically in order for this function to have any effect. Otherwise, the handle status will - * never change. - * - * \sa CriMvEasyPlayer::GetStatus(), CriMvEasyPlayer::DecodeHeader(), CriMvEasyPlayer::Start(), - * CriMvEasyPlayer::SetBufferingTime(), CriMvInputBufferInfo - */ - /*JP - * \ingroup MODULE_CONTROL - * \brief 再生準備(ヘッダ解析とバッファリング) - * \param err エラー情報(省略可) - * - * ムービの再生は開始せず、ヘッダ解析と再生準備のみを行って待機するための関数です。
- * この関数を使用して再生準備を事前に済ませることにより、ムービ再生開始のタイミングを細かく制御することができます。
- * (再生準備無しで再生開始関数を呼び出した場合は、実際に再生が始まるまでにタイムラグが発生します。)
- * 本関数を呼び出すと、EasyPlayerのハンドル状態はMVEASY_STATUS_STOP → MVEASY_STATUS_DECHDR → MVEASY_STATUS_PREP と遷移していき、 - * 再生準備が完了するとMVEASY_STATUS_READYとなります。 - * - * ハンドル状態がMVEASY_STATUS_READYの時に、 CriMvEasyPlayer::Start() を呼ぶことで再生を開始することができます。 - * - * CriMvEasyPlayer::DecodeHeader() の呼び出し無しでこの関数を呼び出す場合は、CriMvEasyPlayerのハンドル状態が - * MVEASY_STATUS_STOPかMVEASY_STATUS_PLAYEND でなければいけません。 - * - * 再生開始前には CriMvEasyPlayer::SetFile() か CriMvEasyPlayer::SetData() でムービデータを指定してください。
- * ただし、ファイル要求コールバック関数を登録している場合は事前のムービデータ設定は省略することだきます。 - * - * \sa CriMvEasyPlayer::GetStatus(), CriMvEasyPlayer::DecodeHeader(), CriMvEasyPlayer::Start(), - * CriMvEasyPlayer::SetBufferingTime(), CriMvInputBufferInfo - */ - void Prepare(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_CONTROL - * - * \brief Starts movie playback - * \param err Optional error code - * - * Opens the movie and starts playback. If CriMvEasyPlayer::Prepare() was not called, there will be a - * delay while the library reads the movie header and buffers the initial data. If CriMvEasyPlayer::Prepare() - * was called and the handle status is MVEASY_STATUS_READY, playback will start as soon as this function is called. - * - * \remarks - * If you call this function without calling CriMvEasyPlayer::DecodeHeader() or CriMvEasyPlayer::Prepare() - * first, this function can only be called when the handle status is MVEASY_STATUS_STOP, MVEASY_STATUS_PLAYEND, - * or MVEASY_STATUS_READY. - * - * \remarks - * You must either call CriMvEasyPlayer::SetFile() or CriMvEasyPlayer::SetData(), or provide a file request - * callback with CriMvEasyPlayer::SetFileRequestCallback(), before calling this function. - * - * \remarks - * Once this function has been called, CriMvEasyPlayer::ExecuteDecode() and CriMvEasyPlayer::Update() must be - * called periodically in order for this function to have any effect. Otherwise, the movie will not play and - * the handle status will never change. - * - * \sa CriMvEasyPlayer::GetStatus(), CriMvEasyPlayer::DecodeHeader(), CriMvEasyPlayer::Prepare() - */ - /*JP - * \ingroup MODULE_CONTROL - * \brief 再生開始 - * \param err エラー情報(省略可) - * - * ムービの再生を開始します。
- * CriMvEasyPlayer::Prepare()を呼ばずに、本関数を呼び出した場合は、ムービの解析と再生の準備を行うため、 - * 実際にムービの再生が始まるまでにタイムラグが発生します。
- * CriMvEasyPlayer::Prepare()を先に呼び出して、ハンドル状態がMVEASY_STATUS_READYになっていれば、 - * この関数を呼び出してすぐに再生が始まります。 - * - * CriMvEasyPlayer::DecodeHeader() または CriMvEasyPlayer::Prepare() の呼び出し無しでこの関数を呼び出す場合は、 - * CriMvEasyPlayerのハンドル状態が MVEASY_STATUS_STOPかMVEASY_STATUS_PLAYEND でなければいけません。 - * - * 再生開始前には CriMvEasyPlayer::SetFile() か CriMvEasyPlayer::SetData() でムービデータを指定してください。
- * ただし、ファイル要求コールバック関数を登録している場合は事前のムービデータ設定は省略することだきます。 - * - * \sa CriMvEasyPlayer::GetStatus(), CriMvEasyPlayer::DecodeHeader(), CriMvEasyPlayer::Prepare() - */ - void Start(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_CONTROL - * - * \brief Stops movie playback; resets a handle that is in an ERROR state, - * \param err Optional error code - * - * Tells the movie to stop playing and returns immediately. Note that this does not actually stop playback; - * an application must continue to call CriMvEasyPlayer::Update() and CriMvEasyPlayer::ExecuteDecode() until - * the status changes to MVEASY_STATUS_STOP. - * - * Once the handle is in the MVEASY_STATUS_STOP state, it can be reused for a different movie. - * - * If the handle state is MVEASY_STATUS_ERROR, an application must call this function and wait for the status - * to change to MVEASY_STATUS_STOP before destroying or reusing the player handle. - * - * In principle, this function does not reset any EasyPlayer handle parameters that were explicitly set via - * any of the settings APIs, so an application can replay the same movie by simply calling CriMvEasyPlayer::Start() - * once the state has changed to MVEASY_STATUS_STOP. However, calling this function will reset the following - * parameters: - * - * - The pause state (see CriMvEasyPlayer::Pause()) will be reset to OFF (not paused). - * - If a file request callback has been set (via CriMvEasyPlayer::SetFileRequestCallback()), the movie - * data information will be reset. - * - * See the description of CriMvEasyPlayer::ResetAllParameters() for a comparison of the parameters that are - * affected by that function and by this function. - * - * \remarks - * This function may call CriMvSoundInterface::Stop() and CriMvFileReaderInterface::Close(). For an EasyPlayer - * handle to change to MVEASY_STATUS_STOP, the sound and file interfaces need to transition to their STOP states. - * In the case of CriMvSoundInterface, this means that CriMvSoundInterface::GetStatus() will return - * MVEASY_SOUND_STATUS_STOP. For CriMvFileReaderInterface, this means that CriMvFileReaderInterface::GetCloseStatus() - * will return ASYNC_STATUS_COMPLETE. - * - * \sa CriMvEasyPlayer::Status, CriMvEasyPlayer::GetStatus(), CriMvEasyPlayer::ResetAllParameters() - */ - /*JP - * \ingroup MODULE_CONTROL - * \brief 再生停止/エラー状態からの復帰 - * \param err エラー情報(省略可) - * - * ムービ再生停止の要求を出します。本関数は即時復帰関数です。本関数内で全ての停止処理が実行されるわけではありません。
- * 本関数呼出し後、再生状態が MVEASY_STATUS_STOP なるまでは通常のメインループ処理を動かしてください。
- * 具体的には CriMvEasyPlayer::Update(), CriMvEasyPlayer::ExecuteDecode() が通常通り呼び出される必要があります。 - * - * 再生状態が MVEASY_STATUS_ERROR になった場合は、本関数を呼び出して MVEASY_STATUS_STOP を待ってください。
- * - * forループなどによるローカルループで状態変更待ちをしても MVEASY_STATUS_STOP にはなりません。
- * - * 本関数を呼び出しても、アプリケーションが再生ハンドルに設定した各種パラメータは原則としてリセットされません。
- * MVEASY_STATUS_STOP 状態になったあと、もう一度再生を開始すると前回と同じパラメータで再生を行うことができます。
- * 例外的に本関数でリセットされるパラメータは以下のものがあります。 - * - CriMvEasyPlayer::Pause() によるポーズ状態は、OFFにリセットされます。 - * - ファイル要求コールバック関数の登録がある場合、ムービファイル名(またはメモリ)の情報はリセットされます。 - * - * リセットされるパラメータ一覧は CriMvEasyPlayer::ResetAllParameters() の説明を参照してください。 - * - * 本関数は必要に応じて CriMvSoundInterface::Stop() および CriMvFileReaderInterface::Close() を呼び出します。
- * EasyPlayer ハンドルが MVEASY_STATUS_STOP 状態になるためには、各インタフェースが停止状態にならなければいけません。
- * サウンドインタフェースの場合、 CriMvSoundInterface::GetStatus()が MVEASY_SOUND_STATUS_STOP を返すこと。
- * ファイル読み込みインタフェースの場合、 CriMvFileReaderInterface::GetCloseStatus() が、ASYNC_STATUS_COMPLETE - * を返さなければいけません。 - * - * \sa CriMvEasyPlayer::Status, CriMvEasyPlayer::GetStatus(), CriMvEasyPlayer::ResetAllParameters() - */ - void Stop(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_CONTROL - * - * \brief Pauses or resumes movie playback - * \param sw Pause state. ON (1) will pause playback, OFF (0) will resume it. - * \param err Optional error code - * - * Pauses or resumes movie playback, depending on the argument. If \a sw is ON (1), playback will be paused. - * If \a sw is OFF (0), playback will be resumed. - * - * \remarks - * This function will call CriMvSoundInterface::Pause() and CriMvSystemTimerInterface::Pause() with the - * provided argument. - * - * \remarks - * Calling CriMvEasyPlayer::Stop() or CriMvEasyPlayer::ResetAllParameters() will set the pause state to OFF. - * - * \sa CriMvSoundInterface::Pause(), CriMvSystemTimerInterface::Pause() - */ - /*JP - * \ingroup MODULE_CONTROL - * \brief 再生の一時停止または再開 - * \param sw ポーズスイッチ。ポーズONの場合は1、ポーズOFF(レジューム)の場合は0を指定します。 - * \param err エラー情報(省略可) - * - * 本関数の動作は引数に依存します。
- * 引数 sw がON(1)なら、一時停止。引数 sw がOFF(0)なら再生再開です。 - * - * CriMvEasyPlayer::Stop() または CriMvEasyPlayer::ResetAllParameters を呼び出すとポーズ状態はOFFにリセットされます。 - * - * この関数は CriMvSoundInterface::Pause() と CriMvSystemTimerInterface::Pause() を同じ引数で呼び出します。 - * - * \sa CriMvSoundInterface::Pause(), CriMvSystemTimerInterface::Pause() - */ - void Pause(CriBool sw, CriError &err=CriMv::ErrorContainer); - - CriBool IsPaused(CriError &err=CriMv::ErrorContainer); - - /* オプション設定/取得 */ - /*EN - * \ingroup MODULE_OPTION - * - * \brief Sets the type of timer used for video synchronization - * \param type Type of timer to use - * \param err Optional error code - * - * In order to display video frames at the proper rate, CRI Movie uses a timer to determine when the - * next frame should be shown. For a movie with an audio track, you would typically use the - * MVEASY_TIMER_AUDIO timer type. For a movie with no audio, the MVEASY_TIMER_SYSTEM type timer - * should be used. - * - * The default is the timer type that was passed to CriMvEasyPlayer::Create(). If this value - * was NULL, a system timer (MVEASY_TIMER_SYSTEM) will be used. - * - * \remarks - * If an audio timer (MVEASY_TIMER_AUDIO) is wanted, it must be created and passed to - * CriMvEasyPlayer::Create(). - * - * \remarks - * If the movie does not have an audio track, CRI Movie will use a MVEASY_TIMER_SYSTEM regardless of - * the value set by this function. - * - * \sa CriMvEasyPlayer::GetMasterTimer(), CriMvEasyPlayer::Create(), TimerType - */ - /*JP - * \ingroup MODULE_OPTION - * \brief マスタタイマ種別の指定 - * \param type マスタタイマ種別 - * \param err エラー情報(省略可) - * - * ビデオフレームの時刻管理に使用するタイマ種別を指定します。
- * デフォルトはハンドル作成時に指定するシステムタイマです。
- * ビデオフレームの表示タイミングをオーディオの時刻と同期させたいときはオーディオタイマを指定してください。
- * オーディオタイマを指定した場合でも、再生するムービにオーディオが含まれていない場合はシステムタイマ同期となります。 - * - * \sa CriMvEasyPlayer::GetMasterTimer(), CriMvEasyPlayer::Create() - */ - void SetMasterTimer(TimerType type, CriError &err=CriMv::ErrorContainer); // default is SYSTEM - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Returns the type of timer currently being used by the EasyPlayer handle - * \param err Optional error code - * \return The current timer type - * - * Returns the current type of timer used to synchronize video frames. This value can be changed - * by calling CriMvEasyPlayer::SetMasterTimer(). Otherwise, the timer type is set when the handle - * is created. - * - * \sa CriMvEasyPlayer::SetMasterTimer(), CriMvEasyPlayer::Create(), TimerType - */ - /*JP - * \ingroup MODULE_OPTION - * \brief マスタタイマ種別の取得 - * \param err エラー情報(省略可) - * \return 現在設定されているマスタタイマ種別 - * - * 現在設定されているマスタタイマ種別を取得します。 - * - * \sa CriMvEasyPlayer::SetMasterTimer() - */ - TimerType GetMasterTimer(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Sets the number of internal video buffers - * \param npools The number of buffers to use; must be greater than 0 - * \param err Optional error code - * - * CRI Movie uses internal memory, or frame pools, to buffer decoded frames before display. - * More frame pools can help smooth out playback under high CPU loads. - * - * \remarks - * By default, the number of pools is 1. To change the value, this function must be called - * before starting playback (with either CriMvEasyPlayer::Prepare() or CriMvEasyPlayer::Start()). - */ - /*JP - * \ingroup MODULE_OPTION - * \brief 内部ビデオバッファ(フレームプール)数の指定 - * \param npools 内部ビデオバッファ数(最低でも1) - * \param err エラー情報(省略可) - * - * EasyPlayerハンドル内部のビデオバッファ数を指定します。
- * この内部ビデオバッファはデコード結果を蓄えておくためのもので、フレームプールと呼びます。
- * フレームプールが多いほど先行してビデオデコードを進めることができるため、デコードの - * 負荷変動が大きかったり、デコードに使用できるCPU時間の変動が大きい場合にもスムーズな再生を - * 行いやすくなります。
- * デフォルトのフレームプール数は1です。
- * フレームプール数を変更したい場合は、再生開始前( CriMvEasyPlayer::Prepare()または CriMvEasyPlayer::Start())に - * 本関数を実行してください。 - */ - void SetNumberOfFramePools(CriUint32 npools, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Sets the amount of movie data that will be buffered, in seconds - * \param sec Buffering time, in seconds - * \param err Optional error code - * - * CRI Movie buffers enough raw data from disk to allow for smooth playback and to reduce disk reads. - * The buffer size is based on the bitrate of the movie, and other movie parameters. - * - * By default, this buffer will be large enough to hold 1 second worth of playback. - * - * To determine the current buffering time, look at the \a buffering_time field of the - * CriMvStreamingParameters structure, which is retrieved by calling CriMvEasyPlayer::GetMovieInfo(). - * - * \remarks - * If this function is called, it must be called before starting playback (with either - * CriMvEasyPlayer::Prepare() or CriMvEasyPlayer::Start()). - * - * \remarks - * Passing \a 0.0 as the value of \a sec will reset the buffering time to the default value. - * - * \remarks - * If an application calls CriMvEasyPlayer::SetStreamingParameters() for a handle, this function - * can not be used with that handle. - * - * \remarks - * The value set by this function, along with the value set by CriMvEasyPlayer::SetReloadThresholdTime(), - * determine how often data is read from disk. See the description of - * CriMvEasyPlayer::SetReloadThresholdTime() for details. - * - * \sa CriMvEasyPlayer::SetReloadThresholdTime(), CriMvEasyPlayer::GetInputBufferInfo(), - * CriMvStreamingParameters - */ - /*JP - * \ingroup MODULE_OPTION - * \brief 入力データのバッファリング時間の指定 - * \param sec バッファリング時間。単位は秒。 - * \param err エラー情報(省略可) - * - * ストリーミング再生でバッファリングする入力データの量を秒単位の時間で指定します。
- * EasyPlayerは、バッファリング時間とムービのビットレート等から読み込みバッファのサイズを決定します。 - * - * デフォルトのバッファリング時間は、再生開始時点でアプリケーションが作成済みのEasyPlayerハンドル数 - * に依存して決まります。EasyPlayerハンドル1つにつき1秒のバッファリング時間を確保します。もしもアプリ - * ケーションが3つのEasyPlayerハンドルを作成していた場合、バッファリング時間は3秒となります。 - * - * EasyPlayerハンドルが何秒分のバッファリング時間になっているかは CriMvEasyPlayer::GetMovieInfo - * 関数で取得する CriMvStreamingParameters 構造体の変数 buffering_time で確認できます。 - * - * 本関数の呼び出しは、 CriMvEasyPlayer::Prepare 関数または CriMvEasyPlayer::Start 関数の前までに実行してください。 - * - * バッファリング時間に 0.0f を指定した場合、バッファリング時間はライブラリのデフォルト値となります。
- * また、アプリケーションが CriMvEasyPlayer::SetStreamingParameters 関数を呼び出した場合は本関数で - * 設定した値よりも、 CriMvEasyPlayer::SetStreamingParameters 関数の指定が優先されます。 - * - * \sa CriMvEasyPlayer::SetReloadThresholdTime(), CriMvEasyPlayer::GetInputBufferInfo() - */ - void SetBufferingTime(CriFloat32 sec, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Determines how often the movie data buffer is refilled from disk - * \param sec Number of seconds of playback time to buffer - * \param err Optional error code - * - * EasyPlayer buffers raw data from disk to allow for smooth playback. How often it refills - * its buffers is determined by this function. When the amount of data remaining, in seconds, - * falls below this value, EasyPlayer will call into the FileReader module for this handle in - * order to read more data. - * - * SetBufferingTime() sets a "low water mark" for the data buffer. For instance, if an application - * sets the buffer size to 4 seconds (with CriMvEasyPlayer::SetBufferingTime()), and sets the reload - * threshold to 1 second, then CRI Movie will initially fill the buffer with 4 seconds worth of - * data. After 3 seconds worth of data have been decoded and consumed, there will be less than - * \a reload \a threshold seconds of data remaining, and CRI Movie will refill the buffer. - * - * \remarks - * The default value for \a sec is 0.8s. - * - * \remarks - * If this function is called, it must be called before starting playback (with either - * CriMvEasyPlayer::Prepare() or CriMvEasyPlayer::Start()). - * - * \sa CriMvEasyPlayer::SetBufferingTime(), CriMvEasyPlayer::GetInputBufferInfo(), CriMvFileReaderInterface - */ - /*JP - * \ingroup MODULE_OPTION - * \brief 再読み込み閾値の時間指定 - * \param sec 時間指定による再読み込み閾値。単位は秒。 - * \param err エラー情報(省略可) - * - * EasyPlayerハンドルは、入力バッファ内のデータが再読み込み閾値以下になった時に次のデータ読み込みを実行します。 - * 再読み込み閾値は本関数による指定時間とムービデータのビットレートによって自動的に計算されます。 - * 再読み込み閾値は時間[秒]で指定します。デフォルト値は0.8秒です。 - * - * ムービ再生中にデータを裏読みする場合などにシーク回数を減らすために閾値設定を利用することができます。 - * 例えば、バッファリング時間を2秒、再読み込み閾値を1秒に設定すると、ムービデータの読み込みは約1秒に1回の実行になります。 - * こうすることで、約1秒の間はデータの読み込みを連続的に行うことができます。 - * - * ムービを再生しながらユーザデータの読み込みを行う場合、ユーザデータの読み込みは本関数で指定した時間以内に読み込み - * 処理が終わるようにしてください。サイズの大きなデータは複数に分割して読み込むなどの対処が必要になります。 - * 本関数で指定した時間以内にユーザデータの読み込みが終わらなかった場合、ムービデータが枯渇してムービ再生が滞ります。 - * - * 本関数の呼び出しは、 CriMvEasyPlayer::Prepare 関数または CriMvEasyPlayer::Start 関数の前までに実行してください。 - * - * ムービ再生中の入力バッファのデータ量や再読み込み閾値のサイズは、CriMvEasyPlayer::GetInputBufferInfo で取得可能です。 - * - * \sa CriMvEasyPlayer::SetBufferingTime(), CriMvEasyPlayer::GetInputBufferInfo() - */ - void SetReloadThresholdTime(CriFloat32 sec, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Retrieves input data buffering settings - * \param ibuf_info Input buffer information structure - * \param err Optional error code - * - * Populates the passed CriMvInputBufferInfo structure with the values of the settings - * for the raw input buffer size, the reload interval, and the amount of data currently buffered. - * - * \remarks - * This function can be called once the handle status has transitioned to MVEASY_STATUS_WAIT_PREP. - * - * \sa CriMvInputBufferInfo, CriMvEasyPlayer::SetBufferingTime(), CriMvEasyPlayer::SetReloadThresholdTime() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief 入力バッファ情報の取得 - * \param ibuf_info 入力バッファ情報 - * \param err エラー情報(省略可) - * - * 入力バッファ情報 CriMvInputBufferInfo を取得します。
- * 入力バッファ情報はEasyPlayerハンドルの状態が MVEASY_STATUS_WAIT_PREP 以降になったあと取得できます。
- * - * \sa CriMvInputBufferInfo, CriMvEasyPlayer::SetBufferingTime(), CriMvEasyPlayer::SetReloadThresholdTime() - */ - void GetInputBufferInfo(CriMvInputBufferInfo &ibuf_info, CriError &err=CriMv::ErrorContainer); - - /*EN - * - * \brief Sets the maximum bitrate EasyPlayer will assume for movie data - * \param max_bitrate Maximum bitrate, in bits/second - * \param err Optional error code - * - * EasyPlayer determines the size of its input data buffer by the movie's bitrate, the buffering time, - * and other movie parameters. In normal usage, an application should not need to call this function. - * However, it can be useful when doing concatenated playback of several movies sequentially. - * - * If the bitrate of the first movie is smaller or larger than the next movie, EasyPlayer can choose - * a buffer size that will be appropriate for the first movie, but either too small for the next - * (causing excessive disk reads or playback stuttering) or too large (using more memory than necessary). - * - * Passing a value of 0 for \a max_bitrate will cause the handle to revert to its default behavior - * for determining maximum bitrate. - * - * \remarks - * The value set by this function will not be reflected in the \a max_bitrate field of the - * CriMvStreamingParameters structure, which will contain the actual value as stored in the movie's - * header. - * - * \remarks - * If this function is called, it must be called before starting playback (with either - * CriMvEasyPlayer::Prepare() or CriMvEasyPlayer::Start()). - * - * \remarks - * If an application calls CriMvEasyPlayer::SetStreamingParameters() for a handle, this function - * can not be used with that handle. - * - * \remarks - * For details about concatenated playback, see the description of CriMvEasyPlayer::SetFileRequestCallback(). - * - * \sa CriMvEasyPlayer::SetBufferingTime(), CriMvEasyPlayer::SetReloadThresholdTime(), - * CriMvEasyPlayer::SetFileRequestCallback() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief 最大ビットレートの指定 - * \param max_bitrate 最大ビットレート(bit per second) - * \param err エラー情報(省略可) - * - * ムービデータの最大ビットレートを指定します。最大ビットレートはストリーム再生用に確保するバッファサイズに影響します。
- * - * 単純再生時は本関数を呼び出す必要はありません。EasyPlayerハンドルが自動的に最大ビットレートを取得して必要なだけの - * 読み込みバッファを確保します。
- * - * 連結再生時に、先頭のムービファイルのビットレートが後続のムービファイルと比べて極端に小さい場合には、本関数を使用して - * 明示的に最大ビットレートを大きく指定してください。
- * - * 本関数で設定した最大ビットレートは、CriMvEasyPlayer::GetMovieInfo 関数で取得するムービ情報には反映されません。 - * CriMvEasyPlayer::GetMovieInfo 関数で取得できるのはムービデータの本来の情報です。
- * - * 本関数の呼び出しは、 CriMvEasyPlayer::Prepare 関数または CriMvEasyPlayer::Start 関数の前までに実行してください。
- * - * 最大ビットレートに 0を指定した場合、最大ビットレートはムービデータの持つ値となります。
- * また、アプリケーションが CriMvEasyPlayer::SetStreamingParameters 関数を呼び出した場合は本関数で - * 設定した値よりも、 CriMvEasyPlayer::SetStreamingParameters 関数の指定が優先されます。 - * - * \sa CriMvEasyPlayer::SetBufferingTime(), CriMvEasyPlayer::SetReloadThresholdTime(), - * CriMvEasyPlayer::SetFileRequestCallback() - */ - void SetMaxBitrate(CriUint32 max_bitrate, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Sets the audio playback track - * \param track Audio track number - * \param err Optional error code - * - * If a movie has multiple audio tracks (for instance, English and Spanish versions), this function - * will determine which track plays. By default, the first audio track is used. - * - * To determine the number of audio tracks in the movie, call CriMvEasyPlayer::GetMovieInfo() and - * look at the \a num_audio field of the CriMvStreamingParameters structure. - * - * If the movie does not have any audio, this function has no effect. - * - * \remarks - * To use the default setting, set \a track to CRIMV_AUDIO_TRACK_AUTO. - * - * \remarks - * To turn off audio altogether, set \a track to CRIMV_AUDIO_TRACK_OFF. - * - * \sa CriMvEasyPlayer::GetMovieInfo() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief 再生するオーディオトラックの指定 - * \param track 再生するオーディオトラック - * \param err エラー情報(省略可) - * - * ムービが複数のオーディオトラックを持っている場合に、再生するオーディオを指定します。
- * 再生開始前( CriMvEasyPlayer::Prepare()または CriMvEasyPlayer::Start())に本関数を実行してください。 - * - * 本関数を実行しなかった場合は、もっとも若い番号のオーディオトラックを再生します。
- * CriMvEasyPlayer::DecodeHeader()と CriMvEasyPlayer::GetMovieInfo()を使うことで、どのチャネルに - * どんなオーディオが入っているかを再生開始前に知ることができます。 - * - * データが存在しないトラック番号を指定した場合は、オーディオは再生されません。 - * - * トラック番号としてCRIMV_AUDIO_TRACK_OFFを指定すると、例えムービにオーディオが含まれていたと - * してもオーディオは再生しません。 - * - * また、デフォルト設定(もっとも若いチャネルのオーディオを再生する)にしたい場合は、 - * チャネルとしてCRIMV_AUDIO_TRACK_AUTOを指定してください。 - * - * \sa CriMvEasyPlayer::GetMovieInfo(), CriMvEasyPlayer::DecodeHeader() - */ - void SetAudioTrack(CriSint32 track, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Turns movie looping on or off - * \param sw Looping value - * \param err Optional error code - * - * If \a sw is 1 (ON), the movie will loop continuously. - * If \a sw is 0 (OFF), the movie will play normally. - * - * In normal usage, a movie will play once, with the handle status changing to MVEASY_STATUS_PLAYEND - * when it completes. When looping is ON, this behavior changes. When the movie reaches the - * end, it will immediately start playing again from the beginning, and the status will continue to - * toggle between MVEASY_STATUS_PLAYING and MVEASY_STATUS_PREP. - * - * If looping is ON, and the playback is from a file, EasyPlayer will call CriMvFileReaderInterface::Seek() - * as necessary to reset the file pointer. - * - * \remarks - * If looping is ON, and an application sets it to OFF while the movie is playing, playback might - * not stop at the end of the movie. In that case, playback will end after the next loop iteration. - * - * \sa CriMvEasyPlayer::GetLoopFlag(), CriMvFileReaderInterface::Seek() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief ループ再生フラグの指定 - * \param sw ループスイッチ。ONの場合はループあり、OFFの場合はループ無しになります。 - * \param err エラー情報(省略可) - * - * ループ再生の有無を設定します。デフォルトはループOFFです。
- * ループ再生ONにした場合は、ムービの終端まで再生してもハンドル状態はMVEASY_STATUS_PLAYENDにならず、 - * ムービの先頭から再生を繰り返します。
- * ファイル名指定で再生している場合は、最後まで読み込んだあと CriMvFileReaderInterface::Seek()を使って - * 読み込み位置をファイルの先頭に戻します。 - * - * ループ再生OFFに設定した場合は、そのとき読み込んでいたムービの終端まで再生すると、 - * ハンドル状態がMVEASY_STATUS_PLAYENDに遷移します。
- * 再生中にループOFFにした場合、タイミングによっては、再生中のムービ終端で終わらず、次の繰り返し - * 再生まで実行されます。 - * - * 現在のループ設定を取得するには CriMvEasyPlayer::GetLoopFlag()を使ってください。 - * - * \sa CriMvEasyPlayer::GetLoopFlag(), CriMvFileReaderInterface::Seek() - */ - void SetLoopFlag(CriBool sw, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Retrieves the value of the looping flag - * \return The current looping setting - * - * By default, looping is OFF and playback will stop when it reaches the end. You can - * change this behavior by calling CriMvEasyPlayer::SetLoopFlag(). - * - * \sa CriMvEasyPlayer::SetLoopFlag() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief ループ再生フラグの取得 - * \param err エラー情報(省略可) - * \return 現在のループ再生設定 - * - * 現在のループ設定を取得します。 - * ループ設定は CriMvEasyPlayer::SetLoopFlag() で変更することができます。 - * - * \sa CriMvEasyPlayer::SetLoopFlag() - */ - CriBool GetLoopFlag(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Gets the amount of time that a movie has been playing - * \param count Number of timer units since the movie started playing - * \param unit Number of timer units per second - * \param err Optional error code - * - * This function retrieves the absolute time that has elapsed since a movie started playing. - * The time value is returned in two parts - a counter with an arbitrary interval, and the - * number of timer ticks per second. To determine the playing time in seconds, divide - * \a count by \a unit. - * - * Before playback has started, and after it has stopped, this function will return a \a count value of 0. - * - * The value retrieved is the value of the master timer for the handle, not the time of the current frame itself. - * To get the video frame time, check the CriMvFrameInfo structure once you have retrieved the frame. - * - * \remarks - * Note that this function provides an absolute playback time - it does not wrap to 0 - * when the movie loops. - * - */ - /*JP - * \ingroup MODULE_OPTION - * \brief 再生時刻の取得 - * \param count タイマカウント - * \param unit 1秒あたりのタイマカウント値。count ÷ unit で秒単位の時刻となります。 - * \param err エラー情報(省略可) - * - * タイマ時刻を取得します。時刻はcountとunitの二つの変数で表現します。
- * count ÷ unit で秒単位の時刻となるような値を返します。
- * 再生開始前( CriMvSoundInterface::Start()呼び出し前)および - * 再生停止後( CriMvSoundInterface::Stop()呼び出し後)は、時刻0(タイマカウントが0)を返します。
- * 本関数はマスタタイマで指定されたタイマの時刻を返すだけで、ビデオフレームの時刻を返すものではありません。
- * 取得したビデオフレームの本来の表示時刻は、ビデオフレーム取得時の CriMvFrameInfo 構造体を参照してください。 - */ - void GetTime(CriUint64 &count, CriUint64 &unit, CriError &err=CriMv::ErrorContainer); // only refer time of SyncMasterTimer - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Gets information about the movie - * \param stmprm Movie information structure - * \param err Optional error code - * \return TRUE if movie information was successfully retrieved - * \return FALSE if the header has not yet been decoded, or if an error occurred - * - * Populates the passed \a CriMvStreamingParameters structure with information about the current movie, - * including the bitrate, resolution, audio track information, subtitle availability, and more. - * - * This function is available once the handle status has changed to MVEASY_STATUS_WAIT_PREP. If an application - * needs this information before starting playback (for instance, to set up for playing subtitles, or to - * allocate a display surface based on the size of the movie), call CriMvEasyPlayer::DecodeHeader(), then - * call GetMovieInfo(). - * - * \remarks - * When doing concatenated playback (via CriMvEasyPlayer::SetFileRequestCallback()), GetMovieInfo() will - * return information about the currently playing movie. - * - * \sa CriMvEasyPlayer::DecodeHeader(), CriMvEasyPlayer::SetFileRequestCallback() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief ムービ情報の取得 - * \param stmprm ムービ情報 - * \param err エラー情報(省略可) - * - * ムービ情報 CriMvStreamingParameters を取得します。
- * ムービ情報からは主にビットレートや解像度、オーディオ数などがわかります。
- * ムービ情報はEasyPlayerハンドルの状態が MVEASY_STATUS_WAIT_PREP 以降になったあと取得できます。
- * 再生開始前にムービ情報を知りたい場合は、 CriMvEasyPlayer::DecodeHeader()を呼び出してヘッダ解析を行ってください。 - * - * 連結再生を行った場合、最後に取得したフレームを含むムービファイルについての情報を返します。 - * - * \sa CriMvEasyPlayer::DecodeHeader() - */ - CriBool GetMovieInfo(CriMvStreamingParameters &stmprm, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Changes the parameters for the movie - * \param stmprm Movie information structure - * \param err Optional error code - * - * This is a DEBUG function and should not normally be used by applications. - * - * This function allows an application to change the streaming parameters for the movie as a whole. - * It is available once the handle status has changed to MVEASY_STATUS_WAIT_PREP. - * - * To use this function, first call CriMvEasyPlayer::DecodeHeader(), then call CriMvEasyPlayer::GetMovieInfo() - * to retrieve the current movie parameters. Change the fields of the CriMvStreamingParameters structure - * as appropriate, then call SetStreamingParameters(). - * - * \sa CriMvEasyPlayer::GetMovieInfo(), CriMvEasyPlayer::DecodeHeader() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief ストリーミングパラメータの変更 - * \param stmprm ストリーミングパラメータ - * \param err エラー情報(省略可) - * - * 本関数は通常、アプリケーションからは使用しません。デバッグ用の関数です。 - * - * ムービ再生のためのストリーミングパラメータをEasyPlayerハンドルに設定します。
- * ストリーミングパラメータが指定できるのは、EasyPlayerハンドル状態がMVEASY_STATUS_WAIT_PREPの時だけです。
- * この関数は、読み込みバッファサイズなど細かなパラメータを全てアプリケーションで調整したい場合に使います。
- * CriMvEasyPlayer::DecodeHeader()でヘッダ解析を行ったあと、 CriMvEasyPlayer::GetMovieInfo()で取得できる - * ムービ情報がそのままストリーミングパラメータとなりますので、調整したい値を変更して、本関数で設定しなお - * してください。 - * - * \sa CriMvEasyPlayer::GetMovieInfo(), CriMvEasyPlayer::DecodeHeader() - */ - void SetStreamingParameters(CriMvStreamingParameters *stmprm, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_VIDEO_FRAME - * - * \brief Determine if a new video frame can be displayed - * - * \param err Optional error code - * - * \return TRUE if a frame is ready to be displayed - * \return FALSE if the movie is paused or not playing, or if a new frame is - * not yet decoded or ready to be displayed - * - * Each frame in a movie corresponds to an absolute time, with the first frame being time 0. - * The playback time is controlled by the master timer for this handle. - * If the time of the next frame is less than or equal to the current playback time, as determined - * by CriMvEasyPlayer::GetTime(), it is ready to be displayed, and this function will return TRUE. - * - * If an application needs to do some complex or lengthy processing before displaying a frame (such - * as locking a texture), it should call this function first. - * - * \remarks - * If the next frame has not yet been decoded, this function will return FALSE regardless of the playback time. - * - * \sa CriMvEasyPlayer::GetTime() - */ - /*JP - * \ingroup MODULE_VIDEO_FRAME - * \brief 次フレームの表示時刻判定 - * \param err エラー情報(省略可) - * \return 次のビデオフレームがすでに表示時刻になっている場合はTRUE(1)を返します。
- * 次のビデオフレームがまだデコードできない場合はFALSE(0)を返します。 - * - * 次のビデオフレームがすでに表示時刻になっているかどうかを問い合わせます。
- * もしもデコードが遅れていて次のビデオフレームがまだデコードできていない場合は、再生時刻に関係 - * なくFALSEを返します。
- * つまりこの関数は「次のフレームが GetFrameOnTime関数で取得できるかどうか」を調べます。
- * ビデオフレームが実際に取得するよりも先にやらなければいけない処理(例えばテクスチャロックなど) - * がある場合は、この関数でフレーム取得の成否を判定してから処理してください。 - * - * \sa CriMvEasyPlayer::GetTime() - */ - CriBool IsNextFrameOnTime(CriError &err=CriMv::ErrorContainer); - -#if !defined(XPT_TGT_EE) - /*EN - * \ingroup MODULE_VIDEO_FRAME - * - * \brief Loads video frame data into a buffer, in 32 bit ARGB format - * \param imagebuf Pointer to output buffer - * \param pitch Pitch of output buffer, in bytes - * \param bufsize Size of output buffer, in bytes - * \param frameinfo Video frame information structure - * \param err Optional error code - * \return TRUE if a frame was retrieved - * \return FALSE otherwise - * - * Copies the next decoded frame into the 32 bit ARGB image buffer pointed to by \a imagebuf. - * If the display time is less than the frame time, or if the frame has not yet been decoded, the - * \a frameinfo parameter will be cleared and this function will return FALSE. - * - * The \a pitch parameter is the width, in bytes, of each row of the frame image, including any padding. - * - * To determine if the next frame is ready to be displayed, call CriMvEasyPlayer::IsNextFrameOnTime(). - * - * CRI Movie decodes video frames into YUV420 format internally, and stores them in frame pools (see - * CriMvEasyPlayer::SetNumberOfFramePools()) for later display. When this function is called, - * the frame must first converted to ARGB format. This can be a very CPU-intensive operation, - * especially on the PS3 and Xbox360. For 1280 x 720 video resolution, this can use almost an - * entire vsync interval. On these platforms, we recommend implementing a pixel shader and calling - * CriMvEasyPlayer::GetFrameOnTimeAsYUVBuffers() instead. - * - * \remarks
- * If an application uses this function, an application need to call CriMv::InitializeFrame32bitARGB() - * after CriMv::Initialize(). If an application calls this function without CriMv::InitializeFrame32bitARGB() - * calling, this function failed and an error callback occurs. - * - * \remarks - * This function is not available on the PS2. - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime(), CriMvEasyPlayer::GetFrameOnTimeAsYUVBuffers(), - * CriMvEasyPlayer::SetNumberOfFramePools() - */ - /*JP - * \ingroup MODULE_VIDEO_FRAME - * \brief 32bit ARGBフォーマットでのデコード結果の取得 - * \param imagebuf 出力バッファポインタ - * \param pitch 出力バッファのピッチ [byte] - * \param bufsize 出力バッファのサイズ [byte] - * \param frameinfo 取得したビデオフレームの情報構造体 - * \param err エラー情報(省略可) - * \return フレームが取得できた場合はTRUE(1)、できなかった場合はFALSE(0)を返します。 - * - * 32bit ARGBフォーマットで、表示時刻になっているビデオフレームを取得します。
- * この関数を呼び出す場合は、ARGBバッファの実体を確保したうえで呼び出す必要があります。
- * ビデオフレームは引数imagebufで指定したARGBバッファに書き出されます。
- * もしも次のビデオフレームの表示時刻になっていなかったり、デコードが終わっていなかった場合は - * フレーム取得できず、frameinfoの中身はクリアされます。
- * 事前にビデオフレームが取得できるかどうかを知りたい場合は CriMvEasyPlayer::IsNextFrameOnTime() - * を使用してください。 - * - * 32bit ARGB の実際のピクセルデータの並びについては、そのプラットフォームで最も標準的な - * フォーマットになります。 - * - * 注意:
- * 本関数を使用する場合はフレーム変換の初期化 CriMv::InitializeFrame32bitARGB()の呼び出しが - * 事前に必要です。フレーム変換の初期化を行わずに本関数を呼び出した場合はフレーム取得に失敗し、 - * エラーコールバックが発生します。 - * - * 注意:
- * PS3, Xbox360 でも本関数は使用できますが、とてもCPU負荷の高い関数となります。
- * 解像度が 1280x720 のムービを本関数をフレーム取得すると1vsync近い時間がかかります。
- * PS3, Xbox360 ではCriMvEasyPlayer::GetFrameOnTimeAsYUVBuffers() 関数と ピクセルシェーダー - * の組み合わせによるフレーム変換をおすすめします。
- * - * 備考:
- * PS2版CRI Movie は本関数に対応していません。 - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime() - */ - CriBool GetFrameOnTimeAs32bitARGB(CriUint8 *imagebuf, CriUint32 pitch, CriUint32 bufsize, CriMvFrameInfo &frameinfo, - CriError &err=CriMv::ErrorContainer); -#endif - -#if !defined(XPT_TGT_EE) - /*EN - * \ingroup MODULE_VIDEO_FRAME - * - * \brief Loads video frame data into a set of Y,U,V separate buffers - * \param yuvbuffers Pointer to Y,U,V buffer data structure - * \param frameinfo Video frame information structure - * \param err Optional error code - * \return TRUE if a frame was retrieved - * \return FALSE otherwise - * - * Copies the next decoded frame into the Y,U,V image buffers pointed to by \a yuvbuffers, for use - * with a pixel shader. CRI Movie decodes video frames into YUV420 format internally, so this is - * a very efficient function. - * - * If the display time is less than the frame time, or if the frame has not yet been decoded, the - * \a frameinfo parameter will be cleared and this function will return FALSE. - * - * To determine if the next frame is ready to be displayed, call CriMvEasyPlayer::IsNextFrameOnTime(). - * - * \remarks - * If the movie does not have an alpha channel, the alpha buffer fields of the \a CriMvYuvBuffers - * structure are not used. - * - * \remarks - * This function is not available on the PS2. - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime() - */ - /*JP - * \ingroup MODULE_VIDEO_FRAME - * \brief YUV個別バッファへのデコード結果の取得 - * \param yuvbuffers YUV個別バッファのパラメータ構造体 - * \param frameinfo 取得したビデオフレームの情報構造体 - * \param err エラー情報(省略可) - * \return フレームが取得できた場合はTRUE(1)、できなかった場合はFALSE(0)を返します。 - * - * YUV個別バッファ形式で表示時刻になっているビデオフレームを取得します。
- * YUV個別バッファ形式はピクセルシェーダーでフレームを描画するための出力フォーマットです。
- * この関数を呼び出す場合は、YUV個別バッファの実体を確保したうえで呼び出す必要があります。
- * ビデオフレームは引数yuvbuffersで指定したYUV個別バッファに書き出されます。
- * もしも次のビデオフレームの表示時刻になっていなかったり、デコードが終わっていなかった場合は - * フレーム取得できず、frameinfoの中身はクリアされます。
- * 事前にビデオフレームが取得できるかどうかを知りたい場合は CriMvEasyPlayer::IsNextFrameOnTime() - * を使用してください。
- *
- * アルファムービ再生を行わない場合は、引数 yuvbuffers のAlphaテクスチャ関連のパラメータは使用しません。
- * - * 備考:
- * PS2版CRI Movie は本関数に対応していません。 - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime() - */ - CriBool GetFrameOnTimeAsYUVBuffers(CriMvYuvBuffers *yuvbuffers, CriMvFrameInfo &frameinfo, - CriError &err=CriMv::ErrorContainer); -#endif - -#if defined(XPT_TGT_PC) || defined(XPT_TGT_SH7269) || defined(XPT_TGT_TRGP6K) - /*EN - * \ingroup MODULE_VIDEO_FRAME - * - * \brief Loads video frame data into a buffer, in YUV422 format - * \param imagebuf Pointer to output buffer - * \param pitch Pitch of output buffer, in bytes - * \param bufsize Size of output buffer, in bytes - * \param frameinfo Video frame information structure - * \param err Optional error code - * \return TRUE if a frame was retrieved - * \return FALSE otherwise - * - * Copies the next decoded frame into the YUV422 texture buffer pointed to by \a imagebuf. - * CRI Movie decodes video frames into YUV420 format internally, so there is some internal conversion - * required when using this function. - * - * If the display time is less than the frame time, or if the frame has not yet been decoded, the - * \a frameinfo parameter will be cleared and this function will return FALSE. - * - * The \a pitch parameter is the width, in bytes, of each row of the frame image, including any padding. - * - * To determine if the next frame is ready to be displayed, call CriMvEasyPlayer::IsNextFrameOnTime(). - * - * \remarks - * This function is currently only available in the PC version of CRI Movie. - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime() - */ - /*JP - * \ingroup MODULE_VIDEO_FRAME - * \brief YUV422フォーマットでのデコード結果の取得 - * \param imagebuf 出力バッファのポインタ - * \param pitch 出力バッファのピッチ [byte] - * \param bufsize 出力バッファサイズ [byte] - * \param frameinfo 取得したビデオフレームの情報構造体 - * \param err エラー情報(省略可) - * \return フレームが取得できた場合はTRUE(1)、できなかった場合はFALSE(0)を返します。 - * - * YUV422テクスチャフォーマットで、表示時刻になっているビデオフレームを取得します。
- * この関数を呼び出す場合は、YUVバッファの実体を確保したうえで呼び出す必要があります。
- * ビデオフレームは引数imagebufで指定したYUVバッファに書き出されます。
- * もしも次のビデオフレームの表示時刻になっていなかったり、デコードが終わっていなかった場合は - * フレーム取得できず、frameinfoの中身はクリアされます。
- * 事前にビデオフレームが取得できるかどうかを知りたい場合は CriMvEasyPlayer::IsNextFrameOnTime() - * を使用してください。 - * - * 【備考】
- * 現在は、PC版CRI Movie のみ本関数に対応しています。 - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime() - */ - CriBool GetFrameOnTimeAsYUV422(CriUint8 *imagebuf, CriUint32 pitch, CriUint32 bufsize, CriMvFrameInfo &frameinfo, - CriError &err=CriMv::ErrorContainer); -#endif - -#if defined(XPT_TGT_IPHONE) || defined(XPT_TGT_WINMO) || defined(XPT_TGT_ANDROID) || defined(XPT_TGT_CQSH2A) || defined(XPT_TGT_ACRODEA) || defined(XPT_TGT_NACL) || defined(XPT_TGT_SH7269) || defined(XPT_TGT_PC)|| defined(XPT_TGT_TRGP6K) - /*EN - * \ingroup MODULE_VIDEO_FRAME - * \brief Get video frame data to 16bit RGB565 format buffer - * - * This function is added for a prototype library for iPhone - * Please add comments when releasing the SDK. - * - */ - /*JP - * \ingroup MODULE_VIDEO_FRAME - * \brief 16bit RGB565フォーマットでのデコード結果の取得 - * - * この関数はiPhone版CRI Movieのプロトタイプ用の関数宣言です。 - * SDKとしてリリースする際は、コメントを追加して下さい。 - * - */ - CriBool GetFrameOnTimeAsRGB565(CriUint8 *imagebuf, CriUint32 pitch, CriUint32 bufsize, CriMvFrameInfo &frameinfo, - CriError &err=CriMv::ErrorContainer); -#endif - -#if defined(XPT_TGT_EE) - /*EN - * \ingroup MODULE_VIDEO_FRAME - * - * \brief Gets a reference to EasyPlayer's internal video frame buffer, in 32 bit ARGB format - * \param frameinfo Video frame information structure - * \param err Optional error code - * \return TRUE if a frame was retrieved - * \return FALSE otherwise - * - * Locks the internal buffer for the current video frame in memory, and retrieves a pointer to it. This is - * different behavior than the GetFrameXXX()functions, which copy the frame data into a caller-supplied location. - * - * On successful return from this function, the fields of \a frameinfo will be populated with information - * about the frame. In particular, the \a imageptr field will be set to the image buffer, in 32 bit ARGB format. - * After calling this function, an application must copy the video frame into its own buffer or transfer it to - * GS local memory via DMA. - * - * To determine if the next frame is ready to be displayed, call CriMvEasyPlayer::IsNextFrameOnTime(). - * - * \remarks - * After the application has copied the frame data, it must call CriMvEasyPlayer::UnlockFrame(). - * - * \remarks - * This function is only available on the PS2. - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime(), CriMvEasyPlayer::UnlockFrame() - */ - /*JP - * \ingroup MODULE_VIDEO_FRAME - * \brief デコード結果領域(ARGB32bit)のロック。PS2専用。 - * \param frameinfo ロックしたビデオフレームの情報構造体 - * \param err エラー情報(省略可) - * - * 本関数はPS2専用のフレーム取得関数で、他機種の GetFrame 関数に相当します。
- * PS2では GetFrame 関数の代わりに本関数と UnlockFrame 関数を使用してフレーム取得を行います。
- * GetFrame 関数は出力バッファを指定してそこへデコード結果を取得するのに対し、LockFrame 関数はバッファを指定せず - * CriMvEasyPlayerハンドル内部にあるデコード結果バッファのポインタを取得するところが違います。
- * - * 本関数はデコード結果のメモリ領域を参照開始するためにロックします。
- * この関数でフレームをロックできるのは、そのフレームが表示可能時間になっている場合のみです。
- * アプリケーションはフレームをロックしたあと、デコード結果をDMAでテクスチャ領域へ転送するか、 - * 別バッファへコピーするなどの処理を行います。
- * デコード結果の参照が終わった後には、必ず CriMvEasyPlayer::UnlockFrame() 関数を呼び出して参照終了を通知してください。
- * - * 備考:
- * 本関数はPS2版CRI Movie のみ対応しています。 - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime(), CriMvEasyPlayer::UnlockFrame() - */ - CriBool LockFrameOnTimeAs32bitARGB_PS2(CriMvFrameInfo &frameinfo, CriError &err=CriMv::ErrorContainer); -#endif - - /*EN - * \ingroup MODULE_VIDEO_FRAME - * - * \brief Unlocks the video frame - * \param frameinfo Pointer to locked video frame information - * \param err Optional error code - * - * Unlocks the video frame that was locked in memory by a call to one of the LockFrameXXX() functions. - * - * The \a frameinfo parameter must be the same one that was passed to LockFrameXXX(). - * - * If the frame has been locked, EasyPlayer will not be able to retrieve the next frame until the frame is - * unlocked. An attempt to lock the same frame more than once will fail. - * - * The LockFrameXXX() functions are CriMvEasyPlayer::LockFrameOnTimeAs32bitARGB_PS2() and - * CriMvEasyPlayer::LockFrameOnTimeAsYUVBuffers(). Depending on the platform, only one or the other of - * these functions will be available. - * - * \sa CriMvEasyPlayer::LockFrameOnTimeAs32bitARGB_PS2(), CriMvEasyPlayer::LockFrameOnTimeAsYUVBuffers() - */ - /*JP - * \ingroup MODULE_VIDEO_FRAME - * \brief ロックフレームで取得したデコード結果をアンロックする - * \param frameinfo ロックしたビデオフレームの情報構造体 - * \param err エラー情報(省略可) - * - * 本関数はロックフレーム関数を使ってロックしていたフレームをアンロックし、メモリ参照の終了を通知します。
- * ロックフレーム関数には CriMvEasyPlayer::LockFrameOnTimeAs32bitARGB_PS2() と CriMvEasyPlayer::LockFrameOnTimeAsYUVBuffers() - * がありますが、どちらの関数を使ってロックした場合も、本関数を使ってアンロックします。
- * 本関数の引数には、どのフレームをアンロックするかを指示するために、ロックフレーム関数で取得したフレーム情報構造体を指定します。
- * - * 本関数でアンロックしたフレームは、以後、次にビデオフレームのデコード出力バッファとして使用されます。
- * 1度アンロックしたフレームをもう一度ロックすることは出来ません。
- * - * \sa CriMvEasyPlayer::LockFrameOnTimeAs32bitARGB_PS2(), CriMvEasyPlayer::LockFrameOnTimeAsYUVBuffers() - */ - CriBool UnlockFrame(CriMvFrameInfo *frameinfo, CriError &err=CriMv::ErrorContainer); - -#if !defined(XPT_TGT_EE) - /*EN - * - * \brief Gets a reference to EasyPlayer's internal video frame buffer - * \param yuvbuffers Y,U,V buffer data structure - * \param frameinfo Video frame information structure - * \param err Optional error code - * \return TRUE if a frame was retrieved - * \return FALSE otherwise - * - * Locks the internal buffer for the current video frame in memory, and retrieves a pointer to it. This is - * different behavior than the GetFrameXXX() functions, which copy the frame data into a caller-supplied location. - * - * On successful return from this function, the fields of \a yuvbuffers will be set to the Y,U,V fields of the - * video frame, and the fields of \a frameinfo will be populated with information about the frame. - * - * After calling this function, an application must copy the video frame into its own buffer or transfer it to - * texture memory. - * - * To determine if the next frame is ready to be displayed, call CriMvEasyPlayer::IsNextFrameOnTime(). - * - * \remarks - * After the application has copied the frame data, it must call CriMvEasyPlayer::UnlockFrame(). - * - * \remarks - * This function is not available on the PS2. - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime(), CriMvEasyPlayer::UnlockFrame() - */ - /*JP - * \ingroup MODULE_VIDEO_FRAME - * \brief デコード結果領域のロック - * \param yuvbuffers YUV個別バッファのパラメータ構造体 - * \param frameinfo ロックしたビデオフレームの情報構造体 - * \param err エラー情報(省略可) - * - * GetFrame とは別の仕様のフレーム取得関数です。
- * 本関数は UnlockFrame 関数とセットで使用します。
- * GetFrame 関数は出力バッファを指定してそこへデコード結果を取得するのに対し、LockFrame 関数はバッファを指定せず - * CriMvEasyPlayerハンドル内部にあるデコード結果バッファのポインタを取得するところが違います。
- * - * 本関数はデコード結果のメモリ領域を参照開始するためにロックし、 - * デコード結果のYUV3種類のバッファについての情報を引数 yuvbuffers に格納します。
- * この関数でフレームをロックできるのは、そのフレームが表示可能時間になっている場合のみです。
- * アプリケーションはフレームをロックしたあと、デコード結果をテクスチャ領域へコピーするか、 - * 別バッファへコピーするなどの処理を行います。
- * デコード結果の参照が終わった後には、必ず CriMvEasyPlayer::UnlockFrame() 関数を呼び出して参照終了を通知してください。
- * - * 備考:
- * PS2版CRI Movie は本関数に対応していません。 - * - * \sa CriMvEasyPlayer::UnlockFrame() - */ - CriBool LockFrameOnTimeAsYUVBuffers(CriMvYuvBuffers &yuvbuffers, CriMvFrameInfo &frameinfo, - CriError &err=CriMv::ErrorContainer); -#endif - - /*EN - * \ingroup MODULE_VIDEO_FRAME - * - * \brief Discards the next video frame - * \param frameinfo Discarded frame information structure - * \param err Optional error code - * \return TRUE if a frame was available to discard - * \return FALSE otherwise - * - * Discards the next video frame, if it is available, and populates \a frameinfo with information about - * the frame. Note that the \a imageptr field of that structure will not be available and should not - * be referenced. - * - * To determine if the next frame is ready to be displayed, call CriMvEasyPlayer::IsNextFrameOnTime(). - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime() - */ - /*JP - * \ingroup MODULE_VIDEO_FRAME - * \brief 次フレームを取得せずに捨てる - * \param frameinfo 破棄したビデオフレームの情報構造体 - * \param err エラー情報(省略可) - * - * デコード済みのビデオフレームを捨てたい場合に使用する関数です。
- * フレーム取得関数と比べると、出力用バッファを準備する必要が無い部分が特徴です。
- * CriMvEasyPlayer::IsNextFrameOnTime()で次フレームが取得できることを確認した後、本関数を呼び出してください。
- * 引数frameinfoには参考のために破棄したビデオフレームの情報が格納されますが、デコード結果自体にはアクセスできません。 - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime() - */ - CriBool DiscardNextFrame(CriMvFrameInfo &frameinfo, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Sets the current channel for displaying subtitles - * - * \param channel Subtitle channel number - * \param err Optional error code - * - * A movie can contain up to 16 distinct sets of subtitles, each on its own display channel. This can - * be used, for instance, to provide multilanguage support. - * - * Subtitle channels are numbered sequentially, starting from 0, but do not need to be contiguous. - * For example, a movie can have 3 sets of subtitles, on channels 1, 5, and 7. The number of channels - * can be determined once CriMvEasyPlayer::GetMovieInfo() has completed successfully by looking at the - * \a num_subtitle field of the \a CriMvStreamingParameters structure passed to that function. - * - * By default, subtitle playback is off. To turn off subtitles once they have been turned on, pass - * CRIMV_SUBTITLE_CHANNEL_OFF as the value of \a channel. - * - * If the selected subtitle channel does not exist, subtitles will not be displayed. - * - * \remarks - * If an application turns on subtitle display with this function, it must periodically call - * CriMvEasyPlayer::GetSubtitleOnTime(), or else movie playback will stall. - * - * \sa CriMvEasyPlayer::GetMovieInfo(), CriMvEasyPlayer::DecodeHeader(), CriMvEasyPlayer::GetSubtitleOnTime() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief 取得する字幕チャネルの設定 - * \param channel 字幕チャネル - * \param err エラー情報(省略可) - * - * 取得する字幕チャネルを設定します。デフォルトは字幕取得無しです。 - * - * CriMvEasyPlayer::DecodeHeader()と CriMvEasyPlayer::GetMovieInfo()を使うことで、再生するムービが - * いくつの字幕を含んでいるかを再生開始前に知ることができます。 - * - * データが存在しないチャネル番号を指定した場合は、字幕は取得できません。
- * デフォルト設定(字幕取得無し)にしたい場合は、チャネルとしてCRIMV_SUBTITLE_CHANNEL_OFFを指定してください。 - * - * この関数で字幕チャネルを指定した場合は、メインループから定期的に CriMvEasyPlayer::GetSubtitleOnTime() を - * 実行してください。字幕取得を定期的に行わない場合は、ムービ再生が途中で止まります。 - * - * \sa CriMvEasyPlayer::GetMovieInfo(), CriMvEasyPlayer::DecodeHeader(), CriMvEasyPlayer::GetSubtitleOnTime - */ - void SetSubtitleChannel(CriSint32 channel, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_VIDEO_FRAME - * - * \brief Retrieves subtitle data for the current frame, if available - * - * \param bufptr Buffer to receive subtitle data - * \param bufsize Size of buffer, in bytes - * \param err Optional error code - * - * \return The number of bytes copied into \a bufptr - * - * If the movie contains subtitle data, and there is a subtitle for the current frame, up to \a bufsize - * bytes of the subtitle data for the active subtitle channel will be copied into \a bufptr. Otherwise, - * the entire buffer will be filled with zeroes. - * - * \remarks - * If an application turns on subtitle display with CriMvEasyPlayer::SetSubtitleChannel(), it must - * periodically call this function, or else movie playback will stall. - * - * \remarks - * An application should not make assumptions as to whether the returned data is NUL-terminated. - * - * \sa CriMvEasyPlayer::SetSubtitleChannel() - */ - /*JP - * \ingroup MODULE_VIDEO_FRAME - * \brief 字幕データの取得 - * \param bufptr 出力バッファポインタ - * \param bufsize 出力バッファサイズ [byte] - * \param err エラー情報(省略可) - * \return 取得した字幕データのサイズ[byte]を返します。 - * - * 表示時刻になっている字幕データを取得します。 - * この関数を呼び出す場合は、字幕用バッファの実体を確保したうえで呼び出してください。
- * 字幕データは引数 bufptr で指定したバッファに書き出されます。
- * もし字幕データが bufsize よりも大きい場合は、bufsize に収まる量だけ書き出し、残りは破棄されます。 - * - * もしも表示時刻の字幕が無い場合は、バッファの中身はクリアされます。 - * - * CriMvEasyPlayer::SetSubtitleChannel()で存在する字幕チャネルを指定している場合は、 - * メインループから定期的に本関数を実行してください。
- * 実行しない場合は、ムービ再生が途中で止まります。 - * - * \sa CriMvEasyPlayer::SetSubtitleChannel() - */ - CriUint32 GetSubtitleOnTime(CriUint8 *bufptr, CriUint32 bufsize, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Sets a secondary sound interface - * - * \param sound Secondary sound interface to attach to this handle - * \param err Optional error code - * - * A subaudio interface allows an application to play two audio tracks at the same time. This is - * typically used to play a dialog track or sound effects along with background music. After calling - * this function, an application needs to call CriMvEasyPlayer::SetSubAudioTrack() to choose the secondary - * audio track to play. - * - * Note that you must create a separate sound interface to pass to this function. The interface used - * in the CriMvEasyPlayer::Create() call can not be used. - * - * If a subaudio interface is used, the application must call CriMvEasyPlayer::DetachSubAudioInterface() - * when the EasyPlayer handle reaches the MVEASY_STATUS_STOP or MVEASY_STATUS_PLAYEND state before calling - * CriMvEasyPlayer::Destroy(). - * - * Calling CriMvEasyPlayer::ResetAllParameters() will not affect the value set by this function. - * - * \remarks - * If this function is called, it must be called before starting playback (with either CriMvEasyPlayer::Prepare() - * or CriMvEasyPlayer::Start()). - * - * \remarks - * An EasyPlayer handle can not use a subaudio interface and center channel replacement (see - * CriMvEasyPlayer::ReplaceCenterVoice()) at the same time. - * - * \sa CriMvEasyPlayer::DetachSubAudioInterface(), CriMvEasyPlayer::SetSubAudioTrack(), - * CriMvEasyPlayer::ReplaceCenterVoice() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief サブオーディオ用サウンドインタフェースの設定 - * \param sound サブオーディオ用サウンドインタフェース - * \param err エラー情報(省略可) - * - * サブオーディオ(メインオーディオと同時に別のオーディオを再生する機能)のための - * サウンドインタフェースを設定します。
- * 設定するサウンドインタフェースは、 CriMvEasyPlayer::Create() 時に指定したサウンドインタフェース - * とは「別の」インスタンスでなければいけません。
- * - * 本関数は、EasyPlayerハンドル作成後、 CriMvEasyPlayer::Start() または CriMvEasyPlayer::Prepare() の - * 呼び出しより前に実行しなければいけません。
- * - * サブオーディオを再生するには、本関数でサウンドインタフェースを設定したあと、 - * CriMvEasyPlayer::SetSubAudioTrack() でサブオーディオのトラックを指定してください。
- * - * サブオーディオ用サウンドインタフェースを設定したハンドル破棄を破棄する前に、 - * MVEASY_STATUS_STOP または MVEASY_STATUS_PLAYEND の状態で CriMvEasyPlayer::DetachSubAudioInterface() を呼んでください。 - * なお、サブオーディオ用サウンドインタフェースは CriMvEasyPlayer::ResetAllParameters() を呼び出してもリセットされません。 - * - * 注意:
- * サブオーディオ機能は、 CriMvEasyPlayer::ReplaceCenterVoice() によるセンターチャネル置き換え機能とは - * 同時に使用できません。
- * - * \sa CriMvEasyPlayer::DetachSubAudioInterface(), CriMvEasyPlayer::SetSubAudioTrack(), - * CriMvEasyPlayer::ReplaceCenterVoice() - */ - void AttachSubAudioInterface(CriMvSoundInterface *sound, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Removes a secondary audio interface - * - * \param err Optional error code - * - * Removes the secondary sound interface that was set by a call to CriMvEasyPlayer::AttachSubAudioInterface(). - * - * This function should be called when the EasyPlayer handle's state is either MVEASY_STATUS_STOP or - * MVEASY_STATUS_PLAYEND. - * - * \sa CriMvEasyPlayer::AttachSubAudioInterface() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief サブオーディオ用サウンドインタフェースの解除 - * \param err エラー情報(省略可) - * - * 現在設定されているサブオーディオ用サウンドインタフェースを解除します。
- * - * 本関数は、EasyPlayerハンドルの状態が CriMvEasyPlayer::MVEASY_STATUS_STOP または - * CriMvEasyPlayer::MVEASY_STATUS_PLAYEND の時に呼び出してください。
- * - * \sa CriMvEasyPlayer::AttachSubAudioInterface() - */ - void DetachSubAudioInterface(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Sets the secondary audio track - * - * \param track Track number - * \param err Optional error code - * - * A secondary, or subaudio, track is typically used to play a dialog track or sound effects along - * with a movie. An application can support several different languages by setting the desired language - * track with this function. By default, the subaudio track is disabled, even if the interface has been set. - * - * Subaudio is enabled with CriMvEasyPlayer::AttachSubAudioInterface(). If the interface has not been set, - * this function will have no effect. - * - * The main audio track for the movie is set with CriMvEasyPlayer::SetAudioTrack(). If the same track - * number is used for the main and subaudio, the subaudio will not play. - * - * To turn off the subaudio track, pass CRIMV_CENTER_VOICE_OFF as the track number. - * - * \remarks - * If this function is called, it must be called before starting playback (with either CriMvEasyPlayer::Prepare() - * or CriMvEasyPlayer::Start()). - * - * \remarks - * An EasyPlayer handle can not use a subaudio interface and center channel replacement (see - * CriMvEasyPlayer::ReplaceCenterVoice()) at the same time. - * - * \sa CriMvEasyPlayer::AttachSubAudioInterface(), CriMvEasyPlayer::ReplaceCenterVoice() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief サブオーディオトラックの設定 - * \param track サブオーディオ再生するトラック番号 - * \param err エラー情報(省略可) - * - * サブオーディオトラックを設定します。デフォルト値は CRIMV_CENTER_VOICE_OFF です。
- * - * サブオーディオを再生するには、 CriMvEasyPlayer::AttachSubAudioInterface() でサウンドインタフェースを設定したあと、 - * 本関数でサブオーディオのトラックを指定してください。
- * 本関数の呼び出しは、 CriMvEasyPlayer::Start() または CriMvEasyPlayer::Prepare() の呼び出しより前でなければいけません。
- * - * メインオーディオのトラックは CriMvEasyPlayer::SetAudioTrack() で指定します。 - * サブオーディオトラックとしてメインオーディオと同じトラックを指定した場合は、サブオーディオからは何も再生されません。
- * - * サブオーディオトラックには、センターチャネル置き換え機能とは異なりチャネル数の制限はありません。 - * モノラル、ステレオ、5.1ch のいずれのトラックもサブオーディオとして使用することができます。
- * - * 注意:
- * サブオーディオ機能は、 CriMvEasyPlayer::ReplaceCenterVoice() によるセンターチャネル置き換え機能とは - * 同時に使用できません。
- * - * \sa CriMvEasyPlayer::AttachSubAudioInterface() - */ - // default value is -1. - void SetSubAudioTrack(CriSint32 track, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Retrieves the secondary audio track - * - * \param err Optional error code - * \return track number Current subaudio track number - * - * When you successfully set the subaudio track, this function return the track number - * that you specified by CriMvEasyPlayer::SetSubAudioTrack(). Otherwise, it retuns CRIMV_CENTER_VOICE_OFF. - * - * \sa CriMvEasyPlayer::SetSubAudioTrack() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief サブオーディオトラックの取得 - * \param err エラー情報(省略可) - * \return トラック番号 現在設定されているトラック番号 - * - * サブオーディオ再生が有効になっていれば、ユーザがCriMvEasyPlayer::SetSubAudioTrack()で設定した - * サブオーディオトラック番号を返します。 - * - * サブオーディオ再生が有効でない場合や、サブオーディオトラックを指定していなかった場合は、 - * CRIMV_CENTER_VOICE_OFFを返します。 - * - * \sa CriMvEasyPlayer::SetSubAudioTrack() - */ - CriSint32 GetSubAudioTrack(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Replaces the center channel of a 5.1ch audio track - * - * \param track Track number to use - * \param err Optional error code - * - * If the current audio track for a movie (set with CriMvEasyPlayer::SetAudioTrack()) is in 5.1ch - * surround sound, the center channel can be replaced with a different, mono, track. This does not - * affect any of the other channels in the 5.1ch track. - * - * If the current audio track is not 5.1ch, or the replacement track is not monaural, this call will - * have no effect. - * - * Passing CRIMV_CENTER_VOICE_OFF as the value of \a track will undo the replacement and revert to - * playing the original center channel of th 5.1ch track. - * - * \remarks - * An EasyPlayer handle can not use center channel replacement and a subaudio interface (see - * CriMvEasyPlayer::AttachSubAudioInterface() and CriMvEasyPlayer::SetSubAudioTrack()) at the same time. - * - * \sa CriMvEasyPlayer::SetAudioTrack(), CriMvEasyPlayer::AttachSubAudioInterface(), - * CriMvEasyPlayer::SetSubAudioTrack() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief センターボイスの設定 - * \param track ボイストラック番号 - * \param err エラー情報(省略可) - * - * 5.1ch オーディオ再生時に、センターチャネルだけを別のモノラルトラックと置き換えることができます。
- * 本関数は、置き換え用のモノラルデータが入ったオーディオトラックを設定します。
- * 5.1ch BGM に対して、ボイスだけを複数種類から差し替えたい場合に使用してください。 - * - * デフォルトはセンターボイス指定無しです。 - * - * この関数を使用した場合、メインのオーディオトラックとして再生している5.1chデータのセンターチャネル - * は破棄され、代わりにセンターボイスとして指定したデータが入ります。 - * - * (a) センターボイスとして使用できるのはモノラルのオーディオだけです。
- * (b) センター置き換えが有効なのはメインのオーディオが5.1chの場合だけです。 - * - * この二つの条件を満たしていない場合は、本関数で設定した値は無視されます。 - * - * デフォルト値に戻したい場合は、チャネルとしてCRIMV_CENTER_VOICE_OFFを指定してください。 - * - * \sa CriMvEasyPlayer::SetAudioTrack(), CriMvEasyPlayer::AttachSubAudioInterface(), - * CriMvEasyPlayer::SetSubAudioTrack() - */ - void ReplaceCenterVoice(CriSint32 track, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Sets a callback function that will set the movie file - * - * \param func Callback function - * \param usrobj Pointer to user-provided data - * \param err Optional error code - * - * Normally, the movie file is provided directly, via CriMvEasyPlayer::SetFile() or - * CriMvEasyPlayer::SetData(), before playback is started. Setting a file request callback - * allows an application to do \a concatenated \a playback, playing multiple movies, one - * after the other. - * - * If the callback function is set, it will be called when - * - * - The last data chunk of the current movie has been read by EasyPlayer. - * - Any of the playback functions (CriMvEasyPlayer::Start(), CriMvEasyPlayer::Prepare(), - * or CriMvEasyPlayer::DecodeHeader()) are called and the movie file has not been set. - * - * The callback should call CriMvEasyPlayer::SetFile() or CriMvEasyPlayer::SetData() if the - * application wants to continue playback. Otherwise, playback will end once the callback returns. - * - * The \a usrobj parameter specifies a pointer to arbitrary data, that will be passed as the - * second parameter to the callback. - * - * The prototype of the callback function is - * - * void callback(CriMvEasyPlayer *mveasy, void *usrobj) - * - * where - * - * mveasy is the EasyPlayer object - * usrobj is the pointer to user data that was passed to SetFileRequestCallback(). - * - * \remarks - * In order to do concatenated playback, all movies must have the same - * - * \remarks - * - video resolution - * - framerate - * - video codec - * - audio track structure - * - subtitle structure - * - * \remarks - * The same audio track structure means that all movies must have the same number of tracks, and the - * same track number must be of the same audio type for each movie. For instance, if the first movie has - * 2 audio tracks, with track 1 being stereo and track 2 being mono, then \a all other movies would have - * to have 2 tracks, track 1 stereo and track 2 mono. - * - * \remarks - * Subtitles have to match in the number of channels. For instance, if the first movie had 3 subtitle - * channels, then all other movies would need 3 channels. It is also important to keep the languages on - * the same tracks for each movie, since otherwise the application would get confused. CRI Movie makes - * no assumptions about languages or the interpretation of subtitles; subtitles are simply treated as - * binary data. - * - * \remarks - * Currently, cuepoints are not supported with concatenated playback. - * - * \sa CriMvEasyPlayer::SetFile(), CriMvEasyPlayer::SetData() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief ファイル要求コールバック関数の登録 - * \param func ファイル要求コールバック関数 - * \param usrobj ユーザオブジェクト - * \param err エラー情報(省略可) - * - * ムービの連結再生を行うために、ムービファイルを要求するコールバック関数を登録します。 - * このコールバック関数は以下のタイミングで発生します。 - * - * ・ムービファイルを読み込み終了した時。
- * ・ファイルの指定無しで再生を開始した時。 - * - * ファイル要求コールバック関数内で CriMvEasyPlayer::SetFile() または CriMvEasyPlayer::SetData() - * を呼び出すことで、連続して次のムービファイルを指定することができます。
- * SetFile() も SetData() も呼び出さなかった場合は、読み込み済みのムービが終わると - * 再生終了になります。 - * - * ファイル要求コールバック発生時、コールバック関数の第二引数usrobjには、登録時に指定 - * したユーザオブジェクトが渡されます。登録ファイルリストなどの管理に利用してください。 - * - * 連結再生できるムービファイルには以下の条件があります。
- * - ビデオ解像度が同じ - * - ビデオのフレームレートが同じ - * - ビデオのコーデックが同じ - * - オーディオおよび字幕のトラック構成が同じ - * - * \sa CriMvEasyPlayer::SetFile(), CriMvEasyPlayer::SetData() - */ - void SetFileRequestCallback(void (*func)(CriMvEasyPlayer *mveasy, void *usrobj), - void *usrobj, CriError &err=CriMv::ErrorContainer); - -#if defined(XPT_TGT_PC) - /*EN - * \ingroup MODULE_OPTION - * \brief Set processor parameters for decoding on PC - * - * \param num_threads Number of additional threads for load distribution in decoding (Maximum 3 threads) - * \param affinity_mask Pointer to an array of thread affinity masks for each thread specified with num_threads. - * \param priority Thread priority of the decoding threads for load balancing - * \param err Optional error code - * - * This function sets the processor parameters for decoding. Use it when you want to change - * processors or thread priority for decoding load distribution. - * - * If this function is called, it must be called before calling any of the playback functions - * (CriMvEasyPlayer::Start(), CriMvEasyPlayer::Prepare(), or CriMvEasyPlayer::DecodeHeader()). - * - * On initialization, CRI Movie prepares three worker threads for distributed decoding.
- * - * \a num_threads specifies how many worker threads CRI Movie should use.
- * \a affinity_mask is an array of affinity masks for the worker threads. This array must have - * \a num_threads many elements. The format of \a affinity_mask is same as for the value passed to the - * Win32 SetThreadAffinityMask() API function.
- * \a priority is used as the thread priority for all of the threads specified by \a num_threads. - * - * If this function is called, three distributed decoding threads will run in parallel by default. - * Also, processor assignment of the decoding threads is handled by the operating system, and their - * priority will be normal. - * - * To reset the parameters, call this function again, passing CRIMV_DEFAULT_AFFNITY_MASK_PC and - * CRIMV_DEFAULT_THREAD_PRIORITY_PC as the affinity masks and thread priority. - * - * \sa CRIMV_DEFAULT_AFFNITY_MASK_PC, CRIMV_DEFAULT_THREAD_PRIORITY_PC - */ - /*JP - * \ingroup MODULE_OPTION - * \brief PCでデコード処理に使う追加プロセッサ設定 - * \param num_threads 負荷分散デコード用に使用する追加スレッドの数 (最大3つ) - * \param affinity_masks スレッドアフィニティマスクの配列へのポインタ。num_threadsで指定したスレッドごとのマスク値。 - * \param priority 負荷分散デコードスレッドの優先度 - * \param err エラー情報(省略可) - * - * デコード処理を分散して処理するためのプロセッサを指定できます。 - * デコード処理に行うプロセッサやスレッド優先度を変更したい場合に使用してください。 - * 本関数は再生開始(Start, Prepare, DecodeHader)前に呼び出す必要があります。 - * - * CRI Movieは初期化の際に3つの分散デコード用のワーカースレッドを用意します。 - * num_threads引数で、そのうちのいくつのスレッドを実際に使用するかを指定できます。 - * アプリケーションから明示的にプロセッサ割り当てを行いたい場合、個々のスレッドに対して - * アフィニティマスクを設定してください。 - * アフィニティマスクの値は、Win32 APIのSetThreadAffinityMaskの引数と同じ書式です。 - * スレッド優先度は、num_threadsで指定したデコードに使用するスレッドに対して適用されます。 - * - * この関数を呼ばなかった場合、3つのスレッドで並列デコードを行います。 - * デコードスレッドのプロセッサは割り当ては全てOS任せで、優先度はスレッド標準になります。 - * - * 一度本関数で設定を変更した後、状態を戻したい場合は、CRIMV_DEFAULT_AFFNITY_MASK_PC, CRIMV_DEFAULT_THREAD_PRIORITY_PCを - * 引数として指定し、再度呼び出してください。 - * - * \sa CRIMV_DEFAULT_AFFNITY_MASK_PC, CRIMV_DEFAULT_THREAD_PRIORITY_PC - */ - void SetUsableProcessors_PC(CriSint32 num_threads, const CriUint32 *affinity_mask, CriSint32 priority, - CriError &err=CriMv::ErrorContainer); - -#endif - -#if defined(XPT_TGT_XBOX360) - /*EN - * \ingroup MODULE_OPTION - * \brief Set processor parameters for decoding - * \param processors_param Processor Parameters - * \param err Optional error code - * - * \brief Set processor parameters for decoding - * \param processors_param Processor Parameters - * \param err Optional error code - * - * This function sets the processor parameters for decoding, along the priority of the - * decoding threads. - * - * If this function is called, it must be called before calling any of the playback functions - * (CriMvEasyPlayer::Start(), CriMvEasyPlayer::Prepare(), or CriMvEasyPlayer::DecodeHeader()). - * - * If you don't call this function, the EasyPlayer handle uses Processor 3 (Core 0, Thread 0) - * and Processor 5 (Core 0, Thread 0). - * - * \sa CriMvProcessorParameters_XBOX360 - */ - /*JP - * \ingroup MODULE_OPTION - * \brief Xbox360でデコードに使うプロセッサ設定 - * \param processors_param 使用プロセッサパラメータ - * \param err エラー情報(省略可) - * - * デコードに使用するプロセッサを指定します。
- * 本関数は再生開始(Start, Prepare, DecodeHader)前に呼び出す必要があります。 - * - * また、デコードに使用する内部スレッドの優先度の設定が出来ます。 - * - * デフォルトのプロセッサ設定では、プロセッサ3(コア1スレッド1)とプロセッサ5 - * (コア2スレッド1)を使用します。 - * - * \sa CriMvProcessorParameters_XBOX360 - */ - void SetUsableProcessors_XBOX360(const CriMvProcessorParameters_XBOX360 *processors_param, - CriError &err=CriMv::ErrorContainer); -#endif - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Sets the frame where playback will start - * - * \param seek_frame_id Frame (0-based) to start playing from - * \param err Optional error code - * - * To play a movie from other than the first frame, call this function before starting playback. - * To seek to a new frame when the movie is already playing, call CriMvEasyPlayer::Stop() and wait - * for the handle to change to the MVEASY_STATUS_STOP state, call this function with the desired - * frame number, then call CriMvEasyPlayer::Start() again. - * - * Valid values for seek_frame_id are from 0 to \a num_frames - 1, where \a num_frames can be found by - * - *
-	 *
-	 *   CriMvStreamingParameters streaming_params;
-	 *   CriSint32                num_frames;
-	 *
-	 *   GetMovieInfo(streaming_params);
-	 *   num_frames = streaming_params.video_prm[0].total_frames;
-	 *
-	 * 
- * - * Refer to \ref usr_mech7 for more information. - * - * \remarks - * If the value of \a seek_frame_id is out of range, playback will start from frame 0. - * - * \sa CriMvStreamingParameters - */ - /*JP - * \ingroup MODULE_OPTION - * \brief シーク再生開始位置の設定 - * \param seek_frame_id シーク再生開始するフレーム番号(0〜) - * \param err エラー情報(省略可) - * - * シーク再生を開始するフレーム番号を指定します。 - * - * 再生開始前( CriMvEasyPlayer::Prepare()または CriMvEasyPlayer::Start()呼び出し前)に本関数を実行してください。 - * また、この関数はムービの再生中に呼び出すことは出来ません。再生中にシークをする場合は、一度再生を停止してから - * 本関数を呼び出してください。 - * - * 本関数を実行しなかった場合、またはフレーム番号0を指定した場合はムービの先頭から再生を開始します。 - * 指定したフレーム番号が、ムービデータの総フレーム数より大きかったり負の値だった場合もムービの先頭から再生します。 - * - * \ref usr_mech7 もあわせて参照してください。 - * - */ - void SetSeekPosition(CriSint32 seek_frame_id, CriError &err=CriMv::ErrorContainer); - - /*EN - * - * \brief Calculates a frame ID from a frame time - * - * \param count Timer counter - * \param unit Counter increment per second - * \param err Optional error code - * - * \return Frame ID corresponding to given time - * - * Each frame of a movie corresponds to a particular display time, based on the framerate. Given a - * time from the start of playback, this function will return the ID of the specific frame that should - * be displayed, barring any delays or skipped frames, at that time. - * - * The time, in seconds, is specified by \a count / \a unit.
- * - * This function can be used for, among other things, jumping to a particular frame when a cuepoint is reached. - * - * \remarks - * This function can be called once the EasyPlayer handle status has reached MVEASY_STATUS_WAIT_PREP. - * - * \sa CriMvEasyPlayer::CalcTimeFromFrameId(); - */ - /*JP - * \ingroup MODULE_OPTION - * \brief 再生時刻からフレーム番号の計算 - * \param count タイマカウント - * \param unit 1秒あたりのタイマカウント値。count ÷ unit で秒単位の時刻となります。 - * \param err エラー情報(省略可) - * \return frame ID - * - * 再生時刻からフレーム番号を計算します。 - * この関数は、EasyPlayerハンドルの状態が MVEASY_STATUS_WAIT_PREP 以降になったあとに使用できます。 - * - * シーク再生開始位置を、時刻から計算したいときに使用してください。 - * (例えばキューポイント情報からシーク位置を決定する場合など。) - * - * \sa CriMvEasyPlayer::CalcTimeFromFrameId(); - */ - CriSint32 CalcFrameIdFromTime(CriUint64 count, CriUint64 unit, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Calculates a frame time from a frame ID - * - * \param frame_id Frame ID - * \param unit Counter increment per second - * \param err Optional error code - * - * \return Timer counter corresponding to given frame ID - * - * Each frame of a movie corresponds to a particular display time, based on the framerate. Given a - * frame ID and the number of timer intervals per second, this function will return the timer count - * of the display time for that frame. - * - * The display time, in seconds, for this frame is calculated by dividing the timer count by the timer - * interval. - * - * If you have the movie frame, you do not have to calculate the time. The \a time and \a tunit fields - * of the CriMvFrameInfo structure that is passed the GetFrameOnTimeXXX() and DiscardNextFrame() - * functions will contain this information. - * - * \remarks - * This function can be called once the EasyPlayer handle status has reached MVEASY_STATUS_WAIT_PREP. - * - * \sa CriMvEasyPlayer::CalcFrameIdFromTime(), CriMvFrameInfo - */ - /*JP - * \ingroup MODULE_OPTION - * \brief フレーム番号から再生時刻の計算 - * \param frame_id frame ID - * \param unit 1秒あたりのタイマカウント値。count ÷ unit で秒単位の時刻となります。 - * \param err エラー情報(省略可) - * \return タイマカウント - * - * フレーム番号から再生時刻を計算します。 - * この関数は、EasyPlayerハンドルの状態が MVEASY_STATUS_WAIT_PREP 以降になったあとに使用できます。 - * - * 実際にフレーム取得した場合は、計算の必要はありません。フレーム情報構造体の時刻を参照してください。 - * - * \sa CriMvEasyPlayer::CalcFrameIdFromTime(), CriMvFrameInfo - */ - CriUint64 CalcTimeFromFrameId(CriSint32 frame_id, CriUint64 unit, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Find the next event point, if any, after the given time counter - * - * \param count Timer counter - * \param unit Counter increment per second - * \param type Type of event point to look for - * \param eventinfo Returned event point information structure - * \param err Optional error code - * - * \return Frame ID corresponding to given time - * - * Event points allow an application to associate arbitrary actions with specific points in a movie. - * This function will search forward in the movie for the next event point after the given time - * (specifed as \a count / \a unit). If an event point is found, \a eventinfo will be populated with - * the information about the event point, and the function will return the corresponding frame ID. - * - * \a type is an application-defined value that can be used to categorize event points, and is specified - * when the movie is encoded (see link to event-point-specification-section for more information - * about creating event points.). If -1 is passed as the value of \a type, all event points will be - * searched. Otherwise, only matching event point types will be searched. - * - * If no event point of the requested type is found, this function will return -1. - * - * \remarks - * This function can be called once the EasyPlayer handle status has reached MVEASY_STATUS_WAIT_PREP. - * - * \sa CriMvEasyPlayer::SearchPrevEventPointByTime(); - */ - /*JP - * \ingroup MODULE_OPTION - * \brief 指定時刻直後のイベントポイントの検索 - * \param count タイマカウント - * \param unit 1秒あたりのタイマカウント値。count ÷ unit で秒単位の時刻となります。 - * \param type 検索対象とするイベントポイントのtype値 - * \param eventinfo 発見したイベントポイントの情報 - * \param err エラー情報(省略可) - * \return frame ID - * - * 指定時刻の次にあるイベントポイントを検索し、イベントポイント情報とフレーム番号を取得します。 - * この関数は、EasyPlayerハンドルの状態が MVEASY_STATUS_WAIT_PREP 以降になったあとに使用できます。 - * - * 検索の対象となるのは type で指定した値が一致するイベントポイントです。 - * type に -1を指定した場合は、全てのイベントポイントが検索対象となります。 - * - * 検索対象となるイベントポイントが発見できなかった場合は、フレーム番号は-1を返します。 - * - * \sa CriMvEasyPlayer::SearchPrevEventPointByTime(); - */ - CriSint32 SearchNextEventPointByTime(CriUint64 count, CriUint64 unit, CriSint32 type, - CriMvEventPoint &eventinfo, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Find the previous event point, if any, before the given time counter - * - * \param count Timer counter - * \param unit Counter increment per second - * \param type Type of event point to look for - * \param eventinfo Returned event point information structure - * \param err Optional error code - * - * \return Frame ID corresponding to given time - * - * Event points allow an application to associate arbitrary actions with specific points in a movie. - * This function will search backward in the movie (i.e. towards the beginning) for the next event - * point before the given time (specifed as \a count / \a unit). If an event point is found, - * \a eventinfo will be populated with the information about the event point, and the function will - * return the corresponding frame ID. - * - * \a type is an application-defined value that can be used to categorize event points, and is specified - * when the movie is encoded (see link to event-point-specification-section for more information - * about creating event points.). If -1 is passed as the value of \a type, all event points will be - * searched. Otherwise, only matching event point types will be searched. - * - * If no event point of the requested type is found, this function will return -1. - * - * \remarks - * This function can be called once the EasyPlayer handle status has reached MVEASY_STATUS_WAIT_PREP. - * - * \sa CriMvEasyPlayer::SearchNextEventPointByTime(); - */ - /*JP - * \ingroup MODULE_OPTION - * \brief 指定時刻直前のイベントポイントの検索 - * \param count タイマカウント - * \param unit 1秒あたりのタイマカウント値。count ÷ unit で秒単位の時刻となります。 - * \param type 検索対象とするイベントポイントのtype値 - * \param eventinfo 発見したイベントポイントの情報 - * \param err エラー情報(省略可) - * \return frame ID - * - * 指定時刻の手前にあるイベントポイントを検索し、イベントポイント情報とフレーム番号を取得します。 - * この関数は、EasyPlayerハンドルの状態が MVEASY_STATUS_WAIT_PREP 以降になったあとに使用できます。 - * - * 検索の対象となるのは type で指定した値が一致するイベントポイントです。 - * type に -1を指定した場合は、全てのイベントポイントが検索対象となります。 - * - * 検索対象となるイベントポイントが発見できなかった場合は、フレーム番号は-1を返します。 - * - * \sa CriMvEasyPlayer::SearchNextEventPointByTime(); - */ - CriSint32 SearchPrevEventPointByTime(CriUint64 count, CriUint64 unit, CriSint32 type, - CriMvEventPoint &eventinfo, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Gets the list of all event points in the movie - * - * \param err Optional error code - * - * \return Pointer to the list of event points, or NULL if there are no event points - * - * CRI Movie considers a cue point list to be the number of event points in a movie, and a pointer to - * an array of event point structures. Event points allow an application to associate arbitrary actions - * with specific points in a movie. - * - * The returned pointer points to an area inside of the EasyPlayer's work buffer. An application should - * not attempt to write to it. - * - * \remarks - * This function can be called once the EasyPlayer handle status has reached MVEASY_STATUS_WAIT_PREP. - * The returned information is valid through the MVEASY_STATUS_STOP state. Once the EasyPlayer handle - * has been destroyed, or the movie has been restarted (by calling CriMvEasyPlayer::Start(), - * CriMvEasyPlayer::Prepare(), or CriMvEasyPlayer::DecodeHeader()), the cuepoint information will be - * invalid. - * - */ - /*JP - * \ingroup MODULE_OPTION - * \brief キューポイント情報(イベントポイント一覧)の取得 - * \param err エラー情報(省略可) - * \return Cue point info (Event point list) - * - * キューポイント情報(イベントポイント一覧)を取得します。 - * この関数は、EasyPlayerハンドルの状態が MVEASY_STATUS_WAIT_PREP 以降になったあとに使用できます。 - * - * この関数で取得するキューポイント情報は、再生ハンドルのワークバッファを直接参照しています。
- * 再生停止状態での参照は可能ですが、次の再生を開始した後は参照を禁止します。
- * このキューポイント情報を別のメモリにコピーした場合もこの条件は変わりません。 - * - */ - CriMvCuePointInfo* GetCuePointInfo(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Sets a function that will be called when a cue point is reached - * - * \param func Callback function - * \param usrobj Pointer to user-provided data - * \param err Optional error code - * - * Beginning with version 2.0, CRI Movie allows a movie to specify arbitrary actions to - * happen at various points on the timeline. These are referred to as \a cue \a points, or, - * more generally, as \a event \a points. If a cue point callback has been installed for the - * movie, it will be called whenever a cuepoint has been reached. - * - * The \a usrobj parameter specifies a pointer to arbitrary data, that will be passed as the - * third parameter to the callback. - * - * The prototype of the callback function is - * - * void callback(CriMvEasyPlayer *mveasy, CriMvEventPoint *eventinfo, void *usrobj) - * - * where - * - * mveasy is the EasyPlayer object
- * eventinfo is the event info structure that was reached
- * usrobj is the pointer to user data that was passed to SetFileRequestCallback().
- * - * \remarks - * Do not call any movie playback functions (for example, CriMvEasyPlayer::Stop()) from the callback - * function. If you need to do this, set a flag from the callback and refer to it in your main loop. - * - * \sa CriMvEventPoint - */ - /*JP - * \ingroup MODULE_OPTION - * \brief キューポイントコールバック関数の登録 - * \param func キューポイントコールバック関数 - * \param usrobj ユーザオブジェクト - * \param err エラー情報(省略可) - * - * キューポイントのコールバック関数を登録します。 - * このコールバック関数は、ムービの再生時刻が各イベントポイントで指定された時刻を経過した時に発生します。 - * コールバック関数の呼び出し判定は CriMvEasyPlayer::Update() から行われます。 - * - * キューポイントコールバック発生時、コールバック関数の第2引数 eventinfo にはエベントポイント情報が、 - * 第3引数usrobjには、登録時に指定したユーザオブジェクトが渡されます。 - * - * キューポイントコールバック関数内では、ムービ再生をコントロールする関数(例えば CriMvEasyPlayer::Stop()) - * を呼び出してはいけません。 - * - * \sa CriMvEventPoint - */ - void SetCuePointCallback(void (*func)(CriMvEasyPlayer *mveasy, CriMvEventPoint *eventinfo, void *usrobj), - void *usrobj, CriError &err=CriMv::ErrorContainer); - - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Resets movie handle parameters to their default values - * - * \param err Optional error code - * - * This function will reset most parameters back to their default values. Call this when you are - * reusing an EasyPlayer handle and need to quickly undo changes to a number of parameters. - * - * Note that this will not remove a subaudio interface (set by CriMvEasyPlayer::AttachSubAudioInterface()). - * CriMvEasyPlayer::DetachSubAudioInterface() must be called instead. - * - * \remarks - * This function can be called once the EasyPlayer handle status is either MVEASY_STATUS_STOP or - * MVEASY_STATUS_PLAYEND. - * - * - *
Setting API Reset by ResetAllParameters() Reset by Stop() - *
SetFile YES (*1) - *
SetData YES (*1) - *
Pause YES YES - *
SetMasterTimer YES NO - *
SetNumberOfFramePools YES NO - *
SetBufferingTime YES NO - *
SetReloadThresholdTime YES NO - *
SetMaxBitrate YES NO - *
SetAudioTrack YES NO - *
SetLoopFlag YES NO - *
SetStreamingParameters YES NO - *
AttachSubAudioInterface NO NO - *
SetSubAudioTrack YES NO - *
ReplaceCenterVoice YES NO - *
SetFileRequestCallback YES NO - *
SetSeekPosition YES NO - *
SetCuePointCallback YES NO - *
- * - * (*1) Normally, values set by SetFile() or SetData() are not reset by a call to Stop(). However, - * if a file request callback has been set (via CriMvEasyPlayer::SetFileRequestCallback()), this - * setting will be reset. - * - * \sa CriMvEasyPlayer::Stop(), CriMvEasyPlayer::SetFileRequestCallback() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief パラメータのリセット - * \param err エラー情報(省略可) - * - * 再生ハンドルに設定されたパラメータ類をリセットします。
- * ただしサブオーディオ用インタフェースだけはリセットされませんので、アプリケーションで明示的に - * CriMvEasyPlayer::DetachSubAudioInterface() を呼び出してください。 - * - * 本関数はハンドル状態が MVEASY_STATUS_STOP または MVEASY_STATUS_PLAYEND の時に呼び出してください。 - * - * - *
設定関数 ResetAllParametersによる
リセット処理
Stopによる
リセット処理 - *
SetFile o (*1) - *
SetData o (*1) - *
Pause o o - *
SetMasterTimer o x - *
SetNumberOfFramePools o x - *
SetBufferingTime o x - *
SetReloadThresholdTime o x - *
SetMaxBitrate o x - *
SetAudioTrack o x - *
SetLoopFlag o x - *
SetStreamingParameters o x - *
AttachSubAudioInterface x x - *
SetSubAudioTrack o x - *
ReplaceCenterVoice o x - *
SetFileRequestCallback o x - *
SetSeekPosition o x - *
SetCuePointCallback o x - *
- * (*1) 通常はリセットされません。ただしファイル要求コールバックが登録されていた場合はリセットされます。 - * - * \sa CriMvEasyPlayer::Stop() - */ - void ResetAllParameters(CriError &err=CriMv::ErrorContainer); - - /* 再生用ワークバッファおよび下位モジュールの解放(明示的な呼び出し用) */ - void ReleasePlaybackWork(CriError &err=CriMv::ErrorContainer); - -public: /* for DEBUG */ - /*//EN - * \ingroup MODULE_OPTION - * - * \brief Sets the maximum movie data read size - * - * \param max_chunk_size The maximum read size, in bytes - * \param err Optional error code - * - * This is a DEBUG function and should not normally need to be used by applications. - * - * Sets the maximum read size. CRI Movie will attempt to read this many bytes each time it - * needs to load more movie data from disk. - * - * If this function is called, it must be called before calling any of the playback functions - * (CriMvEasyPlayer::Start(), CriMvEasyPlayer::Prepare(), or CriMvEasyPlayer::DecodeHeader()). - * - * To revert to the default behavior, pass 0 as \a max_chunk_size. - * - * \remarks - * If this function is called, the new value for \a max_chunk_size will not be reflected in the - * CriMvStreapingParameters structure. A call to CriMvEasyPlayer::GetMovieInfo() will return the - * original value that was set in the movie header. - * - * \remarks - * If you call CriMvEasyPlayer::SetStreamingParameters(), this function can not be used. - * - * \sa CriMvEasyPlayer::GetMovieInfo(), CriMvEasyPlayer::SetMinBufferSize() - */ - /*//JP - * \ingroup MODULE_OPTION - * \brief 最大チャンクサイズの指定 - * \param max_chunk_size 最大チャンクサイズ[byte] - * \param err エラー情報(省略可) - * - * ムービデータの最大チャンクサイズを指定します。
- * 現在のライブラリでは、本関数はアプリケーションから使用する必要はありません。
- * - * 本関数で設定した最大チャンクサイズは、CriMvEasyPlayer::GetMovieInfo 関数で取得するムービ情報には反映されません。 - * CriMvEasyPlayer::GetMovieInfo 関数で取得できるのはムービデータの本来の情報です。
- * - * 本関数の呼び出しは、 CriMvEasyPlayer::Prepare 関数または CriMvEasyPlayer::Start 関数の前までに実行してください。 - * - * 最大チャンクサイズに 0を指定した場合、最大チャンクサイズはムービデータの持つ値となります。
- * また、アプリケーションが CriMvEasyPlayer::SetStreamingParameters 関数を呼び出した場合は本関数で - * 設定した値よりも、 CriMvEasyPlayer::SetStreamingParameters 関数の指定が優先されます。 - * - * \sa CriMvEasyPlayer::GetMovieInfo(), CriMvEasyPlayer::SetMinBufferSize() - */ - void SetMaxChunkSize(CriUint32 max_chunk_size, CriError &err=CriMv::ErrorContainer); - - /*//EN - * \ingroup MODULE_OPTION - * - * \brief Sets the minimum movie data buffer size - * - * \param min_buffer_size The minimum buffer size, in bytes - * \param err Optional error code - * - * This is a DEBUG function and should not normally need to be used by applications. - * - * Sets the minimum buffer size used for reading movie data from disk. - * - * If this function is called, it must be called before calling any of the playback functions - * (CriMvEasyPlayer::Start(), CriMvEasyPlayer::Prepare(), or CriMvEasyPlayer::DecodeHeader()). - * - * To revert to the default behavior, pass 0 as \a max_chunk_size. - * - * \remarks - * If this function is called, the new value for \a min_buffer_size will not be reflected in the - * CriMvStreapingParameters structure. A call to CriMvEasyPlayer::GetMovieInfo() will return the - * original value that was set in the movie header. - * - * \remarks - * If you call CriMvEasyPlayer::SetStreamingParameters(), this function can not be used. - * - * \sa CriMvEasyPlayer::GetMovieInfo(), CriMvEasyPlayer::SetMaxChunkSize() - */ - /*//JP - * \ingroup MODULE_OPTION - * \brief 最小バッファサイズの指定 - * \param min_buffer_size 最小バッファサイズ[byte] - * \param err エラー情報(省略可) - * - * ムービデータの最小バッファサイズを指定します。
- * 現在のライブラリでは、本関数はアプリケーションから使用する必要はありません。
- * - * 本関数で設定した最小バッファサイズは、CriMvEasyPlayer::GetMovieInfo 関数で取得するムービ情報には反映されません。 - * CriMvEasyPlayer::GetMovieInfo 関数で取得できるのはムービデータの本来の情報です。
- * - * 本関数の呼び出しは、 CriMvEasyPlayer::Prepare 関数または CriMvEasyPlayer::Start 関数の前までに実行してください。 - * - * 最小バッファサイズに 0を指定した場合、最小バッファサイズはムービデータの持つ値となります。
- * また、アプリケーションが CriMvEasyPlayer::SetStreamingParameters 関数を呼び出した場合は本関数で - * 設定した値よりも、 CriMvEasyPlayer::SetStreamingParameters 関数の指定が優先されます。 - * - * \sa CriMvEasyPlayer::GetMovieInfo(), CriMvEasyPlayer::SetMaxChunkSize() - */ - void SetMinBufferSize(CriUint32 min_buffer_size, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Retrieves various movie playback statistics - * - * \param playinfo Playback statistics structure - * \param err Optional error code - * - * This is a DEBUG function and is not normally needed by applications. - * - * Retrieves a number of performance statistics dealing with movie playback, including how often - * a frame could not be retrieved and how close the plaback framerate is to the movie's expected - * playback. - * - * This information is updated on every call to CriMvEasyPlayer::IsNextFrameOnTime(). In order for - * the values to be accurate, an application should call IsNextFrameOnTime() once each time through - * its main loop. Calling IsNextFrameOnTime() too often or not often enough will result in - * misleading statistics. - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief ムービ再生情報の取得 - * \param playinfo ムービ情報(返り値) - * \param err エラー情報(省略可) - * - * 本関数は通常、アプリケーションからは使用しません。デバッグ用の関数です。 - * - * 現在再生しているムービの再生情報 CriMvPlaybackInfo 構造体を取得できます。
- * この情報からビデオフレームの取得間隔や、ビデオフレームのデコード遅延などを知ることができます。
- * - * 再生情報はアプリが呼び出す CriMvEasyPlayer::IsNextFrameOnTime() 内で更新します。
- * アプリケーションが CriMvEasyPlayer::IsNextFrameOnTime()を呼び出さない場合や、メインループで複数回 - * 呼び出す場合は情報が正しく更新されないので注意してください。
- * - * \sa CriMvEasyPlayer::IsNextFrameOnTime() - */ - void GetPlaybackInfo(CriMvPlaybackInfo & playinfo, CriError & err = CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Gets the result of the last attempt to retrieve a video frame - * - * \param err Optional error code - * - * \return The result of the last frame retrieval - * - * Returns one of the following values: - * - * - * - * - * - * - * - *
Value Meaning
CRIMV_LASTFRAME_OK The frame was successfully retrieved.
CRIMV_LASTFRAME_TIME_EARLY It is too soon to display this frame. The frame time - * is greater than the current playback time.
CRIMV_LASTFRAME_DECODE_DELAY The frame has not been decoded yet, or CRI Movie is not - * done decoding it.
CRIMV_LASTFRAME_DISCARDED The frame was discarded, by calling - * CriMvEasyPlayer::DiscardNextFrame()
- * - * \remarks - * The result is determined by calling CriMvEasyPlayer::IsNextFrameOnTime(), not the GetFrameOnTimeXXX() - * functions. - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime(), CriMvEasyPlayer::DiscardNextFrame() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief 前回のビデオフレーム取得の結果を取得する - * \param err エラー情報(省略可) - * \return フレーム取得結果の列挙値 - * - * 本関数は通常、アプリケーションからは使用しません。デバッグ用の関数です。 - * - * 前回のビデオフレーム取得の結果を返します。 - * ビデオフレームのデコードが間に合っているのかどうかをチェックすることが出来ます。 - * - * 注意:
- * ビデオフレーム取得の結果とは、基本的にアプリケーションが呼び出す CriMvEasyPlayer::IsNextFrameOnTime() の結果を元に - * 更新します。GetFrameOnTime関数の結果ではありません。 - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime() - */ - CriMvLastFrameResult GetLastFrameResult(CriError & err = CriMv::ErrorContainer); - - /* [Unofficial] */ - /* Set the number of decoded frames to keep internally during the MVEASY_STATUS_PREP status. */ - /* Adjust the number if you need to reduce latesy for the first frame */ - void SetNumberOfFramesForPrep(CriUint32 num_frames, CriError & err = CriMv::ErrorContainer); - - /* [Unofficial] - * \ingroup MODULE_OPTION - * \brief 再生終了/停止通知コールバック関数の登録 - * \param func 再生終了/停止通知コールバック関数 - * \param usrobj ユーザオブジェクト - * \param err エラー情報(省略可) - * - * 再生終了および再生停止を通知するコールバック関数を登録します。 - * このコールバック関数は、ヘッダ解析/再生準備/再生状態から再生停止/再生終了状態に - * 遷移した直後に一度だけ呼び出されます。 - * コールバック関数の呼び出しは CriMvEasyPlayer::Update() から行われます。 - * - * 登録したコールバック関数内では、ムービ再生をコントロールする関数(例えば CriMvEasyPlayer::Stop()) - * を呼び出してはいけません。 - * - * 注意: MVEASY_STATUS_PLAYEND状態からMVEASY_STATUS_STOP状態への遷移時にはコールバック関数は呼び出されません。 - */ - void SetStopCompleteCallback(void (*func)(CriMvEasyPlayer *mveasy, void *usrobj), - void *usrobj, CriError &err=CriMv::ErrorContainer); - - /* For FAST_LATENCY */ - /*************************************************************************************/ - /* コンフィグ指定のハンドル作成関数 */ - static CriMvEasyPlayer* CRIAPI Create(CriHeap heap, - CriMvHandleConfig *config, - CriMvFileReaderInterface *freader, - CriMvSystemTimerInterface *stimer, - CriMvSoundInterface *sound, - CriError &err=CriMv::ErrorContainer); - - /* For Sofdec2 */ - /*************************************************************************************/ - enum MetaFlag { - MVEASY_META_FLAG_CUE = 0x0001, - MVEASY_META_FLAG_SEEK = 0x0002, - MVEASY_META_FLAG_ALL = MVEASY_META_FLAG_CUE + MVEASY_META_FLAG_SEEK, - - /* Keep enum 4bytes */ - MVEASY_META_FLAG_MAKE_ENUM_SINT32 = 0x7FFFFFFF - }; - - enum ReferFrameResult { - MVEASY_REFER_FRAME_RESULT_OK = (1), - MVEASY_REFER_FRAME_RESULT_SHORT_INPUT = (2), - MVEASY_REFER_FRAME_RESULT_SHORT_CPUTIME = (3), - MVEASY_REFER_FRAME_RESULT_DEMUX_STUCK = (4), - - /* Keep enum 4bytes */ - MVEASY_REFER_FRAME_RESULT_MAKE_ENUM_SINT32 = 0x7FFFFFFF - }; - - /* ユーザからのワーク領域渡し版、ハンドル作成関数 */ - static CriMvEasyPlayer* CRIAPI Create(void *work, CriSint32 work_size, - CriMvHandleConfig *config, - CriMvFileReaderInterface *freader, - CriMvSystemTimerInterface *stimer, - CriMvSoundInterface *sound, - CriError &err=CriMv::ErrorContainer); - - /* 再生用ワーク領域サイズの計算 */ - CriSint32 CalcPlaybackWorkSize(const CriMvStreamingParameters *stmprm, CriError & err = CriMv::ErrorContainer); - - /* 再生用ワーク領域の設定関数 */ - void SetPlaybackWork(void *work, Sint32 work_size, CriError & err = CriMv::ErrorContainer); - - /* メタデータワーク用コールバック関数 */ - void SetMetaDataWorkAllocator(CriMvMetaDataWorkMallocFunc allocfunc, CriMvMetaDataWorkFreeFunc freefunc,void *usrobj, CriMvMetaFlag meta_flag); - - /* 引数で指定したフレーム情報の表示判定 */ - CriBool IsFrameOnTime(const CriMvFrameInfo *frameinfo, CriError &err=CriMv::ErrorContainer); - - /* フレームの参照 */ - ReferFrameResult ReferFrame(CriMvFrameInfo &frameinfo, CriError &err=CriMv::ErrorContainer); - - /* YUV個別バッファフォーマットでのバッファ取得 */ - CriBool LockFrameYUVBuffersWithAlpha(CriMvYuvBuffers &yuvbuffers, CriMvFrameInfo &frameinfo, CriMvAlphaFrameInfo &alpha_frameinfo, CriError &err=CriMv::ErrorContainer); - - /* LockFrameYUVBuffersWithAlphaでロックしたフレームの解放 */ - CriBool UnlockFrameBufferWithAlpha(CriMvFrameInfo *frameinfo, CriMvAlphaFrameInfo *alpha_frameinfo, CriError &err=CriMv::ErrorContainer); - - /* 32bitARGBバッファフォーマットへのコピー関数 */ - CriBool CopyFrameToBufferARGB32(CriUint8 *dstbuf, CriUint32 dst_pitch, CriUint32 dst_bufsize, - const CriMvYuvBuffers *srcbufs, const CriMvFrameInfo *src_vinf, const CriMvAlphaFrameInfo *src_ainf, CriError &err=CriMv::ErrorContainer); - - /* 32bitARGBバッファフォーマットへαのみのコピー関数 */ - CriBool CopyAlphaToBufferARGB32( - const CriMvFrameInfo *src_vinf, - CriUint8 *dst_buf, - CriUint32 dst_pitch, - CriUint32 dst_bufsize, - CriError &err=CriMv::ErrorContainer - ); - -#if defined(XPT_TGT_IPHONE) || defined(XPT_TGT_WINMO) || defined(XPT_TGT_ANDROID) || defined(XPT_TGT_CQSH2A) || defined(XPT_TGT_ACRODEA) || defined(XPT_TGT_NACL) || defined(XPT_TGT_SH7269) || defined(XPT_TGT_PC)|| defined(XPT_TGT_TRGP6K) - CriBool CopyFrameToBufferRGB565(CriUint8 *dstbuf, CriUint32 dst_pitch, CriUint32 dst_bufsize, - const CriMvYuvBuffers *srcbufs, const CriMvFrameInfo *src_vinf, const CriMvAlphaFrameInfo *src_ainf, CriError &err=CriMv::ErrorContainer); -#endif - - /* YUV個別バッファフォーマットのコピー関数 */ - CriBool CopyFrameToBuffersYUV(CriMvYuvBuffers *dstbufs, - const CriMvFrameInfo *src_vinf, const CriMvAlphaFrameInfo *src_ainf, CriError &err=CriMv::ErrorContainer); - - /* リードバッファサイズの強制指定 */ - void SetReadBufferSize(CriUint32 buffer_size, CriError &err=CriMv::ErrorContainer); - - CriUint32 GetMinBufferSize(CriError &err=CriMv::ErrorContainer); - /**************************************************************************************/ - void SetVideoFramerate(CriUint32 framerate_n, CriUint32 framerate_d); - - void SetCompareFrameTimeCallback( - CriBool (*func)(CriMvEasyPlayer *mveasy, CriMvFrameInfo *frameinfo, CriUint64 count, CriUint64 unit, void *usrobj), - void *usrobj, CriError &err=CriMv::ErrorContainer); - void SetSeekFrameAndOffset(CriSint32 seek_frame_id, CriUint64 seek_byte, CriError &err=CriMv::ErrorContainer); - - enum InputMode { - MVEASY_INPUT_UNDEFINED, - MVEASY_INPUT_STREAMING, /* メモリストリーミング */ - MVEASY_INPUT_MEMORY, /* メモリ直接参照(ユニSJ) */ - - /* Keep enum 4bytes */ - MVEASY_INPUT_MAKE_ENUM_SINT32 = 0x7FFFFFFF - }; - /* 実験中: この関数のために InputMode 定義を暫定でpublicへ移動 */ - void SetMemoryPlaybackType(InputMode memplay_type, CriError &err=CriMv::ErrorContainer); - - /* デコードスキップの自動実行モード */ - //void SetAutoSkipDecode(CriBool sw, CriFloat32 margin_msec, CriError &err=CriMv::ErrorContainer) - - /* ファイル要求の再コールバック要求 */ - void DeferFileRequest(CriError &err=CriMv::ErrorContainer); - - /* for specific use */ - void SetHeaderAndBodyData(const CriUint64Adr header_ptr, CriSint64 header_size, - const CriUint64Adr body_ptr, CriSint64 body_size); - CriSint32 CalcFramepoolWorkSize(const CriMvStreamingParameters *stmprm, CriError & err = CriMv::ErrorContainer); - void SetFramepoolWork(void *work, CriSint32 work_size, CriError & err = CriMv::ErrorContainer); - void SetFramepoolWorkAllocator(CriMvFramepoolWorkMallocFunc allocfunc, CriMvFramepoolWorkFreeFunc freefunc, void *usrobj); - void SetCapacityOfPictureSize(CriSint32 video_picsize, CriSint32 alpha_picsize, CriError &err); - void GetUsrCapacityOfPictureSize(CriSint32 *video_picsize, CriSint32 *alpha_picsize); - void SetMaxMovieSize(CriUint32 max_width, CriUint32 max_height, CriError &err); - void GetMaxMovieSize(CriUint32 *max_width, CriUint32 *max_height); - CriBool PlaybackResourceAllocated() const; - CriBool CanReusePlaybackResource(const CriMvStreamingParameters *stmprm) const; - CriBool GetReusePlaybackResourceFlag() const; - -private: - /* CRI internal use only */ - - void initializeHandleParameters(void); - void initializeCompareFrameParameters(void); - void resetHandleParameters(void); - CriBool startInputAndDecoding(void); - CriBool isEndReadFile(void); - void reinputDataForLooping(void); - void executeFileCloseServer(void); - void supplyDataFromStreamer(void); - void executeFileReadServer(void); - void executeFileOpenServer(void); - void executeCuePointServer(void); - //void executeAutoSkipDecode(void); - void executeWaitStatusServer(CriError &err = CriMv::ErrorContainer); - void surveilTerminationInput(void); - CriBool isAvailableCenterVoice(const CriMvStreamingParameters *stmprm); - CriBool isAvailableSubAudio(const CriMvStreamingParameters *stmprm); - CriBool attachCenterVoice(void); - void detachCenterVoice(void); - - CriBool attachSubAudioHandle(CriHeap heap); - void detachSubAudioHandle(void); - - void getAudioTime(CriUint64 &out_count, CriUint64 &out_unit, CriUint64 s_count, CriUint64 s_unit); - - CriBool allocAndCreateModules(void); - void startModules(void); - void requestStopModules(void); - CriBool closeFileIfOpening(void); - CriBool isCompleteStopModules(void); - void tryCleanupModules(CriMvPlyStatus mvstat); - CriBool tryFreeAndDestroySubmodules(void); - void freeAndDestroyModules(void); - - CriUint32 adjustNumTrackAudioOut(void); - - /* ストリーミング用のパラメータ取得 */ - /* GetMovieInfo()との違いはユーザ指定値がどこまで反映されるか。 - * 例えば、最大チャンクサイズはこの関数ではユーザ指定値をとるが、GetMovieInfoだとファイルの値。 - * この関数は、内部で下位モジュール作成およびメモリ確保する時に使う。 */ - CriBool GetStreamingParameters(CriMvStreamingParameters &stmprm, CriError &err=CriMv::ErrorContainer); - - void setNormalErrorStatus(const CriChar8 *errmsg); - - CriBool compareFrameTimeSimple(CriMvEasyPlayer *mveasy, CriMvFrameInfo *frameinfo, CriUint64 count, CriUint64 unit, void *usrobj); - static CriBool compareFrameTimeFluctuation(CriMvEasyPlayer *mveasy, CriMvFrameInfo *frameinfo, CriUint64 count, CriUint64 unit, void *usrobj); - - Bool isNextFrameOnTime(CriBool update_stats, CriError &err); - Bool checkFrameTime(CriMvFrameInfo *frameinfo); - void updateGetFrameInfo(CriBool time_ready, CriBool acquired_frame, CriBool discard_frame, CriUint64 frame_count, CriUint64 frame_unit); - - /* for DEBUG */ - void crimveasy_SetSeekInfo(void); - - void executeUpdate(CriError &err); - -private: - static CriUint32 crimveasy_SupplyPcmDataByFloat32(void *obj, CriUint32 nch, CriFloat32 *pcmbuf[], CriUint32 req_nsmpl); - static CriUint32 crimveasy_SupplyPcmDataBySint16(void *obj, CriUint32 nch, CriSint16 *pcmbuf[], CriUint32 req_nsmpl); - static CriUint32 crimveasy_CalcAvailableNumSmpls(CriMvEasyPlayer *mveasy); - static CriUint32 crimveasy_GetWave16(CriMvEasyPlayer *mveasy, CriUint32 nch, CriSint16 *pcmbuf[], CriUint32 req_nsmpl); - static CriUint32 crimveasy_GetWave32(CriMvEasyPlayer *mveasy, CriUint32 nch, CriFloat32 *pcmbuf[], CriUint32 req_nsmpl); - - static CriUint32 crimveasy_SupplySubAudioDataByFloat32(void *obj, CriUint32 nch, CriFloat32 *pcmbuf[], CriUint32 req_nsmpl); - static CriUint32 crimveasy_GetSubAudioWave32(CriMvEasyPlayer *mveasy, CriUint32 nch, CriFloat32 *pcmbuf[], CriUint32 req_nsmpl); - static CriUint32 crimveasy_SupplySubAudioDataBySint16(void *obj, CriUint32 nch, CriSint16 *pcmbuf[], CriUint32 req_nsmpl); - static CriUint32 crimveasy_GetSubAudioWave16(CriMvEasyPlayer *mveasy, CriUint32 nch, CriSint16 *pcmbuf[], CriUint32 req_nsmpl); - -public: - CriMvPly mvply; /* Temporally allowed to access for debug */ - -private: - CriHeap heap; - CriBool user_stmprm_flag; - CriMvStreamingParameters stmprm; - CriBool alloced_submodules_flag; - CriMvFrameInfo frameinfo; - CriMvAlphaFrameInfo alpha_frame; - CriMvFileReaderInterface *freader; - CriMvSoundInterface *sndout; - CriMvSystemTimerInterface *stimer; - TimerType timertype; - Status pre_ezstat; - CriBool req_decode_header_flag; - CriBool req_prepare_flag; - CriBool pause_flag; - CriUint32 npools; - CriSint32 track_play_audio; - CriUint32 num_track_audio_data; - CriUint32 num_track_audio_out; - CriBool loop_flag; - CriUint64 time_count; - CriUint64 time_unit; - CriSint64 total_read; - CriSint64 fsize_byte; - CriChunk read_crick; - CriBool exe_open; - CriBool exe_close; - CriBool exe_read; - - CriUint64 time_syslog_count; /* システムタイマの記録 */ - CriUint64 time_syslog_unit; - CriUint64 time_ofs_count; /* オーディオ終了時のシステムタイマ */ - CriUint64 time_ofs_unit; - CriUint64 time_prev_audio_count; /* オーディオ時刻変化チェック用 */ - CriUint64 time_prev_audio_unit; - - CriFloat32 user_buffering_sec; /* 0.0f means AUTO */ - CriUint32 user_max_bitrate; /* 0 means AUTO */ - CriUint32 user_max_chunk_size; /* 0 means AUTO */ - CriUint32 user_min_buffer_size; /* 0 means AUTO */ - CriSint32 user_read_buffer_size; /* CRIMV_READ_BUFFER_SIZE_AUTO means AUTO */ - CriSint32 user_video_capacity_of_picsize; /* 0 means AUTO */ - CriSint32 user_alpha_capacity_of_picsize; /* 0 means AUTO */ - CriUint32 user_max_width; - CriUint32 user_max_height; - - CriSint32 usr_subtitle_channel; - CriMvSubtitleInfo sbtinfo; - CriFloat32 sbt_start_msec; - CriFloat32 sbt_end_msec; - CriUint8 *sbtbuf; - - enum InputSrc { - MVEASY_INPUT_SRC_UNDEFINED, - MVEASY_INPUT_SRC_FILE, - MVEASY_INPUT_SRC_MEMORY, - /* Keep enum 4bytes */ - MVEASY_INPUT_SRC_MAKE_ENUM_SINT32 = 0x7FFFFFFF - }; - InputSrc input_src; - CriMvFileReaderInterface *ext_reader; - CriMvFileReaderInterface *mem_reader; - - enum InputSupplyStatus { - MVEASY_SUPPLY_STOP, - MVEASY_SUPPLY_REQ_OPEN, - MVEASY_SUPPLY_OPENING, - MVEASY_SUPPLY_READING, - MVEASY_SUPPLY_REQ_CLOSE, - MVEASY_SUPPLY_CLOSING, - - /* Keep enum 4bytes */ - MVEASY_SUPPLY_MAKE_ENUM_SINT32 = 0x7FFFFFFF - }; - - InputMode memplay_type; /* メモリ再生をストリームするかユニSJするか */ - InputMode input_mode; - InputSupplyStatus supply_stat; - CriBool change_file_mode; - CriChar8 file_name[CRIMV_MAX_FILE_NAME]; - CriUint64 file_offset; - CriSint64 file_range; - CriUint8 *dataptr; - CriUint32 datasize; - CriBool terminate_flag; - CriSint32 reinput_cnt; - - enum NextEntryState { - MVEASY_NEXT_ENTRY_NONE, - MVEASY_NEXT_ENTRY_READY, - MVEASY_NEXT_ENTRY_DEFER, - /* Keep enum 4bytes */ - MVEASY_NEXT_ENTRY_MAKE_ENUM_SINT32 = 0x7FFFFFFF - }; - NextEntryState next_entry_state; - - CriUint32 center_ch; - CriSint32 usr_voice_track; // by SetCenterVoice() - CriSint32 voice_attached_track; - - // Sub Audio - CriMvSoundInterface *if_subaudio; - CriSint32 usr_subaudio_track; - CriSint32 attached_subaudio_track; - - void (*cbfunc_file_request)(CriMvEasyPlayer *mveasy, void *usrobj); - void *usrobj_file_request; - - CriBool (*cbfunc_compare_ftime)(CriMvEasyPlayer *mveasy, CriMvFrameInfo *frameinfo, CriUint64 count, CriUint64 unit, void *usrobj); - void *usrobj_compare_ftime; - - /* Seek Playback */ - CriSint32 seek_frame_id; - CriUint64 seek_byte; - - /* CuePoint */ - void (*cbfunc_cuepoint)(CriMvEasyPlayer *mveasy, CriMvEventPoint *eventinfo, void *usrobj); - void *usrobj_cuepoint; - - /* Playback Statistics */ - CriBool start_getfrm; - CriUint64 last_getfrm_count; - CriFloat32 sum_diff_time; - CriMvPlaybackInfo playinfo; - CriMvLastFrameResult last_frm_result; - - /* Block flag for simultanious calls on multi-threads */ - CriSint32 execute_decode_block_flag; - CriSint32 update_block_flag; - - /* Stop Completion Notification */ - void (*cbfunc_stopcomplete)(CriMvEasyPlayer *mveasy, void *usrobj); - void *usrobj_stopcomplete; - - /* For Sofdec2 */ - void *playback_work; - CriSint32 playback_work_size; - void *mvply_work; - CriHeap heap_mveasy; - CriHeap heap_extra_sound; - CriBool reuse_modules_flag; - - /* For Debug */ - volatile CriUint8 end_sequence_info; - - /* Handle Protection */ - void *cshn; - void *cs_work; - - /* Skip Decoding */ - //CriBool skip_auto_flag; - //CriFloat32 margin_msec; - -public: - enum FrameCompareMode { - MVEASY_COMPARE_MODE_JUST, /* 正確に時刻比較する */ - MVEASY_COMPARE_MODE_DELAY_GET, /* タイマ時刻を前倒し=フレームはなるべく渡さない */ - MVEASY_COMPARE_MODE_FAST_GET, /* タイマ時刻を水増し=フレームはなるべく渡す */ - - /* Keep enum 4bytes */ - MVEASY_COMPARE_MODE_MAKE_ENUM_SINT32 = 0x7FFFFFFF - }; - FrameCompareMode compare_mode; - CriFloat32 accuracy_system_tmr_msec; /* システム時刻精度 milli sec */ - CriFloat32 accuracy_audio_tmr_msec; /* オーディオ時刻精度 milli sec */ - CriFloat32 fluctuation_system; /* システム(SyncFrame)の揺らぎ milli sec */ - CriFloat32 fluctuation_adjust; /* 揺らぎ補正 */ -// CriFloat32 fluctuation_system_msec; /* システム時刻ゆらぎ幅 milli sec */ -// CriFloat32 fluctuation_audio_msec; /* オーディオ時刻ゆらぎ幅 milli sec */ -// CriFloat32 fluctuation_adjust; /* ゆらぎ補正倍率 */ -// CriSint32 fluctuation_system_usec; /* システム時刻ゆらぎ幅 micro sec */ -// CriSint32 fluctuation_audio_usec; /* オーディオ時刻ゆらぎ幅 micro sec */ -// CriFloat32 fluctuation_adjust_multi; /* ゆらぎ補正倍率 */ -// CriSint32 fluctuation_adjust_add; /* ゆらぎ補正オフセット */ - -private: - CriBool req_stop_modules; - CriBool error_flag; - CriBool req_start_modules; - -protected: - CriMvEasyPlayer(CriHeap heap, - CriMvFileReaderInterface *freader, - CriMvSystemTimerInterface *stimer, - CriMvSoundInterface *sound, - CriError &err=CriMv::ErrorContainer); - virtual ~CriMvEasyPlayer(); - -private: - CriMvEasyPlayer(void); //disabled -}; - - - - -#endif /* CRI_MOVIE_H_INCLUDED */ diff --git a/3rdParty/cri/PS4/include/cri_movie_core.h b/3rdParty/cri/PS4/include/cri_movie_core.h deleted file mode 100644 index 06f7f797..00000000 --- a/3rdParty/cri/PS4/include/cri_movie_core.h +++ /dev/null @@ -1,2554 +0,0 @@ -/**************************************************************************** - * - * CRI Middleware SDK - * - * Copyright (c) 2005-2013 CRI Middleware Co., Ltd. - * - * Library : CRI Movie - * Module : Library User's Header - * File : cri_movie_core.h - * Date : 2013-11-21 - * Version : (see CRIMVPLY_VER) - * - ****************************************************************************/ -/*! - * \file cri_movie_core.h - */ -#ifndef CRI_MOVIE_CORE_H_INCLUDED /* Re-definition prevention */ -#define CRI_MOVIE_CORE_H_INCLUDED - -/* Version No. */ -#define CRIMVPLY_VER "3.50" -#define CRIMVPLY_NAME "criMvPly" - -/*************************************************************************** - * Include file - ***************************************************************************/ -#include -#include -#include - -/*************************************************************************** - * MACRO CONSTANT - ***************************************************************************/ - -/*EN - * \brief Audio OFF setting of Audio Track - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetAudioTrack() - */ -/*JP - * \brief オーディオ再生OFFの指定値 - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetAudioTrack() - */ -#define CRIMV_AUDIO_TRACK_OFF (-1) - -/*EN - * \brief Default setting of Audio Track - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetAudioTrack() - */ -/*JP - * \brief オーディオチャネルのデフォルト値 - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetAudioTrack() - */ -#define CRIMV_AUDIO_TRACK_AUTO (100) - -/*EN - * \brief Maximum number of PCM tracks in one audio stream - * \ingroup MDL_MV_OPTION - */ -/*JP - * \brief オーディオデータ内の最大PCMトラック数 - * \ingroup MDL_MV_OPTION - */ -#define CRIMV_PCM_BUFFER_MAX (8) - -/*EN - * \brief Subtitle OFF setting - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetSubtitleChannel() - */ -/*JP - * \brief 字幕再生OFFの指定値 - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetSubtitleChannel() - */ -#define CRIMV_SUBTITLE_CHANNEL_OFF (-1) - -/*EN - * \brief Maximum number of video tracks in a movie file - * \ingroup MDL_MV_OPTION - */ -/*JP - * \brief ムービファイル内の最大ビデオストリーム数 - * \ingroup MDL_MV_OPTION - */ -#define CRIMV_MAX_VIDEO_NUM (1) - -/*EN - * \brief Maximum number of audio tracks in a movie file - * \ingroup MDL_MV_OPTION - */ -/*JP - * \brief ムービファイル内の最大オーディオストリーム数 - * \ingroup MDL_MV_OPTION - */ -#define CRIMV_MAX_AUDIO_NUM (32) - -/*EN - * \brief Maximum number of alpha tracks in a movie file - * \ingroup MDL_MV_OPTION - */ -/*JP - * \brief ムービファイル内の最大アルファストリーム数 - * \ingroup MDL_MV_OPTION - */ -#define CRIMV_MAX_ALPHA_NUM (1) - -#if defined(XPT_TGT_PC) -/*EN - * \brief Number of extra threads for multicore decoding - * \ingroup MDL_MV_OPTION - * The number of additional decoding threads that CRI Movie library internally creates. - * The threads are intended to run on multiple processors in parallel. - * \sa CriMvEasyPlayer::SetUsableProcessors_PC() - */ -/*JP - * \brief マルチコアデコード用の追加のデコードスレッド数 - * \ingroup MDL_MV_OPTION - * CRI Movieライブラリが内部で作成する追加のデコードの数です。これらのスレッドは、マルチコアPC上で - * デコード処理を並列分散させるために作られます。 - * \sa CriMvEasyPlayer::SetUsableProcessors_PC() - */ -#define CRIMV_NUM_EXT_DECTHREAD_PC (3) - -/*EN - * \brief Default affnity mask of a thread - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetUsableProcessors_PC() - */ -/*JP - * \brief スレッドアフィニティマスクのデフォルト設定値 - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetUsableProcessors_PC() - */ -#define CRIMV_DEFAULT_AFFNITY_MASK_PC (0xFFFFFFFF) - - -/*EN - * \brief Default priority of a thread - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetUsableProcessors_PC() - */ -/*JP - * \brief スレッドのデフォルト優先度 - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetUsableProcessors_PC() - */ -#define CRIMV_DEFAULT_THREAD_PRIORITY_PC (0x8000000) -#endif - -/*EN - * \brief Default value of the read buffer size - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetReadBufferSize() - */ -/*JP - * \brief リードバッファサイズをデフォルト値 - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetReadBufferSize() - */ -#define CRIMV_READ_BUFFER_SIZE_AUTO (-1) - - -/*************************************************************************** - * Library Spec Defenition - ***************************************************************************/ - -/* */ - -/* 2007-09-06:URUSHI オーディオ処理のサブモジュール化 * - * MvPlyのオーディオ処理部分をCriMvPlyAmngという新たなクラスに切り出す。* - * CriMvPlyAmngはデマルチプレクサから全トラックデータを受け取って、 * - * トラックごとに割り振られたAdecに処理を渡します。 * - * 目的は以下の二つ * - * 1) オーディオトラックの動的切替 * - * 2) ループ再生での異なるAV尺の同期 */ - -#define NUM_MAX_ADEC (2) /* Adecの最大数 */ -/* ADECのインデックス定義 */ -/* このindexを使ってCriMvPlyAmngからAdecをコントロールしてください。 */ -#define MAIN_ADEC_IDX (0) // メイントラック用 -#define SUB_ADEC_IDX (1) // ボイストラック用 - -/* オーディオの動的切替機能をサポートするか */ -//#define ENABLE_DYNAMIC_AUDIO_SWITCH - -#if defined(ENABLE_DYNAMIC_AUDIO_SWITCH) - #define CRIMVPLYAMNG_TRACK_OFF (512) // 切り替え先トラック番号のデフォルト値(切替OFF) - - /* トラックの動的切替のための状態定義 */ - typedef enum _crimvplyamng_track_state { - CRIMVPLYAMNG_TRACK_STATE_FIXED = (1), // デフォルト - CRIMVPLYAMNG_TRACK_STATE_PREP_SWITCHING, // ユーザが切替を命令し、切替の準備段階(時刻判定のための基準時間をセット) - CRIMVPLYAMNG_TRACK_STATE_SWITCHING // 切替元と先の時刻判定を行なって切替を行なう状態 - } CriMvPlyAmngTrackState; -#endif - -/* 連結再生時、2個目以降のヘッダを取得できるようにするため */ -#define CRIMVPLY_HEAD_CONTAINER_NUM (2) - -/* 再読み込み閾値のデフォルト値 */ -#define CRIMV_DEFAULT_RELOAD_THRESHOLD (0.8f) // 0.8[sec] - -/* 再生準備中の貯金フレーム数デフォルト値 */ -#define CRIMV_DEFAULT_NUM_FRAMES_FOR_PREP (-1) /* デフォルト:不使用 (フレームプール数を採用) */ - -/* 内部ワーク領域の確保にCRI Heapを使用しない */ -#define CRIMV_REMOVE_CRIHEAP - -/* 機種固有フレーム情報数 */ -#define CRIMV_FRAME_DETAILS_NUM (2) - -/* CriVavfios で指定する外部ファイルのパスの上限 */ -#if defined(XPT_TGT_IOS) - #define CRIMVPLY_VAVFIOS_MAX_FILEPATH (256) -#endif - -/*************************************************************************** - * Process MACRO - ***************************************************************************/ -#define criMv_SetDefaultHandleConfig(p_config) \ -{\ - (p_config)->readbuffer_size = 0;\ -} - -/*************************************************************************** - * Enum declaration - ***************************************************************************/ -/*EN - * \brief Speaker index of CRI Movie PCM output - * \ingroup MDL_MV_OPTION - */ -/*JP - * \brief CRI Movie のPCM出力のスピーカー配置 - * \ingroup MDL_MV_OPTION - */ -typedef enum { - CRIMV_PCM_BUFFER_L = 0, /*EN< The LEFT channel of CRI Movie output */ - /*JP< CRI Movie オーディオ出力の LEFT チャンネル */ - CRIMV_PCM_BUFFER_R = 1, /*EN< The RIGHT channel of CRI Movie output */ - /*JP< CRI Movie オーディオ出力の RIGHT チャンネル */ - CRIMV_PCM_BUFFER_LS = 2, /*EN< The Surround LEFT channel of CRI Movie output */ - /*JP< CRI Movie オーディオ出力の Surround LEFT チャンネル */ - CRIMV_PCM_BUFFER_RS = 3, /*EN< The Surround RIGHT channel of CRI Movie output */ - /*JP< CRI Movie オーディオ出力の Surround RIGHT チャンネル */ - CRIMV_PCM_BUFFER_C = 4, /*EN< The CENTER channel of CRI Movie output */ - /*JP< CRI Movie オーディオ出力の CENTER チャンネル */ - CRIMV_PCM_BUFFER_LFE = 5, /*EN< The LFE channel of CRI Movie output */ - /*JP< CRI Movie オーディオ出力の LFE チャンネル */ - CRIMV_PCM_BUFFER_EXT1 = 6, /*EN< The EXT1(Rear Left) channel of CRI Movie output */ - /*JP< CRI Movie オーディオ出力の EXT1(Rear Left) チャンネル */ - CRIMV_PCM_BUFFER_EXT2 = 7, /*EN< The EXT2(Rear Right) channel of CRI Movie output */ - /*JP< CRI Movie オーディオ出力の EXT2(Rear Right) チャンネル */ - - /* Keep enum 4bytes */ - CRIMV_PCM_BUFFER_MAKE_ENUM_SINT32 = 0x7FFFFFFF -} CriMvPcmBufferIndex; - - -/*EN - * \brief Composite mode of alpha movie - * \ingroup MDL_MV_OPTION - */ -/*JP - * \brief アルファムービの合成モード - * \ingroup MDL_MV_OPTION - */ -typedef enum { - CRIMV_COMPO_OPAQ = 0, /*EN< Opacity, no alpha value */ - /*JP< 不透明、アルファ情報なし */ - CRIMV_COMPO_ALPHFULL = 1, /*EN< Full alpha blending (8bits-alpha data) */ - /*JP< フルAlpha合成(アルファ用データが8ビット) */ - CRIMV_COMPO_ALPH3STEP = 2, /*EN< 3 Step Alpha */ - /*JP< 3値アルファ */ - CRIMV_COMPO_ALPH32BIT = 3, /*EN< Full alpha blending (32bits color + alpha data) */ - /*JP< フルAlpha、(カラーとアルファデータで32ビット) */ - CRIMV_COMPO_ALPH1BIT = 4, /*EN< Alpha blending (24bits color + 1->8bits alpha) */ - /*JP< フルAlpha、(カラーとアルファデータで32bit、値は2値) */ - CRIMV_COMPO_ALPH2BIT = 5, /*EN< Alpha blending (24bits color + 2->8bits alpha) */ - /*JP< フルAlpha、(カラーとアルファデータで32bit、値は4値) */ - CRIMV_COMPO_ALPH3BIT = 6, /*EN< Alpha blending (24bits color + 3->8bits alpha) */ - /*JP< フルAlpha、(カラーとアルファデータで32bit、値は8値) */ - CRIMV_COMPO_ALPH4BIT = 7, /*EN< Alpha blending (24bits color + 4->8bits alpha) */ - /*JP< フルAlpha、(カラーとアルファデータで32bit、値は16値)*/ - - /* Keep enum 4bytes */ - CRIMV_COMPO_MAKE_ENUM_SINT32 = 0x7FFFFFFF -} CriMvAlphaType; - - -/*EN - * \brief Result of the last video frame retrieval - * \ingroup MDL_MV_OPTION - */ -/*JP - * \brief 前回のビデオフレーム取得の結果 - * \ingroup MDL_MV_OPTION - */ -typedef enum { - CRIMV_LASTFRAME_OK = 0, /*EN< Succeeded */ - /*JP< 取得成功 */ - CRIMV_LASTFRAME_TIME_EARLY = 1, /*EN< Failed. The frame is not yet the time to draw */ - /*JP< 取得失敗。フレーム表示時刻が再生時間に達していなかった */ - CRIMV_LASTFRAME_DECODE_DELAY = 2, /*EN< Failed. The frame to draw is not decoded yet */ - /*JP< 取得失敗。ビデオフレームのデコードが間に合わなかった */ - CRIMV_LASTFRAME_DISCARDED = 3, /*EN< Failed. The video frame is discarded by app */ - /*JP< 取得失敗。アプリによって破棄された */ - //CRIMV_LASTFRAME_NO_INPUT_DATA = 4, //Not supported yet - //CRIMV_LASTFRAME_SKIPPED = 5, //Not supported yet - //CRIMV_LASTFRAME_DEMUX_STUCKED = 6, //Not supported yet - - /* Keep enum 4bytes */ - CRIMV_LASTFRAME_MAKE_ENUM_SINT32 = 0x7FFFFFFF -} CriMvLastFrameResult; - -#if defined(XPT_TGT_PS3PPU) -/*EN - * \brief Graphic Environment type for PS3 - * \ingroup MDL_MV_OPTION - */ -/*JP - * \brief PS3のグラフィック環境 - * \ingroup MDL_MV_OPTION - */ -typedef enum { - CRIMV_GRAPHIC_ENV_GCM = 0, /*EN< GCM. (or same ARGB 32bit texture format of GCM) */ - /*JP< GCM環境 (またはテクスチャフォーマットがGCMと同じ環境) */ - CRIMV_GRAPHIC_ENV_PSGL = 1, /*EN< PSGL. (or same ARGB 32bit texture format of PSGL) */ - /*JP< PSGL環境 (またはテクスチャフォーマットがPSGLと同じ環境) */ - - /* Keep enum 4bytes */ - CRIMV_GRAPHIC_ENV_MAKE_ENUM_SINT32 = 0x7FFFFFFF -} CriMvGraphicEnv; -#endif - - -/* CRI Movie Interanl handle status - * - * The possible legal states of a CriMvPly handle. Over the course of your application - * the CriMvPly handle will walk through the following states in roughly the following - * order. In states that are waiting states, you can request the - * CriMvPly handle to advance to the next state by calling the criMvPly_IncrementState() - * function. You can check the status of a valid CriMvPly handle at any time - * by calling criMvPly_GetStatus(). - * - * It is not possible to jump from a state to an arbitrary other state. Normal play - * proceeds from the CRIMVPLY_STATUS_STOP state through the CRIMV_PLY_STATUS_PLAYEND - * state in that order. Premature termination can be requested with the criMvPly_Stop() - * function. - * - * \sa criMvPly_IncrementState(), criMvPly_GetStatus(), criMvPly_Stop() - */ -typedef enum { - CRIMVPLY_STATUS_STOP = 0, /* Standstill. No processing is occurring. - * CriMvPly handles are created into this state. - */ - /* 停止中 */ - CRIMVPLY_STATUS_DECHDR = 1, /* The CriMvPly structure is now parsing the header - * of the file, including information on height and width - * of the video stream. - */ - /* ヘッダ解析中 */ - CRIMVPLY_STATUS_WAIT_PREP = 2, /* The header has been decoded and criMvPly_GetStreamingParameters() - * will now provide valid values. Typically you will call - * criMvPly_AllocateWorkBuffer() with this information at this point. - */ - /* PREP状態へのIncrementState待ち
- AllocateWorkBufferしてから次へいくこと */ - CRIMVPLY_STATUS_PREP = 3, /* Transition to this state to acknowledge to the - * CriMvPly handle that you have allocated your work buffers. */ - /* 再生準備中 */ - CRIMVPLY_STATUS_WAIT_PLAYING = 4, /* The audio and video decoders are now ready to begin playback.*/ - /* PLAYING状態へのIncrementState待ち
- この状態で既にビデオとオーディオのデコード結果は取得できる。*/ - CRIMVPLY_STATUS_PLAYING = 5, /* The decoders are currently decoding and playing output. */ - /* 再生中 */ - CRIMVPLY_STATUS_WAIT_PLAYEND = 6, /* The library is waiting for you to acknowledge the end of the movie. You - * have informed the CriMvPly structure that an end-of-file condition exists, - * but final frames of video and audio may still be pending in your application. */ - /* PLAYEND状態へのIncrementState待ち */ - CRIMVPLY_STATUS_PLAYEND = 7, /* You have acknowledged the end of the movie. Teardown can occur at this point. */ - /* 再生終了 */ - CRIMVPLY_STATUS_STOP_PROCESSING = 8, /* A request to stop has been received by the CriMvPly structure, - * that is, you have called criMvPly_Stop(), and a stop is now pending. */ - /* 停止処理中 */ - CRIMVPLY_STATUS_WAIT_STOP = 9, /* The CriMvPly handle has acknowledged the stop request and - * you may now call criMvPly_IncrementState() to transition to - * the CRIMVPLY_STATUS_STOP state. */ - /* STOP状態へのIncrementState待ち */ - CRIMVPLY_STATUS_ERROR = 10, /* An error has occurred. */ - /* エラー */ - - /* Keep enum 4bytes */ - CRIMVPLY_STATUS_MAKE_ENUM_SINT32 = 0x7FFFFFFF -} CriMvPlyStatus; - - -/* Sofdec2 */ -typedef enum { - CRIMVPLY_META_FLAG_OFF = 0x0000, - CRIMVPLY_META_FLAG_CUE = 0x0001, - CRIMVPLY_META_FLAG_SEEK = 0x0002, - CRIMVPLY_META_FLAG_ALL = CRIMVPLY_META_FLAG_CUE + CRIMVPLY_META_FLAG_SEEK, - - /* Keep enum 4bytes */ - CRIMVPLY_META_FLAG_MAKE_ENUM_SINT32 = 0x7FFFFFFF -} CriMvMetaFlag; - -/* Color Conversion*/ -typedef enum{ - CRIMV_COLORSPACE_CONVERSION_TYPE_ITU_R_BT601_LIMITED = 0, - CRIMV_COLORSPACE_CONVERSION_TYPE_ITU_R_BT601_FULLRANGE = 1, - - /* Keep enum 4bytes */ - CRIMV_COLORSPACE_CONVERSION_TYPE_ENUM_SINT32 = 0x7FFFFFFF -}CriMvColorSpaceConversionType; - -typedef void *(*CriMvMetaDataWorkMallocFunc)(void *obj, CriUint32 size); -typedef void (*CriMvMetaDataWorkFreeFunc)(void *obj, void *mem); - -/* OUTER_FRAMEPOOL_WORK */ -#define CriMvFramepoolWorkMallocFunc CriMvMetaDataWorkMallocFunc -#define CriMvFramepoolWorkFreeFunc CriMvMetaDataWorkFreeFunc - -/*************************************************************************** - * Data type declaration - ***************************************************************************/ - -/*EN - * \brief Audio parameters - * \ingroup MDL_MV_INFO - * - * \sa CriMvStreamingParameters, CriMvWaveInfo - */ -/*JP - * \brief オーディオパラメータ - * \ingroup MDL_MV_INFO - * - * オーディオストリームのパラメータ - * \sa CriMvStreamingParameters, CriMvWaveInfo - */ -typedef struct { - CriUint32 sampling_rate; /*EN< Sampling rate */ - /*JP< サンプリング周波数 */ - CriUint32 num_channel; /*EN< Number of channels. Monaural = 1, Stereo = 2 */ - /*JP< オーディオチャネル数 */ - CriUint32 total_samples; /*EN< Total number of samples */ - /*JP< 総サンプル数 */ - CriUint32 output_buffer_samples; /*EN< Output wave buffer size */ - /*JP< サウンド出力バッファのサンプル数 */ - CriUint32 codec_type; /*EN< Codec type */ - /*JP< コーデック種別 */ - -} CriMvAudioParameters; - -/*EN - * \brief Video Parameters - * \ingroup MDL_MV_INFO - * \sa CriMvStreamingParameters - */ -/*JP - * \brief ビデオパラメータ - * \ingroup MDL_MV_INFO - * ビデオストリームのパラメータ - * \sa CriMvStreamingParameters - */ -typedef struct { - CriUint32 max_width; /*EN< Maximum video width for stream. (multiple of 8) */ - /*JP< ムービ最大幅(8の倍数) */ - CriUint32 max_height; /*EN< Maximum video height for stream. (multiple of 8)*/ - /*JP< ムービ最大高さ(8の倍数) */ - CriUint32 disp_width; /*EN< Width of the image to draw. */ - /*JP< 表示したい映像の横ピクセル数(左端から) */ - CriUint32 disp_height; /*EN< Height of the image to draw. */ - /*JP< 表示したい映像の縦ピクセル数(上端から) */ - CriUint32 num_frame_pool; /*EN< Number of frame pools required for stream */ - /*JP< フレームプール数 */ - CriUint32 framerate; /*EN< Frame rate per second [x1000]. */ - /*JP< フレームレート[x1000] */ - CriUint32 framerate_n; /*EN< Frame rate (in rational as numerator). framerate_n/framerate_d = framerate */ /* UTODO: 変数名 */ - /*JP< フレームレートの分子(有理数形式)。framerate_n/framerate_d = framerate */ - CriUint32 framerate_d; /*EN< Frame rate (in rational as denominator). */ - /*JP< フレームレートの分母(有理数形式)。 */ - CriUint32 total_frames; /*EN< Total number of video frames */ - /*JP< 総フレーム数 */ - - CriUint32 material_width; /*EN< Width of the video source resolustion before encoding. */ - /*JP< エンコード前のビデオ素材の横ピクセル数 */ - CriUint32 material_height; /*EN< Height of the video source resolustion before encoding. */ - /*JP< エンコード前のビデオ素材の縦ピクセル数 */ - CriUint32 screen_width; /*EN< Screen width set by encoding and cropping. - * This parameter is only available when you encoded the movie with "Widescreen TV Support" option. - * Normally this value is 0. */ - /*JP< エンコード時に指定したスクリーン幅。 - * この値はエンコード時に「ワイドテレビ支援機能」を使用した場合のみ有効になります。 - * 通常は0です。 */ - - CriUint32 codec_type; /*EN< Video Codec Type. If you encoded the movie for PS2, this value is 2. - * Normally this value is 1 or 0(no info). - * If the codec_type is 1, the CRI Movie for ONLY PS2 can play the movie file. */ - /*JP< ビデオコーデック種別。PS2用にエンコードした場合 2になります。 - * 通常は 1または 0(情報無し)です。 - * コーデック種別が2のムービは、PS2版ライブラリで「のみ」再生可能です。 */ - CriUint32 codec_dc_option; /*EN< Video Codec DC Option. If you encoded the movie for PS2, this value is 10. - * Normally this value is 11 or 0(no info). - * If the codec_type is 11, the CRI Movie for PS2 can NOT play the movie file. */ - /*JP< ビデオコーデックのDCオプション種別。PS2用にエンコードした場合10になります。 - * 通常は11または 0(情報無し)です。 - * コーデックDCオプションが11のムービは、PS2版ライブラリ「では」再生できません。 */ - CriUint32 color_conversion_type; /*EN< Color space converion type. Fullrange or Limited.*/ - /*JP< 色変換タイプ。 */ - CriSint32 capacity_of_picsize; /*EN< Capacity size of video pictures. */ - /*JP< ピクチャサイズ上限値 */ - CriUint32 average_bitrate; /*EN< Average bitrate. */ - /*JP< 平均ビットレート */ -} CriMvVideoParameters; - -/*EN - * \brief Alpha Parameters - * \ingroup MDL_MV_INFO - * \sa CriMvStreamingParameters - */ -/*JP - * \brief アルファパラメータ - * \ingroup MDL_MV_INFO - * アルファストリームのパラメータ - * \sa CriMvStreamingParameters - */ -typedef struct { - CriUint32 max_width; /*EN< Maximum alpha width for stream */ - /*JP< アルファフレームの最大幅 */ - CriUint32 max_height; /*EN< Maximum alpha height for stream */ - /*JP< アルファフレームの最大高さ */ - CriUint32 disp_width; /*EN< valid alpha width */ - /*JP< アルファフレームの実有効幅 */ - CriUint32 disp_height; /*EN< valid alpha height */ - /*JP< アルファフレームの実有効高さ */ - CriUint32 framerate; /*EN< Frame rate per second [x1000]. */ - /*JP< アルファのフレームレート[x1000] */ - CriUint32 framerate_n; /*EN< Frame rate (in rational as numerator). framerate_n/framerate_d = framerate */ /* UTODO: 変数名 */ - /*JP< フレームレートの分子(有理数形式)。framerate_n/framerate_d = framerate */ - CriUint32 framerate_d; /*EN< Frame rate (in rational as denominator). */ - /*JP< フレームレートの分母(有理数形式)。 */ - CriUint32 total_frames; /*EN< Total number of alpha frames */ - /*JP< 総フレーム数 */ - CriMvAlphaType alpha_type; /*EN< Alpha Composite Type. */ - /*JP< アルファ合成種別。 */ - CriUint32 codec_type; /*EN< Internal use only. Do not access this */ - /*JP< ライブラリ内部使用変数 */ - CriUint32 color_conversion_type; /*EN< Color space converion type. Fullrange or Limited.*/ - /*JP< 色変換タイプ。 */ - CriSint32 capacity_of_picsize; /*EN< Capacity size of video pictures. */ - /*JP< ピクチャサイズ上限値 */ - CriUint32 average_bitrate; /*EN< Average bitrate. */ - /*JP< 平均ビットレート */ -} CriMvAlphaParameters; - - -/*EN - * \brief Streaming Parameters - * \ingroup MDL_MV_INFO - * This structure includes streaming parameters and playing parameters. - * \sa CriMvEasyPlayer::GetMovieInfo() - */ -/*JP - * \brief ストリーミング再生パラメータ - * \ingroup MDL_MV_INFO - * ストリーミング再生パラメータ。
- * ストリーム自体の情報と、再生のために必要なパラメータの両方を含んでいる。 - * \sa CriMvEasyPlayer::GetMovieInfo() - */ -typedef struct { - /* Stream */ - CriUint32 is_playable; /*EN< Flag of the movie file is playable or not. 1 is playable. 0 is not playable.*/ - /*JP< 再生可能フラグ(1: 再生可能、0: 再生不可) */ - CriFloat32 buffering_time; /*EN< Amount of time to buffer in the stream, in seconds */ - /*JP< 読み込みデータのバッファリング時間。単位[sec]。 */ - CriUint32 max_bitrate; /*EN< Maximum bits per second for stream. This value includes video and audio both. */ - /*JP< 最大ビットレート(絵と音の合計) */ - CriUint32 max_chunk_size; /*EN< Maximum chunk size of incoming stream (USF) file */ - /*JP< 最大USFチャンクサイズ */ - CriUint32 min_buffer_size; /*EN< Minimum buffer size for reading */ - /*JP< 最低限必要な読み込みバッファサイズ。
オーディオとビデオの合計 */ - CriSint32 read_buffer_size; /*EN< Input buffer size for reading data */ - /*JP< リードバッファサイズ */ - /* Video */ - CriUint32 num_video; /*EN< Number of simultaneous video streams */ - /*JP< ビデオデコーダの数。現在は1固定。*/ - CriMvVideoParameters video_prm[CRIMV_MAX_VIDEO_NUM]; /*EN< Video parameters see CriMvVideoParameters struct for details */ - /*JP< ビデオパラメータ */ - /* Audio */ - CriUint32 num_audio; /*EN< Number of simultaneous audio streams */ - /*JP< オーディオデコーダの数。現在は1固定。*/ - CriSint32 track_play_audio; /*EN< Track of audio playback. */ - /*JP< 再生するオーディオチャネル番号。-1指定で再生無し。 */ - CriMvAudioParameters audio_prm[CRIMV_MAX_AUDIO_NUM]; /*EN< Audio parameters see CriMvAudioParameters struct for details */ - /*JP< オーディオパラメータ */ - /* Subtitle */ - CriUint32 num_subtitle; /*EN< Number of subtitles */ - /*JP< 字幕チャネル数 */ - CriSint32 channel_play_subtitle; /*EN< Channel for playing subtitles */ - /*JP< 再生する字幕チャネル番号 */ - CriUint32 max_subtitle_size; /*EN< Maximum size of subtitle data */ - /*JP< 字幕データの最大サイズ*/ - - /* Composite mode */ - CriUint32 num_alpha; /*EN< Number of alpha channels (current spec allows only one) */ - /*JP< アルファデコーダの数。現在は1固定。 */ - CriMvAlphaParameters alpha_prm[CRIMV_MAX_ALPHA_NUM]; /*EN< Alpha parameters see CriMvAlphaParameters struct for details */ - /*JP< アルファパラメータ */ - - CriBool seekinfo_flag; /*EN< Flag of the movie file inclues seek info */ - /*JP< シーク情報フラグ */ - CriUint32 format_ver; /*EN< Format version */ - /*JP< フォーマットバージョン */ -} CriMvStreamingParameters; - - -/*EN - * \brief Input Buffer Information - * \ingroup MDL_MV_INFO - * \sa CriMvEasyPlayer::GetInputBufferInfo(), - * CriMvEasyPlayer::SetReloadThresholdTime(), CriMvEasyPlayer::SetBufferingTime() - */ -/*JP - * \brief 入力バッファ情報 - * \ingroup MDL_MV_INFO - * \sa CriMvEasyPlayer::GetInputBufferInfo(), - * CriMvEasyPlayer::SetReloadThresholdTime(), CriMvEasyPlayer::SetBufferingTime() - */ -typedef struct { - CriUint32 buffer_size; /*EN< Input buffer size [byte] */ - /*JP< 入力バッファサイズ[byte] */ - CriUint32 data_size; /*EN< Data size in input buffer[byte] */ - /*JP< 入力バッファにあるデータサイズ[byte] */ - CriUint32 reload_threshold; /*EN< Re-load threshold. When data size is less than re-load threshold, next read is requested. */ - /*JP< 再読み込み閾値[byte]。データサイズがこの値以下になると読み込みを行います。 */ -} CriMvInputBufferInfo; - - -// TEMP: for internal use -typedef struct { - CriUint8 *imageptr; - CriUint32 bufsize; // [Byte] - CriUint32 line_pitch; // [Byte] - CriUint32 line_size; // [Byte] - CriUint32 num_lines; -} CriMvImageBufferInfo; - -/*EN - * \brief Video Frame Information - * \ingroup MDL_MV_INFO - * \sa CriMvEasyPlayer::GetFrameOnTimeAs32bitARGB(), CriMvEasyPlayer::GetFrameOnTimeAsYUVBuffers, - * CriMvEasyPlayer::GetFrameOnTimeAsYUV422(), CriMvEasyPlayer::DiscardNextFrame() - */ -/*JP - * \brief ビデオフレーム情報 - * \ingroup MDL_MV_INFO - * ビデオフレーム情報 - * \sa CriMvEasyPlayer::GetFrameOnTimeAs32bitARGB(), CriMvEasyPlayer::GetFrameOnTimeAsYUVBuffers, - * CriMvEasyPlayer::GetFrameOnTimeAsYUV422(), CriMvEasyPlayer::DiscardNextFrame() - */ -typedef struct { - CriUint8 *imageptr; /*EN< Pointer to image data */ - /*JP< 画像データのポインタ */ - CriSint32 frame_id; /*EN< Frame ID ot the playback */ - /*JP< フレーム識別ID(ループ/連結再生時は通算) */ - CriUint32 width; /*EN< Width of movie frame [pixel] (multiple of 8) */ - /*JP< ムービの横幅[pixel] (8の倍数) */ - CriUint32 height; /*EN< Height of movie frame [pixel] (multiple of 8) */ - /*JP< ムービの高さ[pixel] (8の倍数) */ - CriUint32 pitch; /*EN< Pitch of movie frame [byte]*/ - /*JP< ムービのピッチ[byte] */ - CriUint32 disp_width; /*EN< Width of the image to draw. */ - /*JP< 表示したい映像の横ピクセル数(左端から) */ - CriUint32 disp_height; /*EN< Height of the image to draw. */ - /*JP< 表示したい映像の縦ピクセル数(上端から) */ - CriUint32 framerate; /*EN< Frames per second times 1000 */ - /*JP< フレームレートの1000倍の値 */ - CriUint32 framerate_n; /*EN< Frame rate (in rational as numerator). framerate_n/framerate_d = framerate */ /* UTODO: 変数名 */ - /*JP< フレームレートの分子(有理数形式)。framerate_n/framerate_d = framerate */ - CriUint32 framerate_d; /*EN< Frame rate (in rational as denominator). */ - /*JP< フレームレートの分母(有理数形式)。 */ - CriUint64 time; /*EN< Frame time ('time / tunit' indicates time in seconds) */ - /*JP< 時刻。time / tunit で秒を表す。 */ - CriUint64 tunit; /*EN< Unit of time measurement */ - /*JP< 時刻単位 */ - CriUint32 cnt_concatenated_movie; /*EN< Number of concatenated movie data */ - /*JP< ムービの連結回数 */ - CriSint32 frame_id_per_data; /*EN< Frame ID of the movie data */ - /*JP< ムービデータごとのフレーム番号 */ - - CriBool csc_flag; /*EN< This is temporary variable. Please don't access. */ - /*JP< テスト中の変数です。アクセスしないでください。 */ - - CriMvAlphaType alpha_type; /*EN< Composite mode */ - /*JP< アルファの合成モード*/ - - void *details_ptr[CRIMV_FRAME_DETAILS_NUM]; // for internal use - - CriSint32 num_images; // TEMP: for internal use - CriMvImageBufferInfo image_info[4]; // TEMP: for internal use - - CriUint32 color_conversion_type; /*EN< Color space converion type. Fullrange or Limited.*/ - /*JP< 色変換タイプ。 */ - CriUint32 total_frames_per_data; /*EN< Total frames of the movie data*/ - /*JP< ムービデータ単位の総フレーム数 */ - CriUint32 cnt_skipped_frames; /*EN< Number of skipped frames to decode */ - /*JP< デコードスキップされたフレーム数 */ -} CriMvFrameInfo; - -/*EN - * \brief Subtitle Information - * \ingroup MDL_MV_INFO - * \sa CriMvEasyPlayer::GetSubtitleOnTime() - */ -/*JP - * \brief 字幕情報 - * \ingroup MDL_MV_INFO - * \sa CriMvEasyPlayer::GetSubtitleOnTime() - */ -typedef struct { - CriUint8 *dataptr; /*EN< Pointer to subtitle data */ - /*JP< 字幕データのポインタ */ - CriUint32 data_size; /*EN< Size of subtitle data */ - /*JP< 字幕データサイズ */ - CriSint32 channel_no; /*EN< Channel number of subtitle data */ - /*JP< 字幕データのチャネル番号 */ - CriUint64 time_unit; /*EN< Unit of time measurement */ - /*JP< 時刻単位 */ - CriUint64 in_time; /*EN< Display start time */ - /*JP< 表示開始時刻*/ - CriUint64 duration_time; /*EN< Display duration time */ - /*JP< 表示持続時間 */ - CriUint32 cnt_concatenated_movie; /*EN< Number of concatenated movie data */ - /*JP< ムービの連結回数 */ - CriUint64 in_time_per_data; /*EN< Display start time per movie data*/ - /*JP< ムービデータごとに表示開始時刻*/ -} CriMvSubtitleInfo; - -/*EN - * \brief Event Point Info - * \ingroup MDL_MV_INFO - * Event point info is the each timing info was embeded to movie data as cue point info. - * \sa CriMvEasyPlayer::GetCuePointInfo() - */ -/*JP - * \brief イベントポイント情報 - * \ingroup MDL_MV_INFO - * キューポイント機能でムービデータに埋め込まれた個々のタイミング情報です。 - * \sa CriMvEasyPlayer::GetCuePointInfo() - */ -typedef struct { - CriChar8 *cue_name; /*EN< The name string of event point. Char code depends on cue point text. */ - /*JP< イベントポイント名。文字コードはキューポイント情報テキストに従います。 */ - CriUint32 size_name; /*EN< The data size of name string */ - /*JP< イベントポイント名のデータサイズ */ - CriUint64 time; /*EN< Timer counter */ - /*JP< タイマカウント */ - CriUint64 tunit; /*EN< Counter per 1 second. "count / unit" indicates the timer on the second time scale. */ - /*JP< 1秒あたりのタイマカウント値。count ÷ unit で秒単位の時刻となります。 */ - CriSint32 type; /*EN< Event point type */ - /*JP< イベントポイント種別 */ - CriChar8 *param_string; /*EN< The string of user parameters. Char code depends on cue point text. */ - /*JP< ユーザパラメータ文字列。文字コードはキューポイント情報テキストに従います。 */ - CriUint32 size_param; /*EN< The data size of user parameters string */ - /*JP< ユーザパラメータ文字列のデータサイズ */ - CriUint32 cnt_callback; /*EN< The counter of calling cue point callback. */ - /*JP< キューポイントコールバックの呼び出しカウンタ */ -} CriMvEventPoint; - -/*EN - * \brief Cue Point Info - * \ingroup MDL_MV_INFO - * Cue point info includes the number of event points and the list. - * \sa CriMvEasyPlayer::GetCuePointInfo() - */ -/*JP - * \brief キューポイント情報 - * \ingroup MDL_MV_INFO - * キューポイント情報は、イベントポイントの個数と一覧です。
- * \sa CriMvEasyPlayer::GetCuePointInfo() - */ -typedef struct { - CriUint32 num_eventpoint; /*EN< The number of event points */ - /*JP< イベントポイント個数 */ - CriMvEventPoint *eventtable; /*EN< The list of event points */ - /*JP< イベントポイント一覧 */ -} CriMvCuePointInfo; - -/*EN - * \brief YUV Texture Buffer Parameters - * \ingroup MDL_MV_INFO - * The output buffer parameters for CriMvEasyPlayer::GetFrameOnTimeAsYUVBuffers(). - * CriMvEasyPlayer::GetFrameOnTimeAsYUVBuffers() outputs data for pixel shader.
- * If an application doesn't play alpha movie, CRI Movie library doesn't use alpha buffer parameters.
- * \sa CriMvEasyPlayer::GetFrameOnTimeAsYUVBuffers() - */ -/*JP - * \brief YUV個別バッファ情報 - * \ingroup MDL_MV_INFO - * CriMvEasyPlayer::GetFrameOnTimeAsYUVBuffers() の出力バッファ情報です。
- * CriMvEasyPlayer::GetFrameOnTimeAsYUVBuffers() はPixel Shader 向けのデコード結果を出力します。
- * アルファムービ再生を行わない場合(不透明の通常再生)は、Alphaテクスチャ関連のパラメータは使用しません。
- * \sa CriMvEasyPlayer::GetFrameOnTimeAsYUVBuffers() - */ -typedef struct { - CriUint8 *y_imagebuf; /*EN< Pointer to the buffer of Y texture */ - /*JP< Yテクスチャのバッファポインタ */ - CriUint32 y_bufsize; /*EN< Size of the buffer of Y texture [byte] */ - /*JP< Yテクスチャのバッファサイズ[byte] */ - CriUint32 y_pitch; /*EN< Pitch of the buffer of Y texture [byte] */ - /*JP< Yテクスチャのピッチ[byte] */ - CriUint8 *u_imagebuf; /*EN< Pointer to the buffer of U texture */ - /*JP< Uテクスチャのバッファポインタ */ - CriUint32 u_bufsize; /*EN< Size of the buffer of U texture [byte] */ - /*JP< Uテクスチャのバッファサイズ[byte] */ - CriUint32 u_pitch; /*EN< Pitch of the buffer of U texture [byte] */ - /*JP< Uテクスチャのピッチ[byte] */ - CriUint8 *v_imagebuf; /*EN< Pointer to the buffer of V texture */ - /*JP< Vテクスチャのバッファポインタ */ - CriUint32 v_bufsize; /*EN< Size of the buffer of V texture [byte] */ - /*JP< Vテクスチャのバッファサイズ[byte] */ - CriUint32 v_pitch; /*EN< Pitch of the buffer of V texture [byte] */ - /*JP< Vテクスチャのピッチ[byte] */ - CriUint8 *a_imagebuf; /*EN< Pointer to the buffer of Alpha texture */ - /*JP< Alphaテクスチャのバッファポインタ */ - CriUint32 a_bufsize; /*EN< Size of the buffer of Alpha texture [byte] */ - /*JP< Alphaテクスチャのバッファサイズ[byte] */ - CriUint32 a_pitch; /*EN< Pitch of the buffer of Alpha texture [byte] */ - /*JP< Alphaテクスチャのピッチ[byte] */ -} CriMvYuvBuffers; - - -/*EN - * \brief Playback Information - * \ingroup MDL_MV_INFO - * The output playback information of CriMvEasyPlayer::GetPlaybackInfo(). - * These parameters represents current movie playback information such as decode delay of movie data and - * interval of video frames retrieval. - * \sa CriMvEasyPlayer::GetPlaybackInfo() - */ -/*JP - * \brief 再生情報 - * \ingroup MDL_MV_INFO - * CriMvEasyPlayer::GetPlaybackInfo() の出力再生情報です。
- * フレームの取得間隔やデコードの遅延などの現在再生しているムービの再生情報を表します。
- * \sa CriMvEasyPlayer::GetPlaybackInfo() - */ -typedef struct { - CriUint64 cnt_app_loop; /*EN< Loop count of application. Precisely, this is a number of calls of CriMvEasyPlayer::Update(). The count up will start after app is able to acquire the first video frame */ - /*JP< アプリケーションのループカウント。具体的には CriMvEasyPlayer::Update() の呼び出し回数になります。最初のフレームが取得可能になるとカウントが始まります。*/ - CriUint64 cnt_frame_interval[4]; /*EN< Interval of video frames retrieval. These values are count up when CriMvEasyPlayer::IsNextFrameOnTime() returns TRUE. - * - * The interval of video frames retrieval indicates a number of the loop count when your application calls CriMvEasyPlayer::IsNextFrameOnTime() in the main loop. - * In case that the application waits for vertical retrace, 1 interval equals about 16.7 msec. - * The index of array represents the count of intervals as follows: - * - *
Index Interval of video frames retrieval - *
0 Every main loop - *
1 2 main loops - *
2 3 main loops - *
3 4 or more main loops - *
- * With these values, you can check if the application gets video frames with appropriate intervals. Please use the values as measuring playback smoothness - * - * In order to use these values, the application must meet the following conditions: - * - The main loop should work periodically and stably (Ideally sync with vertical retrace) - * - The application should call CriMvEasyPlayer::IsNextFrameOnTime() once in everly main loop - * - * For example, if the application runs at 59.94fps by waiting for vertical retrace and a framerate of playing movie file is 29.97fps, - * only cnt_frame_interval[1] should be increased. - */ - /*JP< フレームの取得間隔。これらの値は、 CriMvEasyPlayer::IsNextFrameOnTime() がTRUEを返した時にカウントアップされます。
- * - * フレームの取得間隔とは、アプリケーションがメインループ内でフレーム取得関数を読んだ時のループの回数を意味します。 - * メインループがVSyncと同期している場合は、1 Interval = 約16.7msecということになります。 - * 配列のインデックスは、以下のように取得間隔を表します。
- * - *
インデックス フレームの取得間隔 - *
0 毎メインループ - *
1 2 メインループ - *
2 3 メインループ - *
3 4 メインループ以上 - *
- * これらの値を見ることで、アプリが正しい間隔でフレームを取得できたのかどうかをチェックすることができます。ムービが滑らかに再生できているかの目安にしてください。
- * - * ただし前提として、以下の条件をアプリが満たしている必要があります。 - * - アプリがVSyncなど、一定の周期で安定して動作している - * - メインループ内で毎回 CriMvEasyPlayer::IsNextFrameOnTime() を呼び出す - * - * 上記の条件下において、例えばアプリが59.94fpsで動作している状態で、フレームレートが29.97fpsのムービを再生した場合、cnt_frame_interval[1]のみが増え続けれれば - * 正しい間隔でフレームの取得が出来たことになります。 - */ - CriUint64 cnt_time_early; /*EN< A count of how many times CriMvEasyPlayer::IsNextFrameOnTime() returns FALSE due to the determination if it is the time to provide the next video frame */ - /*JP< CriMvEasyPlayer::IsNextFrameOnTime() が、フレーム表示時刻判定によりFALSEを返した回数。*/ - CriUint64 cnt_decode_delay; /*EN< A count of how many times CriMvEasyPlayer::IsNextFrameOnTime() returns FALSE due to the delay of decoding movie data */ - /*JP< CriMvEasyPlayer::IsNextFrameOnTime()が、ビデオフレームのデコード遅延によりFALSEを返した回数 */ - CriFloat32 time_max_delay; /*EN< Maximum delay time [msec] of the actual time a video frame retrieved against the original time should be retrieved */ - /*JP< ビデオフレームを取得した実際の時刻と、本来表示すべき時刻との最大遅延時間 [msec]。 */ - CriFloat32 time_average_delay; /*EN< Average delay time [msec] of the actual time a video frame retrieved against the original time should be retrieved */ - /*JP< ビデオフレームを取得した実際の時刻と、本来表示すべき時刻との平均遅延時間 [msec]。 */ -} CriMvPlaybackInfo; - -#if defined(XPT_TGT_PS3PPU) -/*EN - * \brief Parameters of SPURS and PPU for decoding - * \ingroup MDL_MV_BASIC - * - * \sa CriMv::SetupSpursParameters_PS3(), CriMv::CalcSpursWorkSize_PS3() - */ -/*JP - * \brief デコードに使うSPURSおよびPPUのパラメータ - * \ingroup MDL_MV_BASIC - * - * \sa CriMv::SetupSpursParameters_PS3(), CriMv::CalcSpursWorkSize_PS3() - */ -typedef struct { - void *spurs_handler; /*EN< SPURS handler */ - /*JP< SPURSハンドル */ - void *spurs_work; /*EN< SPURS work area. The size is spurs_worksize. The alignment is 128 byte. */ - /*JP< SPURS用ワークバッファ。バッファサイズは spurs_worksize で128バイト境界。 */ - CriSint32 spurs_worksize; /*EN< SPURS work size. This size is calculated by CriMv::CalcSpursWorkSize_PS3 function. */ - /*JP< SPURS用ワークサイズ。CriMv::CalcSpursWorkSize_PS3 関数で取得した値。 */ - CriSint32 spurs_max_contention; /*EN< SPURS max contention */ - /*JP< SPURS でムービデコード用に使うSPUの最大数 */ - CriUint8 *spurs_task_priority; /*EN< SPURS task priority x 8 */ - /*JP< SPURS のタスクプライオリティ配列。配列要素は8個。 */ - - CriUint32 ppu_num; /*EN< The number of PPU for decoding (0-2) */ - /*JP< The number of PPU for decoding (0-2) */ - CriSint32 ppu_thread_prio; /*EN< PPU Thread Priority. This priority is used for decoding thread in the case of ppu_num equal 2. */ - /*JP< PPU Thread Priority. この値は ppu_num に2を指定した場合に作成するスレッドに使われる。 */ -} CriMvProcessorParameters_PS3; - -// [NOT SUPPORT on normal library] -// for SPU Thread -typedef struct { - CriUint32 ppu_num; /* The number of PPU for decoding (0-2) */ - CriSint32 ppu_prio; /* PPU Thread Priority */ - CriUint32 spu_num; /* The number of SPU for decoding (0-6) */ - CriSint32 spu_grp_prio; /* SPU Thread Group Priority */ -} CriMvSpuThreadParameters_PS3; - -#endif - -#if defined(XPT_TGT_XBOX360) -/*EN - * \brief Parameters of Xbox360 processors for decoding - * \ingroup MDL_MV_BASIC - * - * \sa CriMvEasyPlayer::SetUsableProcessors_XBOX360() - */ -/*JP - * \brief デコードに使うXbox360プロセッサのパラメータ - * \ingroup MDL_MV_BASIC - * - * \sa CriMvEasyPlayer::SetUsableProcessors_XBOX360() - */ -typedef struct { - CriBool processor0_flag; /*EN< Processor 0 (Core 0, Thread 0) usable flag */ - /*JP< プロセッサ0 (コア0スレッド0) 使用可能フラグ */ - CriBool processor1_flag; /*EN< Processor 1 (Core 0, Thread 1) usable flag */ - /*JP< プロセッサ1 (コア0スレッド1) 使用可能フラグ */ - CriBool processor2_flag; /*EN< Processor 2 (Core 1, Thread 0) usable flag */ - /*JP< プロセッサ2 (コア1スレッド0) 使用可能フラグ */ - CriBool processor3_flag; /*EN< Processor 3 (Core 1, Thread 1) usable flag */ - /*JP< プロセッサ3 (コア1スレッド1) 使用可能フラグ */ - CriBool processor4_flag; /*EN< Processor 4 (Core 2, Thread 0) usable flag */ - /*JP< プロセッサ4 (コア2スレッド0) 使用可能フラグ */ - CriBool processor5_flag; /*EN< Processor 5 (Core 2, Thread 1) usable flag */ - /*JP< プロセッサ5 (コア2スレッド1) 使用可能フラグ */ - CriSint32 thread_priority; /*EN< Priority of decoding threads on the active processors */ - /*JP< 各プロセッサ上でデコード処理を行うスレッドの優先度 */ -} CriMvProcessorParameters_XBOX360; -#endif - -#if defined(XPT_TGT_VITA) -/*EN - * \brief AVC Decoder Parameters - * \ingroup MDL_MV_BASIC - * - * \sa CriMv::SetupAvcDecoderParameters_VITA() - */ -/*JP - * \brief AVCデコーダパラメータ - * \ingroup MDL_MV_BASIC - * - * \sa CriMv::SetupAvcDecoderParameters_VITA() - */ -typedef struct { - CriUint32 horizontal; /*EN< Maximum width for decoding (in pixel) */ - /*JP< 最大デコード画像の横幅 (単位:ピクセル) */ - CriUint32 vertical; /*EN< Maximum height for decoding (in pixel) */ - /*JP< 最大デコード画像の高さ (単位:ピクセル) */ - CriUint32 n_ref_frames; /*EN< Maximum reference frames on decoding (default:3) */ - /*JP< デコード時の最大参照画像の枚数 */ - CriUint32 n_decoders; /*EN< Maximum number of avc decoders (max:1) */ - /*JP< 同時に使用するAVCでコーダの最大数 (1固定) */ - -} CriMvAvcDecoderParameters_VITA; -#endif - -/*--------------------------------------------------------------------------*/ -/* */ -/*--------------------------------------------------------------------------*/ -typedef enum { - CRIMV_PCM_FORMAT_SINT16 = 0, - CRIMV_PCM_FORMAT_FLOAT32 = 1, - - /* Keep enum 4bytes */ - CRIMV_PCM_FORMAT__MAKE_ENUM_SINT32 = 0x7FFFFFFF -} CriMvPcmFormat; -/* - * \brief 16bit wave data information - * \ingroup MDL_MV_INFO - * Information about a 16-bit waveform. - */ -/* 16bit Waveform 情報 */ -typedef struct { - CriUint32 num_channel; /* Number of Channels. monaural = 1, stereo = 2 */ - /* Number of Channels. monaural = 1, stereo = 2 */ - CriUint32 num_samples; /* Number of sample */ - /* サンプル数 */ - CriUint32 sampling_rate; /* Sampling rate */ - /* サンプリング周波数 */ -} CriMvWaveInfo; - -/* オーディオヘッダ */ -typedef struct { - /* ストリーミングパラメータと共通 */ - CriUint32 sampling_rate; - CriUint32 num_channel; - CriUint32 total_samples; - CriUint32 codec_type; - - CriUint32 metadata_count; - CriUint32 metadata_size; - - /* ヘッダ固有 */ - CriUint32 a_input_xsize; -} CriMvPlyAudioHeader; - -/* ビデオヘッダ */ -typedef struct { - /* ヘッダ固有 */ - CriUint32 width; - CriUint32 height; - CriUint32 disp_width; - CriUint32 disp_height; - CriUint32 framerate_n; - CriUint32 framerate_d; - CriUint32 total_frames; - - CriUint32 material_width; /* width of video original source. 0 means no info. */ - CriUint32 material_height; /* height of video original source. 0 means no info. */ - CriUint32 screen_width; /* screen width for Wii */ - - CriUint32 codec_type; - CriUint32 codec_dc_option; /* 11 or 10 */ - - CriUint32 metadata_count; - CriUint32 metadata_size; - - CriUint32 pre_padding; - CriUint32 color_conversion_type; - CriSint32 max_picture_size; - CriSint32 average_bitrate; -} CriMvPlyVideoHeader; - -/* サブタイトルヘッダ */ -typedef struct { - CriBool is_subtitle_data; - CriUint32 num_channel; - CriUint64 time_unit; - CriUint32 max_subtitle_size; -} CriMvPlySubtitleHeader; - -/* キューポイントヘッダ */ -typedef struct { - CriBool is_cuepoint_data; - CriUint32 metadata_count; - CriUint32 metadata_size; - CriUint32 num_eventpoint; - CriUint64 time_unit; -} CriMvPlyCuePointHeader; - -/* アルファヘッダ */ -typedef struct { - /* ヘッダ固有 */ - CriUint32 width; - CriUint32 height; - CriUint32 disp_width; - CriUint32 disp_height; - CriUint32 framerate_n; - CriUint32 framerate_d; - CriUint32 total_frames; - - CriMvAlphaType alpha_type; - CriUint32 codec_type; - - CriUint32 metadata_count; - CriUint32 metadata_size; - - CriUint32 pre_padding; - CriUint32 color_conversion_type; - CriSint32 max_picture_size; - CriSint32 average_bitrate; -} CriMvPlyAlphaHeader; - -/* アルファのみのフレーム情報 */ -typedef struct { - CriUint8 *imageptr; /*EN< Pointer to image data */ - /*JP< 画像データのポインタ */ - CriSint32 frame_id; /*EN< Frame ID */ - /*JP< フレーム識別ID */ - CriUint32 width; /*EN< Width of movie frame [pixel] */ - /*JP< ムービの横幅[pixel] */ - CriUint32 height; /*EN< Height of movie frame [pixel] */ - /*JP< ムービの高さ[pixel] */ - CriUint32 disp_width; /*EN< Width of image [pixel] */ - /*JP< 有効な映像の横幅[pixel] */ - CriUint32 disp_height; /*EN< Height of image [pixel] */ - /*JP< 有効な映像の高さ[pixel] */ - CriUint32 pitch; /*EN< Pitch of movie frame [byte]*/ - /*JP< ムービのピッチ[byte] */ - CriUint64 time; /*EN< Frame time ('time / tunit' indicates time in seconds) */ - /*JP< 時刻。time / tunit で秒を表す。 */ - CriUint64 tunit; /*EN< Unit of time measurement */ - /*JP< 時刻単位 */ - CriSint32 frame_id_per_data; /*EN< Frame ID of the movie data */ - /*JP< ムービデータごとのフレーム番号 */ - CriMvAlphaType alpha_type; /*EN< Composite mode */ - /*JP< アルファの合成モード*/ - void *detail_ptr; /* TEMP: for internal use */ - CriUint32 color_conversion_type; /*EN< Color space converion type. Fullrange or Limited.*/ - /*JP< 色変換タイプ。 */ -} CriMvAlphaFrameInfo; - -// 内部管理用。ムービ情報をユーザに渡す時はこれとほぼ同じだろうか。 -/* Information of USF File */ -typedef struct { - CriBool is_usf_file; - CriUint32 max_chunk_size; - CriUint32 min_buffer_size; - CriUint32 bitrate; - CriUint32 format_version; - /* Video */ - CriUint32 num_video; - CriMvPlyVideoHeader videohead[CRIMV_MAX_VIDEO_NUM]; - /* Audio */ - CriUint32 num_audio; - CriMvPlyAudioHeader audiohead[CRIMV_MAX_AUDIO_NUM]; - /* Subtitle */ - CriUint32 num_subtitle; - CriMvPlySubtitleHeader subtitlehead; - /* Alpha */ - CriUint32 num_alpha; - CriMvPlyAlphaHeader alphahead[CRIMV_MAX_ALPHA_NUM]; - /* CuePoint */ - CriUint32 num_cuepoint; - CriMvPlyCuePointHeader cuepointhead; -} CriMvPlyHeaderInfo; - -/* Video Elementary Stream */ -typedef struct { - CriUint32 fcid; - CriSint32 track_no; // チャンクのチャネル番号 - void *vdec; -} CriMvPlyVideo; - -typedef struct { - CriUint32 fcid; - CriSint32 track_no; // チャンクのチャネル番号 - void *dec; -} CriMvPlyAlpha; - -/* ムービヘッダを管理するための構造体 */ -typedef struct { - CriMvPlyHeaderInfo info; - CriBool write_new_head_flag; // CRIDが見つかって次のヘッダを書き込む準備ができたか? - CriUint32 num_remaining_adec_head; // 必要な残りのオーディオヘッダの数 - CriUint32 num_remaining_vdec_head; // 必要な残りのビデオのヘッダの数 - CriUint32 num_remaining_subtitle_head; // 必要な残りの字幕のヘッダの数 - CriUint32 num_remaining_alpha_head; // 必要な残りのアルファのヘッダ数 - CriUint32 num_remaining_cuepoint_head; // 必要な残りのキューポイントのヘッダ数 - /* 2010-08-19: TEMP: CONCAT_KAI: Don't refer this member. */ - CriUint64 accumulated_tcount; -} CriMvHeaderInfoContainer; - -typedef struct { - CriBool is_play_audio; - CriUint32 fcid; - CriUint32 track_no; // チャンクのチャネル番号 - void *adec; // 実際のオーディオコーデック - CriUint32 num_channel; // データのチャネル数 - CriUint32 sampling_rate; // サンプリング周波数 - CriUint32 output_buffer_samples; - CriSj sji; // UNI - CriSj sjo[CRIMV_PCM_BUFFER_MAX]; // RBF - CriUint32 sjo_bufsize[CRIMV_PCM_BUFFER_MAX]; - CriBool term_supply; // データ供給終了通知フラグ - CriBool is_working; // コンテンツチャンク処理中 - -#if defined(ENABLE_DYNAMIC_AUDIO_SWITCH) - CriUint32 next_track_no; // ユーザが指定した切替先のトラック番号 - CriUint32 last_track_switch_time; // 切替元のトラックの最後にチャンクをとった時刻 - CriUint32 last_track_switch_tunit; // 上記時刻の単位 (in Hz?) - CriMvPlyAmngTrackState switch_state; // トラック切替による状態 -#endif -} *CriMvPlyAdec, CriMvPlyAdecObj; - -typedef struct { - - CriMvPlyAdec mvply_adecs[NUM_MAX_ADEC]; - CriSint32 num_adecs; - CriUint32 size_smpl; - CriSj sji; - CriUint32 chunk_num_per_server; - - CriBool (*cbfunc_nofify_found_header)(void *usrobj, CriChunk *ckc, CriUint8 chno); - void *usrobj_nofify_found_header; - -} *CriMvPlyAmng, CriMvPlyAmngObj; - - -/* シークブロック情報 */ -typedef struct { - CriSint32 top_frame_id; -} CriMvSeekBlockInfo; - -/* ストリーマ用情報 */ -typedef struct { - CriUint32 max_chunk_size; - CriUint32 average_bitrate; -} CriMvStreamerInfo; - - -/* ハンドル作成用コンフィグ構造体 */ -typedef struct { - CriUint32 readbuffer_size; -} CriMvHandleConfig; - - -/*JP CRI Movie ハンドル */ -/*EN - * A handle for a single movie. If multiple movies are to be played simultaneously, - * create a CriMvPly handle for each movie. - * - * \sa criMvPly_Create(), criMvPly_Destroy() */ -typedef struct { - /*** Member variable is ***/ - CriBool used; - CriMvPlyStatus stat; - CriBool request_stop; - CriBool restrain_supply; - CriBool term_supply; - void *cs_work; - void *cshn; - /* USF Header */ - - CriMvHeaderInfoContainer headinfo_container[CRIMVPLY_HEAD_CONTAINER_NUM]; - Uint16 cur_dechead_idx; - CriUint32 cnt_dechead; /* ヘッダ解析ごとに更新 */ - CriUint32 cnt_concat; /* GetFrameで更新 */ - - CriMvPlyHeaderInfo headinfo; - CriUint32 num_headck; /* ヘッダ解析処理したチャンク数 */ - CriFloat32 def_buffering_time; - CriUint32 def_max_stream; - CriUint32 def_sound_output_buffer_samples; - CriSint32 def_track_play_audio; /* -1 でオーディオ再生無し */ - - /* デリゲートパラメータ構造体 */ - CriSint32 size_dlgparams; - CriUint8 *ptr_dlgparams; - - CriBool is_prepare_work; - CriMvStreamingParameters stmprm; /* ストリーミングパラメータの記録 */ - /* Demultiplexer */ - CriSint32 inputtype; /* ストリーミングかメモリか?メモリ=ユニSJ再生 */ - CriBool is_usf_data; /* 入力ファイルはUSFファイルか? */ - void *demux; /* USFデマルチプレクサハンドル */ - CriUint32 max_demuxout; /* デマルチプレクサ出力の最大種別数 */ - CriUint32 num_demuxout; /* デマルチプレクサ出力に設定済みの種別数 */ - CriSj headanaly_in_sj; // RBF - CriSj headanaly_out_sj; // UNI - CriSj read_sj; // RBF - CriChunk readck; - - CriSj memplay_sj; // UNI (for memory playback) - CriChunk movie_on_mem; /* メモリ指定のムービデータ記憶用(1個) */ - CriUint32 offset_content; /* メモリ指定先頭データのコンテンツ本体までのサイズ */ - - /* === ハンドル作成時に確保 === */ - CriHeap heap_gen; - /* ヘッダ解析用の読み込み領域 */ - CriUint32 headanaly_bufsize; - /* ハンドル内部メモリは最初に10kbyte確保して使いまわす。具体的にはヘッダ解析用。 */ - CriHeap local_heap; /* ハンドル内部専用Heap */ - CriSint32 local_bufsize; /* ハンドル内部専用Heap用のバッファサイズ */ - CriUint8 *local_bufptr; /* ハンドル内部専用Heap用のバッファポインタ */ - /* === メタワークバッファ (ヘッダ解析時に確保) === */ - CriHeap heap_meta; - /* === ワークバッファ作成時に確保 === */ - CriHeap heap_core; - /* 読み込みバッファ */ - CriUint32 size_readbuf_main; - CriUint32 size_readbuf_ext; - /* Video Decoder */ - CriMvPlyVideo video; - CriUint32 framerate_n; - CriUint32 framerate_d; - /* Audio Decoder */ - CriMvPlyAmng audio_mngr; - CriMvPcmFormat pcmfmt; - CriUint32 size_smpl; - CriHeap heap_audio2; - /* Subtitle */ - CriSj sjo_subtitle; - CriSint32 concat_subtitle_cnt; /* 字幕の連結処理回数 */ - CriSint32 ch_subtitle; /* 字幕の連結処理回数 */ - /* Alpha */ - CriMvPlyAlpha alpha; - - /* 折り返しチャンク対応用(使うかどうかに関係なく変数だけは定義する) */ - CriUint32 bufsize_read_main; /* 入力SJのバッファ本体サイズ */ - CriUint32 bufsize_read_ext; /* 入力SJののりしろサイズ */ - CriUint8 *read_sj_bufptr; /* 入力RBSJの先頭バッファアドレス */ - - /* ストリーミングパラメータに入れるという手段もアリかも? */ - CriSint32 seek_frame_id; /* シークしたいフレームID(GOPの途中の可能性あり) */ - CriSint32 video_gop_top_id; /* シーク後のビデオGOP先頭フレームID : 0以下でシーク無し */ - CriSint32 alpha_gop_top_id; /* シーク後のアルファGOP先頭フレームID : 0以下でシーク無し */ - CriBool seek_video_prep_flag; /* シーク再生のビデオ準備完了フラグ(GOP途中まで進んだか?) */ - CriBool seek_alpha_prep_flag; /* シーク再生のアルファ準備完了フラグ(GOP途中まで進んだか?) */ - CriBool seek_audio_prep_flag; /* シーク再生のオーディオ準備完了フラグ(シーク指定時刻まで捨てたか?) */ - - CriSint32 dechdr_stage; /* DECHDRの進み具合 */ - CriSint32 sji_meta_bufsize; /* メタデータ用入力バッファサイズ */ - CriSj sji_meta; /* メタデータ用入力SJ */ - CriUint32 cnt_meta_ck; /* メタデータ用入力SJ */ - void *video_seektbl_ptr; - CriUint32 video_seektbl_size; - CriSint32 video_gop_num; - void *alpha_seektbl_ptr; - CriUint32 alpha_seektbl_size; - CriSint32 alpha_gop_num; - - void *audio_header_ptr[CRIMV_MAX_AUDIO_NUM]; - CriUint16 audio_header_size[CRIMV_MAX_AUDIO_NUM]; - - void *cuepoint_meta_ptr; - CriUint32 cuepoint_meta_size; - CriMvCuePointInfo cuepoint_info; - - CriMvInputBufferInfo ibuf_info; - CriFloat32 reload_sec_threshold; - - CriSint32 num_frames_for_prep; - - /* For Sofdec2 */ - CriHeap heap_playback; - CriMvMetaDataWorkMallocFunc cbfunc_meta_alloc; - CriMvMetaDataWorkFreeFunc cbfunc_meta_free; - void* usrobj_meta_data; - void* meta_data_work_allocated; /* ユーザアロケータで確保されたメタデータワーク */ - void* event_table_work_allocated; /* ユーザアロケータで確保されたイベントテーブル */ - CriMvStreamerInfo streamer_info; - - /* OUTER_FRAMEPOOL_WORK */ - CriMvFramepoolWorkMallocFunc cbfunc_framepool_alloc; - CriMvFramepoolWorkFreeFunc cbfunc_framepool_free; - void* usrobj_framepool; - void* framepool_work_allocated; /* ユーザアロケータで確保されたフレームプールワーク(解放必要) */ - void* framepool_work_set; /* 直接バッファ指定されたフレームプールワーク(解放不要) */ - - /* For Debug */ - volatile CriUint8 end_sequence_info; - CriUint64Adr header_ptr; - CriSint64 header_size; - CriUint64Adr body_ptr; - CriSint64 body_size; - - CriBool sync_flag; - - CriBool error_flag; - -#if defined(XPT_TGT_IOS) - CriChar8 vavfios_filepath[CRIMVPLY_VAVFIOS_MAX_FILEPATH]; -#endif - - /* For Tools */ - void *extended_mvinfo_config; - - /* ハンドル作成コンフィグ関連 */ - CriBool use_hn_config_flag; /* ハンドル作成コンフィグ指定があったかどうか */ - CriMvHandleConfig hn_config; - -} *CriMvPly, CriMvPlyObj; - -/*************************************************************************** - * Function Declaration - ***************************************************************************/ - -#ifdef __cplusplus -extern "C" { -#endif - -/* ライブラリ初期化 */ -/* - * \brief ライブラリの初期化 - * \param なし - * \return なし - * \par 説明: - * ライブラリの初期化を行います。
- * 複数回連続で初期化した場合は、最初の1回のみ初期化処理を実行します。 - */ -/* - * \ingroup MODULE_INIT - * \brief Initialize library - * - * This function initializes the CRI Movie library, including internal audio, - * streaming and video subsystems. This function must be - * called before any other function in this library will work properly. - * This function initializes only the first time it is called; if it is - * called again, it simply increments an internal counter and returns; it - * does not re-initialize, nor does it create an error condition. - * - * Therefore, it is safe to call criMvPly_Initialize() and criMvPly_Finalize() - * at the beginning and end, respectively, within each of the independent - * modules in your program. If you match these functions call for call, - * only the first criMvPly_Initialize() function and the last criMvPly_Finalize() - * functions should have any effect. - * - * \sa criMvPly_Finalize() - */ -void CRIAPI criMvPly_Initialize(void); - -/* ライブラリ終了 */ -/* - * \brief ライブラリ終了 - * \param なし - * \return なし - * \par 説明: - * ライブラリの終了処理を行います。
- * 複数回初期化をしていた場合は、同じ回数だけ終了処理を実行してください。 - */ -/* - * \ingroup MODULE_INIT - * \brief Finalize library - * - * This function deallocates any resources in use by the library. - * It should be called the same number of times that the criMvPly_Initialize() - * function is called. If the criMvPly_Initialize() function is called n - * times, on the nth time the criMvPly_Finalize() function is called, - * criMvPly_Finalize() releases any resources allocated by CRI Movie. - * - * Therefore, it is safe to call criMvPly_Initialize() and criMvPly_Finalize() - * at the beginning and end, respectively, within each of the independent - * modules in your program. If you match these functions call for call, - * only the first criMvPly_Initialize() function and the last criMvPly_Finalize() - * functions should have any effect. - * - * \sa criMvPly_Initialize() - */ -void CRIAPI criMvPly_Finalize(void); - -/* ハンドル作成 */ -/* - * \brief ハンドル作成 - * \param heap : メモリ確保に使用するHeapハンドル - * \return CriMvPlyハンドル - * \par 説明: - * CRI Movie ハンドルを作成します。
- * 必要なハンドル管理領域はHeapハンドルを使って自動的に確保します。
- * 作成直後のハンドル状態はSTOP状態です。 - */ -/* - * \ingroup MODULE_INIT - * \brief Create a handle - * \param heap A valid CriHeap handle - * \return A valid CriMvPly handle, or NULL if the handle cannot be allocated - * - * This function creates a CriMvPly handle in the CRIMVPLY_STATUS_STOP state. - * Memory for the handle is allocated from the CriHeap structure that you provide. - * Any memory allocation failure during this function results in a text error message to output, and the program hangs. - * Make sure to initialize and create your heap with criHeap_Initialize() and - * criHeap_Create() before calling this function. - * - * \sa CriMvPly, CriMvPlyStatus, criHeap_Initialize(), criHeap_Create() - */ -CriMvPly CRIAPI criMvPly_Create(CriHeap heap); - -/* コンフィグ指定のハンドル作成 */ -/* config がNULL指定の場合はコンフィグ指定無しと同様 */ -CriMvPly CRIAPI criMvPly_CreateWithConfig(CriHeap heap, CriMvHandleConfig *config); - -/* ハンドル破棄 */ -/* - * \brief ハンドル破棄 - * \param mvply : CRI Movie ハンドル - * \return なし - * \par 説明: - * CRI Movie ハンドルの破棄を行います。
- * ハンドル作成時に引数で指定したHeapハンドルを使って、ハンドル管理領域を解放します。
- * ワークバッファを確保したままの場合は、ワークバッファ確保時に指定したHeapハンドルを使ってワークバッファも解放します。
- * ハンドルの破棄は、ハンドル状態がSTOPかPLAYENDの時にしか実行できません。 - */ -/* - * \ingroup MODULE_INIT - * \brief Destroy a handle - * \param mvply A valid CriMvPly handle to be destroyed - * - * This function destroys the CriMvPly handle previously created - * with criMvPly_Create(). - * - * You can only destroy the handle if it is in either the CRIMVPLY_STATUS_STOP or the - * the CRIMVPLY_STATUS_PLAYEND states. Attempting to destroy the handle in - * any other state will produce an error message. You can check the status of - * the handle at any time with criMvPly_GetStatus(). - * - * Any work buffers allocated via criMvPly_AllocateWorkBuffer(), if they are - * still associated with the handle, are freed when criMvPly_Destroy() is called. - * - * \sa CriMvPly, CriMvPlyStatus, criMvPly_GetStatus(), criMvPly_AllocateWorkBuffer() - */ -void CRIAPI criMvPly_Destroy(CriMvPly mvply); - -/* ストリーミングパラメータの取得 */ -/* - * \brief ストリーミングパラメータの取得 - * \param mvply : CRI Movie ハンドル - * \param stmprm : ストリーミングパラメータ - * \return なし - * \par 説明: - * ヘッダ解析の結果をもとに、ムービ再生に必要なストリーミングパラメータを取得します。
- * ハンドル状態がWAIT_PREPになると取得できるようになります。
- * このパラメータをもとにcriMvPly_AllocateWorkBuffer関数を呼び出すことができます。
- * 必要ならばこのパラメータの値を変更して、例えば音ありムービで音を再生しない、といったことも可能です。
- */ -/* - * \ingroup MODULE_BUFFER - * \brief Get streaming parameters - * \param mvply A valid CriMvPly handle - * \param stmprm An empty CriMvStreamingParameters structure to be filled with data - * - * This function permits you to get detailed information about the stream and - * dynamically allocate resources just before the video and audio sequence - * begins playback. - * - * This function does nothing if the current state of the CriMvPly handle is - * CRIMVPLY_STATUS_DECHDR or CRIMVPLY_STATUS_STOP. The only useful state in - * which to call criMvPly_GetStreamingParameters() is the CRIMVPLY_WAIT_PREP - * status. When the CriMvPly handle is in the CRIMVPLY_WAIT_PREP status, - * calling this function will cause the CriMvStreamingParameters field to be - * filled with data. - * - * Some of the CriMvStreamingParameters, such as buffering time and the - * maximum number of files to read, are copied from the CriMvPly structure. - * However, maximum bitrate, video size, audio stream rate and channel - * info are calculated from the incoming stream. - * - * After calling criMvPly_GetStreamingParameters(), you can programmatically - * override any of the fields in the CriMvStreamingParameters struct yourself - * before calling criMvPly_AllocateWorkBuffer() with it. For example, you might - * need to read a stream containing both audio and video, but only output the - * video from the stream. In this case you could allocate trivial audio buffers - * for output by modifying the CriMvStreamingParameters struct accordingly after - * calling this function. - * - * \sa criMvPly_AllocateWorkBuffer(), CriMvPly, CriMvStreamingParameters - */ - void CRIAPI criMvPly_GetStreamingParameters(CriMvPly mvply, CriMvStreamingParameters *stmprm); - -/* ワークバッファの確保 */ -/* - * \brief ワークバッファの確保 - * \param mvply : CRI Movie ハンドル - * \param heap : - * \param stmprm : ストリーミングパラメータ - * \return なし - * \par 説明: - * 引数のHeapハンドルを使って、読み込みバッファやビデオ/オーディオのワークバッファを確保します。
- * この関数を呼び出し可能なのは、STOP状態かWAIT_PREP状態の時のみです。
- * 同じハンドルに対して2度呼び出すと、1度目のワークバッファを全て解放してから、改めてワークバッファを確保します。
- * criMvPly_Start関数よりも先にワークバッファを確保しておくこともできます。 - */ -/* - * \ingroup MODULE_BUFFER - * \brief Allocate internal streaming work buffers - * \param mvply A CriMvPly handle - * \param heap A CriHeap handle - * \param stmprm An initialized CriMvStreamingParameters structure - * - * This function allocates internal streaming buffers for the CriMvPly movie - * player from the CriHeap. The amount of memory required is based - * on the maximum bitrate of the stream, the requested buffering time, the - * maximum chunk size, and the height and width of the incoming video frame. - * However, a small amount of memory is allocated for the - * video and audio decoders from the CriHeap as well. - * - * The CriHeap handle passed as a parameter to this function need not - * be the same CriHeap handle you passed to the criMvPly_Create() function. - * You may prefer to use either one or two heaps. - * - * This function can be called only if the CriMvPly handle is in the - * CRIMVPLY_STATUS_STOP or the CRIMVPLY_STATUS_WAIT_PREP status. Calling - * this function any other time will produce an error message. - * - * If this function is called twice without calling criMvPly_FreeWorkBuffer(), - * it releases the previously allocated buffers before allocating them again. - * - * This function must be called sometime before criMvPly_Start(). - * - * \if ps2 - * \par PS2 only: - * The PS2 implementation of this function additionally allocates buffers for - * internal DMA tags. If these allocations fail due to lack of memory, the - * library will hang. - * \endif - * - * \sa CriMvPly, CriHeap, CriMvPlyStatus, CriMvStreamingParameters, criMvPly_FreeWorkBuffer(), - * criMvPly_Start() - */ -CriBool CRIAPI criMvPly_AllocateWorkBuffer(CriMvPly mvply, CriHeap heap, CriMvStreamingParameters *stmprm); - -/* ワークバッファの解放 */ -/* - * \brief ワークバッファの解放 - * \param mvply : CRI Movie ハンドル - * \return なし - * \par 説明: - * criMvPly_AllocateWorkBuffer関数で確保したワークバッファを全て解放します。
- * この関数を呼び出し可能なのは、STOP/WAIT_PREP/PLAYEND状態の時のみです。
- * CRI Movie Ver.0.60 では未実装です。 - */ -/* - * \ingroup MODULE_BUFFER - * \brief Release streaming work buffer - * \param mvply A valid CriMvPly handle - * - * This function releases streaming work buffers allocated from the CriHeap - * previously associated with criMvPly_AllocateWorkBuffer(). - * This function should only be called at CRIMVPLY_STATUS_STOP, - * CRIMVPLY_STATUS_WAIT_PREP or CRIMVPLY_STATUS_PLAYEND states. However, this - * function does not verify the current stream status before releasing - * all the buffers; it merely deallocates them. Expect interesting crashes - * if you call this function while playing a movie. - * - * You can verify the current CriMvPly handle status with criMvPly_GetStatus() if - * necessary. - * - */ -void CRIAPI criMvPly_FreeWorkBuffer(CriMvPly mvply); - -/* 再生するオーディオチャネルの設定 */ -/* - * \brief 再生するオーディオチャネルの設定 - * \param mvply : CRI Movie ハンドル - * \param ch : オーディオチャネル番号 - * \return なし - * \par 説明: - * CriMvStreamingParameters構造体のメンバ track_play_audioのデフォルト値を設定します。
- * criMvPly_GetStreamingParameters関数でCriMvStreamingParameters構造体を取得したときにこの値が格納されます。
- * 何も設定していない場合、buffering_timeには0が入います。 - * -1を指定するとオーディオを再生しない設定になります。 - */ -void CRIAPI criMvPly_SetAudioTrack(CriMvPly mvply, CriSint32 track); - -/* バッファリング時間(単位[sec])の設定 */ -/* - * \brief バッファリング時間(単位[sec])の設定 - * \param mvply : CRI Movie ハンドル - * \param time : バッファリング時間 - * \return なし - * \par 説明: - * CriMvStreamingParameters構造体のメンバbuffering_timeのデフォルト値を設定します。
- * criMvPly_GetStreamingParameters関数で CriMvStreamingParameters構造体を取得したときにこの値が格納されます。
- * 何も設定していない場合、buffering_timeには1.0秒が入っています。 - */ -/* - * \ingroup MODULE_BUFFER - * \brief Set default buffering time (unit[sec]) - * \param mvply A valid CriMvPly handle - * \param time Buffering time in seconds - * - * This function tells the CriMvPly handle how much time of the stream to buffer in - * memory. Buffering is necessary to cover seeks, error retries, latency and - * other various hiccups in most data sources. - * - * This value is stored in the buffering_time field of the CriMvStreamingParameters - * struct. It is set to a default of 1.0 seconds when the CriMvPly handle is created. - * This is typically safe for most DVD type file systems. - * - * \sa CriMvPly, CriMvStreamingParameters - */ -//void CRIAPI criMvPly_SetBufferingTime(CriMvPly mvply, CriFloat32 time); - -/* 同時読み込みファイル数の設定 */ -/* - * \brief 同時読み込みファイル数の設定 - * \param mvply : CRI Movie ハンドル - * \param max_stm : 同時読み込みファイル数 - * \return なし - * \par 説明: - * CriMvStreamingParameters構造体のメンバmax_simultaneous_read_filesのデフォルト値を設定します。
- * criMvPly_GetStreamingParameters関数で CriMvStreamingParameters構造体を取得したときにこの値が格納されます。
- * 何も設定していない場合、max_simultaneous_read_filesには1が入っています。 - */ -/* - * \ingroup MODULE_BUFFER - * \brief Set maximum number of simultaneous streams - * \param mvply A valid CriMvPly handle - * \param max_stm The maximum number of simultaneous streams - * - * This function sets the default value of the "max_simultaneous_read_files" field of - * the CriMvStreamingParameters struct. Currently, setting this value has no effect. - */ -//void CRIAPI criMvPly_SetMaxSimultaneousStreams(CriMvPly mvply, CriUint32 max_stm); - -/* サウンド出力バッファサンプル数の設定 */ -/* - * \brief GetWave16で要求する最大サンプル数の設定 - * \param mvply : CRI Movie ハンドル - * \param max_smpl : 最大サンプル数 - * \return なし - * \par 説明: - * CriMvAudioParameters構造体のメンバoutput_buffer_samplesのデフォルト値を設定します。
- * criMvPly_GetStreamingParameters関数で CriMvStreamingParameters構造体を取得したときにこの値が格納されます。
- * 何も設定していない場合、output_buffer_samplesには16*1024が入っています。 - */ -/* - * \ingroup MODULE_AUDIO - * \brief Set default sound output buffer samples - * \param mvply A valid CriMvPly handle - * \param smpls : sound output buffer samples - * - * This function sets the default value of the "output_buffer_samples" field in the - * CriMvAudioParameters struct. The default value is 16384, which is set when - * criMvPly_Create() is called. - * - * This function only has an effect if it is called before the - * criMvPly_AllocateWorkBuffer() function is called, since this is when the audio - * output buffer is allocated. - * - * \sa CriMvAudioParameters, criMvPly_Create(), criMvPly_AllocateWorkBuffer(), - * criMvPly_GetWave16() - */ -//void criMvPly_SetMaxSamplesOfGetWave16(CriMvPly mvply, CriUint32 max_smpl); -void CRIAPI criMvPly_SetSoundOutputBufferSamples(CriMvPly mvply, CriUint32 smpls); - -/* ハンドル状態の取得 */ -/* - * \brief ハンドル状態の取得 - * \param mvply : CRI Movie ハンドル - * \return ハンドル状態 - * \par 説明: - * ハンドル状態を取得します。 - */ -/* - * \ingroup MODULE_STATE - * \brief Get the handle status - * \param mvply A valid CriMvPly handle - * \return One of the CriMvPlyStatus enum values - * - * This function gets the current status of the CRI Movie handle. Check the - * following link for possible return values. - * - * \sa CriMvPlyStatus - */ -CriMvPlyStatus CRIAPI criMvPly_GetStatus(CriMvPly mvply); - -/* WAIT状態から次の状態への遷移通知 */ -/* - * \brief WAIT状態から次の状態への遷移通知 - * \param mvply : CRI Movie ハンドル - * \return なし - * \par 説明: - * ハンドル状態をWAIT_**** 状態から次の状態に遷移させます。状態に応じて次のように使用します。
- * ・WAIT_PREP 状態 : criMvPly_AllocateWorkBuffer関数でワークを確保しおわったら呼び出してください。
- * ・WAIT_PLAYING 状態 : ビデオフレーム、オーディオデータを取得して表示・出力の準備ができたら、 - * 出力を開始して、本関数を呼び出してください。
- * ・WAIT_PLAYEND 状態 : 最後のビデオフレームの表示、最後のオーディオデータの出力が終了したら呼び出してください。
- * ・WAIT_STOP 状態 : ビデオやオーディオの出力が停止してもいい状態になったら、呼び出してください。
- * 本関数を呼び出すと各状態は即座に次の状態に遷移します。
- * 本関数を WAIT_**** 以外の状態で呼び出しても、状態は何も変わりません。 - */ -/* - * \ingroup MODULE_STATE - * \brief Notify transition from WAIT status - * \param mvply A valid CriMvPly handle - * - * This function notifies the CriMvPly handle that your application is ready to - * go from the current WAIT state to the next state. There are exactly four states - * in which it is appropriate to call this function: - * - * - CRIMVPLY_STATUS_WAIT_PREP After your application has allocated buffers with - * criMvPly_AllocateWorkBuffer() - * - CRIMVPLY_STATUS_WAIT_PLAYING After your application has prerolled stream data (if - * necessary) - * - CRIMVPLY_STATUS_WAIT_PLAYEND After your application has displayed the last frames of audio and - * video from the stream - * - CRIMVPLY_STATUS_WAIT_STOP After your application suspends playback from the stream - * - * You can check the current status of the CriMvPly handle by calling the criMvPly_GetStatus() - * function. This function has no effect if called in states other than those listed above. - * - * \sa CriMvPly, CriMvPlyStatus - */ -void CRIAPI criMvPly_IncrementState(CriMvPly mvply); - -/* 状態の更新 */ -/* - * \brief CriMvPlyモジュールのサーバ関数 - * \param mvply : CRI Movie ハンドル - * \return なし - * \par 説明: - * 主にデマルチプレクサ内部のデータの更新を行います。
- * 本関数はアプリケーションのメインスレッド側でで毎回呼び出すようにしてください。
- */ -void CRIAPI criMvPly_Update(CriMvPly mvply); - -/* 再生開始 */ -/* - * \brief 再生開始 - * \param mvply : CRI Movie ハンドル - * \return 再生開始できた場合はCRI_TRUE, 失敗した場合はCRI_FALSE - * \par 説明: - * 再生のための処理を開始します。
- * 本関数呼出し後、ハンドル状態はDECHDRに遷移します。
- */ -/* - * \ingroup MODULE_STATE - * \brief Start of playback processing - * \param mvply A valid CriMvPly handle - * - * This function initiates playback processing. This function should be called - * after the CriMvPly handle is created and the data source has been opened, - * but before the work buffers are allocated with criMvPly_AllocateWorkBuffer(). - * This function sets the current status of the CriMvPly handle to - * CRIMVPLY_STATUS_DECHDR, which prepares it to decode the header information - * from the data source. - * - * \sa CriMvPly, CriMvPlyStatus, criMvPly_AllocateWorkBuffer() - */ -CriBool CRIAPI criMvPly_Start(CriMvPly mvply); - -/* 再生停止リクエスト(即時復帰) */ -/* - * \brief 再生停止リクエスト(即時復帰) - * \param mvply : CRI Movie ハンドル - * \return なし - * \par 説明: - * 再生停止のリクエストを発行して即時復帰します。
- * 本関数呼出し後、ハンドル状態はSTOP_PROCESSING状態に遷移します。
- * 停止のための処理が終わると、ハンドル状態がWAIT_STOPに遷移します。
- * WAIT_STOP状態になったら、criMvPly_IncrementState関数でSTOP状態に遷移させて、 - * アプリケーションの停止処理を行ってください。 - */ -/* - * \ingroup MODULE_STATE - * \brief Non-blocking request to stop playback - * \param mvply A currently playing CriMvPly handle - * - * This function records a request to terminate playback. Termination of - * playback is not synchronous to this function; this function sets the current - * state of the CriMvPly handle to CRIMVPLY_STATUS_STOP_PROCESSING. After - * movie processing is halted, the state of the handle transitions to - * CRIMWPLY_STATUS_WAIT_STOP. - * - * This function is useful for prematurely terminating a movie, e.g. "press - * X to skip this movie". - * - * Video frames will keep being delivered until you detect a CRIMVPLY_STATUS_WAIT_STOP - * state in the CriMvPly handle, and then call criMvPly_IncrementState to transition - * back to the CRIMVPLY_STATUS_STOP state. - * - * \note Pausing is not accomplished through this function. The system clock, including - * whether or not to pause or advance frames, is controlled entirely through user - * code. So the effect of "pausing" a CriMvPly handle can be accomplished by simply - * not updating your system clock as long as your pause is in effect. - * - * \sa CriMvPly, CriMvPlyStatus - */ -void CRIAPI criMvPly_Stop(CriMvPly mvply); - -/* サーバ処理(ハンドル指定) */ -/* - * \brief サーバ処理(ハンドル指定) - * \param mvply : CRI Movie ハンドル - * \return なし - * \par 説明: - * CRI Movie ハンドルを指定してサーバ処理を実行します。
- * 各WAIT_**** 状態への状態遷移はサーバ関数内で実行されます。 - */ -/* - * \ingroup MODULE_VIDEO - * \brief Execute heartbeat functions for a handle - * \param mvply A valid CriMvPly handle - * - * This function executes heartbeat functions for the specified CriMvPly handle only, - * including handoff and parsing of input buffers and audio decoding. Additionally, - * it checks for buffer situations in which the CriMvPly handle should transition to - * one of the four WAIT states of CriMvPlyStatus, and it makes these transitions if - * necessary. - * - * However, video decoding does NOT occur in criMvPly_Execute(). - * - * Expect that criMvPly_Execute() will take a relatively low CPU load. Typically, - * this function should be called on every vertical blank. However, it may be called - * more frequently in a CriMvPly wait state, in conjunction with criMvPly_IncrementState(), - * in order to "force" a transition into the next state without waiting for - * another vertical blank. This type of transition is not generically - * necessary. - * - * \sa CriMvPly, CriMvPlyStatus, criMvPly_ExecuteAll() - */ -void CRIAPI criMvPly_Execute(CriMvPly mvply); - -/* ファイル読み込みバッファの空きチャンク取得 */ -/* - * \brief ファイル読み込みバッファの空きチャンク取得 - * \param mvply : CRI Movie ハンドル - * \param ck : チャンク - * \return なし - * \par 説明: - * ファイル読み込みバッファの空き領域を取得します。
- * 取得した空き領域(チャンクと呼びます)は、データ書き込みを通知するさいに - * そのまま使用しますので、アプリケーションで記憶してください。
- * 1度に取得できるチャンクは1つのみです。
- * チャンクが取得できたか否かは、チャンクのサイズで判定できます。
- * データの書き込みが終わったら、criMvPly_PutInputChunk関数で書き込みサイズを通知してください。
- */ -/* - * \ingroup MODULE_SUPPLY - * \brief Get a free chunk from file reading buffer - * \param mvply A valid CriMvPly handle - * \param ck A CriChunk structure to be filled with data by this function - * - * This function selects an empty internal buffer for your data source to read its data into. - * An area of this type is referred to as a "chunk." - * After calling this function, the ck->data and ck->size - * fields will provide a valid pointer and size, respectively, that your data - * source should copy its data into. - * If no buffers can internally be allocated, this function will return 0 as the - * ck->size field. If this occurs, your program should choke input until a free - * buffer can be allocated. - * Typical data sources are native file reading, sequential memory access, or - * playback from a network source. - * The ck->size field is dynamically calculated when criMvPly_AllocateWorkBuffer() - * is called; it is calculated based on expected data rate and video resolutions - * embedded in the stream file. - * - * After you receive a valid chunk from criMvPly_GetInputChunk(), - * you can fill the provided chunk up to the ck->size limit. After you - * fill the chunk with valid data, call the criMvPly_PutInputChunk() function - * to queue the data for processing. The functions criMvPly_GetInputChunk() and - * criMvPly_PutInputChunk() should be called in equal pairs; calling these - * functions out of order will produce odd results. No dynamic chunk reordering - * is permitted; serial calls with out-of-order chunks will be - * flagged at run-time as an error. - * - * This function will only return a valid chunk if the CriMvPly handle is in - * one of two playback states: CRIMVPLY_STATUS_PLAY or CRIMVPLY_STATUS_DECHDR. - * You can verify the current playback state with criMvPly_GetStatus(). - * - * \sa criMvPly_GetStatus(), criMvPly_PutInputChunk(), criMvPly_AllocateWorkBuffer(), - * CriChunk, CriMvPlyStatus - */ -void CRIAPI criMvPly_GetInputChunk(CriMvPly mvply, CriChunk *ck); - -/* ファイル読み込みバッファへのデータ書き込み通知 */ -/* - * \brief ファイル読み込みバッファへのデータ書き込み通知 - * \param mvply : CRI Movie ハンドル - * \param ck : - * \param inputsize : - * \return なし - * \par 説明: - * criMvPly_GetInputChunk関数で取得した空き領域(チャンクと呼びます)に - * データを書き込み終わったら、引数inputsizeにデータサイズを入れて本関数を呼び出してください。
- * その際、チャンクは criMvPly_GetInputChunk関数で取得したものと同じチャンクを必ず指定してください。 - */ -/* - * \ingroup MODULE_SUPPLY - * \brief Put a data chunk into file read buffer - * \param mvply A valid CriMvPly handle - * \param ck A CriChunk structure containing source data - * \param inputsize The number of bytes actually supplied - * - * This function informs the CriMvPly handle that the CriChunk structure - * now contains valid data from the data source. Typically, you would call - * this function after your asynchronous file read reports that the buffer is - * full of data. - * - * The inputsize field should contain the number of bytes actually provided. - * This value can be less than or equal to ck->size. In an end-of-file condition, - * be sure to supply the actual number of bytes remaining in the file, and not - * merely the size of the input buffer, to criMvPly_PutInputChunk(). - * Do not modify the contents of the CriChunk after calling this function; - * instead, call criMvPly_GetInputChunk() to get a new chunk for further input. - * - * This function invalidates the CriChunk provided if the function is called - * while the CriMvPly handle is in the CRIMVPLY_STATUS_STOP, the - * CRIMVPLY_STATUS_WAIT_PREP, or the CRIMVPLY_STATUS_STOP_PROCESSING state. - * You can verify the current playback state with criMvPly_GetStatus(). - * - * After you receive a valid chunk from criMvPly_GetInputChunk(), - * you can fill the provided chunk up to the ck->size limit. After you call - * fill the chunk with valid data, call the criMvPly_PutInputChunk() function - * to queue the data for processing. The function criMvPly_GetInputChunk() and - * criMvPly_PutInputChunk() should be called in equal pairs; calling these - * functions out of order will produce odd results. No dynamic chunk reordering - * is permitted; serial calls with out-of-order chunks will be - * flagged at run-time as an error. - * - * After putting the final chunk of data in the stream, call - * criMvPly_TerminateSupply() to indicate that an end-of-file condition exists. - * - * \sa criMvPly_GetStatus(), criMvPly_GetInputChunk(), criMvPly_AllocateWorkBuffer(), - * criMvPly_TerminateSupply(), CriChunk, CriMvPlyStatus - */ -void CRIAPI criMvPly_PutInputChunk(CriMvPly mvply, CriChunk *ck, CriUint32 inputsize); - -/* ファイル読み込み終了の通知 */ -/* - * \brief ファイル読み込み終了の通知 - * \param mvply : CRI Movie ハンドル - * \return なし - * \par 説明: - * 再生したい全てのデータを読み込んで、 criMvPly_PutInputChunk関数で通知し終わったら、 - * 本関数でファイル読み込み終了の通知を必ず行ってください。
- * 終了を通知された時点で読み込みバッファに書き込まれた全てのデータをデコードし終わると、 - * ハンドル状態はWAIT_PLAYENDに遷移します。
- * 本関数を呼び出さない限り、WAIT_PLAYEND状態になることはありません。 - */ -/* - * \ingroup MODULE_SUPPLY - * \brief Notify end of reading data - * \param mvply A valid CriMvPly structure - * - * After you put all the source data into the CriMvPly handle with - * criMvPly_PutInputChunk(), indicate the end of the movie file by calling - * criMvPly_TerminateSupply(). After calling this function, the CriMvPly - * handle's status is changed by the library to CRIMVPLY_STATUS_WAIT_PLAYEND - * and the library completes processing of whatever frames it has internally - * buffered. - * - * If you do not call this function, the CriMvPly handle will never transition - * to the CRIMVPLY_STATUS_WAIT_PLAYEND state, making teardown impossible. - * - * \sa criMvPly_PutInputChunk(), CriMvPly, CriMvPlyStatus - */ -void CRIAPI criMvPly_TerminateSupply(CriMvPly mvply); - -#if 0//defined(XPT_TGT_EE) -/* RGB32フォーマットのビデオフレームの取得 */ -/* - * \if ps2 - * \brief RGB32フォーマットのビデオフレームの取得 - * \param mvply : CRI Movie ハンドル - * \param imagebuf : ビデオフレームバッファ - * \param bufsize : バッファサイズ - * \param frameinfo : フレーム情報 - * \return 取得できた場合はTRUE, できなかった場合はFALSE - * \par 説明: - * 引数で指定したバッファに、PS2のマクロブロック並びRGBA32フォーマットでフレームを取得します。
- * 引数CriMvFrameInfo構造体には、取得したフレームについての情報が格納されます。
- * フレームが取得できるのは、ハンドル状態がWAIT_PLAYING/PLAYINGの時のみです。
- * それ以外の状態で呼び出す、または入力データ不足の場合には、本関数はフレームの取得に失敗し、即座に復帰します。
- * フレームが取得できなかった場合は、関数値でFALSEが返ります。
- * 実際のビデオデコード処理も本関数内で動くため、フレーム取得できる場合には、処理の重い関数となります。 - * \endif - */ -/* - * \if ps2 - * \ingroup MODULE_VIDEO - * \brief Get a video frame in PS2 macroblock RGB32 format - * \param mvply A valid CriMvPly handle - * \param imagebuf a pointer to the video buffer in memory to receive the frame - * \param bufsize video buffer size in bytes - * \param frameinfo Information about the decoded frame - * \return returns true if a frame has been copied into the buffer, false otherwise - * - * This function finds and decodes the current frame, if any, to the imagebuf buffer. - * The format of this buffer is specific to the PS2. This function will only return - * a valid frame if the CriMvPly handle is in the CRIMVPLY_STATUS_WAIT_PLAYING or the - * CRIMVPLY_STATUS_PLAYING state. - * - * This function is an EE-intensive activity, and the amount of time required - * is variable, depending on the complexity and size of the video frame being decoded. - * Therefore the preferred method of calling this function is in a low priority thread, - * separate from your I/O, buffer management, and criMvPly_Execute() routines. - * - * If this function returns true, the preferred display time of the video frame is calculated - * as: - * - * \code - * frameinfo.time / frameinfo.tunit - * \endcode - * - * Humans notice audio stuttering much more readily than a dropped video frame during - * a video decode process. If the frame reported by criMvPly_GetFrameRGBA32_PS2() - * arrives after your system clock says the frame should be displayed, you should - * simply drop the frame without bothering to DMA it to video memory. - * - * Here is an example showing how to drop frames in this case: - * - * \dontinclude crimvt01_simple_playback_ps2.c - * \skip Get video frame - * \until *tutor_update_video_frame_on_display_time* - * - * It is not preferred, but it is possible, to call this function in a single-threaded - * playback model. In this case, it is important to allocate more heap space - * and service the CriMvPly handle with criMvPly_Execute() or criMvPly_ExecuteAll() - * frequently, as well as criMvPly_GetWave16() frequently. This helps to cover - * for the case where other I/O needs to occur when a frame is currently being decoded by - * criMvPly_GetFrameRGBA32_PS2(). - * - * \image html crimvply_getframergba32_ps2.png The DMA reordering step on PS2 - * - * In order to get acceptable performance on the PS2, a macroblock reordering step - * must take place during the DMA transfer from EE RAM to video RAM. - * \endif - */ -CriBool CRIAPI criMvPly_GetFrameRGBA32_PS2(CriMvPly mvply, CriUint8 *imagebuf, CriUint32 bufsize, CriMvFrameInfo *frameinfo); - -CriBool CRIAPI criMvPly_DecodeFrameRGBA32_PS2(CriMvPly mvply, CriUint8 *imagebuf, CriUint32 bufsize, CriMvFrameInfo *frameinfo); -#endif - -#if defined(XPT_TGT_PC) || defined(XPT_TGT_XBOX360) || defined(XPT_TGT_WII) || defined(XPT_TGT_SH7269) || defined(XPT_TGT_TRGP6K) -/* - * \if pc - * \ingroup MODULE_VIDEO - * \brief Get a video frame in YUV422 format - * \param mvply A valid CriMvPly handle - * \param imagebuf A pointer to the video buffer in memory to receive the frame - * \param pitch Number of bytes in one row of the video buffer - * \param bufsize Video buffer size in bytes - * \param frameinfo Information about the decoded frame - * \return returns true if a frame has been copied into the buffer, false otherwise - * - * This function finds and decodes the current frame, if any, to the imagebuf buffer. - * This function will only return a valid frame if the CriMvPly handle is in the - * CRIMVPLY_STATUS_WAIT_PLAYING or the CRIMVPLY_STATUS_PLAYING state. - * - * This function is a CPU-intensive activity, and the amount of time required - * is variable, depending on the complexity and size of the video frame being decoded. - * Therefore the preferred method of calling this function is in a low priority thread, - * separate from your I/O, buffer management, and criMvPly_Execute() routines. - * - * If this function returns true, the preferred display time of the video frame is calculated - * as: - * - * \code - * frameinfo.time / frameinfo.tunit - * \endcode - * - * It is not preferred, but it is possible, to call this function in a single-threaded - * playback model. In this case, it is important to allocate more heap space - * and service the CriMvPly handle with criMvPly_Execute() or criMvPly_ExecuteAll() - * frequently, as well as criMvPly_GetWave16() frequently. - * - * \endif - */ -CriBool CRIAPI criMvPly_GetFrameYUV422(CriMvPly mvply, CriUint8 *imagebuf, CriUint32 pitch, CriUint32 bufsize, CriMvFrameInfo *frameinfo); -#endif - -/* 16bit WAVEフォーマットのオーディオデータ取得 */ -/* - * \brief 16bit WAVEフォーマットのオーディオデータ取得 - * \param mvply : CRI Movie ハンドル - * \param nch : チャネル数 - * \param waveptr : オーディオデータバッファ - * \param wavesmpl : 要求サンプル数(<バッファサイズ) - * \param waveinfo : 16bit Waveform 情報 - * \return 取得できたサンプル数 - * \par 説明: - * 16bitのWAVEフォーマットでオーディオデータを取得します。引数waveptrには、nch分のバッファポインタを格納した - * 配列を指定してください。
- * 引数CriMvWaveInfo構造体には、取得したオーディオデータについての情報が格納されます。
- * 入力データ不足などで要求されたサンプル数のデコードができない場合もあります。
- * (未実装機能) 本関数の処理が重くなってでも、なるべく要求された多くのオーディオデータを取得するモード。 - */ -/* - * \ingroup MODULE_AUDIO - * \brief Get 16bit wave audio data - * \param mvply A currently playing CriMvPly handle - * \param nch The number of audio channels to get in this call - * \param waveptr An array of audio data buffers to copy audio data into - * \param wavesmpl The number of requested wave data samples (must be less than buffer size) - * \param waveinfo A structure filled by this function with info about this wave - * \return The number of wave data samples actually copied into the buffer - * - * This function copies currently decoding audio data into your output buffer - * for you to send to the audio output. The output format is a sixteen-bit PCM - * format. The data provided is "current", e.g. you should try to minimize latency. - * while delivering the audio data to the output device. - * - * This function will return an empty audio buffer if the input to the CriMvPly - * handle is starving for data, or if criMvPly_Execute() or criMvPly_ExecuteAll() - * has not been called recently. - * - * Note that this function actually copies data. However, the expected bandwidth - * for moving audio data in memory is minimal -- about 176400 bytes per second for - * a stereo stream, which is typically a fraction of 1% of the bandwidth available - * on modern game systems. - * - * For debugging tips on stuttering, see \ref crim_section_stuttering . - */ -CriUint32 CRIAPI criMvPly_GetWave16(CriMvPly mvply, CriUint32 nch, CriSint16 *waveptr[], - CriUint32 wavesmpl, CriMvWaveInfo *waveinfo); -CriUint32 CRIAPI criMvPly_GetWave32(CriMvPly mvply, CriUint32 nch, CriFloat32 *waveptr[], - CriUint32 wavesmpl, CriMvWaveInfo *waveinfo); - - -#if defined(XPT_TGT_EE) -/* スクラッチパッドRAM使用設定 */ -/* スクラッチパッドRAMの使用設定(ハンドル作成前に呼び出すこと) */ -/* - * \brief スクラッチパッドRAM使用設定 - * \param sw : - * \return なし - * \par 説明: - * スクラッチパッドRAMの使用設定を行います。
- * デフォルトはOFFです。 - */ -/* - * \if ps2 - * \ingroup MODULE_INIT - * \brief Enable or disable PS2 scratch pad (SPRAM) usage - * \param sw : ON to enable scratch pad use, OFF to disable - * - * This function determines whether the video decode step uses the PS2 - * SPRAM memory area for its work. The performance of this library is - * increased by around 30% when using SPRAM; however, this use might - * conflict with graphics engines that depend on exclusive access to SPRAM. - * However, on the PS2, the video decode step occurs synchronously to the - * criMvPly_GetFrameRGBA32_PS2() function, so you can take appropriate external - * locking measures to intelligently synchronize SPRAM utilization. - * The value set by criMvPly_SetUseScratchPadRAM_PS2() is internally checked - * exactly once, during the criMvPly_Create() step; calling this function - * after criMvPly_Create() has no effect. The default setting for this - * function is OFF. - * \endif - */ -void CRIAPI criMvPly_SetUseScratchPadRAM_PS2(CriBool sw); -#endif - - -/* メモリからの再生開始 */ -/* - * \brief メモリからの再生開始 - * \param mvply : CRI Movie ハンドル - * \param memptr : メモリ上のムービデータの先頭アドレス - * \param memsize : メモリ上のムービデータのサイズ - * \return なし - * \par 説明: - * メモリからのムービ再生を開始します。
- * 本関数の呼び出し前に、あらかじめムービデータの全てをメモリ上に読み込んでおいてください。 - */ -/* - * \ingroup MODULE_STATE - * \brief Start playback from movie file on memory - * \param mvply A currently playing CriMvPly handle - * \param memptr A address of movie file - * \param memsize The size of movie file - * - * Start playback from memory.
- * Please read movie file to memory before playback. - */ -void CRIAPI criMvPly_StartMemory(CriMvPly mvply, CriUint8* memptr, CriUint32 memsize); - - -/* - * YUV個別バッファへのフレーム取得 - */ -/* - * \if xbox360 - * \ingroup MODULE_VIDEO - * \brief Get a video frame to Y,U,V independently texture buffers - * \param mvply A valid CriMvPly handle - * \param yuvbuffers Information about Y,U,V independently texture buffers - * \param frameinfo Information about the decoded frame - * \return returns true if a frame has been copied into the buffer, false otherwise - * - * This function finds and decodes the current frame, if any, to the Y,U,V texture buffers. - * This function will only return a valid frame if the CriMvPly handle is in the - * CRIMVPLY_STATUS_WAIT_PLAYING or the CRIMVPLY_STATUS_PLAYING state. - * \endif - */ -CriBool CRIAPI criMvPly_GetFrameYUVBuffers(CriMvPly mvply, CriMvYuvBuffers *yuvbuffers, CriMvFrameInfo *frameinfo); - - -/* - * ビデオのデコード - */ -/* - * \ingroup MODULE_VIDEO - * \param mvply The movie player handle - * \return returns the number of decoded frames - * - */ -CriUint32 CRIAPI criMvPly_DecodeVideo(CriMvPly mvply); - -/* - * ヘッダのデコード - */ -/* - * - * \ingroup MODULE_VIDEO - * \param mvply The movie player handle - * - */ -void CRIAPI criMvPly_DecodeHeader(CriMvPly mvply); - -/* - * デコードスキップ指示 - * \par 説明: - * この関数を実行した回数だけ、その後のデコード時に自動的に1枚Bピクチャをスキップする。
- * スキップ指示を出した次のフレームからは、実際のスキップが実行されていなくても - * 表示時刻はスキップしたものとして補正される。 - */ -/* - * \ingroup MODULE_VIDEO - * \param mvply The movie player handle - * \return returns the number of decoded frames - * - * After calling SkipFrame function, Decoding function skip B-picture. - * To avoid that application judge continuous wrong skip, After calling - * SkipFrame function, next frame time will be adjusted. - */ -void CRIAPI criMvPly_SkipFrame(CriMvPly mvply); - - -#if 0 -/* - * YUVA8フォーマットのフレーム取得 - */ -/* - * \if ps3 - * \ingroup MODULE_VIDEO - * \brief Get a video frame in YUVA8 format. - * \param mvply A valid CriMvPly handle - * \param imagebuf A pointer to the video buffer in memory to receive the frame - * \param pitch Number of bytes in one row of the video buffer - * \param bufsize Video buffer size in bytes - * \param frameinfo Information about the decoded frame - * \return returns true if a frame has been copied into the buffer, false otherwise - * - * This function finds and decodes the current frame, if any, to the imagebuf buffer. - * This function will only return a valid frame if the CriMvPly handle is in the - * CRIMVPLY_STATUS_WAIT_PLAYING or the CRIMVPLY_STATUS_PLAYING state. - * \endif - */ -CriBool CRIAPI criMvPly_GetFrameYUVA8_PS3(CriMvPly mvply, CriUint8 *imagebuf, CriUint32 pitch, CriUint32 bufsize, CriMvFrameInfo *frameinfo); -#endif - -/* - * ARGB8888フォーマットでフレーム取得 - */ -/* - * \if ps3 - * \ingroup MODULE_VIDEO - * \brief Get a video frame in ARGB8888 format. - * \param mvply A valid CriMvPly handle - * \param imagebuf A pointer to the video buffer in memory to receive the frame - * \param pitch Number of bytes in one row of the video buffer - * \param bufsize Video buffer size in bytes - * \param frameinfo Information about the decoded frame - * \return returns true if a frame has been copied into the buffer, false otherwise - * - * This function finds and decodes the current frame, if any, to the imagebuf buffer. - * This function will only return a valid frame if the CriMvPly handle is in the - * CRIMVPLY_STATUS_WAIT_PLAYING or the CRIMVPLY_STATUS_PLAYING state. - * \endif - */ -CriBool CRIAPI criMvPly_GetFrameARGB8888(CriMvPly mvply, CriUint8 *imagebuf, CriUint32 pitch, CriUint32 bufsize, CriMvFrameInfo *frameinfo); -void CRIAPI criMvPly_InitializeFrameARGB8888(void); - - -#if defined(XPT_TGT_IPHONE) || defined(XPT_TGT_WINMO) || defined(XPT_TGT_ANDROID) || defined(XPT_TGT_CQSH2A) || defined(XPT_TGT_ACRODEA) || defined(XPT_TGT_NACL) || defined(XPT_TGT_SH7269) || defined(XPT_TGT_TRGP6K) -/* - * RGB565フォーマットでフレーム取得 - */ -/* - * \ingroup MODULE_VIDEO - * \brief Get a video frame in RGB565 format - */ -CriBool CRIAPI criMvPly_GetFrameRGB565(CriMvPly mvply, CriUint8 *imagebuf, CriUint32 pitch, CriUint32 bufsize, CriMvFrameInfo *frameinfo); -void CRIAPI criMvPly_InitializeFrameRGB565(void); -#endif - -/* - * 次のフレームの情報だけ取得する - */ -/* - * \ingroup MODULE_VIDEO - * \brief Get a information of next video frame (without actual video frame). - */ -CriUint8* CRIAPI criMvPly_GetNextFrameInfo(CriMvPly mvply, CriMvFrameInfo *frameinfo); - -/* - * 次のフレームを捨てる - */ -CriBool CRIAPI criMvPly_DiscardNextFrame(CriMvPly mvply, CriMvFrameInfo *frameinfo); - -/* - * 再生準備完了状態(PREPからWAIT_PLAYING)になるまでに貯金するフレーム数の指定 - * この関数を呼び出さなければ、貯金フレーム数 = フレームプール数 - */ -void CRIAPI criMvPly_SetNumberOfFramesForPrep(CriMvPly mvply, CriSint32 nframes); - -/* - * For Debug use. - */ -void CRIAPI criMvPly_SetSeekPosition(CriMvPly mvply, CriSint32 seek_frame_id, CriSint32 video_gop_top_id); -void CRIAPI criMvPly_SetSeekAlphaPosition(CriMvPly mvply, CriSint32 alpha_gop_top_id); -void CRIAPI criMvPly_CalcSeekPosition(CriMvPly mvply, void *seektbl_ptr, CriUint32 seektbl_size, Sint32 frame_id, Uint64 *offset, Sint32 *gop_top_id); - -/* for specific use */ -/* ボディアドレスの設定 */ -void CRIAPI criMvPly_SetBodyData(CriMvPly mvply, const CriUint64Adr body_ptr, CriSint64 body_size); - -/* 入力SJおよびバッファサイズの取得(バッファサイズ、リロードサイズはNULL指定で省略) */ -CriSj CRIAPI criMvPly_GetInputSj(CriMvPly mvply, CriUint32 *buffer_size, CriUint32 *reload_threshold); - -/* 名前&タイプ指定によるイベントポイント情報の取得 */ -//Bool criMvPly_SearchEventPointByName(CriMvPly mvply, Char8 *cue_name, Sint32 type, CriMvEventPoint *eventinfo); -/* イベントポイント情報からフレームIDへの変換 */ -//Sint32 criMvPly_CalcFrameIdFromCuePoint(CriMvPly mvply, CriMvEventPoint *eventinfo); - -CriBool CRIAPI criMvPly_AttachSubAudio(CriMvPly mvply, CriHeap heap, CriUint32 track); -CriUint32 CRIAPI criMvPly_GetSubAudioWave16(CriMvPly mvply, CriUint32 nch, CriSint16 *waveptr[], CriUint32 wavesmpl, CriMvWaveInfo *waveinfo); -CriUint32 CRIAPI criMvPly_GetSubAudioWave32(CriMvPly mvply, CriUint32 nch, CriFloat32 *waveptr[], CriUint32 wavesmpl, CriMvWaveInfo *waveinfo); -void CRIAPI criMvPly_DetachSubAudio(CriMvPly mvply); - -void CRIAPI criMvPly_GetSubtitle(CriMvPly mvply, CriUint8 *bufptr, CriUint32 bufsize, CriMvSubtitleInfo *info); -void CRIAPI criMvPly_GetNextSubtitleInfo(CriMvPly mvply, CriMvSubtitleInfo *info); - -/* 入力バッファのデータ量を見る[byte] */ -CriUint32 CRIAPI criMvPly_PeekInputBufferData(CriMvPly mvply); -/* メモリ上のムービを入力SJに追加する */ -void CRIAPI criMvPly_AddInputMemory(CriMvPly mvply, CriUint8* memptr, CriUint32 memsize); - - -/* 取得できるオーディオデータのサンプル数を調べる */ -CriUint32 CRIAPI criMvPly_GetDataSizeMainAudio(CriMvPly mvply, CriUint32 nch); -/* 取得できるオーディオデータのサンプル数を調べる */ -CriUint32 CRIAPI criMvPly_GetDataSizeSubAudio(CriMvPly mvply, CriUint32 nch); - -/* メインのオーディオの再生が終了しているかどうかを調べる */ -CriBool CRIAPI criMvPly_IsEndMainAudioPlayback(CriMvPly mvply); -/* サブのオーディオの再生が終了しているかどうかを調べる */ -CriBool CRIAPI criMvPly_IsEndSubAudioPlayback(CriMvPly mvply); - -/* メインオーディオが活動中かどうかを調べる (デコード中かつ出力バッファがある状態) */ -CriBool CRIAPI criMvPly_IsActiveMainAudioPlayback(CriMvPly mvply); - -/* ワーク確保前に設定変更すること */ -void CRIAPI criMvPly_SetPcmFormat(CriMvPly mvply, CriMvPcmFormat pcmfmt); - -#if defined(XPT_TGT_PC) -/* [PC] マルチプロセッサの指定 */ -//void CRIAPI criMvPly_SetProcessorParameters_PC(CriMvPly mvply, Sint32 thread_num, Uint32 *affinity_masks, Sint32 *priorities); -#endif - -#if defined(XPT_TGT_XBOX360) -/* [Xbox360] マルチプロセッサの指定 */ -void CRIAPI criMvPly_SetProcessorParameters_XBOX360(CriMvPly mvply, Sint32 thread_num, CriUint32 processor_mask, CriSint32 *priorities); -#endif - -#if defined(XPT_TGT_PS3PPU) -/* [PS3] SPURSの指定 */ -void CRIAPI criMvPly_SetupSpursParameters_PS3(const CriMvProcessorParameters_PS3 *processor_param); - /* [PS3] SPUスレッドによるマルチプロセッサの指定 */ -void CRIAPI criMvPly_SetupSpuThreadParameters_PS3(const CriMvSpuThreadParameters_PS3 *spu_thread_param); -void CRIAPI criMvPly_SetGraphicEnv(CriMvGraphicEnv env); -CriMvGraphicEnv CRIAPI criMvPly_GetGraphicEnv(void); -#endif - -/* フレームプール情報の取得 */ -void CRIAPI criMvPly_GetFramePoolInfo(CriMvPly mvply, CriSint32 *num_input, CriUint32* num_data, CriUint32* num_ref, CriUint32* num_hold, CriUint32* num_free); - -/* 再生中でも字幕チャネルを切り替える */ -void CRIAPI criMvPly_SetSubtitleChannel(CriMvPly mvply, CriSint32 chno); - -/* ポインタだけ取得してフレームプール内のバッファをロックする */ -CriBool CRIAPI criMvPly_LockFrameBuffer(CriMvPly mvply, CriMvYuvBuffers *yuvbuffers, CriMvFrameInfo *frameinfo); -/* ロックしていたフレームプールを解放する */ -CriBool CRIAPI criMvPly_UnlockFrameBuffer(CriMvPly mvply, CriMvFrameInfo *frameinfo); - -/* - * For Sofdec2 - */ -CriMvPly CRIAPI criMvPly_CreateWithWork(void *work, CriSint32 size, CriMvHandleConfig *config); -CriSint32 CRIAPI criMvPly_CalcHandleWorkSize(CriMvHandleConfig *config); -CriSint32 CRIAPI criMvPly_CalcPlaybackWorkSize(CriMvPly mvply, CriMvStreamingParameters *stmprm); -CriBool CRIAPI criMvPly_AllocateWorkBufferWithWork(CriMvPly mvply, void *work ,Sint32 work_size, CriMvStreamingParameters *stmprm); -void CRIAPI criMvPly_SetMetaDataWorkAllocator(CriMvPly mvply, CriMvMetaDataWorkMallocFunc allocfunc, CriMvMetaDataWorkFreeFunc freefunc, void *usrobj, CriMvMetaFlag meta_flag); -CriSint32 criMvPly_CalcSubAudioWorkSize(CriMvPly mvply, const CriMvAudioParameters *aprm); -CriBool criMvPly_CopyFrameYUVBuffers(CriMvPly mvply, CriMvYuvBuffers *yuvbuffers, - const CriMvFrameInfo *frameinfo,const CriMvAlphaFrameInfo *alpha_frameinfo); -CriBool criMvPly_CopyFrameARGB8888Buffer(CriMvPly mvply, CriUint8 *dst_buf, CriUint32 dst_pitch, CriUint32 dst_bufsize, - const CriMvYuvBuffers *src_bufs, const CriMvFrameInfo *src_vinf, const CriMvAlphaFrameInfo *src_ainf); -#if defined(XPT_TGT_IPHONE) || defined(XPT_TGT_WINMO) || defined(XPT_TGT_ANDROID) || defined(XPT_TGT_CQSH2A) || defined(XPT_TGT_ACRODEA) || defined(XPT_TGT_NACL) || defined(XPT_TGT_SH7269) || defined(XPT_TGT_TRGP6K) || defined(XPT_TGT_TRGP6K) -CriBool criMvPly_CopyFrameRGB565Buffer(CriMvPly mvply, CriUint8 *dst_buf, CriUint32 dst_pitch, CriUint32 dst_bufsize, - const CriMvYuvBuffers *src_bufs, const CriMvFrameInfo *src_vinf, const CriMvAlphaFrameInfo *src_ainf); -#endif -CriBool criMvPly_LockAlphaFrameBuffer(CriMvPly mvply, CriMvYuvBuffers *yuvbuffers, CriMvAlphaFrameInfo *alpha_frameinfo); -CriBool criMvPly_UnlockAlphaFrameBuffer(CriMvPly mvply, CriMvAlphaFrameInfo *alpha_frameinfo); -CriSint32 criMvPly_GetNumPictureData(CriMvPly mvply); -const CriMvPlyHeaderInfo* criMvPly_GetCurrentStreamInfo(CriMvPly mvply); -/* for debug */ -CriBool CRIAPI criMvPly_GetAlphaFrame(CriMvPly mvply, CriUint8 *imagebuf, CriUint32 pitch, CriMvAlphaFrameInfo *alpha_frameinfo); - -/* OUTER_FRAMEPOOL_WORK */ -/* フレームプール用ワーク計算。ハンドルはNULL指定OK。 */ -CriSint32 criMvPly_CalcFramepoolWorkSize(CriMvPly mvply, const CriMvStreamingParameters *stmprm); -/* フレームプール用ワーク設定 */ -void criMvPly_SetFramepoolWork(CriMvPly mvply, void *work, CriSint32 work_size); -/* フレームプール用ワークアロケータ設定 */ -void criMvPly_SetFramepoolWorkAllocator(CriMvPly mvply, CriMvFramepoolWorkMallocFunc allocfunc, CriMvFramepoolWorkFreeFunc freefunc, void *usrobj); - -/* シークブロック情報の取得 */ -/* <入力> - * - seektbl_ptr : UTFアドレス - * - seektbl_size : UTFサイズ - * - num_seekblock : 出力配列の要素数 - * <出力> - * - blockinfo : シークブロック情報配列へのポインタ(num_seekblock分の領域を確保して渡すこと) - */ -void criMvPly_GetSeekBlockInfo(CriMvPly mvply, void *seektbl_ptr, CriUint32 seektbl_size, CriSint32 num_seekblock, CriMvSeekBlockInfo *blockinfo); - -/* フレームレートの強制指定 */ -void criMvPly_SetVideoFramerate(CriMvPly mvply, CriUint32 framerate_n, CriUint32 framerate_d); - -/* 同期有無の設定 */ -void criMvPly_SetSyncFlag(CriMvPly mvply, CriBool sync_flag); - -/* 再生可能かの問い合わせ */ -CriBool criMvPly_IsPlayable(CriMvPly mvply, const CriMvStreamingParameters *stmprm); - - - -#ifdef __cplusplus -} -#endif - -#endif /* CRI_MOVIE_CORE_H_INCLUDED */ diff --git a/3rdParty/cri/PS4/include/cri_movie_ps4.h b/3rdParty/cri/PS4/include/cri_movie_ps4.h deleted file mode 100644 index 95e804e6..00000000 --- a/3rdParty/cri/PS4/include/cri_movie_ps4.h +++ /dev/null @@ -1,94 +0,0 @@ -/**************************************************************************** - * - * CRI Middleware SDK - * - * Copyright (c) 2013 CRI Middleware Co., Ltd. - * - * Library : CRI Movie - * Module : Library User's Header - * File : cri_movie_ps4.h - * Date : 2013-11-25 - * - ****************************************************************************/ -/*! - * \file cri_movie_ps4.h - */ -#ifndef CRI_MOVIE_PS4_H_INCLUDED /* Re-definition prevention */ -#define CRI_MOVIE_PS4_H_INCLUDED - -/*************************************************************************** - * Include file - ***************************************************************************/ -#include - -#include -#include - -/*************************************************************************** - * Variable Declaration - ***************************************************************************/ -namespace CriMv { - extern CriError ErrorContainer; -} - -/*************************************************************************** - * Prototype Functions - ***************************************************************************/ -namespace CriMv { - /*EN - * \ingroup MODULE_OPTION - * \brief Set processor parameters for decoding (Library Global) - * - * \param num_threads Number of additional threads for load distribution in decoding (Maximum 5 threads) - * \param affinity_mask Pointer to an array of thread affinity masks for each thread specified with num_threads. - * \param priorities Pointer to an array of thread priority for each thread specified with num_threads. - * \param err Optional error code - * - * This function sets the processor parameters for decoding as default setting of library global. - * Use it when you want to change processors or thread priority for decoding load distribution. - * - * If this function is called, it must be called before library initialization. - * - * On initialization, CRI Movie prepares 5 worker threads for distributed decoding.
- * - * \a num_threads specifies how many worker threads CRI Movie should use.
- * \a affinity_mask is an array of affinity masks for the worker threads. This array must have - * \a num_threads many elements. - * \a priorities is an array of thread priority for the worker threads. This array must have - * \a num_threads many elements. - * The format of \a affinity_mask and \a priorities is same as for the value passed to the OS standard API.
- * - * If this function is not called, 5 distributed decoding threads will run in parallel by default. - * Also, processor assignment of the decoding threads is handled by the operating system, and their - * priority will be 725 (below main thread). - */ - /*JP - * \ingroup MODULE_OPTION - * \brief デコード処理に使う追加プロセッサ設定(ライブラリ全体) - * \param num_threads 負荷分散デコード用に使用する追加スレッドの数 (最大5つ) - * \param affinity_masks スレッドアフィニティマスクの配列へのポインタ。num_threadsで指定したスレッドごとのマスク値。 - * \param priorities 追加スレッドの優先度配列へのポインタ。 - * \param err エラー情報(省略可) - * - * デコード処理を分散して処理するためのプロセッサをライブラリ全体に指定します。 - * デコード処理に行うプロセッサやスレッド優先度を変更したい場合に使用してください。 - * 本関数はライブラリ初期化前に呼び出す必要があります。 - * - * CRI Movieは初期化の際に5つの分散デコード用のワーカースレッドを用意します。 - * num_threads引数で、そのうちのいくつのスレッドを実際に使用するかを指定できます。 - * アプリケーションから明示的にプロセッサ割り当てを行いたい場合、個々のスレッドに対して - * アフィニティマスクとスレッド優先度を設定してください。 - * アフィニティマスクとスレッド優先度の値は、OS標準関数の引数と同じ書式です。 - * - * この関数を呼ばなかった場合、5つのスレッドで並列デコードを行います。 - * デコードスレッドのプロセッサは割り当ては全てOS任せで、優先度は725(メインスレッドより下)になります。 - */ - void SetUsableProcessors_PS4( - CriSint32 num_threads, - const SceKernelCpumask *affinity_masks, - const int *priorities, - CriError &err = CriMv::ErrorContainer); -} - - -#endif /* CRI_MOVIE_PS4_H_INCLUDED */ diff --git a/3rdParty/cri/PS4/include/cri_sj.h b/3rdParty/cri/PS4/include/cri_sj.h deleted file mode 100644 index 28b29424..00000000 --- a/3rdParty/cri/PS4/include/cri_sj.h +++ /dev/null @@ -1,189 +0,0 @@ -/**************************************************************************** - * - * CRI Middleware SDK - * - * Copyright (c) 2006-2010 CRI Middleware Co., Ltd. - * - ****************************************************************************/ - -#ifndef _CRI_SJ_H_INCLUDED -#define _CRI_SJ_H_INCLUDED -/**************************************************************************** - * * - * CRI Stream Joint "CriSj" Library * - * * - * 2005-06-21 written by M.Oshimi * - * * - ****************************************************************************/ - -/**************************************************************************** - * Include file * - ****************************************************************************/ -#include "cri_xpt.h" -#include "cri_heap.h" - -/**************************************************************************** - * MACRO CONSTANT * - ****************************************************************************/ - -/* Version number of CriSj */ -#define CRISJ_NAME_STRINGS "CRI Stream Joint" -#define CRISJ_VERSION_STRINGS "1.01.00" - -#define CRISJUNI_MAX_LINE (4) -#define CRICHUNK_MAX_SIZE (0xffffffff) - -/*********************************************************************** - * Process MACRO - ***********************************************************************/ - -/**************************************************************************** - * Data type declaration * - ****************************************************************************/ - -/* ストリームライン */ -typedef enum { - CRISJ_LINE_FREE = (0), - CRISJ_LINE_DATA = (1), - CRISJ_LINE_HOLD = (2), - CRISJ_LINE_EXTRA = (3), - /* enum be 4bytes */ - CRISJ_LINE_ENUM_BE_SINT32 = 0x7FFFFFFF -} CriSjLine; - -/* チャンク */ -#ifndef TYPEDEF_CRICHUNK -#define TYPEDEF_CRICHUNK -typedef struct { - CriUint8 *data; /* データ */ - CriUint32 size; /* バイト数 */ -} CriChunk; -#endif - -/* CriSjハンドル */ -/* CriSj handle */ -typedef struct { - struct _crisj_function_table *vtbl; - const CriChar8 *name; -} CriSjObj, *CriSj; - -typedef struct _crisj_function_table { - /* ハンドルの消去 */ - void (*Destroy)(CriSj sj); - /* リセット */ - void (*Reset)(CriSj sj); - /* チャンクの取得 (FIFOの先頭から取得) */ - void (*GetChunk)(CriSj sj, CriSjLine id, CriUint32 nbyte, CriChunk *ck); - /* チャンクを戻す (FIFOの先頭に挿入) */ - void (*UngetChunk)(CriSj sj, CriSjLine id, CriChunk *ck); - /* チャンクを挿入 (FIFOの最後に挿入) */ - void (*PutChunk)(CriSj sj, CriSjLine id, CriChunk *ck); - /* ラインから取得できる総バイト数の取得 */ - CriUint32 (*GetTotalSize)(CriSj sj, CriSjLine id); -} CriSjVirtualFunctionTable; - -typedef enum { - CRISJ_UNIMODE_SEPARATE = (0), - CRISJ_UNIMODE_JOIN = (1), - /* enum be 4bytes */ - CRISJ_UNIMODE_ENUM_BE_SINT32 = 0x7FFFFFFF -} CriSjUniversalMode; - - -typedef struct CriSjRbfConfig { - CriBool use_cs; - CriUint32 buffer_size; - CriUint32 extra_size; - CriUint32 alignment; - const CriChar8 *buffer_name; -} CriSjRbfConfig; - -typedef struct CriSjMemConfig { - CriBool use_cs; - CriUint8 *data; - CriUint32 data_size; -} CriSjMemConfig; - -typedef struct CriSjUniConfig { - CriBool use_cs; - CriSjUniversalMode mode; - CriUint32 num_chunks; -} CriSjUniConfig; - -/**************************************************************************** - * Function Declaration * - ****************************************************************************/ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* リングバッファ型SJの作成 */ -CriSint32 CRIAPI criSjRbf_CalculateWorkSize(const CriSjRbfConfig* config); -CriSj CRIAPI criSjRbf_Create(const CriSjRbfConfig *config, void *work, CriSint32 work_size); -CriSj CRIAPI criSjRbf_CreateByHeap(const CriSjRbfConfig *config, CriHeap heap, CriHeapType heap_type); - -/* 常駐メモリ型SJの作成 */ -CriSint32 CRIAPI criSjMem_CalculateWorkSize(const CriSjMemConfig* config); -CriSj CRIAPI criSjMem_Create(const CriSjMemConfig *config, void *work, CriSint32 work_size); -CriSj CRIAPI criSjMem_CreateByHeap(const CriSjMemConfig *config, CriHeap heap, CriHeapType heap_type); - -/* ユニバーサルSJの作成 */ -CriSint32 CRIAPI criSjUni_CalculateWorkSize(const CriSjUniConfig* config); -CriSj CRIAPI criSjUni_Create(const CriSjUniConfig *config, void *work, CriSint32 work_size); -CriSj CRIAPI criSjUni_CreateByHeap(const CriSjUniConfig *config, CriHeap heap, CriHeapType heap_type); -/* チェインプール数の取得 */ -CriSint32 CRIAPI criSjUni_GetNumChainPool(CriSj sj); - -void CRIAPI criSj_Destroy(CriSj sj); -void CRIAPI criSj_Reset(CriSj sj); -void CRIAPI criSj_GetChunk(CriSj sj, CriSjLine line, CriUint32 nbyte, CriChunk *ck); -void CRIAPI criSj_UngetChunk(CriSj sj, CriSjLine line, CriChunk *ck); -void CRIAPI criSj_PutChunk(CriSj sj, CriSjLine line, CriChunk *ck); -CriUint32 CRIAPI criSj_GetTotalSize(CriSj sj, CriSjLine line); -void CRIAPI criSj_SplitChunk(CriChunk *ck, CriUint32 nbyte, CriChunk *ck1, CriChunk *ck2); - -/*** -* New APIs -***/ - -CriUint32 CRIAPI criSj_GetInputFreeSize(CriSj sj); -void CRIAPI criSj_GetInputChunk(CriSj sj, CriChunk *ck); -void CRIAPI criSj_PutInputChunk(CriSj sj, CriChunk *ck, CriUint32 input_size); -CriUint32 CRIAPI criSj_GetOutputDataSize(CriSj sj); -void CRIAPI criSj_GetOutputChunk(CriSj sj, CriChunk *ck); -void CRIAPI criSj_PutOutputChunk(CriSj sj, CriChunk *ck, CriUint32 output_size); - -CriUint32 CRIAPI criSj_PutOutputChunk2(CriSj sj, CriChunk *ck1, CriChunk *ck2, CriUint32 output_size); - - -/*** -* Old Interface (for compatibility) -***/ -typedef struct _CriSjConfig { - CriBool use_cs; - CriHeapType heap_type; -} CriSjConfig; - -CriSj CRIAPI criSj_CreateRingBuffer(CriHeap heap, CriUint32 bsize, CriUint32 xsize, CriUint32 align); -CriSj CRIAPI criSj_CreateNamedRingBuffer(CriHeap heap, CriUint32 bsize, CriUint32 xsize, CriUint32 align, const CriChar8 *bname); -CriSj CRIAPI criSj_CreateRingBufferWithConfig(CriHeap heap, CriUint32 bsize, CriUint32 xsize, CriUint32 align, const CriSjConfig *config); -CriSj CRIAPI criSj_CreateNamedRingBufferWithConfig(CriHeap heap, CriUint32 bsize, CriUint32 xsize, CriUint32 align, const CriChar8 *bname, const CriSjConfig *config); -CriSint32 CRIAPI criSjRbf_GetRequiredMemorySizeWithConfig(CriUint32 bsize, CriUint32 xsize, CriUint32 align, const CriSjConfig *config); - -CriSj CRIAPI criSj_CreateMemory(CriHeap heap, CriUint8 *data, CriUint32 dtsize, CriUint32 align); -CriSj CRIAPI criSj_CreateMemoryWithConfig(CriHeap heap, CriUint8 *data, CriUint32 dtsize, CriUint32 align, const CriSjConfig *config); -CriSint32 CRIAPI criSjMem_GetRequiredMemorySizeWithConfig(CriUint32 align, const CriSjConfig *config); - -CriSj CRIAPI criSj_CreateUniversal(CriHeap heap, CriSjUniversalMode mode, CriUint32 nchunk); -CriSj CRIAPI criSj_CreateUniversalWithConfig(CriHeap heap, CriSjUniversalMode mode, CriUint32 nchunk, const CriSjConfig *config); -CriSint32 CRIAPI criSjUni_GetRequiredMemorySizeWithConfig(CriSjUniversalMode mode, CriUint32 nchunk, const CriSjConfig *config); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#endif - -/* end of file */ diff --git a/3rdParty/cri/PS4/include/cri_xpt.h b/3rdParty/cri/PS4/include/cri_xpt.h deleted file mode 100644 index 57fafec1..00000000 --- a/3rdParty/cri/PS4/include/cri_xpt.h +++ /dev/null @@ -1,27 +0,0 @@ -/**************************************************************************** - * - * CRI Middleware SDK - * - * Copyright (c) 2012 CRI Middleware Co., Ltd. - * - * Library : CRI Middleware Library - * Module : CRI Common Header for PS4 - * File : cri_xpt.h - * Date : 2012-10-04 - * Version : 1.00 - * - ****************************************************************************/ -#ifndef CRI_INCL_CRI_XPT_H -#define CRI_INCL_CRI_XPT_H - -#define XPT_TGT_PS4 -#define XPT_CCS_LEND -#define XPT_DISABLE_FSV1API -#define CRI_TARGET_STR "PS4" - - -#include "cri_xpts_ps4.h" -#include "cri_xpt_post.h" - -#endif /* CRI_INCL_CRI_XPT_H */ -/* End Of File */ diff --git a/3rdParty/cri/PS4/include/cri_xpt_post.h b/3rdParty/cri/PS4/include/cri_xpt_post.h deleted file mode 100644 index 7cc8341a..00000000 --- a/3rdParty/cri/PS4/include/cri_xpt_post.h +++ /dev/null @@ -1,256 +0,0 @@ -/***************************************************************************** - * - * CRI Middleware SDK - * - * Copyright (c) 1998-2012 CRI Middleware Co., Ltd. - * - * Library : CRI Middleware Library - * Module : CRI Common Header / Post-Process - * File : cri_xpt_post.h - * Date : 2012-05-15 - * Version : 2.07 - * - *****************************************************************************/ -#ifndef CRI_INCL_CRI_XPT_POST_H -#define CRI_INCL_CRI_XPT_POST_H - - -/***************************************************************************** - * マクロ定義 - * Macro definition - *****************************************************************************/ - -/* コンパイル時の静的アサート - * C++ BoostのSTATIC_ASSERTと同等の機能をC言語で実装する。 - * 条件が真であることを検証する。偽の場合はコンパイルエラーを起こして、コン - * パイルを停止させる。 - * Static Asart when compiling - * This function is equal to STATIC_ASSERT of C++ Boost, and is imprementated - * by C language. If the condition is false, a compiler error is caused and - * it stop compiling. - */ -#define XPT_STATIC_ASSERT(cond) extern int xpt_static_assert_array[(cond)?1:-1] - - -/***************************************************************************** - * コンパイルオプションの検証 - * Compiler option test - *****************************************************************************/ - -/* enum型の検証 - *  enum型がint型に整合することを検証する。 - *  適切なエラーメッセージを表示したいので、可能ならコンパイルオプションによる - *  チェックを行う。不可能な場合、汎用的な静的アサートによるチェックが働く。 - * Enum type test - * It is verified that the enum type adjusts to the int type. - * To display an appropriate error message, it checks the compiler option - * if possible. General static asart test works if it is impossible. - */ -#if defined(__MWERKS__) /* CodeWarrior */ - //#if !__option(enumsalwaysint) - // #error ERROR cri_xpt_post.h : Compiler option 'Enums Always Int' should be ON. - //#endif -#elif defined(__GNUC__) - //#if Compiler option -fshort-enums is used - // #error ERROR cri_xpt_post.h : Compiler option '-fshort-enums' should not be used. - //#endif -#endif -//typedef enum {XPT_TEST_ENUM_0, XPT_TEST_ENUM_1, XPT_TEST_ENUM_2} XptTestEnum; -//XPT_STATIC_ASSERT(sizeof(XptTestEnum) == sizeof(Uint32)); /* enum should be 4byte. */ - -/***************************************************************************** - * 定数マクロ - * Macros of constant value - *****************************************************************************/ - -/* NULL ポインタ型 */ -#if !defined(CRI_NULL) -#ifdef __cplusplus -#define CRI_NULL (0) -#else -#define CRI_NULL ((void *)0) -#endif -#endif - -/* 論理定数1(偽、真) */ -#if !defined(CRI_FALSE) -#define CRI_FALSE (0) -#endif -#if !defined(CRI_TRUE) -#define CRI_TRUE (1) -#endif - -/* 論理定数2(スイッチ) */ -#if !defined(CRI_OFF) -#define CRI_OFF (0) -#endif -#if !defined(CRI_ON) -#define CRI_ON (1) -#endif - -/* 結果判定の定数(成功、失敗) */ -#if !defined(CRI_OK) -#define CRI_OK (0) /* 成功 */ -#endif -#if !defined(CRI_NG) -#define CRI_NG (-1) /* 失敗 */ -#endif - -/***************************************************************************** - * ポインタまたは64ビットアドレスを格納できる整数型 - * 備考: ポインタ32bitかつROMアドレス空間64bitの環境で、両者を透過的に扱える。 - * The integer type which can hold an pointer or an address up to 64 bits. - * NOTE: In the environment of pointer 32bit and ROM address space 64bit, - * this type can treat both transparently. - *****************************************************************************/ - -#if !defined(_TYPEDEF_CriUint64Adr) -#define _TYPEDEF_CriUint64Adr -typedef CriUint64 CriUint64Adr; /* ポインタまたは64ビットアドレスを格納できる整数型 */ -#endif - -#if !defined(CRI_PTR_TO_UINT64ADR) -#define CRI_PTR_TO_UINT64ADR(ptr) ((CriUint64Adr)(ptr)) /* Convert pointer to CriUint64Adr */ -#endif - -#if !defined(CRI_UINT64ADR_TO_PTR) -#define CRI_UINT64ADR_TO_PTR(uint64adr) ((void *)(CriUintPtr)(uint64adr)) /* Convert CriUint64Adr to pointer */ -#endif - -#if !defined(CRI_XPT_DISABLE_UNPREFIXED_TYPE) - -/***************************************************************************** - * 互換性維持のための定数マクロ - * Macros for compatibility with old version - *****************************************************************************/ - -/* NULL ポインタ型 */ -#if !defined(NULL) -#define NULL (CRI_NULL) -#endif - -/* 論理定数1(偽、真) */ -#if !defined(FALSE) -#define FALSE (CRI_FALSE) -#endif -#if !defined(TRUE) -#define TRUE (CRI_TRUE) -#endif - -/* 論理定数2(スイッチ) */ -#if !defined(OFF) -#define OFF (CRI_OFF) -#endif -#if !defined(ON) -#define ON (CRI_ON) -#endif - -/* 結果判定の定数(成功、失敗) */ -#if !defined(OK) -#define OK (CRI_OK) -#endif -#if !defined(NG) -#define NG (CRI_NG) -#endif - -/***************************************************************************** - * 互換性維持のためのデータ型宣言 - * Types for compatibility with old version - *****************************************************************************/ - -#if !defined(_TYPEDEF_Uint8) -#define _TYPEDEF_Uint8 -typedef CriUint8 Uint8; /* 符号なし1バイト整数 */ -#endif - -#if !defined(_TYPEDEF_Sint8) -#define _TYPEDEF_Sint8 -typedef CriSint8 Sint8; /* 符号つき1バイト整数 */ -#endif - -#if !defined(_TYPEDEF_Uint16) -#define _TYPEDEF_Uint16 -typedef CriUint16 Uint16; /* 符号なし2バイト整数 */ -#endif - -#if !defined(_TYPEDEF_Sint16) -#define _TYPEDEF_Sint16 -typedef CriSint16 Sint16; /* 符号つき2バイト整数 */ -#endif - -#if !defined(_TYPEDEF_Uint32) -#define _TYPEDEF_Uint32 -typedef CriUint32 Uint32; /* 符号なし4バイト整数 */ -#endif - -#if !defined(_TYPEDEF_Sint32) -#define _TYPEDEF_Sint32 -typedef CriSint32 Sint32; /* 符号つき4バイト整数 */ -#endif - -#if !defined(_TYPEDEF_Uint64) -#define _TYPEDEF_Uint64 -typedef CriUint64 Uint64; /* 符号なし8バイト整数 */ -#endif - -#if !defined(_TYPEDEF_Sint64) -#define _TYPEDEF_Sint64 -typedef CriSint64 Sint64; /* 符号つき8バイト整数 */ -#endif - -#if !defined(_TYPEDEF_Uint128) -#define _TYPEDEF_Uint128 -typedef CriUint128 Uint128; /* 符号なし16バイト整数 */ -#endif - -#if !defined(_TYPEDEF_Sint128) -#define _TYPEDEF_Sint128 -typedef CriSint128 Sint128; /* 符号つき16バイト整数 */ -#endif - -#if !defined(_TYPEDEF_Float16) -#define _TYPEDEF_Float16 -typedef CriFloat16 Float16; /* 2バイト実数 */ -#endif - -#if !defined(_TYPEDEF_Float32) -#define _TYPEDEF_Float32 -typedef CriFloat32 Float32; /* 4バイト実数 */ -#endif - -#if !defined(_TYPEDEF_Float64) -#define _TYPEDEF_Float64 -typedef CriFloat64 Float64; /* 8バイト実数 */ -#endif - -#if !defined(_TYPEDEF_Fixed32) -#define _TYPEDEF_Fixed32 -typedef CriFixed32 Fixed32; /* 固定小数点32ビット */ -#endif - -/* X11 API(xtrapproto.h)との競合回避用 */ -#if !defined(_TYPEDEF_Bool) && !defined(Bool) -#define _TYPEDEF_Bool -typedef CriBool Bool; /* 論理型(論理定数を値にとる) */ -#endif - -#if !defined(_TYPEDEF_Char8) -#define _TYPEDEF_Char8 -typedef CriChar8 Char8; /* 文字型 */ -#endif - -#if !defined(_TYPEDEF_SintPtr) -#define _TYPEDEF_SintPtr -typedef CriSintPtr SintPtr; -#endif - -#if !defined(_TYPEDEF_UintPtr) -#define _TYPEDEF_UintPtr -typedef CriUintPtr UintPtr; -#endif - -#endif /* CRI_XPT_DISABLE_UNPREFIXED_TYPE */ - -#endif /* CRI_INCL_CRI_XPT_POST_H */ - -/* end of file */ diff --git a/3rdParty/cri/PS4/include/cri_xpts_ps4.h b/3rdParty/cri/PS4/include/cri_xpts_ps4.h deleted file mode 100644 index 919ae0f6..00000000 --- a/3rdParty/cri/PS4/include/cri_xpts_ps4.h +++ /dev/null @@ -1,133 +0,0 @@ -/**************************************************************************** - * - * CRI Middleware SDK - * - * Copyright (c) 1998-2012 CRI Middleware Co., Ltd. - * - * Library : CRI Middleware Library - * Module : CRI Common Header for PS4 - * File : cri_xpts_ps4.h - * Date : 2012-10-04 - * Version : 2.01 - * - ****************************************************************************/ - -#if !defined(CRI_INCL_CRI_XPTS_PS4_H) -#define CRI_INCL_CRI_XPTS_PS4_H - -/***************************************************************************** - * 基本データ型宣言 - *****************************************************************************/ - -#if !defined(_TYPEDEF_CriUint8) -#define _TYPEDEF_CriUint8 -typedef unsigned char CriUint8; /* 符号なし1バイト整数 */ -#endif - -#if !defined(_TYPEDEF_CriSint8) -#define _TYPEDEF_CriSint8 -typedef signed char CriSint8; /* 符号つき1バイト整数 */ -#endif - -#if !defined(_TYPEDEF_CriUint16) -#define _TYPEDEF_CriUint16 -typedef unsigned short CriUint16; /* 符号なし2バイト整数 */ -#endif - -#if !defined(_TYPEDEF_CriSint16) -#define _TYPEDEF_CriSint16 -typedef signed short CriSint16; /* 符号つき2バイト整数 */ -#endif - -#if !defined(_TYPEDEF_CriUint32) -#define _TYPEDEF_CriUint32 -typedef unsigned int CriUint32; /* 符号なし4バイト整数 */ -#endif - -#if !defined(_TYPEDEF_CriSint32) -#define _TYPEDEF_CriSint32 -typedef signed int CriSint32; /* 符号つき4バイト整数 */ -#endif - -#if !defined(_TYPEDEF_CriUint64) -#define _TYPEDEF_CriUint64 -typedef unsigned long CriUint64; /* 符号なし8バイト整数 */ -#endif - -#if !defined(_TYPEDEF_CriSint64) -#define _TYPEDEF_CriSint64 -typedef signed long CriSint64; /* 符号つき8バイト整数 */ -#endif - -#if !defined(_TYPEDEF_CriUint128) -#define _TYPEDEF_CriUint128 -//typedef unsigned __int128 CriUint128; /* 符号なし16バイト整数 */ -typedef struct { /* 符号なし16バイト整数 */ - CriUint64 h; /* 上位64ビット */ - CriUint64 l; /* 下位64ビット */ -} CriUint128; -#endif - -#if !defined(_TYPEDEF_CriSint128) -#define _TYPEDEF_CriSint128 -//typedef signed __int128 CriSint128; /* 符号つき16バイト整数 */ -typedef struct { /* 符号つき16バイト整数 */ - CriSint64 h; /* 上位64ビット */ - CriUint64 l; /* 下位64ビット */ -} CriSint128; -#endif - -#if !defined(_TYPEDEF_CriFloat16) -#define _TYPEDEF_CriFloat16 -typedef signed short CriFloat16; /* 2バイト実数 */ -#endif - -#if !defined(_TYPEDEF_CriFloat32) -#define _TYPEDEF_CriFloat32 -typedef float CriFloat32; /* 4バイト実数 */ -#endif - -#if !defined(_TYPEDEF_CriFloat64) -#define _TYPEDEF_CriFloat64 -typedef double CriFloat64; /* 8バイト実数 */ -#endif - -#if !defined(_TYPEDEF_CriFixed32) -#define _TYPEDEF_CriFixed32 -typedef signed int CriFixed32; /* 固定小数点32ビット */ -#endif - -#if !defined(_TYPEDEF_CriBool) -#define _TYPEDEF_CriBool -typedef CriSint32 CriBool; /* 論理型(論理定数を値にとる) */ -#endif - -#if !defined(_TYPEDEF_CriChar8) -#define _TYPEDEF_CriChar8 -typedef char CriChar8; /* 文字型 */ -#endif - -/***************************************************************************** - * ポインタを格納可能な整数型 - *****************************************************************************/ -#if !defined(_TYPEDEF_CriSintPtr) -#define _TYPEDEF_CriSintPtr -typedef signed long CriSintPtr; // 8 bytes pointer -#endif - -#if !defined(_TYPEDEF_CriUintPtr) -#define _TYPEDEF_CriUintPtr -typedef unsigned long CriUintPtr; // 8 bytes pointer -#endif - -/***************************************************************************** - * 呼び出し規約 - *****************************************************************************/ - -#if !defined(CRIAPI) -#define CRIAPI -#endif - -#endif /* CRI_INCL_CRI_XPTS_PS4_H */ - -/* end of file */ diff --git a/3rdParty/cri/XboxOne/include/cri_allocator.h b/3rdParty/cri/XboxOne/include/cri_allocator.h deleted file mode 100644 index e3c18997..00000000 --- a/3rdParty/cri/XboxOne/include/cri_allocator.h +++ /dev/null @@ -1,63 +0,0 @@ -#ifndef _CRI_ALLOCATOR_H_INCLUDED -#define _CRI_ALLOCATOR_H_INCLUDED -/**************************************************************************** - * * - * CRI Allocator * - * * - * 2006-01-05 written by M.Oshimi * - * * - ****************************************************************************/ - -/**************************************************************************** - * Include file - ****************************************************************************/ -#include -#include "cri_xpt.h" -#include "cri_heap.h" - -/**************************************************************************** - * Macro Constants - ****************************************************************************/ -#if defined(XPT_UNSUPPORT_CPLUSPLUS_THROW) -#define CRI_ALLOCATOR_CPLUSPLUS_THROW -#else -#define CRI_ALLOCATOR_CPLUSPLUS_THROW throw() -#endif - -/**************************************************************************** - * Class Declaration - ****************************************************************************/ -#ifdef __cplusplus - -class CriAllocator -{ -public: - static const CriSint32 DEFAULT_ALIGNMENT = CRIHEAP_DEFAULT_MEM_ALIGN; - - - static void* CRIAPI operator new(size_t size, CriHeap heap) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void* CRIAPI operator new(size_t size, CriHeap heap, CriHeapType heap_type) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void* CRIAPI operator new(size_t size, CriHeap heap, const CriChar8 *name, CriUint32 align=DEFAULT_ALIGNMENT) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void* CRIAPI operator new(size_t size, CriHeap heap, CriHeapType heap_type, const CriChar8 *name, CriUint32 align=DEFAULT_ALIGNMENT) CRI_ALLOCATOR_CPLUSPLUS_THROW; - - static void CRIAPI operator delete(void *p, size_t size); - - static void* CRIAPI operator new(size_t size, void *work, CriSint32 wksize) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void CRIAPI operator delete(void *p, void *work, CriSint32 wksize) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void* CRIAPI operator new(size_t size, void *work, CriSint32 wksize, CriUint32 align) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void CRIAPI operator delete(void *p, void *work, CriSint32 wksize, CriUint32 align) CRI_ALLOCATOR_CPLUSPLUS_THROW; - -#if !defined(XPT_TGT_BCB) - static void CRIAPI operator delete(void *p, CriHeap heap) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void CRIAPI operator delete(void *p, CriHeap heap, CriHeapType heap_type) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void CRIAPI operator delete(void *p, CriHeap heap, const CriChar8 *name, CriUint32 align) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void CRIAPI operator delete(void *p, CriHeap heap, CriHeapType heap_type, const CriChar8 *name, CriUint32 align) CRI_ALLOCATOR_CPLUSPLUS_THROW; -#endif - - static CriSint32 GetWorstExtraSize(CriUint32 align); -}; -#endif // _CRI_ALLOCATOR_H_INCLUDED - -#endif /* end of __cplusplus */ - -/* --- end of file --- */ diff --git a/3rdParty/cri/XboxOne/include/cri_heap.h b/3rdParty/cri/XboxOne/include/cri_heap.h deleted file mode 100644 index 488306bb..00000000 --- a/3rdParty/cri/XboxOne/include/cri_heap.h +++ /dev/null @@ -1,640 +0,0 @@ -#ifndef _CRI_HEAP_H_INCLUDED -#define _CRI_HEAP_H_INCLUDED -/**************************************************************************** - * * - * CRI Heap Manager "CriHeap" Library * - * * - * 2005-03-17 written by satouo * - * * - ****************************************************************************/ -/*! - * \file cri_heap.h - */ - -/**************************************************************************** - * CN[ht@C * - * Include file * - ****************************************************************************/ -#include "cri_xpt.h" - -#ifdef XPT_TGT_PC -#pragma pack(push) -#pragma pack(1) //The boundary value of structure is adjusted to 1 byte. -#endif - -/**************************************************************************** - * 萔}N * - * MACRO CONSTANT * - ****************************************************************************/ -/* Version number of CRIHEAP */ -#define CRIHEAP_NAME_STRINGS "CRI Heap" -#define CRIHEAP_VERSION_STRINGS "1.21.02" - -/* Default memory alignment */ -#define CRIHEAP_DEFAULT_MEM_ALIGN (8) - -/**************************************************************************** - * 񋓒萔}N * - * ENUM CONSTANT * - ****************************************************************************/ -/*JP - * \brief ̃^Cv - */ -/*EN - * \brief Types of heap - */ -typedef enum { - CRIHEAP_TYPE_FIX = (1), - CRIHEAP_TYPE_TEMPORARY = (2), - CRIHEAP_TYPE_DYNAMIC = (3), // unuse - CRIHEAP_TYPE_NONE = (0), - /* enum be 4bytes */ - CRIHEAP_TYPE_ENUM_BE_SINT32 = 0x7FFFFFFF -} CriHeapType; - -/**************************************************************************** - * f[^^ * - * Data type declaration * - ****************************************************************************/ -/* CriHeapnh */ -/* CriHeap handle */ -#ifndef CRIHEAP_DEFINED -#define CRIHEAP_DEFINED - -/* internal */ -typedef struct CriHeapBlockTag { - struct CriHeapBlockTag *prevblock; - struct CriHeapBlockTag *nextblock; - CriSint32 memsize; - CriUint8 used; - CriUint8 type; - CriUint16 alignspc; - CriUint16 gap; - CriChar8 *nameadr; -} CriHeapBlock, *CriHeapBlockPtr; - -/*JP - * \brief CRI Heapnh - * \struct CriHeap - * \ingroup CRIHEAP_BASIC - * CRI HeappăAP[gs߂ɕKvȃnhłB
- * ̃nhɑ΂āAAP[g⃁t[s܂B - * \sa criHeap_Create(), criHeap_Destroy() - */ -/*EN - * \brief CRI Heap handle - * \struct CriHeap - * \ingroup CRIHEAP_BASIC - * \par Description: - * The heap handle. This data structure needs to exist through the life cycle of - * the heap. It allows the library to allocate and deallocate memory - * internally within the heap. Typically this handle gets allocated at the - * beginning of the heap memory that you've provided for the heap, but don't - * depend on this behavior. The heap itself is opaque. You can of course - * allocate multiple non-contiguous heaps, but these will be separate heap - * structures and a single allocation won't choose between them. - * - * \sa criHeap_Create(), criHeap_Destroy() - */ -typedef struct _criheap_struct { - struct _criheap_vfunctiontable *vtbl; - CriSint32 totalsize; - CriSint32 peaksize; - CriSint32 currentsize; - CriHeapBlock *topblock; - CriHeapBlock *taleblock; -} CriHeapObj, *CriHeap; - -/*JP - * \brief CRI Heapz֐e[u - * \struct criHeapVirtualFunctionTable - * \ingroup CRIHEAP_BASIC - * Ǝ̃AP[g֐ۂɎgp鉼z֐e[u\̂łB
- * e֐̓}`XbhZ[tłKv܂B
- * \par l: - * RԖڂ̃AP[g֐͌ݖgpłB - */ -/*EN - * \brief CRI Heap Virtual Function Table - * \struct criHeapVirtualFunctionTable - * \ingroup CRIHEAP_BASIC - * \par Description: - * The virtual functions table for original allocation functions.
- * The third allocation function is not in use currently. - */ -typedef struct _criheap_vfunctiontable { - /*JP - * \brief ̃AP[gï̐[j - * \par : - * criHeap_AllocFix֐ĂяoɌĂ΂܂B - * \sa criHeap_AllocFix() - */ - /*EN - * \brief Memory allocation (allocating from the top of the memory area) - * \par Description: - * Called from criHeap_AllocFix(). - * \sa criHeap_AllocFix() - */ - void *(*AllocFix)(CriHeap heap, CriSint32 size, const CriChar8 *name, CriSint32 align); - /*JP - * \brief ̃AP[gï̏I[j - * \par : - * criHeap_AllocFix֐ĂяoɌĂ΂܂B - * \sa criHeap_AllocTemporary() - */ - /*EN - * \brief Memory allocation (allocating from the tail of the memory area) - * \par Description: - * Called from criHeap_AllocTemporary(). - * \sa criHeap_AllocTemporary() - */ - void *(*AllocTemporary)(CriHeap heap, CriSint32 size, const CriChar8 *name, CriSint32 align); - /*JP - * \brief gp֐ - */ - /*EN - * \brief Unused - */ - void *(*AllocDynamic)(CriHeap heap, CriSint32 size, const CriChar8 *name, CriSint32 align); // unused - - /*JP - * \brief ̃t[ - * \par : - * criHeap_Free֐ĂяoɌĂ΂܂B - * \sa criHeap_Free() - */ - /*EN - * \brief Memory deallocation - * \par Description: - * Called from criHeap_Free(). - * \sa criHeap_Free() - */ - CriSint32 (*Free)(CriHeap heap, void *ptr); -} criHeapVirtualFunctionTable; - -#endif - - -/**************************************************************************** - * ֐̐錾 - * Function Declaration - ****************************************************************************/ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/*==========================================================================* - * CȕƏI - * Initialize and Finalize of Library - *==========================================================================*/ -/*JP - * \brief CRI HeapCȕ - * \ingroup CRIHEAP_BASIC - * \par : - * CRI HeapCugp邽߂ɕKvȏ֐łB
- * CRI Heapgpۂ͂炩ߖ{֐R[Kv܂B - * \sa criHeap_Finalize() - */ -/*EN - * \brief Initialize the heap manager. - * \ingroup CRIHEAP_BASIC - * \par Description: - * This function initializes the heap manager and prepares it to manage heaps. - * This function only has an effect the first time it is called in your program. - * Subsequent calls only increment an internal counter. This allows your - * program to call criHeap_Initialize() in pairs with criHeap_Finalize() - * throughout your program modules, and only the initial call to criHeap_Initialize() - * and the final call to criHeap_Finalize() will have any effect. - * \if ps2 - * \par PS2 only: - * This function does a sanity check to make sure that the size of the CriHeapObj - * data structure is a factor of 16. If it is not a factor of 16, this function - * hangs. - * \endif - * \sa criHeap_Finalize() - */ -void CRIAPI criHeap_Initialize(void); - -/*JP - * \brief CRI HeapCȕI - * \ingroup CRIHEAP_BASIC - * \par : - * CRI HeapCuI邽߂ɕKvȏI֐łB
- * CRI Heap̎gpIۂ͖{֐R[ĂB - * \sa criHeap_Initialize() - */ -/*EN - * \brief Finalize the heap manager. - * \ingroup CRIHEAP_BASIC - * \par Description: - * This function finalizes the heap manager. If the criHeap_Initialize() function - * is called n times, then the nth time that criHeap_Finalize() - * is called, this function invalidates any heaps currently in use. Calling - * any heap function after the nth call to criHeap_Finalize() will - * have unpredictable results. - * \sa criHeap_Initialize() - */ -void CRIAPI criHeap_Finalize(void); - -/*==========================================================================* - * nh̐E - *==========================================================================*/ -/*JP - * \brief CRI Heapnh̐ - * \ingroup CRIHEAP_BASIC - * \param ptr ̈̃|C^B - * \param size ̈̃TCYB - * \return CRI HeapnhB
Ɏsꍇ́ANULLԂ܂B - * \par : - * CRI Heapnh𐶐܂B
- * {֐ŗ^郁̈́ACRI Heapg̃nḧAP[g - * mۂ郁̈ƂȂ܂B
- * Ǘ̈܂ނ߁Ä悷ׂĂAP[goȂ_ɒӂĂB - * Ǘ̖̈ڈ́uPnhsizeof(CriHeapObj)v{uPAP[g - * sizeof(CriHeapBlock){eACgɕKvȃTCYvƂȂ܂B - * \code - * CriChar8 heap_buffer[0x2000]; - * CriHeap heap = criHeap_Create((void *)heap_buffer, sizeof(heap_buffer); - * \endcode - * \sa criHeap_Destroy() - */ -/*EN - * \brief Create a contiguous heap in memory. - * \ingroup CRIHEAP_BASIC - * \param ptr A pointer to the start of the memory region to use as a heap. - * \param size The size of the region to be used as a heap. - * \return A valid CriHeap handle if successful, or NULL if unsuccessful. - * \par Description: - * This function allows you to set aside a region of memory for this library's - * use as a "heap". Heap allocation is required before active playback - * can begin. - * This function will fail and return NULL if the size of the memory region - * is smaller than the CriHeapObj structure. - * \code - * CriChar8 heap_buffer[0x2000]; - * CriHeap heap = criHeap_Create((void *)heap_buffer, sizeof(heap_buffer); - * \endcode - * \sa criHeap_Destroy() - */ -CriHeap CRIAPI criHeap_Create(void *ptr, CriSint32 size); - -/*JP - * \brief XbhZ[tCRI Heapnh̐ - * \ingroup CRIHEAP_BASIC - * \param ptr ̈̃|C^B - * \param size ̈̃TCYB - * \return CRI HeapnhB
Ɏsꍇ́ANULLԂ܂B - * \par : - * CRI Heapnh𐶐܂B
- * {֐gpč쐬ꂽq[v́Ar䂪sȂ܂B
- * Xbh瓯ɎQƂq[v̍쐬ɂ́AcriHeap_Create֐pB - * \sa criHeap_Create(), criHeap_Destroy() - */ -/*EN - * \brief Create a contiguous heap in memory. - * \ingroup CRIHEAP_BASIC - * \param ptr A pointer to the start of the memory region to use as a heap. - * \param size The size of the region to be used as a heap. - * \return A valid CriHeap handle if successful, or NULL if unsuccessful. - * \par Description: - * This function creates a heap to use the static memory as dynamically allocatable memory. - * The heap created by using this function is not threadsafe. - * If heap will be accessed by multiple threads, you must create the heap by using the criHeap_Create function. - * \sa criHeap_Create(), criHeap_Destroy() - */ -CriHeap CRIAPI criHeap_CreateNoSerialize(void *ptr, CriSint32 size); - -/*JP - * \brief CRI Heapnh̉ - * \ingroup CRIHEAP_BASIC - * \param heap CRI HeapnhB - * \par : - * CRI Heapnh܂B
criHeap_Create() Ŏw肳ꂽ̈悪 - * ACRI Heapnh͖ƂȂ܂B - * \sa criHeap_Create() - */ -/*EN - * \brief Destroy a previously created heap. - * \ingroup CRIHEAP_BASIC - * \param heap A CriHeap handle previously created with criHeap_Create(). - * \par Description: - * This function frees all internal allocations previously performed on - * the heap and frees the memory. Internally, this function does in - * fact walk through the heap, finding and freeing all allocations, e.g. - * it is not stubbed. So calling this function on a trashed heap - * will have unpredictable results. - * \sa criHeap_Create() - */ -void CRIAPI criHeap_Destroy(CriHeap heap); - -/*==========================================================================* - * Allocation - *==========================================================================*/ -/*JP - * \brief ̃AP[gï̐[j - * \ingroup CRIHEAP_ALLOC - * \param heap CRI HeapnhB - * \param size AP[g郁̃TCYB - * \param name AP[g郁̖OBO̓fobOɎgp܂B - * \param align AP[g郁̃ACgB - * \return AP[gւ̃|C^B
AP[gɎsꍇNULLԂ܂B - * \par : - * ̈̐[mۂ郁AP[V֐łBq[v̈\ref block_fix "FixubN"쐬܂B
- * ̒fЉh߁ATCY^ACg̉ς\ref block_fix "FixubN"[TāAėp悤Ɏ݂܂Bꂪ‚Ȃꍇ́Agp̋󂫗̈i\ref block_free "FreeubN"j𕪊ă擾܂B - * \code - * CriChar8 heap_buffer[0x2000]; - * CriHeap heap = criHeap_Create((void *)heap_buffer, sizeof(heap_buffer); - * void *memptr = criHeap_AllocFix(heap, 0x100, "forTexture1", 64); - * \endcode - * \sa criHeap_AllocTemporary(), criHeap_Free() - */ -/*EN - * \brief Memory allocation (allocating from the top of the memory area) - * \ingroup CRIHEAP_ALLOC - * \param heap CRI Heap handle - * \param size Memory block size to be allocated - * \param name Memory block name, which is used on debugging - * \param align Memory block alignment - * \return A pointer to the allocated memory block.
Returns NULL if unsuccessful. - * \par Description: - * This function allocates a memory block from the top of the memory area and creates a \ref block_fix "Fix block" in the heap area.
- * To prevent memory fragmentation, a released \ref block_fix "Fix block" with the same size and alignment is searched for in the heap area from the top to the bottom and tries to reused the block. And if not found, an unused free block (\ref block_free "Free block") is divided and a new block is allocated. - * \code - * CriChar8 heap_buffer[0x2000]; - * CriHeap heap = criHeap_Create((void *)heap_buffer, sizeof(heap_buffer); - * void *memptr = criHeap_AllocFix(heap, 0x100, "forTexture1", 64); - * \endcode - * \sa criHeap_AllocTemporary(), criHeap_Free() - */ -void * CRIAPI criHeap_AllocFix(CriHeap heap, CriSint32 size, const CriChar8 *name, CriSint32 align); - -/*JP - * \brief ̃AP[gï̏I[j - * \ingroup CRIHEAP_ALLOC - * \param heap CRI HeapnhB - * \param size AP[g郁̃TCYB - * \param name AP[g郁̖OBO̓fobOɎgp܂B - * \param align AP[g郁̃ACgB - * \return AP[gւ̃|C^B
AP[gɎsꍇNULLԂ܂B - * \par : - * ̈̏I[mۂ郁AP[V֐łBq[v̈\ref block_temporary "TemporaryubN"쐬܂B
- * vTCY^ACgAP[g”\ȉς\ref block_temporary "TemporaryubN"I[TāA܂͍ėp悤Ɏ݂܂Bꂪ‚Ȃꍇ́Agp̋󂫗̈i\ref block_free "FreeubN"j𕪊ă擾܂B
- * q[v̈̏I[烁AP[g邽߁A[ł̒fЉhƂo܂B
- * ɁAꎞIɗp郁Ɏgp܂B - * \sa criHeap_AllocFix(), criHeap_Free() - */ -/*EN - * \brief Memory allocation (allocating from the tail of the memory area) - * \ingroup CRIHEAP_ALLOC - * \param heap CRI Heap handle - * \param size Memory block size to be allocated - * \param name Memory block name, which is used on debugging - * \param align Memory block alignment - * \return A pointer to the allocated memory block.
Returns NULL if unsuccessful. - * \par Description: - * This function allocates a memory block from the bottom of the memory area and creates a \ref block_temporary "Temporary block" in the heap area.
- * A released \ref block_temporary "Temporary block" available with the requested size and alignment is searched for in the heap area from the bottom and tries to divide and to reuse the block. And if not found, an unused free block (\ref block_free "Free block") is divided and a new block is allocated.
- * Allocating from the bottom of the heap area will prevent fragmentation in the top of the heap area.
- * Temporary block is mainly used for the memory area that is temporarily used. - * \sa criHeap_AllocFix(), criHeap_Free() - */ -void * CRIAPI criHeap_AllocTemporary(CriHeap heap, CriSint32 size, const CriChar8 *name, CriSint32 align); - -/* DYNAMIC (unuse) */ -//void * CRIAPI criHeap_AllocDynamic(CriHeap heap, CriSint32 size, const CriChar8 *name, CriSint32 align); - -void * CRIAPI criHeap_Alloc(CriHeap heap, CriSint32 size, const CriChar8 *name, CriSint32 align, CriSint32 type); - -/*==========================================================================* - * Free - *==========================================================================*/ -/*JP - * \brief ̃t[ - * \ingroup CRIHEAP_ALLOC - * \param heap CRI HeapnhB - * \param ptr AP[g̃|C^B - * \return t[ꂽTCYB - * \par : - * AP[gꂽt[܂B
- * \code - * void *memptr = criHeap_AllocFix(heap, 0x100, "forTexture1", 64); - * criHeap_Free(heap, memptr); - * \endcode - * \sa criHeap_AllocFix(), criHeap_AllocTemporary() - */ -/*EN - * \brief Memory deallocation - * \ingroup CRIHEAP_ALLOC - * \param heap CRI Heap handle - * \param ptr The pointer to the allocated memory block - * \return Deallocated memory block size - * \par Description: - * This function deallocates the allocated memory block.
- * \code - * void *memptr = criHeap_AllocFix(heap, 0x100, "forTexture1", 64); - * criHeap_Free(heap, memptr); - * \endcode - * \sa criHeap_AllocFix(), criHeap_AllocTemporary() - */ -CriSint32 CRIAPI criHeap_Free(CriHeap heap, void *ptr); - -/*==========================================================================* - * rp֐ - *==========================================================================*/ -CriSint32 CRIAPI criHeap_EnterCriticalSection(void); -CriSint32 CRIAPI criHeap_LeaveCriticalSection(void); - -/*==========================================================================* - * ̑̊֐ - *==========================================================================*/ -/* For only internal use */ -CriSint32 CRIAPI criHeap_SwitchAllocFunctions(CriHeap heap); - -/*==========================================================================* - * fobO֘A - *==========================================================================*/ -/*JP - * \brief s[NTCY̎擾 - * \ingroup CRIHEAP_DEBUG - * \param heap CRI HeapnhB - * \return gpꂽ̍őlB - * \par : - * ߋAgpꂽʂ̍őlԂ܂B
- * őlcriHeap_DebugResetPeakMemorySize() ŃZbg邱Ƃo܂B - * \sa criHeap_DebugResetPeakMemorySize() - */ -/*EN - * \brief Returns peak memory usage of the heap. - * \ingroup CRIHEAP_DEBUG - * \param heap The heap previously allocated by criHeap_Create(). - * \return The maximum number of bytes used by the heap. - * \par Description: - * The amount of memory used by these libraries is variable and depends - * on the number of simultaneous streams being read, the seek and error - * frequency within the stream being read, video resolution and other - * factors. This function allows you to tune the allocation of the heap - * to achieve a required performance level while allocating minimal - * heap space for this library. To get accurate readings, this function - * should typically be called just before criHeap_Destroy(), and after - * exercising all the video and audio functions in your program. - */ -CriSint32 CRIAPI criHeap_DebugGetPeakMemorySize(CriHeap heap); - -/*JP - * \brief s[NTCỸZbg - * \ingroup CRIHEAP_DEBUG - * \param heap CRI HeapnhB - * \par : - * s[NTCYZbg܂B - * \sa criHeap_DebugGetPeakMemorySize() - */ -/*EN - * \brief Reset peak memory size - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heap handle - * \par Description: - * The peak memory size is reset. - * \sa criHeap_DebugGetPeakMemorySize() - */ -void CRIAPI criHeap_DebugResetPeakMemorySize(CriHeap heap); - -/*JP - * \brief ubN̎擾 - * \ingroup CRIHEAP_DEBUG - * \param heap CRI HeapnhB - * \return ubNB - * \par : - * AP[gꂽ̃ubNԂ܂B
- * CRI Heapnh͖gp̃ubNP‘݂ - * ƂȂ܂B܂At[ꂽfЉꂽubN̐ - * ܂݂܂B - * \sa criHeap_DebugGetUsedBlocks() - */ -/*EN - * \brief Get number of allocated memory blocks - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heap handle - * \return Number of allocated memory blocks - * \par Description: - * The number of allocated memory blocks is returned.
- * One unused memory block exists right after CRI Heap handle creation. - * The number of released fragmented memory blocks is also included. - * \sa criHeap_DebugGetUsedBlocks() - */ - CriSint32 CRIAPI criHeap_DebugGetNumBlocks(CriHeap heap); - -/*JP - * \brief gpubN̎擾 - * \ingroup CRIHEAP_DEBUG - * \param heap CRI HeapnhB - * \return gpubNB - * \par : - * AP[gĂ郁ubN̐Ԃ܂B - * \sa criHeap_DebugGetNumBlocks() - */ -/*EN - * \brief Get number of used memory blocks - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heap - * \return Number of used memory blocks - * \par Description: - * The number of used memory blocks is returned.
- * \sa criHeap_DebugGetNumBlocks() - */ -CriSint32 CRIAPI criHeap_DebugGetUsedBlocks(CriHeap heap); - -/*JP - * \brief ubN̎擾 - * \ingroup CRIHEAP_DEBUG - * \param heap CRI HeapnhB - * \param ptr AP[g̃|C^B - * \return ubNB - * \par : - * AP[gɐݒ肵ubNւ̃|C^Ԃ܂B
- */ -/*EN - * \brief Get memory block name - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heap - * \param ptr A pointer to the allocated memory block - * \return Memory block name - * \par Description: - * The pointer to the memory block name specified on allocation is returned.
- */ -CriChar8 * CRIAPI criHeap_DebugGetBlockName(CriHeap heap, void *ptr); - -/* ubNԍ̎擾 */ -//CriSint32 CRIAPI criHeap_DebugGetBlockNumberFromPointer(CriHeap heap, void *ptr); - -/* ubN̎擾 */ -//void CRIAPI criHeap_DebugGetBlockInformation(CriHeap heap, -// CriSint32 blocknumber, CriHeapBlock *heapblock); - -/* ubN̕\ */ -//void CRIAPI criHeap_DebugPrintBlockInformation(CriHeap heap, -// CriSint32 blocknumber, CriHeapBlock *heapblock); - -/*JP - * \brief ubN̕\ - * \ingroup CRIHEAP_DEBUG - * \param heap CRI HeapnhB - * \par : - * ݂̃ubN\܂B
- * printf֐Ȃǂ̕Wo͂ɕ\s܂B - */ -/*EN - * \brief Print memory block information - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heap - * \par Description: - * The current memory block information is displayed.
- * It is displayed on the standard output for the printf function. - */ - void CRIAPI criHeap_DebugPrintBlockInformationAll(CriHeap heap); - -/*JP - * \brief AP[gTCY̎擾 - * \ingroup CRIHEAP_DEBUG - * \param heap CRI HeapnhB - * \par : - * ݂̃AP[gTCY̍vlԂ܂B - */ -/*EN - * \brief Get total allocation size - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heap - * \par Description: - * The total size of allocated memory blocks is returned. - */ -CriSint32 CRIAPI criHeap_DebugGetTotalAllocSize(CriHeap heap); - -/* t[TCY̎擾 */ -//CriSint32 CRIAPI criHeap_DebugGetTotalFreeSize(CriHeap heap); - -/* AP[gTCY̎擾(^Cv) */ -CriSint32 CRIAPI criHeap_DebugGetAllocSize(CriHeap heap, CriSint32 type); - -/* q[vwb_TCY̎擾 */ -CriSint64 CRIAPI criHeap_DebugGetHandleHeaderSize(CriHeap heap); - -/* ubNwb_TCY̎擾 ptr: Allocated Pointer */ -CriSint64 CRIAPI criHeap_DebugGetMemBlockHeaderSize(void *ptr); - -/* ljŕKvƂȂTCY̍ől */ -CriSint32 CRIAPI criHeap_DebugGetWorstExtraSize(CriSint32 alignment); - -/* criHeap_AllocFixŃAP[g”\ȃTCY */ -CriSint32 CRIAPI criHeap_DebugGetFixAllocatableSize(CriHeap heap, CriSint32 alignment); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#ifdef XPT_TGT_PC -#pragma pack(pop) -#endif - -#endif // _CRI_HEAP_H_INCLUDED - -/* end of file */ diff --git a/3rdParty/cri/XboxOne/include/cri_movie.h b/3rdParty/cri/XboxOne/include/cri_movie.h deleted file mode 100644 index 1c0db2f8..00000000 --- a/3rdParty/cri/XboxOne/include/cri_movie.h +++ /dev/null @@ -1,4402 +0,0 @@ -/**************************************************************************** - * - * CRI Middleware SDK - * - * Copyright (c) 2006-2013 CRI Middleware Co., Ltd. - * - * Library : CRI Movie - * Module : Library User's Header - * File : cri_movie.h - * Date : 2013-11-27 - * Version : (see CRIMOVIE_VER) - * - ****************************************************************************/ -/*! - * \file cri_movie.h - */ -#ifndef CRI_MOVIE_H_INCLUDED /* Re-definition prevention */ -#define CRI_MOVIE_H_INCLUDED - -/* Version No. */ -#define CRIMOVIE_VER "3.50" -#define CRIMOVIE_NAME "CRI Movie" - -/*************************************************************************** - * Include file - ***************************************************************************/ -#include -#include -#include -#include -#include -#include - -/*************************************************************************** - * MACRO CONSTANT - ***************************************************************************/ -/*EN - * \brief Maximum length of a filename that can be opened by EasyPlayer - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetFile() - */ -/*JP - * \brief EasyPlayerɎw”\ȃt@C̍ő咷 - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetFile() - */ -#define CRIMV_MAX_FILE_NAME (256) - -/*EN - * \brief Default audio track setting used by AttachSubAudioInterface(), ReplaceCenterVoice() - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::ReplaceCenterVoice(), CriMvEasyPlayer::AttachSubAudioInterface() - */ -/*JP - * \brief TuI[fBIi܂̓Z^[{CXj̃ftHgl - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::ReplaceCenterVoice(), CriMvEasyPlayer::AttachSubAudioInterface() - */ -#define CRIMV_CENTER_VOICE_OFF (-1) - - -/*************************************************************************** - * Variable Declaration - ***************************************************************************/ -namespace CriMv { - extern CriError ErrorContainer; -} - -/*************************************************************************** - * Prototype Functions - ***************************************************************************/ -/*EN - * \brief CRI Movie Namespace - * \ingroup MDL_MV_BASIC - * \par - * Namespace for all CRI Movie methods, constants, and declarations - */ -/*JP - * \brief CRI Movie Namespace - * \ingroup MDL_MV_BASIC - * \par - * Namespace for all CRI Movie methods, constants, and declarations - */ -namespace CriMv { - - /*EN - * \brief Returns the version number and build information of CRI Movie - * \param none - * \return A string constant - * - * Returns the version number and build information of CRI Movie as a constant - * string, in the form - * - * "CRI Movie/{PLATFORM} {VERSION} Build:{BUILD DATE}" - */ - /*JP - * \brief CRI Moviẽo[WԍrhԂ܂B - * \return Cu񕶎 - * - */ - const CriChar8* CRIAPI GetLibraryVersionString(void); - - /*EN - * \brief Initialize the CRI Movie library - * \param err Optional error code - * - * Does one-time initialization of the CRI Movie library.
- * This function must be successfully called before calling CriMvEasyPlayer::Create().
- *
- * In general, all CRI Movie APIs are available after calling CriMv::Initialize(), - * until CriMv::Finalize() is called. However, there are some methods that set options - * for the library as a whole which must be called before CriMv::Initialize():
- *
- * It is safe to call CriMv::Initialize() more than once, as long as your application calls - * CriMv::Finalize() once for each call to CriMv::Initialize(). Multiple calls will not - * have an effect on the library, other than to increment or decrement an internal counter. - * - * \sa CriMv::Finalize() - */ - /*JP - * \brief CRI MovieCȕ - * \param err G[iȗj - * - * CRI Movie Cu܂B
- * CriMvEasyPlayer::Create ֐ɌĂяoĂB
- *
- * ƂđSĂ CRI Movie Cu֐͏AI֐Ăяo܂ł̊Ԃɂ̂ݎgp܂B
- * A‚̐ݒ֐͏֐ɌĂяoKv̂܂B - * ڍׂ͊eݒ֐̐QƂĂB - *
- * ֐𕡐ĂяoꍇAQڈȍ~̌Ăяoł͌Ăяo񐔂L^邾ōď͍s܂B
- * ̏ꍇAIsɂ͓񐔂I֐ĂяoKv܂B - * ֐ƏI֐͕K΂ŌĂяo悤ɎĂB
- * - * \sa CriMv::Finalize() - */ - void CRIAPI Initialize(CriError &err = CriMv::ErrorContainer); - - /* MEMO: - * If an application calls this function instead of CriMv::Initialize(), - * an application need to call CriMv::SetupMovieHandleWork() before CriMv::InitializeMana(). - */ - void CRIAPI InitializeMana(CriError &err = CriMv::ErrorContainer); - - /*EN - * \brief Initialize 32bit ARGB frame conversion - * - * This function initializes 32bit ARGB frame conversion.
- * When an application uses CriMvEasyPlayer::GetFrameOnTimeAs32bitARGB(), - * please call this function after CriMv::Initialize().
- * - * \sa CriMvEasyPlayer::GetFrameOnTimeAs32bitARGB() - */ - /*JP - * \brief 32bitARGBpt[ϊ̏ - * - * 32bitARGBpt[ϊ܂B
- * CriMvEasyPlayer::GetFrameOnTimeAs32bitARGB() gpꍇ CRI Movie Cu - * ɕKĂяoĂB
- * - * \sa CriMvEasyPlayer::GetFrameOnTimeAs32bitARGB() - */ - void CRIAPI InitializeFrame32bitARGB(void); - -#if defined(XPT_TGT_IPHONE) || defined(XPT_TGT_WINMO) || defined(XPT_TGT_ANDROID) || defined(XPT_TGT_CQSH2A) || defined(XPT_TGT_ACRODEA) || defined(XPT_TGT_NACL) || defined(XPT_TGT_SH7269) || defined(XPT_TGT_PC) || defined(XPT_TGT_TRGP6K) - void CRIAPI InitializeFrameRGB565(void); -#endif - - /*EN - * \brief De-initializes the CRI Movie library - * \param err Optional error code - * - * This function finalize whole CRI Movie library.
- * An application needs to destroy all CriMvEasyPlayer handles and decoding threads before callign CriMv::Finalize().
- *
- * In principle, all CRI Movie library APIs are enabled after CriMv::Initialize() until CriMv::Finalize().
- * But there are some APIs for parameter setting, which need to be called after CriMv::Finalize(). - * For details, refer to each explanations of setting APIs. - *
- * \remarks - * CriMv::Finalize() must be called once for each call to CriMv::Initialize(). When the - * internal initialization count reaches 0, the library will be finalized. - * - * \sa CriMv::Initialize() - */ - /*JP - * \brief CRI MovieCȕI - * \param err G[iȗj - * - * CRI Movie CuI܂B
- * ̊֐ĂяoOɁASĂ CriMvEasyPlayer nhуfR[hXbhjĂB
- *
- * ƂđSĂ CRI Movie Cu֐͏AI֐Ăяo܂ł̊Ԃɂ̂ݎgp܂B
- * A‚̐ݒ֐͏I֐ɌĂяoKv̂܂B - * ڍׂ͊eݒ֐̐QƂĂB - *
- * ֐𕡐ĂяoꍇAIsɂ͓񐔂I֐ĂяoKv܂B - * ֐ƏI֐͕K΂ŌĂяo悤ɎĂB
- * - * \sa CriMv::Initialize() - */ - void CRIAPI Finalize(CriError &err = CriMv::ErrorContainer); - -#if !defined(XPT_TGT_EE) - /*EN - * \brief Calculates the work buffer size needed for the given number of movie handles - * \param max_num Maximum number of movie handles desired - * \param err Optional error code - * \return The necessary work buffer size, in bytes - * - * Each active movie handle requires an internal work buffer. If your application - * needs to have multiple movies open at one time, it should determine how many handles - * it needs, allocate a buffer of the size returned by this function, and pass it to - * CriMv::SetupMovieHandleWork().
- * - * Each CriMvEasy object uses a movie handle. Alpha movie playback uses two handles. - * If you need to play aplha movies, be sure to double the number of handles requested. - * - * \remarks - * The number of movie handles must be set before calling CriMv::Initialize(). - * - * \sa CriMv::SetupMovieHandleWork() - */ - /*JP - * \brief }`nhp[Nobt@TCY̌vZ - * \param max_num őnhis[r̍Đj - * \param err G[iȗj - * \return [NTCY - * - * Ɏgp CriMvEasyPlayer nh̍ő吔𑝉ꍇɕKvȃ[Nobt@ - * TCYvZ܂B - * - * At@[rĐƃnhQ܂B - * ̃At@[rĐsꍇ́Aőnh͔{ɂĎw肵ĂB - * - * \sa CriMv::SetupMovieHandleWork() - */ - CriUint32 CRIAPI CalcMovieHandleWork(CriUint32 max_num, CriError &err = CriMv::ErrorContainer); - - /*EN - * \brief Increases the default number of available movie handles - * \param max_num Maximium number of movie handles - * \param workbuf Work buffer - * \param worksize Size of work buffer - * \param err Optional error code - * - * Call this function if your application needs to increase the maximum number of open movies - * beyond the default. Note that playing an alpha movie requires a second handle.
- * - * The default number of movie handles depends on the platform.
- * - * The work buffer must be allocated based on the size returned by CriMv::CalcMovieHandleWork().
- * - * \remarks - * This function must be called before calling CriMv::Initialize(). - * - * \sa CriMv::CalcMovieHandleWork() - */ - /*JP - * \brief }`nhp[Nobt@̐ݒ - * \param max_num őnhis[r̍Đj - * \param workbuf [Nobt@AhX - * \param worksize [Nobt@TCY - * \param err G[iȗj - * - * Ɏgp CriMvEasyPlayer nh̍ő吔𑝉邽߂̃[Nobt@ݒ肵܂B - * ȂA[Nobt@w肵Ȃꍇ̃nh͋@ɂĈقȂ܂B - * - * [Nobt@̐ݒ́A CriMv::Initialize() ̌ĂяoɎsĂB - * - * \sa CriMv::CalcMovieHandleWork() - */ - void CRIAPI SetupMovieHandleWork(CriUint32 max_num, void *workbuf, CriUint32 worksize, CriError &err = CriMv::ErrorContainer); - - /*EN - * \brief Get max number of movie handles - * \param err Optional error code - * \return Max number of movie handles you set by CriMv::SetupMovieHandleWork(). - * - * Returns the maximum number of movie handles that are available to CRI Movie.
- * - * Note that this is not necessarily equal to the number of movies that can be - * opened at a time. In general, each movie will use one handle; however, - * alpha channel movies uses two handles. - * - * \sa CriMv::SetupMovieHandleWork(), CriMv::CalcMovieHandleWork() - */ - /*JP - * \brief őnh̎擾 - * \param err G[iȗj - * \return CriMv::SetupMovieHandleWork() Őݒ肵őnh - * - * CriMv::CalcMovieHandleWork() ōőnh𑝉ꍇɁA - * ݒ肵őnh擾܂B - * - * \sa CriMv::SetupMovieHandleWork(), CriMv::CalcMovieHandleWork() - */ - CriUint32 CRIAPI GetMaxNumberOfHandles(CriError &err = CriMv::ErrorContainer); -#endif - - /* For Sofdec2 */ - CriSint32 CRIAPI CalcHandleWorkSize(CriMvHandleConfig *config, CriError &err = CriMv::ErrorContainer); - void CRIAPI SetDelayDestroySubmodules(CriBool sw); -} - -/*************************************************************************** - * CLASS - ***************************************************************************/ -/*EN - * \brief File Reading Interface Class for EasyPlayer - * \ingroup MDL_IF_READER - * \par - * You can implement your own streaming filesystem for movie playback by deriving - * from this class.
- * - * Pass an instance of this subclass to CriMvEasyPlayer::Create().
- * - * This class is designed for asynchronous operation. All functions are pure virtual. - * - * \sa CriMvEasyPlayer::Create() - */ -/*JP - * \brief t@Cǂݍ݃C^tF[X for EasyPlayer - * \ingroup MDL_IF_READER - * - * ̃NX`邱ƂŁAÕt@CVXegEasyPlayer - * Xg[~OД\ɂȂ܂B
- * SĂ̊֐͏z֐ƂĒ`Ă̂ŁASĂ̊֐KĂB - * - * \sa CriMvEasyPlayer::Create() - */ -class CriMvFileReaderInterface -{ -public: - /*EN Status of an asynchronous operation */ - /*JP 񓯊Xe[^X */ - enum AsyncStatus { - ASYNC_STATUS_STOP, /*EN< No action */ - /*JP< ĂȂԁB*/ - ASYNC_STATUS_BUSY, /*EN< Currently processing */ - /*JP< */ - ASYNC_STATUS_COMPLETE, /*EN< Processing completed */ - /*JP< I */ - ASYNC_STATUS_ERROR, /*EN< An error occured */ - /*JP< G[ */ - - /* Keep enum 4bytes */ - ASYNC_STATUS_MAKE_ENUM_SINT32 = 0x7FFFFFFF - }; - /*EN Offset values for Seek() */ - /*JP V[NJnʒu */ - enum SeekOrigin { - SEEK_FROM_BEGIN, /*EN< Start of file */ - /*JP< t@C擪 */ - SEEK_FROM_CURRENT, /*EN< Current position in file */ - /*JP< t@Č݈ʒu */ - SEEK_FROM_END, /*EN< End of file */ - /*JP< t@CI[ */ - - /* Keep enum 4bytes */ - SEEK_FROM_MAKE_ENUM_SINT32 = 0x7FFFFFFF - }; - /*EN - * \brief Opens a file asynchronously - * \param fname Name of file to open - * - * Initiates a file open request, and returns immediately. - * - * To determine success or failure, call CriMvFileReaderInterface::GetOpenStatus().
- * - * \remarks - * CRI Movie may call CriMvFileReaderInterface::Read() and CriMvFileReaderInterface::Close() - * before CriMvFileReaderInterface::GetOpenStatus() returns ASYNC_STATUS_COMPLETE. - * - * \sa CriMvFileReaderInterface::GetOpenStatus() - */ - /*JP - * \brief t@Cɂt@CI[v(A) - * \param fname t@C̕ - * - * t@CwŃt@C̃I[vvo܂B
- * ̊֐͑Å֐ƂČĂяo܂B
- * I[vIǂ CriMvFileReaderInterface::GetOpenStatus֐ - * Ń`FbNł悤ɂĂB
- * CRI Movie Cu̓I[vIi CriMvFileReaderInterface::GetOpenStatus֐ - * ASYNC_STATUS_COMPLETEԂjOɁA[hAN[Y̗vĂяo”\܂B - * - * \sa CriMvFileReaderInterface::GetOpenStatus() - */ - /* pure */ virtual void Open(CriChar8 *fname)=0; - - /*EN - * \brief Closes a file asynchronously - * - * Initiates a file close request, and returns immediately.
- * - * To determine success or failure, call CriMvFileReaderInterface::GetCloseStatus().
- * - * \sa CriMvFileReaderInterface::GetCloseStatus() - */ - /*JP - * \brief t@C̃N[Y(A) - * - * I[vς݂̃t@C̃N[Yvo܂B
- * ̊֐͑Å֐ƂČĂяo܂B
- * N[YIǂ CriMvFileReaderInterface::GetCloseStatus() - * Ń`FbNł悤ɂĂB - * - * \sa CriMvFileReaderInterface::GetCloseStatus() - */ - /* pure */ virtual void Close(void)=0; - - /*EN - * \brief Reads from a file - * \param buffer Buffer to read into - * \param req_size Size of the buffer - * - * Initiates a file read request, and returns immediately.
- * - * The buffer must be available and writable until the read request completes.
- * - * To determine success or failure, call CriMvFileReaderInterface::GetReadStatus().
- * - * To determine the number of bytes actually read, call CriMvFileReaderInterface::GetReadSize() - * after CriMvFileReaderInterface::GetReadStatus() has returned ASYNC_STATUS_COMPLETE. - * - * \remarks - * CRI Movie may call CriMvFileReaderInterface::Close() before - * CriMvFileReaderInterface::GetReadStatus() returns ASYNC_STATUS_COMPLETE. - * - * \sa CriMvFileReaderInterface::GetReadStatus(), CriMvFileReaderInterface::GetReadSize() - */ - /*JP - * \brief ǂݍݗviAj - * \param buffer oobt@̃|C^BǂݍݗvTCY𖞂̃obt@mۂĂKv܂B - * \param req_size ǂݍݗvTCYBPʂ̓oCgPʂłB - * - * t@C̓ǂݍݗvo܂B
- * ̊֐͑Å֐ƂČĂяo܂B
- * [hIǂ CriMvFileReaderInterface::GetReadStatus() - * Ń`FbNł悤ɂĂB
- * CRI Movie Cu̓[hIi CriMvFileReaderInterface::GetReadStatus() - * ASYNC_STATUS_COMPLETEԂjOɁAN[YvĂяo”\܂B
- * ̊֐͓ǂݍ񂾃TCYԂ܂B
- * ǂݍݍς݃TCÝA CriMvFileReaderInterface::GetReadStatus() ASYNC_STATUS_COMPLETE - * ԂƂ CriMvFileReaderInterface::GetReadSize()ŕԂ悤ɎĂB - * - * \sa CriMvFileReaderInterface::GetReadStatus(), CriMvFileReaderInterface::GetReadSize() - */ - /* pure */ virtual void Read(CriUint8 *buffer, CriSint64 req_size)=0; - - /*EN - * \brief Gets asynchronous status of a call to CriMvFileReaderInterface::Open() - * - * \return Status of the call - * - * While the Open() call is in process, this will return ASYNC_STATUS_BUSY.
- * If the call fails, this will return ASYNC_STATUS_ERROR.
- * On success, this will return ASYNC_STATUS_COMPLETE.
- * - * \sa CriMvFileReaderInterface::Open() - */ - /*JP - * \brief I[vR}h̏Ԏ擾 - * \return I[vR}h̏ԁB - * - * CriMvFileReaderInterface::Open֐̏Ԃ擾܂B - * - * \sa CriMvFileReaderInterface::Open() - */ - /* pure */ virtual CriMvFileReaderInterface::AsyncStatus GetOpenStatus(void)=0; - - /*EN - * \brief Gets asynchronous status of a call to CriMvFileReaderInterface::Close() - * - * \return Status of the call - * - * While the Close() call is in process, this will return ASYNC_STATUS_BUSY.
- * If the call fails, this will return ASYNC_STATUS_ERROR.
- * On success, this will return ASYNC_STATUS_COMPLETE.
- * - * \sa CriMvFileReaderInterface::Close() - */ - /*JP - * \brief N[YR}h̏Ԏ擾 - * \return N[YR}h̏ԁB - * - * CriMvFileReaderInterface::Close֐̏Ԃ擾܂B - * - * \sa CriMvFileReaderInterface::Close() - */ - /* pure */ virtual CriMvFileReaderInterface::AsyncStatus GetCloseStatus(void)=0; - - /*EN - * \brief Gets asynchronous status of a call to CriMvFileReaderInterface::Read() - * - * \return Status of the call - * - * While the Read() call is in process, this will return ASYNC_STATUS_BUSY.
- * If the call fails, this will return ASYNC_STATUS_ERROR.
- * On success, this will return ASYNC_STATUS_COMPLETE.
- * - * \sa CriMvFileReaderInterface::Read() - */ - /*JP - * \brief [hR}h̏Ԏ擾 - * \return [hR}h̏ԁB - * - * CriMvFileReaderInterface::Read֐̏Ԃ擾܂B - * - * \sa CriMvFileReaderInterface::Read() - */ - /* pure */ virtual CriMvFileReaderInterface::AsyncStatus GetReadStatus(void)=0; - - /*EN - * \brief Gets the number of bytes read by a successful call to CriMvFileReaderInterface::Read() - * - * \return Number of bytes read - * - * Once CriMvFileReaderInterface::GetReadStatus() returns ASYNC_STATUS_COMPLETE, this - * function can be called to determine the number of bytes read by - * CriMvFileReaderInterface::Read().
- * - * If no call to Read() has been made, this function will return 0.
- * - * If called multiple times after completing the read, the same value will be returned each time. - * - * \sa CriMvFileReaderInterface::Read(), CriMvFileReaderInterface::GetReadStatus() - */ - /*JP - * \brief Oǂݍݗvɑ΂ǂݍ݊TCY - * \return ǂݍ݊TCYBPʂByteB - * - * O̓ǂݍݗvɑ΂ēǂݍ݊TCYԂ܂B - * ܂ǂݍ݂PxvĂȂꍇ͂OԂ܂B - * ǂݍ݊ɌJԂ̊֐Ăяoꂽꍇ́AׂēlԂ܂B - * - * \sa CriMvFileReaderInterface::Read(), CriMvFileReaderInterface::GetReadStatus() - */ - /* pure */ virtual CriSint64 GetReadSize(void)=0; - - /*EN - * \brief Seeks to a new position in the file - * - * \param size Number of bytes to seek relative to \a offset - * \param offset Starting position of seek - * \return The offset, in bytes, from the previous file position. - * - * If \a offset is SEEK_FROM_BEGIN, seeking will start from the beginning of the file.
- * If \a offset is SEEK_FROM_CURRENT, seeking will start from the current file position.
- * If \a offset is SEEK_FROM_END, seeking will start from the end of the file.
- * - * \sa CriMvFileReaderInterface::SeekOrigin - */ - /*JP - * \brief V[N - * \param size V[NTCY - * \param offset V[N̊Jnʒu - * \return ۂɃV[NBBytePʁB - * - * \sa CriMvFileReaderInterface::SeekOrigin - * - */ - /* pure */ virtual CriSint64 Seek(CriSint64 size, CriMvFileReaderInterface::SeekOrigin offset)=0; - - /*EN - * \brief Gets the file size - * - * \return File size, in bytes - * - * This function can safely be called once CriMvFileReaderInterface::Open() has completed - * successfully. - * - * \sa CriMvFileReaderInterface::Open(), CriMvFileReaderInterface::GetOpenStatus() - */ - /*JP - * \brief t@CTCY̎擾 - * \return t@CTCY[byte]. - * - * ̊֐̓t@CI[v̏IɌĂяo܂B - * - * \sa CriMvFileReaderInterface::Open(), CriMvFileReaderInterface::GetOpenStatus() - */ - /* pure */ virtual CriSint64 GetFileSize(void)=0; - -protected: - virtual ~CriMvFileReaderInterface(void) {} -}; - -/*EN - * \brief Sound Interface Class for EasyPlayer - * \ingroup MDL_IF_SOUND - * - * \par - * A class derived from CriMvSoundInterface is required in order to play sound in CRI Movie. - * Pass an instance of this subclass to CriMvEasyPlayer::Create().
- * - * If you do not need audio output, you can pass NULL instead. However, if you do, - * you can not use a movie timer of type MVEASY_TIMER_AUDIO. See CriMvEasyPlayer::SetMasterTimer() - * for more details.
- * - * Sound data must be provided in either 32 or 16 bit PCM format. - * - * All functions are pure virtual. - * - * \sa CriMvEasyPlayer::Create(), CriMvEasyPlayer::SetMasterTimer(), CriMvEasyPlayer::TimerType - */ -/*JP - * \brief TEho̓C^tF[X - * \ingroup MDL_IF_SOUND - * - * \sa CriMvEasyPlayer::Create(), CriMvEasyPlayer::SetMasterTimer(), CriMvEasyPlayer::TimerType - */ -class CriMvSoundInterface -{ -public: - /*EN - * \brief The status of the Sound Module - * - * This is the return value of CriMvSoundInterface::GetStatus().
- * - * After CriMvSoundInterface::Start() is called, the state transitions to MVEASY_SOUND_STATUS_EXEC.
- * While the state is MVEASY_SOUND_STATUS_EXEC, the sound module calls the callback function - * to retrieve sound data as needed.
- * When the EasyPlayer is stopped, or transits to MVEASY_STATUS_PLAYEND, - * CRI Movie will call CriMvSoundInterface::Stop(). Then, CRI Movie waits for - * CriMvSoundInterface::GetStatus() to return MVEASY_SOUND_STATUS_STOP, - * and calls CriMvSoundInterface::DestroyOutput(). - * - * \sa CriMvSoundInterface::GetStatus(), CriMvSoundInterface::Start(), - * CriMvSoundInterface::Stop(), CriMvSoundInterface::DestroyOutput() - */ - /*JP - * \brief TEhW[̏ - * - * TEhW[̏Ԃ\񋓌^łB
- * CriMvEasyPlayer::GetStatus() ̊֐lłB
- * CriMvSoundInterface::Start() ĂяoMVEASY_SOUND_STATUS_EXECԂɂȂ܂B
- * MVEASY_SOUND_STATUS_EXECԂ̊Ԃ́ATEho̓W[̓R[obN֐Ăяo܂B
- * CRI Movie Cu͍ĐI܂͍Đ~w󂯂ꍇA܂ CriMvSoundInterface::Stop()Ăяo܂B
- * ̌ASTOPԂɂȂ̂҂Ă CriMvSoundInterface::DestroyOutput()Ăяo܂B - * - * \sa CriMvSoundInterface::GetStatus(), CriMvSoundInterface::Start(), - * CriMvSoundInterface::Stop(), CriMvSoundInterface::DestroyOutput() - */ - enum Status { - MVEASY_SOUND_STATUS_STOP, /*EN< No sound processing is happening. */ - /*JP< CRI Movie ̃TEho͂ĂȂ */ - MVEASY_SOUND_STATUS_EXEC, /*EN< Sound data is being retrieved and processed. */ - /*JP< CRI Movie ̃TEho͒ */ - MVEASY_SOUND_STATUS_ERROR, /*EN< An error has occurred. */ - /*JP< G[ */ - - /* Keep enum 4bytes */ - MVEASY_SOUND_STATUS_MAKE_ENUM_SINT32 = 0x7FFFFFFF - }; - - /*EN - * \brief PCM audio data format - * - * CRI Movie only operates on PCM encoded data. Two formats are supported: 32 bit floating - * point values, and 16 bit integer values. - * - * Return one of these values from CriMvSoundInterface::GetPcmFormat(). - * According to the returned format, CRI Movie calls a SetCallback for the specified PCM format. - * - * \sa CriMvSoundInterface::GetPcmFormat(), CriMvSoundInterface::SetCallbackGetFloat32PcmData(), - * CriMvSoundInterface::SetCallbackGetSint16PcmData() - */ - /*JP - * \brief PCMf[^tH[}bg - * - * PCM̏o̓tH[}bgPcmFormat^Œ`ꂽꂩłȂ΂܂B
- * EasyPlayer CriMvSoundInterface::GetPcmFormat()Ŏ擾łf[^^̂ݎgp܂B
- * AvP[V͂̃NX̑SĂ̊֐Ȃ΂Ȃ̂ŁAgȂtH[}bg - * ̃R[obNo^֐̓J֐ƂĎĂB - * - * \sa CriMvSoundInterface::GetPcmFormat(), CriMvSoundInterface::SetCallbackGetFloat32PcmData(), - * CriMvSoundInterface::SetCallbackGetSint16PcmData() - */ - enum PcmFormat { - MVEASY_PCM_FLOAT32, /*EN< PCM data is in 32 bit floating point format. */ - /*JP< 32bit ^PCMtH[}bg */ - MVEASY_PCM_SINT16, /*EN< PCM data is in 16 bit integer format. */ - /*JP< 16bit ^PCMtH[}bg */ - - /* Keep enum 4bytes */ - MVEASY_PCM_MAKE_ENUM_SINT32 = 0x7FFFFFFF - }; - - /*EN - * \brief Creates a sound output module - * \param heap Handle to a CriHeap object - * \param channel Number of sound channels (1 = monaural, 2 = stereo, 6 = 5.1ch) - * \param samplerate Sample rate of audio data (ex. 48000 = 48k) - * \return TRUE if the sound module was created successfully - * \return FALSE if there was an error - * - * Creates a CRI Movie sound output module and prepares it for use. Memory for the module - * is taken from the provided CriHeap object.
- * - * CRI Movie calls this method once it has determined that a movie has an active audio track - * and has analyzed the number of channels (mono, stereo, 5.1ch, etc.) and the sample rate. - * - */ - /*JP - * \brief TEho͂̍쐬 - * \param heap nh - * \param channel o͂TEh̃`l (1=monaural, 2=stereo, 6=5.1ch) - * \param samplerate TvO[g (ex. 48k = 48000) - * \return 쐬ʁB̏ꍇTRUEAs̏ꍇFALSEԂ܂B - * - * TEho͂쐬܂B
- * ̊֐ CRI Movie ĐTEh肵ƂɁÃTEh̃`l - * TvO[gƂĎs܂B - * - */ - /* pure */ virtual CriBool CreateOutput(CriHeap heap, CriUint32 channel, CriUint32 samplerate)=0; - - /*EN - * \brief Destroys the sound output module - * - * Deletes the sound output module that was created by - * CriMvSoundInterface::CreateOutput().
- * - * CRI Movie calls this method once CriMvSoundInterface::GetStatus() returns MVEASY_SOUND_STATUS_STOP. - * - */ - /*JP - * \brief TEho͂̔j - * - * TEho͂j܂B
- * ̊֐̓TEho͂ MVEASY_SOUND_STATUS_STOP ԂɂȂɌĂяo܂B - * - */ - /* pure */ virtual void DestroyOutput(void)=0; - - /*EN - * \brief Gets the PCM format of audio data - * \return The type of PCM format supported by this CriMvSoundInterface instance - * - * CRI Movie supports audio data in one of two PCM formats: 32 bit floating point (MVEASY_PCM_FLOAT32) - * or 16 bit integer (MVEASY_PCM_SINT16). EasyPlayer uses the return value from this method to - * determine which format is being used, and will call the appropriate callback function to retrieve - * data samples. - * - * \sa CriMvSoundInterface::PcmFormat - */ - /*JP - * \brief PCMf[^tH[}bg̎擾 - * \return CriMvSoundInterface gpPCMtH[}bgԂ܂B - * - * EasyPlayer͂̊֐ɂāAo͂PCMtH[}bg𔻒f܂B - * - * \sa CriMvSoundInterface::PcmFormat - */ - /* pure */ virtual PcmFormat GetPcmFormat(void)=0; - - /*EN - * \brief Sets the callback function for retrieving 32 bit floating point PCM sound samples - * \param func Function that is called when CriMvSoundInterface gets PCM data (32bit float) - * \param obj Pointer to user-specifed data, passed as the first argument to the callback - * - * Sets a function that CriMvSoundInterface will call when it needs audio data in 32 bit floating point - * PCM format. This callback function takes 4 arguments:
- * - * - \a obj: The user-specified \a obj parameter passed to SetCallbackGetFloat32PcmData().
- * - \a nch: The number of audio channels. Mono is 1, stereo is 2, 5.1 channel is 6.
- * - \a pcmbuf: An array of buffers to hold the returned PCM data. There must be one element of - * this array for each channel.
- * - \a req_nsmpl: The number of samples requested. Each buffer must be large enough to hold this - * many samples (i.e. \a nch * \a req_nsmpl). - * - * \remarks - * The maximum number of channels is CRIMV_PCM_BUFFER_MAX - * - * \sa CriMvSoundInterface::SetCallbackGetSint16PcmData() - */ - /*JP - * \brief 32bit`PCMf[^擾R[obN֐̓o^ - * \param func CriMvSoundInterface PCMf[^vۂɌĂтR[obN֐ - * \param obj R[obN֐sۂɑɎw肷IuWFNgϐ - * - * CriMvSoundInterface EasyPlayerPCMf[^vۂɌĂяoR[obN֐o^܂B - * R[obN֐͂S‚̈Ă܂B
- * - "obj" ̓R[obN֐ŎgpIuWFNgłB - * R[obN֐Ăяoۂ́A֐o^Ɏw肳ꂽobjK̈ɓĂB
- * - "nch" CriMvSoundInterface vI[fBĨ`lłBmȂ1BXeIȂ2B5.1chȂ6ƂȂ܂B
- * - "pcmbuf" PCMf[^i[邽߂̃obt@|C^złB
- * obt@̎̂ CriMvSoundInterface ŏĂBobt@̐"nch"ƓłȂ΂܂B
- * - "req_nsmpl" CriMvSoundInterface vPCMf[^̍őTvłB
- * "pcmbuf"Ŏw肵eobt@̂ɂ́ÃTv܂ĂvȂ̗̈KĂB
- * - * o^ꂽR[obN֐Ăяo^C~O CriMvSoundInterface ̔CӂƂȂ܂B - * - * \sa CriMvSoundInterface::SetCallbackGetSint16PcmData() - */ - /* pure */ virtual void SetCallbackGetFloat32PcmData(CriUint32 (*func)(void *obj, CriUint32 nch, CriFloat32 *pcmbuf[], CriUint32 req_nsmpl), void *obj)=0; - - /*EN - * \brief Sets the callback function for retrieving 16 bit integer PCM sound samples - * \param func Function that will be called when 16 bit integer PCM data is needed - * \param obj Pointer to user-specifed data, passed as the first argument to the callback - * - * Sets a function that CriMvSoundInterface will call when it needs audio data in 16 bit integer - * PCM format. This callback function takes 4 arguments:
- * - * - \a obj: The user-specified \a obj parameter passed to SetCallbackGetSint16PcmData().
- * - \a nch: The number of audio channels. Mono is 1, stereo is 2, 5.1 channel is 6.
- * - \a pcmbuf: An array of buffers to hold the returned PCM data. There must be one element of - * this array for each channel.
- * - \a req_nsmpl: The number of samples requested. Each buffer must be large enough to hold this - * many samples (i.e. \a nch * \a req_nsmpl). - * - * \remarks - * The maximum number of channels is CRIMV_PCM_BUFFER_MAX (currently 8) - * - * \sa CriMvSoundInterface::SetCallbackGetFloat32PcmData() - */ - /*JP - * \brief 16bit`PCMf[^擾R[obN֐̓o^ - * \param func CriMvSoundInterface PCMf[^vۂɌĂтR[obN֐ - * \param obj R[obN֐sۂɑɎw肷IuWFNgϐ - * - * PCMtH[}bgႤȊÓA CriMvSoundInterface::SetCallbackGetFloat32PcmData() ƓłB - * - * \sa CriMvSoundInterface::SetCallbackGetFloat32PcmData() - */ - /* pure */ virtual void SetCallbackGetSint16PcmData(CriUint32 (*func)(void *obj, CriUint32 nch, CriSint16 *pcmbuf[], CriUint32 req_nsmpl), void *obj)=0; - - /*EN - * \brief Starts sound output - * - * CRI Movie will call this method when it needs to start playing sound. The PCM data callback function - * has to be called after this function until movie playback is finished.
- * - * Your sound module should begin incrementing its playback time when this method is called. - * - * \remarks - * On success, this should set the status to CriMvSoundInterface::MVEASY_SOUND_STATUS_EXEC. - */ - /*JP - * \brief TEho͂̊Jn - * - * TEho͂Jn܂BPCMf[^擾pR[obN֐́A{֐̌ďoォsĂB - */ - /* pure */ virtual void Start(void)=0; - - /*EN - * \brief Stops sound output - * - * CRI Movie will call this when the movie playback stops, or the status changes to MVEASY_STATUS_PLAYEND.
- * - * When EasyPlayer wants to pause and restart playback, it will call CriMvSoundInterface::Pause() - * instead of this method.
- * - * Your sound module should set its playback time to 0 when this method is called. - * - * \remarks - * This should set the status to CriMvSoundInterface::MVEASY_SOUND_STATUS_STOP. - * - * \sa CriMvSoundInterface::Pause(), CriMvSoundInterface::Start() - */ - /*JP - * \brief TEho͂̒~ - * - * TEho͂~܂BĊJł悤ɂKv͂܂B
- * EasyPlayerĊJsꍇ́A{֐ł͂ȂA CriMvSoundInterface::Pause()Ăяo܂B
- * CriMvSoundInterface::Stop() ďóAR[obN֐Ă΂Ȃ悤ɎĂB - * - * \sa CriMvSoundInterface::Pause(), CriMvSoundInterface::Stop() - */ - /* pure */ virtual void Stop(void)=0; - - /*EN - * \brief Gets status of sound module - * \return The module status - * - * This must return one of the enumerated values in CriMvSoundInterface::Status.
- * - * While this method returns CriMvSoundInterface::MVEASY_SOUND_STATUS_EXEC, EasyPlayer will call the - * PCM data callback.
- * When a movie has finished playing and this method returns CriMvSoundInterface::MVEASY_SOUND_STATUS_STOP, - * EasyPlayer will call CriMvSoundInterface::DestroyOutput(). - * - * \sa CriMvSoundInterface::Status - */ - /*JP - * \brief TEhW[̏Ԏ擾 - * - * TEhW[̏Ԃ擾܂B - * - * \sa CriMvSoundInterface::Status - */ - /* pure */ virtual Status GetStatus(void)=0; - - /*EN - * \brief Pauses or resumes sound output - * \param sw Pause or resume playback. - * - * If \a sw is 1 (ON), output will be paused.
- * If \a sw is 0 (OFF), output will be resumed.
- * - * Temporarily pauses or resumes sound output.
- * - * When you pause sound output, you must pause your playback timer as well. - */ - /*JP - * \brief TEho͂̈ꎞ~܂͍ĊJ - * \param sw |[YXCb`B|[YON̏ꍇ1A|[YOFF(W[)̏ꍇ0w肵܂B - * - * {֐͈̓Ɉˑ܂B
- * sw ON(1)ȂAꎞ~B sw OFF(0)ȂTEho͍ĊJłB - */ - /* pure */ virtual void Pause(CriBool sw)=0; - - /*EN - * \brief Gets the time, in seconds, that sound has been playing - * \param count Playback time counter - * \param unit Counter increment per second - * - * CRI Movie calls this method periodically for some damn reason.
- *
- * The time, in seconds, is specified by \a count / \a unit.
- * - * For example, if \a count was 500 and \a unit was 1000, that would be 0.5 seconds.
- * - * \remarks - * Before Start() is called, and after Stop() is called, \a count should be 0. - */ - /*JP - * \brief Đ̎擾 - * \param count ^C}JEg - * \param unit Pb̃^C}JEglBcount unit ŕbPʂ̎ƂȂ܂B - * - * ^C}擾܂Bcountunit̓‚̕ϐŕ\܂B
- * count unit ŕbPʂ̎ƂȂ悤ȒlԂ܂B
- * ĐJnOi CriMvSoundInterface::Start()ĂяoOj - * Đ~i CriMvSoundInterface::Stop()Ăяoj́AOi^C}JEgOjԂ܂B - */ - /* pure */ virtual void GetTime(CriUint64 &count, CriUint64 &unit)=0; // sec = count / unit. - -protected: - virtual ~CriMvSoundInterface(void) {} -}; - -/*EN - * \brief System Timer Interface Class for EasyPlayer - * \ingroup MDL_IF_TIMER - * - * If you want to synchronize video frames with something other than the audio track, or if you - * need to play a movie that does not have an audio track, you will need to pass an instance of - * a class derived from CriMvSystemTimerInterface to CriMvEasyPlayer::Create().
- * - * If you do not need any special timer facilities, you can pass NULL to CriMvEasyPlayer::Create() instead.
- * - * All functions are pure virtual. - * - * \sa CriMvEasyPlayer::Create(), CriMvEasyPlayer::SyncMasterTimer() - */ -/*JP - * \brief VXe^C}[C^tF[X for EasyPlayer - * \ingroup MDL_IF_TIMER - * - * VXe^C}[͉[rĐɁArfIt[̑o^C~O𒲐邽߂Ɏgp܂B
- * ̃NX`邱ƂŁAÕ^C}VXegEasyPlayer̃Xg[~OД\ɂȂ܂B
- * SĂ̊֐͏z֐ƂĒ`Ă̂ŁASĂ̊֐KĂB - * - * \sa CriMvEasyPlayer::Create(), CriMvEasyPlayer::SyncMasterTimer() - */ -class CriMvSystemTimerInterface -{ -public: - /*EN - * \brief Starts timer and resets it to 0 - * - * When this method is called, your internal counter should initialize itself to 0 and start - * normal operation. - */ - /*JP - * \brief ^C}Jn - * - * ^C}̃JEgJn܂B̊֐Ă΂ꂽOƂȂ܂B - */ - /* pure */ virtual void Start(void)=0; - - /*EN - * \brief Stops the timer and resets it to 0 - * - * When this method is called, your internal counter should stop incrementing, and re-initialize - * itself to 0. After this method has been called, CriMvSystemTimerInterface::GetTime() must - * return a time of 0 seconds. - */ - /*JP - * \brief ^C}~ - * - * ^C}̃JEg~܂B̊֐Ă΂ꂽƂɁÃ^C}ĊJ邱Ƃ͂܂B - */ - /* pure */ virtual void Stop(void)=0; - - /*EN - * \brief Pauses or resumes the timer - * - * \param sw Pause or resume timer operation. - * - * If \a sw is 1 (ON), the timer will be paused.
- * If \a sw is 0 (OFF), the timer will be resumed.
- * - * Temporarily pauses or resumes the timer.
- * - * When you pause the timer, you must maintain the previous value of the counter. - */ - /*JP - * \brief ^C}̈ꎞ~܂͍ĊJ - * \param sw |[YXCb`BON(1)Ȃꎞ~AOFF(0)ȂĊJB - * - * {֐͈̓Ɉˑ܂B
- * sw ON(1)ȂAꎞ~B sw OFF(0)Ȃ^C}JEgĊJłB - */ - /* pure */ virtual void Pause(CriBool sw)=0; - - /*EN - * \brief Gets the time, in seconds, that the timer has been running - * - * \param count Timer counter - * \param unit Counter increment per second - * - * CRI Movie calls this method periodically to synchronize video playback with the - * movie's internal framerate.
- *
- * The time, in seconds, is specified by \a count / \a unit.
- * - * For example, if \a count was 500 and \a unit was 1000, that would be 0.5 seconds.
- * - * \remarks - * Before Start() is called, and after Stop() is called, \a count should be 0. - */ - /*JP - * \brief oߎ̎擾 - * \param count ^C}JEg - * \param unit Pb̃^C}JEglBcount unit ŕbPʂ̎ƂȂ܂B - * - * ^C}擾܂Bcountunit̓‚̕ϐŕ\܂B
- * count unit ŕbPʂ̎ƂȂ悤ȒlԂ܂B
- * ĐJnOi CriMvSystemTimerInterface::Start()ĂяoOj - * Đ~i CriMvSystemTimerInterface::Stop()Ăяoj́AOi^C}JEgOjԂ܂B - */ - /* pure */ virtual void GetTime(CriUint64 &count, CriUint64 &unit)=0; - -protected: - virtual ~CriMvSystemTimerInterface(void) {} -}; - - -/*EN - * \brief EasyPlayer Interface class for CRI Movie - * \ingroup MDL_EASY_PLAYER - */ -/*JP - * \brief EasyPlayerC^tF[X - * \ingroup MDL_EASY_PLAYER - */ -class CriMvEasyPlayer : public CriAllocator -{ -public: - /*EN - * \brief The possible states an EasyPlayer handle can be in. - * - * An EasyPlayer handle takes on various states, depending on where it is in the decoding process. - * You can check the status of a valid EasyPlayer handle at any time by calling CriMvEasyPlayer::GetStatus(). - * - * An EasyPlayer handle is created in the MVEASY_STATUS_STOP state. During movie playback, the status - * transitions through various states from MVEASY_STATUS_STOP to MVEASY_STATUS_PLAYEND. - * - * An application does not need to check all states. At a minimum, it only needs to check for - * MVEASY_STATUS_STOP, MVEASY_STATUS_PLAYING, MVEASY_STATUS_PLAYEND, - * and MVEASY_STATUS_ERROR. - * - * If an application calls CriMvEasyPlayer::DecodeHeader(), the status of the EasyPlayer handle will change to - * MVEASY_STATUS_WAIT_PREP when CRI Movie has finished analyzing the movie information. The EasyPlayer - * handle will remain in this state until the application calls CriMvEasyPlayer::Prepare() or - * CriMvEasyPlayer::Start(). Once the state has changed to MVEASY_STATUS_WAIT_PREP, information - * about the movie can be retrieved by calling CriMvEasyPlayer::GetMovieInfo(). - * - * If an application calls CriMvEasyPlayer::Prepare(), the EasyPlayer handle status will change to - * MVEASY_STATUS_READY once CRI Movie has finished buffering enough input and decoded output for playback. - * The handle will remain in this state until CriMvEasyPlayer::Start() is called. This allows the application - * to better control playback timing, since a movie can immediately start playing. - * - * Once CriMvEasyPlayer::Start() is called and the movie is actively playing, the status will alternate - * between MVEASY_STATUS_PLAYING and MVEASY_STATUS_PREP, as CRI Movie plays back frames and decodes - * new ones. - * - * When the movie has finished playing normally, the status of the EasyPlayer handle will automatically change - * to MVEASY_STATUS_PLAYEND. If the movie is in looping mode, however, once the movie reaches the - * end, it will start playing from the beginning and the status will not change to MVEASY_STATUS_PLAYEND. - * - * When CriMvEasyPlayer::Stop() is called, the status of the handle will change to MVEASY_STATUS_STOP - * once it has finished any decoding and playback that is in progress. This does not happen immediately, - * but will take a few cycles. - * - * If there are any problems during playback, for instance insufficient memory or invalid input data, the - * status will change to MVEASY_STATUS_ERROR. When the handle is in state MVEASY_STATUS_ERROR, - * the application must call CriMvEasyPlayer::Stop() and wait until the state changes to MVEASY_STATUS_STOP - * before doing anything else with the handle. - * - * Once the state is MVEASY_STATUS_STOP or MVEASY_STATUS_PLAYEND, the handle can be deleted by - * calling CriMvEasyPlayer::Destroy(). - * - * \attention - * As of CRI Movie version 2.00, the handling of the MVEASY_STATUS_ERROR state has changed. Previously, - * a handle could be destroyed when it was in the MVEASY_STATUS_ERROR state. Now, an application - * must call CriMvEasyPlayer::Stop() and wait for the MVEASY_STATUS_STOP state before destroying - * the handle. - * - * \sa CriMvEasyPlayer::GetStatus(), CriMvEasyPlayer::Start(), CriMvEasyPlayer::DecodeHeader(), - * CriMvEasyPlayer::Prepare(), CriMvEasyPlayer::GetMovieInfo(), CriMvEasyPlayer::Stop(), - * CriMvEasyPlayer::Destroy() - */ - /*JP - * \brief EasyPlayernh - * - * EasyPlayer ̃nhԂłB - * nhԂ CriMvEasyPlayer::GetStatus() ł‚ł擾邱Ƃo܂B
- * nh쐬 MVEASY_STATUS_STOP ԂłB - * - * nhԂ MVEASY_STATUS_STOP MVEASY_STATUS_PLAYEND ܂ŏɑJڂĂ܂B
- * AvP[V[rĐɂāAK̑SĂ̏Ԃ`FbNKv͂܂B
- * ŒAMVEASY_STATUS_STOP, MVEASY_STATUS_PLAYING, MVEASY_STATUS_PLAYEND, MVEASY_STATUS_ERROR - * `FbN΁A[r̍ĐsƂł܂B - * - * EasyPlayer nh쐬A[r̉𑜓xȂǂɊm肵Ăꍇ́AAvP[V - * CriMvEasyPlayer::Start() 𒼐ڌĂяoƂł܂B̏ꍇAnhԂ͎I - * MVEASY_STATUS_PLAYEND ܂őJڂĂ܂B - * - * ŏ CriMvEasyPlayer::DecodeHeader() Ăяoꍇ́Awb_͂IƃnhԂ - * MVEASY_STATUS_WAIT_PREP ƂȂAAvP[V CriMvEasyPlayer::Prepare() ܂ - * CriMvEasyPlayer::Start() Ă΂܂őҋ@܂B - * - * MVEASY_STATUS_WAIT_PREPԈȍ~A CriMvEasyPlayer::GetMovieInfo() Ń[r擾邱Ƃł܂B
- * CriMvEasyPlayer::Prepare() Ăяoꍇ́Awb_͂уf[^̃obt@OIƁA - * nhԂ MVEASY_STATUS_READY ƂȂAAvP[V CriMvEasyPlayer::Start() - * Ă΂܂őҋ@܂BɂčĐJñ^C~O𒲐邱Ƃł܂B - * - * ĐIƎI MVEASY_STATUS_PLAYEND ɂȂ܂B - * - * CriMvEasyPlayer::Stop() Ăяoꍇ́AfR[_̒~IƂ MVEASY_STATUS_STOP - * ԂɂȂ܂B CriMvEasyPlayer::Stop() Iɒ~ԂɂȂƂ͌܂B - * - * sf[^G[Ȃlj炩̖肪ꍇ MVEASY_STATUS_ERROR ԂƂȂ܂B
- * MVEASY_STATUS_ERROR ԂɂȂꍇ CriMvEasyPlayer::Stop() ĂяoănhԂ - * MVEASY_STATUS_STOP ԂɑJڂĂB
- * - * CriMvEasyPlayer::Destroy() MVEASY_STATUS_STOP, MVEASY_STATUS_PLAYEND - * ꂩ̏Ԃ̎̂݌ĂяoƂł܂B - * - * \attention - * CRI Movie Ver.2.00 MVEASY_STATUS_ERROR Ԃɂ‚Ă̎dlύXɂȂ܂B
- * MVEASY_STATUS_ERROR ԂŃnhjoȂȂA CriMvEasyPlay::Stop() ĂяoKv܂B - * - * \sa CriMvEasyPlayer::GetStatus(), CriMvEasyPlayer::Start(), CriMvEasyPlayer::DecodeHeader(), - * CriMvEasyPlayer::Prepare(), CriMvEasyPlayer::GetMovieInfo(), CriMvEasyPlayer::Stop(), - * CriMvEasyPlayer::Destroy() - */ - enum Status { - MVEASY_STATUS_STOP, /*EN< Standstill. No processing is happening. - * EasyPlayer handles are created in this state. */ - /*JP< ~ */ - MVEASY_STATUS_DECHDR, /*EN< The EasyPlayer handle is now parsing the movie header, - * including information about the width and height of the video stream. */ - /*JP< wb_͒ */ - MVEASY_STATUS_WAIT_PREP, /*EN< The EasyPlayer handle is a waiting for the work buffer to be allocated. */ - /*JP< obt@OJnҋ@ */ - MVEASY_STATUS_PREP, /*EN< The EasyPlayer handle is now buffering video and audio data. */ - /*JP< Đ */ - MVEASY_STATUS_READY, /*EN< Ready to start playback. */ - /*JP< Đҋ@ */ - MVEASY_STATUS_PLAYING, /*EN< The decoders are currently decoding and playing output. */ - /*JP< Đ */ - MVEASY_STATUS_PLAYEND, /*EN< The end of the movie has been reached. */ - /*JP< ĐI */ - MVEASY_STATUS_ERROR, /*EN< An error has occurred. */ - /*JP< G[ */ - - /* Keep enum 4bytes */ - MVEASY_STATUS_MAKE_ENUM_SINT32 = 0x7FFFFFFF - }; - - /*EN - * \brief Supported timer types; used to synchronize video frames. - */ - /*JP - * \brief ^C} - */ - enum TimerType { - MVEASY_TIMER_NONE, /*EN< No synchronization. The output is available as soon as - * each frame is decoded. */ - /*JP< rfIt[͎܂BfR[hIt[ - * ͂Ɏ擾邱Ƃł܂B */ - MVEASY_TIMER_SYSTEM, /*EN< Video frames synchronize to the system timer.
- * You must provide an instance of CriMvSystemTimerInterface to - * CriMvEasyPlayer::Create(). */ - /*JP< rfIt[̓VXeɓ܂BVXe̓AvP[V - * CriMvSystemTimerInterface ƂCriMvEasynhɐݒ肷Kv܂B */ - MVEASY_TIMER_AUDIO, /*EN< Video frames synchronize with the movie's audio data.
- * You must provide an instance of CriMvSoundInterface to CriMvEasyPlayer::Create().
- * If the movie does not have audio, video frames will synchronize with the system timer. */ - /*JP< rfIt[̓[r̃I[fBIɓ܂B - * AvP[V GetTime֐܂ CriMvSoundInterface CriMvEasy - * nhɐݒ肷Kv܂B[rf[^ɃI[fBI܂܂ - * Ȃꍇ́ArfI̓VXeɓ܂B */ - - /* Keep enum 4bytes */ - MVEASY_TIMER_MAKE_ENUM_SINT32 = 0x7FFFFFFF - }; - - /*EN - * \ingroup MODULE_INIT - * - * \brief Creates an EasyPlayer handle - * - * \param heap Handle to a CriHeap object - * \param freader File input interface - * \param stimer System timer interface - * \param sound Sound module interface - * \param err Optional error code - * - * \return A valid CriMvEasyPlayer handle, or NULL if the handle cannot be allocated - * - * Creates and initialize a new EasyPlayer handle. Its status is initially MVEASY_STATUS_STOP. - * Memory for the handle is allocated from the provided CriHeap object. - * - * If memory allocation fails, this function will return NULL. Be sure to initialize and create - * your heap with criHeap_Initialize() and criHeap_Create() before calling this function. - * - * \remarks - * CriMv::Initialize() must be called before calling this function. - * - */ - /*JP - * \ingroup MODULE_INIT - * \brief EasyPlayernh̍쐬 - * \param heap CriHeapnh - * \param freader t@Cǂݍ݃C^tF[X - * \param stimer VXe^C}C^tF[X - * \param sound TEhC^tF[X - * \param err G[ - * \return CriMvEasynhԂ܂BG[ꍇ́ANULLԂ܂B - * - * {֐ CriMv::Initialize() ĂяoɎsĂB
- * nh쐬̓nhԂMVEASY_STATUS_STOPƂȂ܂B
- * nhmۂɕKvȃ͑SāAœnꂽ CriHeap gĊmۂ܂B
- * sȂǂŃG[ꍇ́A{֐NULLԂ܂B - * - */ - static CriMvEasyPlayer* CRIAPI Create(CriHeap heap, - CriMvFileReaderInterface *freader, - CriMvSystemTimerInterface *stimer, - CriMvSoundInterface *sound, - CriError &err=CriMv::ErrorContainer); - /*EN - * \ingroup MODULE_INIT - * \brief Destroy a handle - * \param err Optional error code - * - * \ingroup MODULE_INIT - * - * \brief Destroys an EasyPlayer handle - * \param err Optional error code - * - * Destroys an EasyPlayer handle previously created with CriMvEasyPlayer::Create(), and frees its resources. - * - * An EasyPlayer handle can only be destroyed when it is in the MVEASY_STATUS_STOP or MVEASY_STATUS_PLAYEND state. - * Attempting to destroy a handle when it is in any other state will cause an error. - * - * Any work buffers allocated via CriHeap, if still associated with the handle, are freed by this call. - * - * \sa CriMvEasyPlayer::Create(), CriMvEasyPlayer::Status, CriMvEasyPlayer::GetStatus() - */ - /*JP - * \ingroup MODULE_INIT - * \brief EasyPlayernh̔j - * \param err G[iȗj - * - * CriMvEasyPlayer::Create()ō쐬EasyPlayernhj܂B - * - * nhԂ MVEASY_STATUS_STOP A MVEASY_STATUS_PLAYEND ̎ɂ̂݃nhj邱Ƃł܂B
- * ȊȌԂŌĂяoꍇ́AG[ɂȂ܂B
- * - * nhԂ MVEASY_STATUS_ERROR ꍇ́ACriMvEasyPlayer::Stop() Ăяo - * MVEASY_STATUS_STOP ԂɂȂĂnhjĂB
- * nhԂ CriMvEasyPlayer::GetStatus() ŊmF邱Ƃł܂B - * - * nh쐬Ɏw肵CriHeapɂĊmۂꂽŖ̑SẮA - * ̊֐̌Ăяoɂĉ܂B - * - * \sa CriMvEasyPlayer::Create(), CriMvEasyPlayer::Status, CriMvEasyPlayer::GetStatus() - */ - void Destroy(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_BASIC - * - * \brief Returns status of an EasyPlayer handle. - * \param err Optional error code - * \return Handle status - * - * Returns the current status of an EasyPlayer handle. The status will be one of the values - * defined by CriMvEasyPlayer::Status. - * - * \sa CriMvEasyPlayer::Status - */ - /*JP - * \ingroup MODULE_BASIC - * \brief nhԂ̎擾 - * \param err G[iȗj - * \return nh CriMvEasyPlayer::Status - * - * nhԂ擾܂B - * - * \sa CriMvEasyPlayer::Status - */ - Status GetStatus(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_BASIC - * - * \brief Executes heatbeat functions for an EasyPlayer handle - * \param err Optional error code - * - * Performs regular processing for an EasyPlayer handle, including handoff and parsing of input - * buffers, and audio decoding. Additionally, it checks for situations where the handle state - * should change to one of the values defined by CriMvEasyPlayer::Status, and changes state as - * necessary. - * - * This function and CriMvEasyPlayer::ExecuteDecode() should be called periodically during movie - * playback or when waiting for CriMvEasyPlayer::DecodeHeader() to complete. It takes a relatively - * low CPU load, and should typically be called on every vertical blank. - * - * \remarks - * Note that this function does not perform any video decoding. Decoding is done in - * CriMvEasyPlayer::ExecuteDecode(). - * - * \sa CriMvEasyPlayer::Status, CriMvEasyPlayer::ExecuteDecode(), CriMvEasyPlayer::DecodeHeader() - */ - /*JP - * \ingroup MODULE_BASIC - * \brief EasyPlayerT[o֐ - * \param err G[iȗj - * - * [r̃wb_͂̓obt@AI[fBIfR[hs܂B
- * EasyPlayer nh̏ԑJڂ̊֐ōs܂B
- * ̊֐̓rfĨfR[h͍s܂B̂CPUׂ͂܂荂Ȃ܂B
- * {֐̓AvP[ṼC[vŖĂяo悤ɂĂB - * - * \sa CriMvEasyPlayer::Status - */ - void Update(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_BASIC - * - * \brief Synchronizes the master timer of an EasyPlayer handle. - * \param err Optional error code - * - * Synchronizes the timing of video frames to the master timer used by this EasyPlayer handle. - * If the master timer is of type MVEASY_TIMER_AUDIO and the movie does not have audio, - * EasyPlayer will use the system timer that was set when the handle was created. - * - * \sa CriMvEasyPlayer::TimerType, CriMvEasyPlayer::SetMasterTimer(), CriMvSystemTimerInterface - */ - /*JP - * \ingroup MODULE_BASIC - * \brief }X^^C}ւ̓ - * \param err G[iȗj - * - * [rĐ}X^^C}ɓ܂B
- * }X^^C} CriMvEasyPlayer::SetMasterTimer() ɂĎw肳ꂽ^C}g܂B
- * ^C}ʂƂ MVEASY_TIMER_AUDIO w肳ĂāAĐ郀[rɃI[fBI - * ܂܂ĂȂꍇ́Anh쐬̃VXe^C}gp܂B - * - * ̊֐́Anh쐬Ɏw肵VXe^C}C^tF[X - * CriMvSystemTimerInterface::GetTime() Ăяo܂B - * - * \sa CriMvEasyPlayer::TimerType, CriMvEasyPlayer::SetMasterTimer(), CriMvSystemTimerInterface - */ - void SyncMasterTimer(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_BASIC - * - * \brief Decodes a video frame - * \param err Optional error code - * \return \a TRUE If the movie is currently in a playback state - * \return \a FALSE If the movie is not playing - * - * Performs the actual video decoding. Each call to this function decodes a single frame. - * It does not return until the frame has been decoded. - * - * Video decoding can impose a very heavy CPU load, so calling this function from an application's - * main thread may cause your application to miss the vertical blank interval. To avoid this situation, - * ExecuteDecode() can be called from a separate, lower-priority thread. See the Mutithreaded Decoding - * tutorial for a full explanation. - * - * The return value describes the movie playback state. If TRUE, the movie is currently playing - * (or decoding the movie header) or ready to play. If FALSE, playback has not yet been started, - * or playback has finished. - * - * If a decoding thread is used, an application must wait until this function returns FALSE before destroying - * the thread. Otherwise, the handle state will not transition to MVEASY_STATUS_STOP or MVEASY_STATUS_PLAYEND, - * and the EasyPlayer handle cannot be destroyed. - * - * \attention - * ExecuteDecode() is the only CRI Movie function that is safe to call from a separate thread. - * No other CRI Movie functions should be considered to be thead-safe. - * - */ - /*JP - * \ingroup MODULE_BASIC - * \brief rfIfR[h - * \param err G[iȗj - * \return [rĐTRUE AĐI܂~FALSEԂ܂B - * - * rfIf[^̃fR[hs܂B
- * {֐͂PsN`̃fR[hI܂ŏI܂B
- * sN`fR[hׂ͕̍Ȃ̂ŁAAvP[ṼCXbhĂяoƏ”\܂B
- * ̏ꍇ́ACXbhDx̒ႢʃXbhĂяo悤ɂĂB - * - * {֐̕ԂĺA[rĐ̎sǂ\Ă܂B
- * fR[hpXbhIꍇ́AԂlFALSEɂȂ̂҂Ȃ΂܂B
- * ԂlTRUE̊ԂɃfR[hXbhIĂ܂ƁAnh̏Ԃ MVEASY_STATUS_STOP - * MVEASY_STATUS_PLAYEND ɑJڂłAnhjoȂȂ܂B
- * - */ - CriBool ExecuteDecode(CriError &err=CriMv::ErrorContainer); - - /* Đ */ - /*EN - * \ingroup MODULE_CONTROL - * - * \brief Sets the name of the movie file to play - * \param fname Name of the movie file - * \param err Optional error code - * - * Sets the name of the movie file to play, but does not open the file. The length of the filename - * (including path) is limited to CRIMV_MAX_FILE_NAME characters. EasyPlayer copies this - * string to internal memory, so a temporary variable can be used. - * - * If an application plays the same movie repeatedly, it only needs to call this function once. - * - * Multiple calls to this function will overwrite previous values. Calling CriMvEasyPlayer::SetData() - * will clear any filename set by this function. - * - * \remarks - * This function can only be called when the handle status is MVEASY_STATUS_STOP or MVEASY_STATUS_PLAYEND, - * or from the file request callback. See CriMvEasyPlayer::SetFileRequestCallback() for details. - * - * \remarks - * Calling this function does not open the file. The file is opened by a call to CriMvEasyPlayer::Update(). - * - * \sa CriMvEasyPlayer::SetFileRequestCallback(), CriMvEasyPlayer::SetData() - */ - /*JP - * \ingroup MODULE_CONTROL - * - * \brief Đt@C̎w - * \param fname [rt@CpX - * \param err G[iȗj - * - * Đ郀[r̃t@CpXݒ肵܂Bt@CpX̍ő咷 CRIMV_MAX_FILE_NAME oCgłB
- * EasyPlayer͓ł̃t@CpXRs[̂ŁAœn͔jĂ܂܂B - * - * t@CJԂĐꍇ́Å֐ēxĂяoKv͂܂B - * - * ̊֐Ăяoɂx̊֐ĂяoƁAÕt@C͐Vt@Cɏ㏑܂B - * CriMvEasyPlayer::SetData()֐Ăяoꍇ́AOɐݒ肵t@C񂪃NA܂B - * - * \para l1F - * ̊֐̓nhԂ MVEASY_STATUS_STOP MVEASY_STATUS_PLAYEND̂݌Ăяo”\łB - * ܂̓t@CvR[obN֐ł̊֐ĂяoƂł܂Bڍׂ CriMvEasyPlayer::SetFileRequestCallback()֐ - * QƂĂB - * - * \para l2F - * ̊֐̓ł̓t@C̃I[vv͂܂Bt@C̃I[v CriMvEasyPlayer::Update() ֐̒ōs܂B - * - * \sa CriMvEasyPlayer::SetFileRequestCallback(), CriMvEasyPlayer::SetData(), CriMvEasyPlayer::SetFileRange() - */ - void SetFile(CriChar8 *fname, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_CONTROL - * - * \brief Sets in-memory movie data - * \param dataptr Pointer to movie data - * \param datasize Size of data, in bytes - * \param err Optional error code - * - * Sets the in-memory data buffer for this EasyPlayer handle to point to the provided buffer, - * but does not attempt to read that buffer. After this call, the memory pointed to by \a dataptr - * belongs to CRI Movie and must remain valid until playback is complete. - * - * If an application plays the same movie data repeatedly, it only needs to call this function once. - * - * Multiple calls to this function will overwrite previous values. Calling CriMvEasyPlayer::SetFile() - * will clear any pointer set by this function. - * - * \remarks - * This function can only be called when the handle status is MVEASY_STATUS_STOP or MVEASY_STATUS_PLAYEND, - * or from the file request callback. See CriMvEasyPlayer::SetFileRequestCallback() for details. - * - * \remarks - * Calling this function does not attempt to reference the memory. The memory read is initiated by a call - * to CriMvEasyPlayer::DecodeHeader(), CriMvEasyPlayer::Prepare() or CriMvEasyPlayer::Start(). - * - * \sa CriMvEasyPlayer::SetFileRequestCallback(), CriMvEasyPlayer::SetFile(), CriMvEasyPlayer::SetFileRange() - */ - /*JP - * \ingroup MODULE_CONTROL - * \brief f[^̎w - * \param dataptr f[^|C^ - * \param datasize f[^TCY - * \param err G[iȗj - * - * ̊֐EasyPlayer̃nhԂMVEASY_STATUS_STOPMVEASY_STATUS_PLAYEND̎ɌĂяoĂB
- * ܂́At@CvR[obN̓ŌĂяoƂł܂B
- * - * {֐JԂĂяoꍇ́A͏㏑܂B
- * CriMvEasyPlayer::SetFile()Ăяoꍇ́A{֐Ŏw肵̓nh܂B - * - * nhœ[rf[^JԂĐꍇ́A{֐̌Ăяo͏ȗ邱Ƃł܂B - * - * w肳ꂽ̈ɎۂɃANZX̂́A CriMvEasyPlayer::DecodeHeader(), CriMvEasyPlayer::Prepare(), - * CriMvEasyPlayer::Start() ̂ꂩĂяoꂽȍ~łB
- * - * \sa CriMvEasyPlayer::SetFileRequestCallback(), CriMvEasyPlayer::SetFile(), CriMvEasyPlayer::SetFileRange() - */ - void SetData(CriUint8 *dataptr, CriUint32 datasize, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_CONTROL - * \brief Set a pack file and pass offset and range of movie file to an EasyPlayer handle - * \param fname File name string pointer of the pack file - * \param offset offset in byte to movie data in the packing file [in bytes] - * \param range size of movie data from the offset in the packing file [in bytes] - * \param err Optional error code - * - * Sets the name of the pack file that contains the movie file to play. - * EasyPlayer tries to read data from 'offset' through 'range' in the pack file as the movie data. - * Passing a negative value as range, EasyPlayer reads data until the end of the pack file. - * - * The length of file name is limited until CRIMV_MAX_FILE_NAME. - * EasyPlayer handle copies the file name string into the handle. - * You can use a temporary variable as the file name string. - * - * If an application plays the same movie repeatedly, it only needs to call this function once. - * - * Multiple calls to this function will overwrite previous values. Calling CriMvEasyPlayer::SetData() - * will clear any filename set by this function. - * - * \remarks - * This function can only be called when the handle status is MVEASY_STATUS_STOP or MVEASY_STATUS_PLAYEND, - * or from the file request callback. See CriMvEasyPlayer::SetFileRequestCallback() for details. - * - * \remarks - * Calling this function does not open the file. The file is opened by a call to CriMvEasyPlayer::Update(). - * - * \sa CriMvEasyPlayer::SetFileRequestCallback(), CriMvEasyPlayer::SetData(), CriMvEasyPlayer::SetFile() - */ - /*JP - * \ingroup MODULE_CONTROL - * - * \brief Đ[rt@C܂ރpbNt@C̎w - * \param fname pbNt@C (pX܂) - * \param offset pbNt@C̃[rf[^܂ł̃ItZbg (P: oCg) - * \param range pbNt@C̃[rf[^̃TCY (PʁFoCg) - * \param err G[iȗj - * - * Đ郀[r܂ރpbNt@Cw肵܂BŎw肵 offset ʒu range TCY܂łpbNt@CɊ܂܂郀[rf[^݂Ȃ܂B - * rangeɕl͂ƃpbNt@C̏I[܂ł[rƂēǂݍ݂܂B - * - * pbNt@C̃t@CpX̍ő咷 CRIMV_MAX_FILE_NAME oCgłB - * EasyPlayer͓ł̃t@CpXRs[̂ŁAœn͔jĂ܂܂B - * - * t@CJԂĐꍇ́Å֐ēxĂяoKv͂܂B - * - * ̊֐ĂяoɁAx̊֐ĂяoƁAÕt@C͐Vt@Cɏ㏑܂B - * CriMvEasyPlayer::SetData()֐Ăяoꍇ́AOɐݒ肵t@C񂪃NA܂B - * - * \para l1F - * ̊֐̓nhԂ MVEASY_STATUS_STOP MVEASY_STATUS_PLAYEND̂݌Ăяo”\łB - * ܂̓t@CvR[obN֐ł̊֐ĂяoƂł܂Bڍׂ CriMvEasyPlayer::SetFileRequestCallback()֐ - * QƂĂB - * - * \para l2F - * ̊֐̓ł̓t@C̃I[vv͂܂Bt@C̃I[v CriMvEasyPlayer::Update() ֐̒ōs܂B - * - * \sa CriMvEasyPlayer::SetFileRequestCallback(), CriMvEasyPlayer::SetData(), CriMvEasyPlayer::SetFile() - */ - void SetFileRange(CriChar8 *fname, CriUint64 offset, CriSint64 range, CriError &err=CriMv::ErrorContainer); - - /* Õ[rf[^xo^it@CvR[obN֐ł̂݌ĂԂƁj */ - void SetPreviousDataAgain(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_CONTROL - * - * \brief Reads movie header and analyzes movie information - * \param err Optional error code - * - * This function opens the movie file, reads the header, and starts to analyze the movie data. - * It does not start movie playback. - * - * When this function is called, the handle status changes to MVEASY_STATUS_DECHDR. Once EasyPlayer - * has finished reading the header and analyzing the movie, the status changes to MVEASY_STATUS_WAIT_PREP. - * When the status is MVEASY_STATUS_WAIT_PREP, CriMvEasyPlayer::GetMovieInfo() can be successfully called. - * - * To continue playback, call CriMvEasyPlayer::Prepare() or CriMvEasyPlayer::Start() when the handle status - * is MVEASY_STATUS_WAIT_PREP. - * - * \remarks - * This function can only be called when the handle status is MVEASY_STATUS_STOP or MVEASY_STATUS_PLAYEND. - * - * \remarks - * You must either call CriMvEasyPlayer::SetFile() or CriMvEasyPlayer::SetData(), or provide a file request - * callback with CriMvEasyPlayer::SetFileRequestCallback(), before calling this function. - * - * \remarks - * Once this function has been called, CriMvEasyPlayer::ExecuteDecode() and CriMvEasyPlayer::Update() must be - * called periodically in order for this function to have any effect. Otherwise, the handle status will - * never change. - * - * \sa CriMvEasyPlayer::GetStatus(), CriMvEasyPlayer::Prepare(), CriMvEasyPlayer::Start(), - * CriMvEasyPlayer::SetFileRequestCallback(), - * CriMvEasyPlayer::ExecuteDecode(), CriMvEasyPlayer::Update() - */ - /*JP - * \ingroup MODULE_CONTROL - * \brief [rwb_ - * \param err G[iȗj - * - * [r̍Đ͊JnAwb_͂̂ݍsđҋ@邽߂̊֐łB
- * ̊֐gpăwb_͂Oɍς܂邱ƂɂAĐJnOɃ[r̉𑜓xI[fBȈ - * 邱Ƃł܂B
- * {֐ĂяoƁAEasyPlayer̃nhԂMVEASY_STATUS_STOP MVEASY_STATUS_DECHDR ƑJڂĂA - * wb_͂MVEASY_STATUS_WAIT_PREPƂȂ܂B
- * [r擾ɂ́AnhԂMVEASY_STATUS_WAIT_PREPɂȂƂ CriMvEasyPlayer::GetMovieInfo() - * sĂB
- * - * nhԂMVEASY_STATUS_WAIT_PREP̎ɁA CriMvEasyPlayer::Prepare() CriMvEasyPlayer::Start() - * ĂԂƂōĐ𑱂邱Ƃł܂B
- * - * {֐ EasyPlayer̃nhԂMVEASY_STATUS_STOPMVEASY_STATUS_PLAYEND̎ɌĂяoĂB - * - * {֐ĂяoO CriMvEasyPlayer::SetFile() CriMvEasyPlayer::SetData() Ń[rf[^w肵ĂB
- * At@CvR[obN֐o^Ăꍇ͎Õ[rf[^ݒ͏ȗ邱Ƃ܂B - * - * \sa CriMvEasyPlayer::GetStatus(), CriMvEasyPlayer::Prepare(), CriMvEasyPlayer::Start(), CriMvEasyPlayer::SetFileRequestCallback() - */ - void DecodeHeader(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_CONTROL - * - * \brief Reads movie header, analyzes movie information, and buffers data. - * \param err Optional error code - * - * This function opens the movie file and gets it ready for immediate playback, by reading and analyzing - * the header and decoding and buffering video data. It allows a movie to start playing immediately when - * CriMvEasyPlayer::Start() is called, without an initial delay. - * - * When this function is called, the handle status changes to MVEASY_STATUS_DECHDR. Once EasyPlayer - * has finished reading and analyzing the movie data, the status changes to MVEASY_STATUS_PREP and EasyPlayer - * begins decoding video data. When the initial video data has been decoded and buffered, the status changes to - * MVEASY_STATUS_READY. - * - * The amount of data that is buffered, in seconds, is based on the value set by CriMvEasyPlayer::SetBufferingTime(). - * By default, this is 1 second. - * - * When the status is MVEASY_STATUS_READY, movie playback will start imediately when CriMvEasyPlayer::Start() - * is called. - * - * \remarks - * Unless you CriMvEasyPlayer::DecodeHeader() first, this function can only be called when the handle status - * is MVEASY_STATUS_STOP or MVEASY_STATUS_PLAYEND. - * - * \remarks - * You must either call CriMvEasyPlayer::SetFile() or CriMvEasyPlayer::SetData(), or provide a file request - * callback with CriMvEasyPlayer::SetFileRequestCallback(), before calling this function. - * - * \remarks - * Once this function has been called, CriMvEasyPlayer::ExecuteDecode() and CriMvEasyPlayer::Update() must be - * called periodically in order for this function to have any effect. Otherwise, the handle status will - * never change. - * - * \sa CriMvEasyPlayer::GetStatus(), CriMvEasyPlayer::DecodeHeader(), CriMvEasyPlayer::Start(), - * CriMvEasyPlayer::SetBufferingTime(), CriMvInputBufferInfo - */ - /*JP - * \ingroup MODULE_CONTROL - * \brief Điwb_͂ƃobt@Oj - * \param err G[iȗj - * - * [r̍Đ͊JnAwb_͂ƍĐ݂̂sđҋ@邽߂̊֐łB
- * ̊֐gpčĐOɍς܂邱ƂɂA[rĐJñ^C~Oׂ䂷邱Ƃł܂B
- * iĐōĐJn֐Ăяoꍇ́AۂɍĐn܂܂łɃ^CO܂Bj
- * {֐ĂяoƁAEasyPlayer̃nhԂMVEASY_STATUS_STOP MVEASY_STATUS_DECHDR MVEASY_STATUS_PREP ƑJڂĂA - * ĐMVEASY_STATUS_READYƂȂ܂B - * - * nhԂMVEASY_STATUS_READY̎ɁA CriMvEasyPlayer::Start() ĂԂƂōĐJn邱Ƃł܂B - * - * CriMvEasyPlayer::DecodeHeader() ̌Ăяoł̊֐Ăяoꍇ́ACriMvEasyPlayer̃nhԂ - * MVEASY_STATUS_STOPMVEASY_STATUS_PLAYEND łȂ΂܂B - * - * ĐJnOɂ CriMvEasyPlayer::SetFile() CriMvEasyPlayer::SetData() Ń[rf[^w肵ĂB
- * At@CvR[obN֐o^Ăꍇ͎Õ[rf[^ݒ͏ȗ邱Ƃ܂B - * - * \sa CriMvEasyPlayer::GetStatus(), CriMvEasyPlayer::DecodeHeader(), CriMvEasyPlayer::Start(), - * CriMvEasyPlayer::SetBufferingTime(), CriMvInputBufferInfo - */ - void Prepare(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_CONTROL - * - * \brief Starts movie playback - * \param err Optional error code - * - * Opens the movie and starts playback. If CriMvEasyPlayer::Prepare() was not called, there will be a - * delay while the library reads the movie header and buffers the initial data. If CriMvEasyPlayer::Prepare() - * was called and the handle status is MVEASY_STATUS_READY, playback will start as soon as this function is called. - * - * \remarks - * If you call this function without calling CriMvEasyPlayer::DecodeHeader() or CriMvEasyPlayer::Prepare() - * first, this function can only be called when the handle status is MVEASY_STATUS_STOP, MVEASY_STATUS_PLAYEND, - * or MVEASY_STATUS_READY. - * - * \remarks - * You must either call CriMvEasyPlayer::SetFile() or CriMvEasyPlayer::SetData(), or provide a file request - * callback with CriMvEasyPlayer::SetFileRequestCallback(), before calling this function. - * - * \remarks - * Once this function has been called, CriMvEasyPlayer::ExecuteDecode() and CriMvEasyPlayer::Update() must be - * called periodically in order for this function to have any effect. Otherwise, the movie will not play and - * the handle status will never change. - * - * \sa CriMvEasyPlayer::GetStatus(), CriMvEasyPlayer::DecodeHeader(), CriMvEasyPlayer::Prepare() - */ - /*JP - * \ingroup MODULE_CONTROL - * \brief ĐJn - * \param err G[iȗj - * - * [r̍ĐJn܂B
- * CriMvEasyPlayer::Prepare()Ă΂ɁA{֐Ăяoꍇ́A[r̉͂ƍĐ̏s߁A - * ۂɃ[r̍Đn܂܂łɃ^CO܂B
- * CriMvEasyPlayer::Prepare()ɌĂяoāAnhԂMVEASY_STATUS_READYɂȂĂ΁A - * ̊֐ĂяoĂɍĐn܂܂B - * - * CriMvEasyPlayer::DecodeHeader() ܂ CriMvEasyPlayer::Prepare() ̌Ăяoł̊֐Ăяoꍇ́A - * CriMvEasyPlayer̃nhԂ MVEASY_STATUS_STOPMVEASY_STATUS_PLAYEND łȂ΂܂B - * - * ĐJnOɂ CriMvEasyPlayer::SetFile() CriMvEasyPlayer::SetData() Ń[rf[^w肵ĂB
- * At@CvR[obN֐o^Ăꍇ͎Õ[rf[^ݒ͏ȗ邱Ƃ܂B - * - * \sa CriMvEasyPlayer::GetStatus(), CriMvEasyPlayer::DecodeHeader(), CriMvEasyPlayer::Prepare() - */ - void Start(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_CONTROL - * - * \brief Stops movie playback; resets a handle that is in an ERROR state, - * \param err Optional error code - * - * Tells the movie to stop playing and returns immediately. Note that this does not actually stop playback; - * an application must continue to call CriMvEasyPlayer::Update() and CriMvEasyPlayer::ExecuteDecode() until - * the status changes to MVEASY_STATUS_STOP. - * - * Once the handle is in the MVEASY_STATUS_STOP state, it can be reused for a different movie. - * - * If the handle state is MVEASY_STATUS_ERROR, an application must call this function and wait for the status - * to change to MVEASY_STATUS_STOP before destroying or reusing the player handle. - * - * In principle, this function does not reset any EasyPlayer handle parameters that were explicitly set via - * any of the settings APIs, so an application can replay the same movie by simply calling CriMvEasyPlayer::Start() - * once the state has changed to MVEASY_STATUS_STOP. However, calling this function will reset the following - * parameters: - * - * - The pause state (see CriMvEasyPlayer::Pause()) will be reset to OFF (not paused). - * - If a file request callback has been set (via CriMvEasyPlayer::SetFileRequestCallback()), the movie - * data information will be reset. - * - * See the description of CriMvEasyPlayer::ResetAllParameters() for a comparison of the parameters that are - * affected by that function and by this function. - * - * \remarks - * This function may call CriMvSoundInterface::Stop() and CriMvFileReaderInterface::Close(). For an EasyPlayer - * handle to change to MVEASY_STATUS_STOP, the sound and file interfaces need to transition to their STOP states. - * In the case of CriMvSoundInterface, this means that CriMvSoundInterface::GetStatus() will return - * MVEASY_SOUND_STATUS_STOP. For CriMvFileReaderInterface, this means that CriMvFileReaderInterface::GetCloseStatus() - * will return ASYNC_STATUS_COMPLETE. - * - * \sa CriMvEasyPlayer::Status, CriMvEasyPlayer::GetStatus(), CriMvEasyPlayer::ResetAllParameters() - */ - /*JP - * \ingroup MODULE_CONTROL - * \brief Đ~^G[Ԃ̕A - * \param err G[iȗj - * - * [rĐ~̗vo܂B{֐͑A֐łB{֐őSĂ̒~s킯ł͂܂B
- * {֐ďoAĐԂ MVEASY_STATUS_STOP Ȃ܂ł͒ʏ̃C[v𓮂ĂB
- * ̓Iɂ CriMvEasyPlayer::Update(), CriMvEasyPlayer::ExecuteDecode() ʏʂĂяoKv܂B - * - * ĐԂ MVEASY_STATUS_ERROR ɂȂꍇ́A{֐Ăяo MVEASY_STATUS_STOP ҂ĂB
- * - * for[vȂǂɂ郍[J[vŏԕύX҂Ă MVEASY_STATUS_STOP ɂ͂Ȃ܂B
- * - * {֐ĂяoĂAAvP[VĐnhɐݒ肵ep[^͌ƂăZbg܂B
- * MVEASY_STATUS_STOP ԂɂȂƁAxĐJnƑOƓp[^ōĐsƂł܂B
- * OIɖ{֐ŃZbgp[^͈ȉ̂̂܂B - * - CriMvEasyPlayer::Pause() ɂ|[YԂ́AOFFɃZbg܂B - * - t@CvR[obN֐̓o^ꍇA[rt@Ci܂̓j̏̓Zbg܂B - * - * Zbgp[^ꗗ CriMvEasyPlayer::ResetAllParameters() ̐QƂĂB - * - * {֐͕Kvɉ CriMvSoundInterface::Stop() CriMvFileReaderInterface::Close() Ăяo܂B
- * EasyPlayer nh MVEASY_STATUS_STOP ԂɂȂ邽߂ɂ́AeC^tF[X~ԂɂȂȂ΂܂B
- * TEhC^tF[X̏ꍇA CriMvSoundInterface::GetStatus() MVEASY_SOUND_STATUS_STOP ԂƁB
- * t@Cǂݍ݃C^tF[X̏ꍇA CriMvFileReaderInterface::GetCloseStatus() AASYNC_STATUS_COMPLETE - * ԂȂ΂܂B - * - * \sa CriMvEasyPlayer::Status, CriMvEasyPlayer::GetStatus(), CriMvEasyPlayer::ResetAllParameters() - */ - void Stop(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_CONTROL - * - * \brief Pauses or resumes movie playback - * \param sw Pause state. ON (1) will pause playback, OFF (0) will resume it. - * \param err Optional error code - * - * Pauses or resumes movie playback, depending on the argument. If \a sw is ON (1), playback will be paused. - * If \a sw is OFF (0), playback will be resumed. - * - * \remarks - * This function will call CriMvSoundInterface::Pause() and CriMvSystemTimerInterface::Pause() with the - * provided argument. - * - * \remarks - * Calling CriMvEasyPlayer::Stop() or CriMvEasyPlayer::ResetAllParameters() will set the pause state to OFF. - * - * \sa CriMvSoundInterface::Pause(), CriMvSystemTimerInterface::Pause() - */ - /*JP - * \ingroup MODULE_CONTROL - * \brief Đ̈ꎞ~܂͍ĊJ - * \param sw |[YXCb`B|[YON̏ꍇ1A|[YOFF(W[)̏ꍇ0w肵܂B - * \param err G[iȗj - * - * {֐͈̓Ɉˑ܂B
- * sw ON(1)ȂAꎞ~B sw OFF(0)ȂĐĊJłB - * - * CriMvEasyPlayer::Stop() ܂ CriMvEasyPlayer::ResetAllParameters Ăяoƃ|[YԂOFFɃZbg܂B - * - * ̊֐ CriMvSoundInterface::Pause() CriMvSystemTimerInterface::Pause() 𓯂ŌĂяo܂B - * - * \sa CriMvSoundInterface::Pause(), CriMvSystemTimerInterface::Pause() - */ - void Pause(CriBool sw, CriError &err=CriMv::ErrorContainer); - - CriBool IsPaused(CriError &err=CriMv::ErrorContainer); - - /* IvVݒ^擾 */ - /*EN - * \ingroup MODULE_OPTION - * - * \brief Sets the type of timer used for video synchronization - * \param type Type of timer to use - * \param err Optional error code - * - * In order to display video frames at the proper rate, CRI Movie uses a timer to determine when the - * next frame should be shown. For a movie with an audio track, you would typically use the - * MVEASY_TIMER_AUDIO timer type. For a movie with no audio, the MVEASY_TIMER_SYSTEM type timer - * should be used. - * - * The default is the timer type that was passed to CriMvEasyPlayer::Create(). If this value - * was NULL, a system timer (MVEASY_TIMER_SYSTEM) will be used. - * - * \remarks - * If an audio timer (MVEASY_TIMER_AUDIO) is wanted, it must be created and passed to - * CriMvEasyPlayer::Create(). - * - * \remarks - * If the movie does not have an audio track, CRI Movie will use a MVEASY_TIMER_SYSTEM regardless of - * the value set by this function. - * - * \sa CriMvEasyPlayer::GetMasterTimer(), CriMvEasyPlayer::Create(), TimerType - */ - /*JP - * \ingroup MODULE_OPTION - * \brief }X^^C}ʂ̎w - * \param type }X^^C} - * \param err G[iȗj - * - * rfIt[̎ǗɎgp^C}ʂw肵܂B
- * ftHg̓nh쐬Ɏw肷VXe^C}łB
- * rfIt[̕\^C~OI[fBI̎ƓƂ̓I[fBI^C}w肵ĂB
- * I[fBI^C}w肵ꍇłAĐ郀[rɃI[fBI܂܂ĂȂꍇ̓VXe^C}ƂȂ܂B - * - * \sa CriMvEasyPlayer::GetMasterTimer(), CriMvEasyPlayer::Create() - */ - void SetMasterTimer(TimerType type, CriError &err=CriMv::ErrorContainer); // default is SYSTEM - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Returns the type of timer currently being used by the EasyPlayer handle - * \param err Optional error code - * \return The current timer type - * - * Returns the current type of timer used to synchronize video frames. This value can be changed - * by calling CriMvEasyPlayer::SetMasterTimer(). Otherwise, the timer type is set when the handle - * is created. - * - * \sa CriMvEasyPlayer::SetMasterTimer(), CriMvEasyPlayer::Create(), TimerType - */ - /*JP - * \ingroup MODULE_OPTION - * \brief }X^^C}ʂ̎擾 - * \param err G[iȗj - * \return ݐݒ肳Ă}X^^C} - * - * ݐݒ肳Ă}X^^C}ʂ擾܂B - * - * \sa CriMvEasyPlayer::SetMasterTimer() - */ - TimerType GetMasterTimer(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Sets the number of internal video buffers - * \param npools The number of buffers to use; must be greater than 0 - * \param err Optional error code - * - * CRI Movie uses internal memory, or frame pools, to buffer decoded frames before display. - * More frame pools can help smooth out playback under high CPU loads. - * - * \remarks - * By default, the number of pools is 1. To change the value, this function must be called - * before starting playback (with either CriMvEasyPlayer::Prepare() or CriMvEasyPlayer::Start()). - */ - /*JP - * \ingroup MODULE_OPTION - * \brief rfIobt@it[v[j̎w - * \param npools rfIobt@iŒłPj - * \param err G[iȗj - * - * EasyPlayernh̃rfIobt@w肵܂B
- * ̓rfIobt@̓fR[hʂ~Ă߂̂̂ŁAt[v[ƌĂт܂B
- * t[v[قǐsărfIfR[hi߂邱Ƃł邽߁AfR[h - * וϓ傫AfR[hɎgpłCPUԂ̕ϓ傫ꍇɂX[YȍĐ - * s₷Ȃ܂B
- * ftHg̃t[v[͂PłB
- * t[v[ύXꍇ́AĐJnO( CriMvEasyPlayer::Prepare()܂ CriMvEasyPlayer::Start()) - * {֐sĂB - */ - void SetNumberOfFramePools(CriUint32 npools, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Sets the amount of movie data that will be buffered, in seconds - * \param sec Buffering time, in seconds - * \param err Optional error code - * - * CRI Movie buffers enough raw data from disk to allow for smooth playback and to reduce disk reads. - * The buffer size is based on the bitrate of the movie, and other movie parameters. - * - * By default, this buffer will be large enough to hold 1 second worth of playback. - * - * To determine the current buffering time, look at the \a buffering_time field of the - * CriMvStreamingParameters structure, which is retrieved by calling CriMvEasyPlayer::GetMovieInfo(). - * - * \remarks - * If this function is called, it must be called before starting playback (with either - * CriMvEasyPlayer::Prepare() or CriMvEasyPlayer::Start()). - * - * \remarks - * Passing \a 0.0 as the value of \a sec will reset the buffering time to the default value. - * - * \remarks - * If an application calls CriMvEasyPlayer::SetStreamingParameters() for a handle, this function - * can not be used with that handle. - * - * \remarks - * The value set by this function, along with the value set by CriMvEasyPlayer::SetReloadThresholdTime(), - * determine how often data is read from disk. See the description of - * CriMvEasyPlayer::SetReloadThresholdTime() for details. - * - * \sa CriMvEasyPlayer::SetReloadThresholdTime(), CriMvEasyPlayer::GetInputBufferInfo(), - * CriMvStreamingParameters - */ - /*JP - * \ingroup MODULE_OPTION - * \brief ̓f[^̃obt@OԂ̎w - * \param sec obt@OԁBPʂ͕bB - * \param err G[iȗj - * - * Xg[~OĐŃobt@O̓f[^̗ʂbPʂ̎ԂŎw肵܂B
- * EasyPlayeŕAobt@OԂƃ[r̃rbg[gǂݍ݃obt@̃TCY肵܂B - * - * ftHg̃obt@OԂ́AĐJn_ŃAvP[V쐬ς݂EasyPlayernh - * ɈˑČ܂܂BEasyPlayernhP‚ɂ‚Pb̃obt@OԂmۂ܂BAv - * P[VR‚EasyPlayernh쐬ĂꍇAobt@OԂ͂RbƂȂ܂B - * - * EasyPlayernhb̃obt@OԂɂȂĂ邩 CriMvEasyPlayer::GetMovieInfo - * ֐Ŏ擾 CriMvStreamingParameters \̂̕ϐ buffering_time ŊmFł܂B - * - * {֐̌ĂяóA CriMvEasyPlayer::Prepare ֐܂ CriMvEasyPlayer::Start ֐̑O܂łɎsĂB - * - * obt@OԂ 0.0f w肵ꍇAobt@OԂ̓CũftHglƂȂ܂B
- * ܂AAvP[V CriMvEasyPlayer::SetStreamingParameters ֐Ăяoꍇ͖{֐ - * ݒ肵lA CriMvEasyPlayer::SetStreamingParameters ֐̎w肪D悳܂B - * - * \sa CriMvEasyPlayer::SetReloadThresholdTime(), CriMvEasyPlayer::GetInputBufferInfo() - */ - void SetBufferingTime(CriFloat32 sec, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Determines how often the movie data buffer is refilled from disk - * \param sec Number of seconds of playback time to buffer - * \param err Optional error code - * - * EasyPlayer buffers raw data from disk to allow for smooth playback. How often it refills - * its buffers is determined by this function. When the amount of data remaining, in seconds, - * falls below this value, EasyPlayer will call into the FileReader module for this handle in - * order to read more data. - * - * SetBufferingTime() sets a "low water mark" for the data buffer. For instance, if an application - * sets the buffer size to 4 seconds (with CriMvEasyPlayer::SetBufferingTime()), and sets the reload - * threshold to 1 second, then CRI Movie will initially fill the buffer with 4 seconds worth of - * data. After 3 seconds worth of data have been decoded and consumed, there will be less than - * \a reload \a threshold seconds of data remaining, and CRI Movie will refill the buffer. - * - * \remarks - * The default value for \a sec is 0.8s. - * - * \remarks - * If this function is called, it must be called before starting playback (with either - * CriMvEasyPlayer::Prepare() or CriMvEasyPlayer::Start()). - * - * \sa CriMvEasyPlayer::SetBufferingTime(), CriMvEasyPlayer::GetInputBufferInfo(), CriMvFileReaderInterface - */ - /*JP - * \ingroup MODULE_OPTION - * \brief ēǂݍ臒l̎Ԏw - * \param sec Ԏwɂēǂݍ臒lBPʂ͕bB - * \param err G[iȗj - * - * EasyPlayernh́A̓obt@̃f[^ēǂݍ臒lȉɂȂɎ̃f[^ǂݍ݂s܂B - * ēǂݍ臒l͖{֐ɂw莞Ԃƃ[rf[^̃rbg[gɂĎIɌvZ܂B - * ēǂݍ臒l͎[b]Ŏw肵܂BftHgl0.8błB - * - * [rĐɃf[^𗠓ǂ݂ꍇȂǂɃV[N񐔂炷߂臒lݒ𗘗p邱Ƃł܂B - * Ⴆ΁Aobt@OԂ2bAēǂݍ臒l1bɐݒ肷ƁA[rf[^̓ǂݍ݂͖1b1̎sɂȂ܂B - * 邱ƂŁA1b̊Ԃ̓f[^̓ǂݍ݂AIɍsƂł܂B - * - * [rĐȂ烆[Uf[^̓ǂݍ݂sꍇA[Uf[^̓ǂݍ݂͖{֐Ŏw肵Ԉȓɓǂݍ - * I悤ɂĂBTCY̑傫ȃf[^͕ɕēǂݍނȂǂ̑ΏKvɂȂ܂B - * {֐Ŏw肵ԈȓɃ[Uf[^̓ǂݍ݂IȂꍇA[rf[^͊ă[rĐ؂܂B - * - * {֐̌ĂяóA CriMvEasyPlayer::Prepare ֐܂ CriMvEasyPlayer::Start ֐̑O܂łɎsĂB - * - * [rĐ̓̓obt@̃f[^ʂēǂݍ臒l̃TCÝACriMvEasyPlayer::GetInputBufferInfo Ŏ擾”\łB - * - * \sa CriMvEasyPlayer::SetBufferingTime(), CriMvEasyPlayer::GetInputBufferInfo() - */ - void SetReloadThresholdTime(CriFloat32 sec, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Retrieves input data buffering settings - * \param ibuf_info Input buffer information structure - * \param err Optional error code - * - * Populates the passed CriMvInputBufferInfo structure with the values of the settings - * for the raw input buffer size, the reload interval, and the amount of data currently buffered. - * - * \remarks - * This function can be called once the handle status has transitioned to MVEASY_STATUS_WAIT_PREP. - * - * \sa CriMvInputBufferInfo, CriMvEasyPlayer::SetBufferingTime(), CriMvEasyPlayer::SetReloadThresholdTime() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief ̓obt@̎擾 - * \param ibuf_info ̓obt@ - * \param err G[iȗj - * - * ̓obt@ CriMvInputBufferInfo 擾܂B
- * ̓obt@EasyPlayernh̏Ԃ MVEASY_STATUS_WAIT_PREP ȍ~ɂȂƎ擾ł܂B
- * - * \sa CriMvInputBufferInfo, CriMvEasyPlayer::SetBufferingTime(), CriMvEasyPlayer::SetReloadThresholdTime() - */ - void GetInputBufferInfo(CriMvInputBufferInfo &ibuf_info, CriError &err=CriMv::ErrorContainer); - - /*EN - * - * \brief Sets the maximum bitrate EasyPlayer will assume for movie data - * \param max_bitrate Maximum bitrate, in bits/second - * \param err Optional error code - * - * EasyPlayer determines the size of its input data buffer by the movie's bitrate, the buffering time, - * and other movie parameters. In normal usage, an application should not need to call this function. - * However, it can be useful when doing concatenated playback of several movies sequentially. - * - * If the bitrate of the first movie is smaller or larger than the next movie, EasyPlayer can choose - * a buffer size that will be appropriate for the first movie, but either too small for the next - * (causing excessive disk reads or playback stuttering) or too large (using more memory than necessary). - * - * Passing a value of 0 for \a max_bitrate will cause the handle to revert to its default behavior - * for determining maximum bitrate. - * - * \remarks - * The value set by this function will not be reflected in the \a max_bitrate field of the - * CriMvStreamingParameters structure, which will contain the actual value as stored in the movie's - * header. - * - * \remarks - * If this function is called, it must be called before starting playback (with either - * CriMvEasyPlayer::Prepare() or CriMvEasyPlayer::Start()). - * - * \remarks - * If an application calls CriMvEasyPlayer::SetStreamingParameters() for a handle, this function - * can not be used with that handle. - * - * \remarks - * For details about concatenated playback, see the description of CriMvEasyPlayer::SetFileRequestCallback(). - * - * \sa CriMvEasyPlayer::SetBufferingTime(), CriMvEasyPlayer::SetReloadThresholdTime(), - * CriMvEasyPlayer::SetFileRequestCallback() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief őrbg[g̎w - * \param max_bitrate őrbg[g(bit per second) - * \param err G[(ȗ) - * - * [rf[^̍őrbg[gw肵܂Bőrbg[g̓Xg[ĐpɊmۂobt@TCYɉe܂B
- * - * PĐ͖{֐ĂяoKv͂܂BEasyPlayernhIɍőrbg[g擾ĕKvȂ - * ǂݍ݃obt@mۂ܂B
- * - * AĐɁA擪̃[rt@C̃rbg[g㑱̃[rt@CƔׂċɒ[ɏꍇɂ́A{֐gp - * Iɍőrbg[g傫w肵ĂB
- * - * {֐Őݒ肵őrbg[ǵACriMvEasyPlayer::GetMovieInfo ֐Ŏ擾郀[rɂ͔f܂B - * CriMvEasyPlayer::GetMovieInfo ֐Ŏ擾ł̂̓[rf[^̖{̏łB
- * - * {֐̌ĂяóA CriMvEasyPlayer::Prepare ֐܂ CriMvEasyPlayer::Start ֐̑O܂łɎsĂB
- * - * őrbg[g 0w肵ꍇAőrbg[g̓[rf[^̎’lƂȂ܂B
- * ܂AAvP[V CriMvEasyPlayer::SetStreamingParameters ֐Ăяoꍇ͖{֐ - * ݒ肵lA CriMvEasyPlayer::SetStreamingParameters ֐̎w肪D悳܂B - * - * \sa CriMvEasyPlayer::SetBufferingTime(), CriMvEasyPlayer::SetReloadThresholdTime(), - * CriMvEasyPlayer::SetFileRequestCallback() - */ - void SetMaxBitrate(CriUint32 max_bitrate, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Sets the audio playback track - * \param track Audio track number - * \param err Optional error code - * - * If a movie has multiple audio tracks (for instance, English and Spanish versions), this function - * will determine which track plays. By default, the first audio track is used. - * - * To determine the number of audio tracks in the movie, call CriMvEasyPlayer::GetMovieInfo() and - * look at the \a num_audio field of the CriMvStreamingParameters structure. - * - * If the movie does not have any audio, this function has no effect. - * - * \remarks - * To use the default setting, set \a track to CRIMV_AUDIO_TRACK_AUTO. - * - * \remarks - * To turn off audio altogether, set \a track to CRIMV_AUDIO_TRACK_OFF. - * - * \sa CriMvEasyPlayer::GetMovieInfo() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief ĐI[fBIgbN̎w - * \param track ĐI[fBIgbN - * \param err G[iȗj - * - * [r̃I[fBIgbNĂꍇɁAĐI[fBIw肵܂B
- * ĐJnO( CriMvEasyPlayer::Prepare()܂ CriMvEasyPlayer::Start())ɖ{֐sĂB - * - * {֐sȂꍇ́AƂႢԍ̃I[fBIgbNĐ܂B
- * CriMvEasyPlayer::DecodeHeader() CriMvEasyPlayer::GetMovieInfo()gƂŁAǂ̃`l - * ǂȃI[fBIĂ邩ĐJnOɒm邱Ƃł܂B - * - * f[^݂ȂgbNԍw肵ꍇ́AI[fBI͍Đ܂B - * - * gbNԍƂCRIMV_AUDIO_TRACK_OFFw肷ƁAႦ[rɃI[fBI܂܂Ă - * ĂI[fBI͍Đ܂B - * - * ܂AftHgݒiƂႢ`l̃I[fBIĐjɂꍇ́A - * `lƂCRIMV_AUDIO_TRACK_AUTOw肵ĂB - * - * \sa CriMvEasyPlayer::GetMovieInfo(), CriMvEasyPlayer::DecodeHeader() - */ - void SetAudioTrack(CriSint32 track, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Turns movie looping on or off - * \param sw Looping value - * \param err Optional error code - * - * If \a sw is 1 (ON), the movie will loop continuously. - * If \a sw is 0 (OFF), the movie will play normally. - * - * In normal usage, a movie will play once, with the handle status changing to MVEASY_STATUS_PLAYEND - * when it completes. When looping is ON, this behavior changes. When the movie reaches the - * end, it will immediately start playing again from the beginning, and the status will continue to - * toggle between MVEASY_STATUS_PLAYING and MVEASY_STATUS_PREP. - * - * If looping is ON, and the playback is from a file, EasyPlayer will call CriMvFileReaderInterface::Seek() - * as necessary to reset the file pointer. - * - * \remarks - * If looping is ON, and an application sets it to OFF while the movie is playing, playback might - * not stop at the end of the movie. In that case, playback will end after the next loop iteration. - * - * \sa CriMvEasyPlayer::GetLoopFlag(), CriMvFileReaderInterface::Seek() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief [vĐtO̎w - * \param sw [vXCb`BON̏ꍇ̓[vAOFF̏ꍇ̓[vɂȂ܂B - * \param err G[iȗj - * - * [vĐ̗Lݒ肵܂BftHg̓[vOFFłB
- * [vĐONɂꍇ́A[ȑI[܂ōĐĂnhԂMVEASY_STATUS_PLAYENDɂȂ炸A - * [r̐擪ĐJԂ܂B
- * t@CwōĐĂꍇ́AŌ܂œǂݍ񂾂 CriMvFileReaderInterface::Seek()g - * ǂݍ݈ʒut@C̐擪ɖ߂܂B - * - * [vĐOFFɐݒ肵ꍇ́ÂƂǂݍł[ȑI[܂ōĐƁA - * nhԂMVEASY_STATUS_PLAYENDɑJڂ܂B
- * ĐɃ[vOFFɂꍇA^C~OɂẮAĐ̃[rI[ŏI炸ǍJԂ - * Đ܂Ŏs܂B - * - * ݂̃[vݒ擾ɂ CriMvEasyPlayer::GetLoopFlag()gĂB - * - * \sa CriMvEasyPlayer::GetLoopFlag(), CriMvFileReaderInterface::Seek() - */ - void SetLoopFlag(CriBool sw, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Retrieves the value of the looping flag - * \return The current looping setting - * - * By default, looping is OFF and playback will stop when it reaches the end. You can - * change this behavior by calling CriMvEasyPlayer::SetLoopFlag(). - * - * \sa CriMvEasyPlayer::SetLoopFlag() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief [vĐtO̎擾 - * \param err G[iȗj - * \return ݂̃[vĐݒ - * - * ݂̃[vݒ擾܂B - * [vݒ CriMvEasyPlayer::SetLoopFlag() ŕύX邱Ƃł܂B - * - * \sa CriMvEasyPlayer::SetLoopFlag() - */ - CriBool GetLoopFlag(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Gets the amount of time that a movie has been playing - * \param count Number of timer units since the movie started playing - * \param unit Number of timer units per second - * \param err Optional error code - * - * This function retrieves the absolute time that has elapsed since a movie started playing. - * The time value is returned in two parts - a counter with an arbitrary interval, and the - * number of timer ticks per second. To determine the playing time in seconds, divide - * \a count by \a unit. - * - * Before playback has started, and after it has stopped, this function will return a \a count value of 0. - * - * The value retrieved is the value of the master timer for the handle, not the time of the current frame itself. - * To get the video frame time, check the CriMvFrameInfo structure once you have retrieved the frame. - * - * \remarks - * Note that this function provides an absolute playback time - it does not wrap to 0 - * when the movie loops. - * - */ - /*JP - * \ingroup MODULE_OPTION - * \brief Đ̎擾 - * \param count ^C}JEg - * \param unit Pb̃^C}JEglBcount unit ŕbPʂ̎ƂȂ܂B - * \param err G[iȗj - * - * ^C}擾܂Bcountunit̓‚̕ϐŕ\܂B
- * count unit ŕbPʂ̎ƂȂ悤ȒlԂ܂B
- * ĐJnOi CriMvSoundInterface::Start()ĂяoOj - * Đ~i CriMvSoundInterface::Stop()Ăяoj́AOi^C}JEgOjԂ܂B
- * {֐̓}X^^C}Ŏw肳ꂽ^C}̎ԂŁArfIt[̎Ԃ̂ł͂܂B
- * 擾rfIt[̖{̕\́ArfIt[擾 CriMvFrameInfo \̂QƂĂB - */ - void GetTime(CriUint64 &count, CriUint64 &unit, CriError &err=CriMv::ErrorContainer); // only refer time of SyncMasterTimer - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Gets information about the movie - * \param stmprm Movie information structure - * \param err Optional error code - * \return TRUE if movie information was successfully retrieved - * \return FALSE if the header has not yet been decoded, or if an error occurred - * - * Populates the passed \a CriMvStreamingParameters structure with information about the current movie, - * including the bitrate, resolution, audio track information, subtitle availability, and more. - * - * This function is available once the handle status has changed to MVEASY_STATUS_WAIT_PREP. If an application - * needs this information before starting playback (for instance, to set up for playing subtitles, or to - * allocate a display surface based on the size of the movie), call CriMvEasyPlayer::DecodeHeader(), then - * call GetMovieInfo(). - * - * \remarks - * When doing concatenated playback (via CriMvEasyPlayer::SetFileRequestCallback()), GetMovieInfo() will - * return information about the currently playing movie. - * - * \sa CriMvEasyPlayer::DecodeHeader(), CriMvEasyPlayer::SetFileRequestCallback() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief [r̎擾 - * \param stmprm [r - * \param err G[iȗj - * - * [r CriMvStreamingParameters 擾܂B
- * [r񂩂͎Ƀrbg[g𑜓xAI[fBIȂǂ킩܂B
- * [rEasyPlayernh̏Ԃ MVEASY_STATUS_WAIT_PREP ȍ~ɂȂƎ擾ł܂B
- * ĐJnOɃ[rm肽ꍇ́A CriMvEasyPlayer::DecodeHeader()Ăяoăwb_͂sĂB - * - * AĐsꍇAŌɎ擾t[܂ރ[rt@Cɂ‚Ă̏Ԃ܂B - * - * \sa CriMvEasyPlayer::DecodeHeader() - */ - CriBool GetMovieInfo(CriMvStreamingParameters &stmprm, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Changes the parameters for the movie - * \param stmprm Movie information structure - * \param err Optional error code - * - * This is a DEBUG function and should not normally be used by applications. - * - * This function allows an application to change the streaming parameters for the movie as a whole. - * It is available once the handle status has changed to MVEASY_STATUS_WAIT_PREP. - * - * To use this function, first call CriMvEasyPlayer::DecodeHeader(), then call CriMvEasyPlayer::GetMovieInfo() - * to retrieve the current movie parameters. Change the fields of the CriMvStreamingParameters structure - * as appropriate, then call SetStreamingParameters(). - * - * \sa CriMvEasyPlayer::GetMovieInfo(), CriMvEasyPlayer::DecodeHeader() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief Xg[~Op[^̕ύX - * \param stmprm Xg[~Op[^ - * \param err G[iȗj - * - * {֐͒ʏAAvP[V͎gp܂BfobOp̊֐łB - * - * [rĐ̂߂̃Xg[~Op[^EasyPlayernhɐݒ肵܂B
- * Xg[~Op[^wł̂́AEasyPlayernhԂMVEASY_STATUS_WAIT_PREP̎łB
- * ̊֐́Aǂݍ݃obt@TCYȂǍׂȃp[^SăAvP[VŒꍇɎg܂B
- * CriMvEasyPlayer::DecodeHeader()Ńwb_͂sƁA CriMvEasyPlayer::GetMovieInfo()Ŏ擾ł - * [r񂪂̂܂܃Xg[~Op[^ƂȂ܂̂ŁAlύXāA{֐Őݒ肵Ȃ - * ĂB - * - * \sa CriMvEasyPlayer::GetMovieInfo(), CriMvEasyPlayer::DecodeHeader() - */ - void SetStreamingParameters(CriMvStreamingParameters *stmprm, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_VIDEO_FRAME - * - * \brief Determine if a new video frame can be displayed - * - * \param err Optional error code - * - * \return TRUE if a frame is ready to be displayed - * \return FALSE if the movie is paused or not playing, or if a new frame is - * not yet decoded or ready to be displayed - * - * Each frame in a movie corresponds to an absolute time, with the first frame being time 0. - * The playback time is controlled by the master timer for this handle. - * If the time of the next frame is less than or equal to the current playback time, as determined - * by CriMvEasyPlayer::GetTime(), it is ready to be displayed, and this function will return TRUE. - * - * If an application needs to do some complex or lengthy processing before displaying a frame (such - * as locking a texture), it should call this function first. - * - * \remarks - * If the next frame has not yet been decoded, this function will return FALSE regardless of the playback time. - * - * \sa CriMvEasyPlayer::GetTime() - */ - /*JP - * \ingroup MODULE_VIDEO_FRAME - * \brief t[̕\ - * \param err G[iȗj - * \return ̃rfIt[łɕ\ɂȂĂꍇTRUE(1)Ԃ܂B
- * ̃rfIt[܂fR[hłȂꍇFALSE(0)Ԃ܂B - * - * ̃rfIt[łɕ\ɂȂĂ邩ǂ₢킹܂B
- * fR[hxĂĎ̃rfIt[܂fR[hłĂȂꍇ́AĐɊ֌W - * ȂFALSEԂ܂B
- * ‚܂肱̊֐́ũt[ GetFrameOnTime֐Ŏ擾ł邩ǂv𒲂ׂ܂B
- * rfIt[ۂɎ擾ɂȂ΂ȂiႦ΃eNX`bNȂǁj - * ꍇ́Å֐Ńt[擾̐ۂ𔻒肵Ă珈ĂB - * - * \sa CriMvEasyPlayer::GetTime() - */ - CriBool IsNextFrameOnTime(CriError &err=CriMv::ErrorContainer); - -#if !defined(XPT_TGT_EE) - /*EN - * \ingroup MODULE_VIDEO_FRAME - * - * \brief Loads video frame data into a buffer, in 32 bit ARGB format - * \param imagebuf Pointer to output buffer - * \param pitch Pitch of output buffer, in bytes - * \param bufsize Size of output buffer, in bytes - * \param frameinfo Video frame information structure - * \param err Optional error code - * \return TRUE if a frame was retrieved - * \return FALSE otherwise - * - * Copies the next decoded frame into the 32 bit ARGB image buffer pointed to by \a imagebuf. - * If the display time is less than the frame time, or if the frame has not yet been decoded, the - * \a frameinfo parameter will be cleared and this function will return FALSE. - * - * The \a pitch parameter is the width, in bytes, of each row of the frame image, including any padding. - * - * To determine if the next frame is ready to be displayed, call CriMvEasyPlayer::IsNextFrameOnTime(). - * - * CRI Movie decodes video frames into YUV420 format internally, and stores them in frame pools (see - * CriMvEasyPlayer::SetNumberOfFramePools()) for later display. When this function is called, - * the frame must first converted to ARGB format. This can be a very CPU-intensive operation, - * especially on the PS3 and Xbox360. For 1280 x 720 video resolution, this can use almost an - * entire vsync interval. On these platforms, we recommend implementing a pixel shader and calling - * CriMvEasyPlayer::GetFrameOnTimeAsYUVBuffers() instead. - * - * \remarks
- * If an application uses this function, an application need to call CriMv::InitializeFrame32bitARGB() - * after CriMv::Initialize(). If an application calls this function without CriMv::InitializeFrame32bitARGB() - * calling, this function failed and an error callback occurs. - * - * \remarks - * This function is not available on the PS2. - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime(), CriMvEasyPlayer::GetFrameOnTimeAsYUVBuffers(), - * CriMvEasyPlayer::SetNumberOfFramePools() - */ - /*JP - * \ingroup MODULE_VIDEO_FRAME - * \brief 32bit ARGBtH[}bgł̃fR[hʂ̎擾 - * \param imagebuf o̓obt@|C^ - * \param pitch o̓obt@̃sb` [byte] - * \param bufsize o̓obt@̃TCY [byte] - * \param frameinfo 擾rfIt[̏\ - * \param err G[iȗj - * \return t[擾łꍇTRUE(1)AłȂꍇFALSE(0)Ԃ܂B - * - * 32bit ARGBtH[}bgŁA\ɂȂĂrfIt[擾܂B
- * ̊֐Ăяoꍇ́AARGBobt@̎̂mۂŌĂяoKv܂B
- * rfIt[͈imagebufŎw肵ARGBobt@ɏo܂B
- * ̃rfIt[̕\ɂȂĂȂAfR[hIĂȂꍇ - * t[擾łAframeinfo̒g̓NA܂B
- * OɃrfIt[擾ł邩ǂm肽ꍇ CriMvEasyPlayer::IsNextFrameOnTime() - * gpĂB - * - * 32bit ARGB ̎ۂ̃sNZf[^̕тɂ‚ẮÃvbgtH[ōłWI - * tH[}bgɂȂ܂B - * - * :
- * {֐gpꍇ̓t[ϊ̏ CriMv::InitializeFrame32bitARGB()̌Ăяo - * OɕKvłBt[ϊ̏s킸ɖ{֐Ăяoꍇ̓t[擾ɎsA - * G[R[obN܂B - * - * :
- * PS3, Xbox360 ł{֐͎gpł܂AƂĂCPUׂ̍֐ƂȂ܂B
- * 𑜓x 1280x720 ̃[r{֐t[擾1vsync߂Ԃ܂B
- * PS3, Xbox360 łCriMvEasyPlayer::GetFrameOnTimeAsYUVBuffers() ֐ sNZVF[_[ - * ̑gݍ킹ɂt[ϊ߂܂B
- * - * l:
- * PS2CRI Movie ͖{֐ɑΉĂ܂B - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime() - */ - CriBool GetFrameOnTimeAs32bitARGB(CriUint8 *imagebuf, CriUint32 pitch, CriUint32 bufsize, CriMvFrameInfo &frameinfo, - CriError &err=CriMv::ErrorContainer); -#endif - -#if !defined(XPT_TGT_EE) - /*EN - * \ingroup MODULE_VIDEO_FRAME - * - * \brief Loads video frame data into a set of Y,U,V separate buffers - * \param yuvbuffers Pointer to Y,U,V buffer data structure - * \param frameinfo Video frame information structure - * \param err Optional error code - * \return TRUE if a frame was retrieved - * \return FALSE otherwise - * - * Copies the next decoded frame into the Y,U,V image buffers pointed to by \a yuvbuffers, for use - * with a pixel shader. CRI Movie decodes video frames into YUV420 format internally, so this is - * a very efficient function. - * - * If the display time is less than the frame time, or if the frame has not yet been decoded, the - * \a frameinfo parameter will be cleared and this function will return FALSE. - * - * To determine if the next frame is ready to be displayed, call CriMvEasyPlayer::IsNextFrameOnTime(). - * - * \remarks - * If the movie does not have an alpha channel, the alpha buffer fields of the \a CriMvYuvBuffers - * structure are not used. - * - * \remarks - * This function is not available on the PS2. - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime() - */ - /*JP - * \ingroup MODULE_VIDEO_FRAME - * \brief YUV•ʃobt@ւ̃fR[hʂ̎擾 - * \param yuvbuffers YUV•ʃobt@̃p[^\ - * \param frameinfo 擾rfIt[̏\ - * \param err G[iȗj - * \return t[擾łꍇTRUE(1)AłȂꍇFALSE(0)Ԃ܂B - * - * YUV•ʃobt@`ŕ\ɂȂĂrfIt[擾܂B
- * YUV•ʃobt@`̓sNZVF[_[Ńt[`悷邽߂̏o̓tH[}bgłB
- * ̊֐Ăяoꍇ́AYUV•ʃobt@̎̂mۂŌĂяoKv܂B
- * rfIt[͈yuvbuffersŎw肵YUV•ʃobt@ɏo܂B
- * ̃rfIt[̕\ɂȂĂȂAfR[hIĂȂꍇ - * t[擾łAframeinfo̒g̓NA܂B
- * OɃrfIt[擾ł邩ǂm肽ꍇ CriMvEasyPlayer::IsNextFrameOnTime() - * gpĂB
- *
- * At@[rĐsȂꍇ́A yuvbuffers AlphaeNX`֘Ãp[^͎gp܂B
- * - * l:
- * PS2CRI Movie ͖{֐ɑΉĂ܂B - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime() - */ - CriBool GetFrameOnTimeAsYUVBuffers(CriMvYuvBuffers *yuvbuffers, CriMvFrameInfo &frameinfo, - CriError &err=CriMv::ErrorContainer); -#endif - -#if defined(XPT_TGT_PC) || defined(XPT_TGT_SH7269) || defined(XPT_TGT_TRGP6K) - /*EN - * \ingroup MODULE_VIDEO_FRAME - * - * \brief Loads video frame data into a buffer, in YUV422 format - * \param imagebuf Pointer to output buffer - * \param pitch Pitch of output buffer, in bytes - * \param bufsize Size of output buffer, in bytes - * \param frameinfo Video frame information structure - * \param err Optional error code - * \return TRUE if a frame was retrieved - * \return FALSE otherwise - * - * Copies the next decoded frame into the YUV422 texture buffer pointed to by \a imagebuf. - * CRI Movie decodes video frames into YUV420 format internally, so there is some internal conversion - * required when using this function. - * - * If the display time is less than the frame time, or if the frame has not yet been decoded, the - * \a frameinfo parameter will be cleared and this function will return FALSE. - * - * The \a pitch parameter is the width, in bytes, of each row of the frame image, including any padding. - * - * To determine if the next frame is ready to be displayed, call CriMvEasyPlayer::IsNextFrameOnTime(). - * - * \remarks - * This function is currently only available in the PC version of CRI Movie. - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime() - */ - /*JP - * \ingroup MODULE_VIDEO_FRAME - * \brief YUV422tH[}bgł̃fR[hʂ̎擾 - * \param imagebuf o̓obt@̃|C^ - * \param pitch o̓obt@̃sb` [byte] - * \param bufsize o̓obt@TCY [byte] - * \param frameinfo 擾rfIt[̏\ - * \param err G[iȗj - * \return t[擾łꍇTRUE(1)AłȂꍇFALSE(0)Ԃ܂B - * - * YUV422eNX`tH[}bgŁA\ɂȂĂrfIt[擾܂B
- * ̊֐Ăяoꍇ́AYUVobt@̎̂mۂŌĂяoKv܂B
- * rfIt[͈imagebufŎw肵YUVobt@ɏo܂B
- * ̃rfIt[̕\ɂȂĂȂAfR[hIĂȂꍇ - * t[擾łAframeinfo̒g̓NA܂B
- * OɃrfIt[擾ł邩ǂm肽ꍇ CriMvEasyPlayer::IsNextFrameOnTime() - * gpĂB - * - * ylz
- * ݂́APCCRI Movie ̂ݖ{֐ɑΉĂ܂B - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime() - */ - CriBool GetFrameOnTimeAsYUV422(CriUint8 *imagebuf, CriUint32 pitch, CriUint32 bufsize, CriMvFrameInfo &frameinfo, - CriError &err=CriMv::ErrorContainer); -#endif - -#if defined(XPT_TGT_IPHONE) || defined(XPT_TGT_WINMO) || defined(XPT_TGT_ANDROID) || defined(XPT_TGT_CQSH2A) || defined(XPT_TGT_ACRODEA) || defined(XPT_TGT_NACL) || defined(XPT_TGT_SH7269) || defined(XPT_TGT_PC)|| defined(XPT_TGT_TRGP6K) - /*EN - * \ingroup MODULE_VIDEO_FRAME - * \brief Get video frame data to 16bit RGB565 format buffer - * - * This function is added for a prototype library for iPhone - * Please add comments when releasing the SDK. - * - */ - /*JP - * \ingroup MODULE_VIDEO_FRAME - * \brief 16bit RGB565tH[}bgł̃fR[hʂ̎擾 - * - * ̊֐iPhoneCRI Moviẽvg^Cvp̊֐錾łB - * SDKƂă[Xۂ́ARgljĉB - * - */ - CriBool GetFrameOnTimeAsRGB565(CriUint8 *imagebuf, CriUint32 pitch, CriUint32 bufsize, CriMvFrameInfo &frameinfo, - CriError &err=CriMv::ErrorContainer); -#endif - -#if defined(XPT_TGT_EE) - /*EN - * \ingroup MODULE_VIDEO_FRAME - * - * \brief Gets a reference to EasyPlayer's internal video frame buffer, in 32 bit ARGB format - * \param frameinfo Video frame information structure - * \param err Optional error code - * \return TRUE if a frame was retrieved - * \return FALSE otherwise - * - * Locks the internal buffer for the current video frame in memory, and retrieves a pointer to it. This is - * different behavior than the GetFrameXXX()functions, which copy the frame data into a caller-supplied location. - * - * On successful return from this function, the fields of \a frameinfo will be populated with information - * about the frame. In particular, the \a imageptr field will be set to the image buffer, in 32 bit ARGB format. - * After calling this function, an application must copy the video frame into its own buffer or transfer it to - * GS local memory via DMA. - * - * To determine if the next frame is ready to be displayed, call CriMvEasyPlayer::IsNextFrameOnTime(). - * - * \remarks - * After the application has copied the frame data, it must call CriMvEasyPlayer::UnlockFrame(). - * - * \remarks - * This function is only available on the PS2. - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime(), CriMvEasyPlayer::UnlockFrame() - */ - /*JP - * \ingroup MODULE_VIDEO_FRAME - * \brief fR[hʗ̈(ARGB32bit)̃bNBPS2pB - * \param frameinfo bNrfIt[̏\ - * \param err G[iȗj - * - * {֐PS2p̃t[擾֐ŁA@ GetFrame ֐ɑ܂B
- * PS2ł GetFrame ֐̑ɖ{֐ UnlockFrame ֐gpăt[擾s܂B
- * GetFrame ֐͏o̓obt@w肵ĂփfR[hʂ擾̂ɑ΂ALockFrame ֐̓obt@w肹 - * CriMvEasyPlayernhɂfR[hʃobt@̃|C^擾Ƃ낪Ⴂ܂B
- * - * {֐̓fR[hʂ̃̈QƊJn邽߂ɃbN܂B
- * ̊֐Ńt[bNł̂́Ãt[\”\ԂɂȂĂꍇ݂̂łB
- * AvP[V̓t[bNƁAfR[hʂDMAŃeNX`̈֓]邩A - * ʃobt@փRs[Ȃǂ̏s܂B
- * fR[hʂ̎QƂIɂ́AK CriMvEasyPlayer::UnlockFrame() ֐ĂяoĎQƏIʒmĂB
- * - * l:
- * {֐PS2CRI Movie ̂ݑΉĂ܂B - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime(), CriMvEasyPlayer::UnlockFrame() - */ - CriBool LockFrameOnTimeAs32bitARGB_PS2(CriMvFrameInfo &frameinfo, CriError &err=CriMv::ErrorContainer); -#endif - - /*EN - * \ingroup MODULE_VIDEO_FRAME - * - * \brief Unlocks the video frame - * \param frameinfo Pointer to locked video frame information - * \param err Optional error code - * - * Unlocks the video frame that was locked in memory by a call to one of the LockFrameXXX() functions. - * - * The \a frameinfo parameter must be the same one that was passed to LockFrameXXX(). - * - * If the frame has been locked, EasyPlayer will not be able to retrieve the next frame until the frame is - * unlocked. An attempt to lock the same frame more than once will fail. - * - * The LockFrameXXX() functions are CriMvEasyPlayer::LockFrameOnTimeAs32bitARGB_PS2() and - * CriMvEasyPlayer::LockFrameOnTimeAsYUVBuffers(). Depending on the platform, only one or the other of - * these functions will be available. - * - * \sa CriMvEasyPlayer::LockFrameOnTimeAs32bitARGB_PS2(), CriMvEasyPlayer::LockFrameOnTimeAsYUVBuffers() - */ - /*JP - * \ingroup MODULE_VIDEO_FRAME - * \brief bNt[Ŏ擾fR[hʂAbN - * \param frameinfo bNrfIt[̏\ - * \param err G[iȗj - * - * {֐̓bNt[֐găbNĂt[AbNAQƂ̏Iʒm܂B
- * bNt[֐ɂ CriMvEasyPlayer::LockFrameOnTimeAs32bitARGB_PS2() CriMvEasyPlayer::LockFrameOnTimeAsYUVBuffers() - * ܂Aǂ̊֐găbNꍇA{֐găAbN܂B
- * {֐̈ɂ́Aǂ̃t[AbN邩w邽߂ɁAbNt[֐Ŏ擾t[\̂w肵܂B
- * - * {֐ŃAbNt[́AȌAɃrfIt[̃fR[ho̓obt@ƂĎgp܂B
- * PxAbNt[xbN邱Ƃ͏o܂B
- * - * \sa CriMvEasyPlayer::LockFrameOnTimeAs32bitARGB_PS2(), CriMvEasyPlayer::LockFrameOnTimeAsYUVBuffers() - */ - CriBool UnlockFrame(CriMvFrameInfo *frameinfo, CriError &err=CriMv::ErrorContainer); - -#if !defined(XPT_TGT_EE) - /*EN - * - * \brief Gets a reference to EasyPlayer's internal video frame buffer - * \param yuvbuffers Y,U,V buffer data structure - * \param frameinfo Video frame information structure - * \param err Optional error code - * \return TRUE if a frame was retrieved - * \return FALSE otherwise - * - * Locks the internal buffer for the current video frame in memory, and retrieves a pointer to it. This is - * different behavior than the GetFrameXXX() functions, which copy the frame data into a caller-supplied location. - * - * On successful return from this function, the fields of \a yuvbuffers will be set to the Y,U,V fields of the - * video frame, and the fields of \a frameinfo will be populated with information about the frame. - * - * After calling this function, an application must copy the video frame into its own buffer or transfer it to - * texture memory. - * - * To determine if the next frame is ready to be displayed, call CriMvEasyPlayer::IsNextFrameOnTime(). - * - * \remarks - * After the application has copied the frame data, it must call CriMvEasyPlayer::UnlockFrame(). - * - * \remarks - * This function is not available on the PS2. - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime(), CriMvEasyPlayer::UnlockFrame() - */ - /*JP - * \ingroup MODULE_VIDEO_FRAME - * \brief fR[hʗ̈̃bN - * \param yuvbuffers YUV•ʃobt@̃p[^\ - * \param frameinfo bNrfIt[̏\ - * \param err G[iȗj - * - * GetFrame Ƃ͕ʂ̎dl̃t[擾֐łB
- * {֐ UnlockFrame ֐ƃZbgŎgp܂B
- * GetFrame ֐͏o̓obt@w肵ĂփfR[hʂ擾̂ɑ΂ALockFrame ֐̓obt@w肹 - * CriMvEasyPlayernhɂfR[hʃobt@̃|C^擾Ƃ낪Ⴂ܂B
- * - * {֐̓fR[hʂ̃̈QƊJn邽߂ɃbNA - * fR[hʂYUVRނ̃obt@ɂ‚Ă̏ yuvbuffers Ɋi[܂B
- * ̊֐Ńt[bNł̂́Ãt[\”\ԂɂȂĂꍇ݂̂łB
- * AvP[V̓t[bNƁAfR[hʂeNX`̈փRs[邩A - * ʃobt@փRs[Ȃǂ̏s܂B
- * fR[hʂ̎QƂIɂ́AK CriMvEasyPlayer::UnlockFrame() ֐ĂяoĎQƏIʒmĂB
- * - * l:
- * PS2CRI Movie ͖{֐ɑΉĂ܂B - * - * \sa CriMvEasyPlayer::UnlockFrame() - */ - CriBool LockFrameOnTimeAsYUVBuffers(CriMvYuvBuffers &yuvbuffers, CriMvFrameInfo &frameinfo, - CriError &err=CriMv::ErrorContainer); -#endif - - /*EN - * \ingroup MODULE_VIDEO_FRAME - * - * \brief Discards the next video frame - * \param frameinfo Discarded frame information structure - * \param err Optional error code - * \return TRUE if a frame was available to discard - * \return FALSE otherwise - * - * Discards the next video frame, if it is available, and populates \a frameinfo with information about - * the frame. Note that the \a imageptr field of that structure will not be available and should not - * be referenced. - * - * To determine if the next frame is ready to be displayed, call CriMvEasyPlayer::IsNextFrameOnTime(). - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime() - */ - /*JP - * \ingroup MODULE_VIDEO_FRAME - * \brief t[擾Ɏ̂Ă - * \param frameinfo jrfIt[̏\ - * \param err G[iȗj - * - * fR[hς݂̃rfIt[̂ĂꍇɎgp֐łB
- * t[擾֐ƔׂƁAo͗pobt@KvłB
- * CriMvEasyPlayer::IsNextFrameOnTime()Ŏt[擾ł邱ƂmFA{֐ĂяoĂB
- * frameinfoɂ͎Ql̂߂ɔjrfIt[̏񂪊i[܂AfR[hʎ̂ɂ̓ANZXł܂B - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime() - */ - CriBool DiscardNextFrame(CriMvFrameInfo &frameinfo, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Sets the current channel for displaying subtitles - * - * \param channel Subtitle channel number - * \param err Optional error code - * - * A movie can contain up to 16 distinct sets of subtitles, each on its own display channel. This can - * be used, for instance, to provide multilanguage support. - * - * Subtitle channels are numbered sequentially, starting from 0, but do not need to be contiguous. - * For example, a movie can have 3 sets of subtitles, on channels 1, 5, and 7. The number of channels - * can be determined once CriMvEasyPlayer::GetMovieInfo() has completed successfully by looking at the - * \a num_subtitle field of the \a CriMvStreamingParameters structure passed to that function. - * - * By default, subtitle playback is off. To turn off subtitles once they have been turned on, pass - * CRIMV_SUBTITLE_CHANNEL_OFF as the value of \a channel. - * - * If the selected subtitle channel does not exist, subtitles will not be displayed. - * - * \remarks - * If an application turns on subtitle display with this function, it must periodically call - * CriMvEasyPlayer::GetSubtitleOnTime(), or else movie playback will stall. - * - * \sa CriMvEasyPlayer::GetMovieInfo(), CriMvEasyPlayer::DecodeHeader(), CriMvEasyPlayer::GetSubtitleOnTime() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief 擾鎚`l̐ݒ - * \param channel `l - * \param err G[iȗj - * - * 擾鎚`lݒ肵܂BftHg͎擾łB - * - * CriMvEasyPlayer::DecodeHeader() CriMvEasyPlayer::GetMovieInfo()gƂŁAĐ郀[r - * ‚̎܂ł邩ĐJnOɒm邱Ƃł܂B - * - * f[^݂Ȃ`lԍw肵ꍇ́A͎擾ł܂B
- * ftHgݒi擾jɂꍇ́A`lƂCRIMV_SUBTITLE_CHANNEL_OFFw肵ĂB - * - * ̊֐Ŏ`lw肵ꍇ́AC[vI CriMvEasyPlayer::GetSubtitleOnTime() - * sĂB擾IɍsȂꍇ́A[rĐrŎ~܂܂B - * - * \sa CriMvEasyPlayer::GetMovieInfo(), CriMvEasyPlayer::DecodeHeader(), CriMvEasyPlayer::GetSubtitleOnTime - */ - void SetSubtitleChannel(CriSint32 channel, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_VIDEO_FRAME - * - * \brief Retrieves subtitle data for the current frame, if available - * - * \param bufptr Buffer to receive subtitle data - * \param bufsize Size of buffer, in bytes - * \param err Optional error code - * - * \return The number of bytes copied into \a bufptr - * - * If the movie contains subtitle data, and there is a subtitle for the current frame, up to \a bufsize - * bytes of the subtitle data for the active subtitle channel will be copied into \a bufptr. Otherwise, - * the entire buffer will be filled with zeroes. - * - * \remarks - * If an application turns on subtitle display with CriMvEasyPlayer::SetSubtitleChannel(), it must - * periodically call this function, or else movie playback will stall. - * - * \remarks - * An application should not make assumptions as to whether the returned data is NUL-terminated. - * - * \sa CriMvEasyPlayer::SetSubtitleChannel() - */ - /*JP - * \ingroup MODULE_VIDEO_FRAME - * \brief f[^̎擾 - * \param bufptr o̓obt@|C^ - * \param bufsize o̓obt@TCY [byte] - * \param err G[iȗj - * \return 擾f[^̃TCY[byte]Ԃ܂B - * - * \ɂȂĂ鎚f[^擾܂B - * ̊֐Ăяoꍇ́Apobt@̎̂mۂŌĂяoĂB
- * f[^͈ bufptr Ŏw肵obt@ɏo܂B
- * f[^ bufsize 傫ꍇ́Abufsize Ɏ܂ʂoAc͔j܂B - * - * \̎ꍇ́Aobt@̒g̓NA܂B - * - * CriMvEasyPlayer::SetSubtitleChannel()ő݂鎚`lw肵Ăꍇ́A - * C[vIɖ{֐sĂB
- * sȂꍇ́A[rĐrŎ~܂܂B - * - * \sa CriMvEasyPlayer::SetSubtitleChannel() - */ - CriUint32 GetSubtitleOnTime(CriUint8 *bufptr, CriUint32 bufsize, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Sets a secondary sound interface - * - * \param sound Secondary sound interface to attach to this handle - * \param err Optional error code - * - * A subaudio interface allows an application to play two audio tracks at the same time. This is - * typically used to play a dialog track or sound effects along with background music. After calling - * this function, an application needs to call CriMvEasyPlayer::SetSubAudioTrack() to choose the secondary - * audio track to play. - * - * Note that you must create a separate sound interface to pass to this function. The interface used - * in the CriMvEasyPlayer::Create() call can not be used. - * - * If a subaudio interface is used, the application must call CriMvEasyPlayer::DetachSubAudioInterface() - * when the EasyPlayer handle reaches the MVEASY_STATUS_STOP or MVEASY_STATUS_PLAYEND state before calling - * CriMvEasyPlayer::Destroy(). - * - * Calling CriMvEasyPlayer::ResetAllParameters() will not affect the value set by this function. - * - * \remarks - * If this function is called, it must be called before starting playback (with either CriMvEasyPlayer::Prepare() - * or CriMvEasyPlayer::Start()). - * - * \remarks - * An EasyPlayer handle can not use a subaudio interface and center channel replacement (see - * CriMvEasyPlayer::ReplaceCenterVoice()) at the same time. - * - * \sa CriMvEasyPlayer::DetachSubAudioInterface(), CriMvEasyPlayer::SetSubAudioTrack(), - * CriMvEasyPlayer::ReplaceCenterVoice() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief TuI[fBIpTEhC^tF[X̐ݒ - * \param sound TuI[fBIpTEhC^tF[X - * \param err G[iȗj - * - * TuI[fBIiCI[fBIƓɕʂ̃I[fBIĐ@\ĵ߂ - * TEhC^tF[Xݒ肵܂B
- * ݒ肷TEhC^tF[X́A CriMvEasyPlayer::Create() Ɏw肵TEhC^tF[X - * Ƃ́uʂ́vCX^XłȂ΂܂B
- * - * {֐́AEasyPlayernh쐬A CriMvEasyPlayer::Start() ܂ CriMvEasyPlayer::Prepare() - * ĂяoOɎsȂ΂܂B
- * - * TuI[fBIĐɂ́A{֐ŃTEhC^tF[Xݒ肵ƁA - * CriMvEasyPlayer::SetSubAudioTrack() ŃTuI[fBĨgbNw肵ĂB
- * - * TuI[fBIpTEhC^tF[Xݒ肵nhjjOɁA - * MVEASY_STATUS_STOP ܂ MVEASY_STATUS_PLAYEND ̏Ԃ CriMvEasyPlayer::DetachSubAudioInterface() ĂłB - * ȂATuI[fBIpTEhC^tF[X CriMvEasyPlayer::ResetAllParameters() ĂяoĂZbg܂B - * - * :
- * TuI[fBI@\́A CriMvEasyPlayer::ReplaceCenterVoice() ɂZ^[`lu@\Ƃ - * Ɏgpł܂B
- * - * \sa CriMvEasyPlayer::DetachSubAudioInterface(), CriMvEasyPlayer::SetSubAudioTrack(), - * CriMvEasyPlayer::ReplaceCenterVoice() - */ - void AttachSubAudioInterface(CriMvSoundInterface *sound, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Removes a secondary audio interface - * - * \param err Optional error code - * - * Removes the secondary sound interface that was set by a call to CriMvEasyPlayer::AttachSubAudioInterface(). - * - * This function should be called when the EasyPlayer handle's state is either MVEASY_STATUS_STOP or - * MVEASY_STATUS_PLAYEND. - * - * \sa CriMvEasyPlayer::AttachSubAudioInterface() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief TuI[fBIpTEhC^tF[X̉ - * \param err G[iȗj - * - * ݐݒ肳ĂTuI[fBIpTEhC^tF[X܂B
- * - * {֐́AEasyPlayernh̏Ԃ CriMvEasyPlayer::MVEASY_STATUS_STOP ܂ - * CriMvEasyPlayer::MVEASY_STATUS_PLAYEND ̎ɌĂяoĂB
- * - * \sa CriMvEasyPlayer::AttachSubAudioInterface() - */ - void DetachSubAudioInterface(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Sets the secondary audio track - * - * \param track Track number - * \param err Optional error code - * - * A secondary, or subaudio, track is typically used to play a dialog track or sound effects along - * with a movie. An application can support several different languages by setting the desired language - * track with this function. By default, the subaudio track is disabled, even if the interface has been set. - * - * Subaudio is enabled with CriMvEasyPlayer::AttachSubAudioInterface(). If the interface has not been set, - * this function will have no effect. - * - * The main audio track for the movie is set with CriMvEasyPlayer::SetAudioTrack(). If the same track - * number is used for the main and subaudio, the subaudio will not play. - * - * To turn off the subaudio track, pass CRIMV_CENTER_VOICE_OFF as the track number. - * - * \remarks - * If this function is called, it must be called before starting playback (with either CriMvEasyPlayer::Prepare() - * or CriMvEasyPlayer::Start()). - * - * \remarks - * An EasyPlayer handle can not use a subaudio interface and center channel replacement (see - * CriMvEasyPlayer::ReplaceCenterVoice()) at the same time. - * - * \sa CriMvEasyPlayer::AttachSubAudioInterface(), CriMvEasyPlayer::ReplaceCenterVoice() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief TuI[fBIgbN̐ݒ - * \param track TuI[fBIĐgbNԍ - * \param err G[iȗj - * - * TuI[fBIgbNݒ肵܂BftHgl CRIMV_CENTER_VOICE_OFF łB
- * - * TuI[fBIĐɂ́A CriMvEasyPlayer::AttachSubAudioInterface() ŃTEhC^tF[Xݒ肵ƁA - * {֐ŃTuI[fBĨgbNw肵ĂB
- * {֐̌ĂяóA CriMvEasyPlayer::Start() ܂ CriMvEasyPlayer::Prepare() ̌ĂяoOłȂ΂܂B
- * - * CI[fBĨgbN CriMvEasyPlayer::SetAudioTrack() Ŏw肵܂B - * TuI[fBIgbNƂăCI[fBIƓgbNw肵ꍇ́ATuI[fBI͉Đ܂B
- * - * TuI[fBIgbNɂ́AZ^[`lu@\Ƃ͈قȂ`l̐͂܂B - * mAXeIA5.1ch ̂̃gbNTuI[fBIƂĎgp邱Ƃł܂B
- * - * :
- * TuI[fBI@\́A CriMvEasyPlayer::ReplaceCenterVoice() ɂZ^[`lu@\Ƃ - * Ɏgpł܂B
- * - * \sa CriMvEasyPlayer::AttachSubAudioInterface() - */ - // default value is -1. - void SetSubAudioTrack(CriSint32 track, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Retrieves the secondary audio track - * - * \param err Optional error code - * \return track number Current subaudio track number - * - * When you successfully set the subaudio track, this function return the track number - * that you specified by CriMvEasyPlayer::SetSubAudioTrack(). Otherwise, it retuns CRIMV_CENTER_VOICE_OFF. - * - * \sa CriMvEasyPlayer::SetSubAudioTrack() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief TuI[fBIgbN̎擾 - * \param err G[iȗj - * \return gbNԍ ݐݒ肳ĂgbNԍ - * - * TuI[fBIĐLɂȂĂ΁A[UCriMvEasyPlayer::SetSubAudioTrack()Őݒ肵 - * TuI[fBIgbNԍԂ܂B - * - * TuI[fBIĐLłȂꍇATuI[fBIgbNw肵ĂȂꍇ́A - * CRIMV_CENTER_VOICE_OFFԂ܂B - * - * \sa CriMvEasyPlayer::SetSubAudioTrack() - */ - CriSint32 GetSubAudioTrack(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Replaces the center channel of a 5.1ch audio track - * - * \param track Track number to use - * \param err Optional error code - * - * If the current audio track for a movie (set with CriMvEasyPlayer::SetAudioTrack()) is in 5.1ch - * surround sound, the center channel can be replaced with a different, mono, track. This does not - * affect any of the other channels in the 5.1ch track. - * - * If the current audio track is not 5.1ch, or the replacement track is not monaural, this call will - * have no effect. - * - * Passing CRIMV_CENTER_VOICE_OFF as the value of \a track will undo the replacement and revert to - * playing the original center channel of th 5.1ch track. - * - * \remarks - * An EasyPlayer handle can not use center channel replacement and a subaudio interface (see - * CriMvEasyPlayer::AttachSubAudioInterface() and CriMvEasyPlayer::SetSubAudioTrack()) at the same time. - * - * \sa CriMvEasyPlayer::SetAudioTrack(), CriMvEasyPlayer::AttachSubAudioInterface(), - * CriMvEasyPlayer::SetSubAudioTrack() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief Z^[{CX̐ݒ - * \param track {CXgbNԍ - * \param err G[iȗj - * - * 5.1ch I[fBIĐɁAZ^[`lʂ̃mgbNƒu邱Ƃł܂B
- * {֐́Aup̃mf[^I[fBIgbNݒ肵܂B
- * 5.1ch BGM ɑ΂āA{CX𕡐ނ獷ւꍇɎgpĂB - * - * ftHg̓Z^[{CXw薳łB - * - * ̊֐gpꍇAC̃I[fBIgbNƂčĐĂ5.1chf[^̃Z^[`l - * ͔jAɃZ^[{CXƂĎw肵f[^܂B - * - * (a) Z^[{CXƂĎgpł̂̓m̃I[fBIłB
- * (b) Z^[uLȂ̂̓C̃I[fBI5.1ch̏ꍇłB - * - * ̓‚̏𖞂ĂȂꍇ́A{֐Őݒ肵l͖܂B - * - * ftHglɖ߂ꍇ́A`lƂCRIMV_CENTER_VOICE_OFFw肵ĂB - * - * \sa CriMvEasyPlayer::SetAudioTrack(), CriMvEasyPlayer::AttachSubAudioInterface(), - * CriMvEasyPlayer::SetSubAudioTrack() - */ - void ReplaceCenterVoice(CriSint32 track, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Sets a callback function that will set the movie file - * - * \param func Callback function - * \param usrobj Pointer to user-provided data - * \param err Optional error code - * - * Normally, the movie file is provided directly, via CriMvEasyPlayer::SetFile() or - * CriMvEasyPlayer::SetData(), before playback is started. Setting a file request callback - * allows an application to do \a concatenated \a playback, playing multiple movies, one - * after the other. - * - * If the callback function is set, it will be called when - * - * - The last data chunk of the current movie has been read by EasyPlayer. - * - Any of the playback functions (CriMvEasyPlayer::Start(), CriMvEasyPlayer::Prepare(), - * or CriMvEasyPlayer::DecodeHeader()) are called and the movie file has not been set. - * - * The callback should call CriMvEasyPlayer::SetFile() or CriMvEasyPlayer::SetData() if the - * application wants to continue playback. Otherwise, playback will end once the callback returns. - * - * The \a usrobj parameter specifies a pointer to arbitrary data, that will be passed as the - * second parameter to the callback. - * - * The prototype of the callback function is - * - * void callback(CriMvEasyPlayer *mveasy, void *usrobj) - * - * where - * - * mveasy is the EasyPlayer object - * usrobj is the pointer to user data that was passed to SetFileRequestCallback(). - * - * \remarks - * In order to do concatenated playback, all movies must have the same - * - * \remarks - * - video resolution - * - framerate - * - video codec - * - audio track structure - * - subtitle structure - * - * \remarks - * The same audio track structure means that all movies must have the same number of tracks, and the - * same track number must be of the same audio type for each movie. For instance, if the first movie has - * 2 audio tracks, with track 1 being stereo and track 2 being mono, then \a all other movies would have - * to have 2 tracks, track 1 stereo and track 2 mono. - * - * \remarks - * Subtitles have to match in the number of channels. For instance, if the first movie had 3 subtitle - * channels, then all other movies would need 3 channels. It is also important to keep the languages on - * the same tracks for each movie, since otherwise the application would get confused. CRI Movie makes - * no assumptions about languages or the interpretation of subtitles; subtitles are simply treated as - * binary data. - * - * \remarks - * Currently, cuepoints are not supported with concatenated playback. - * - * \sa CriMvEasyPlayer::SetFile(), CriMvEasyPlayer::SetData() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief t@CvR[obN֐̓o^ - * \param func t@CvR[obN֐ - * \param usrobj [UIuWFNg - * \param err G[iȗj - * - * [r̘AĐs߂ɁA[rt@CvR[obN֐o^܂B - * ̃R[obN֐͈ȉ̃^C~OŔ܂B - * - * E[rt@CǂݍݏIB
- * Et@C̎w薳ōĐJnB - * - * t@CvR[obN֐ CriMvEasyPlayer::SetFile() ܂ CriMvEasyPlayer::SetData() - * ĂяoƂŁAAĎ̃[rt@Cw肷邱Ƃł܂B
- * SetFile() SetData() ĂяoȂꍇ́Aǂݍݍς݂̃[rI - * ĐIɂȂ܂B - * - * t@CvR[obNAR[obN֐̑usrobjɂ́Ao^Ɏw - * [UIuWFNgn܂Bo^t@CXgȂǂ̊ǗɗpĂB - * - * AĐł郀[rt@Cɂ͈ȉ̏܂B
- * - rfI𑜓x - * - rfĨt[[g - * - rfĨR[fbN - * - I[fBIю̃gbN\ - * - * \sa CriMvEasyPlayer::SetFile(), CriMvEasyPlayer::SetData() - */ - void SetFileRequestCallback(void (*func)(CriMvEasyPlayer *mveasy, void *usrobj), - void *usrobj, CriError &err=CriMv::ErrorContainer); - -#if defined(XPT_TGT_PC) - /*EN - * \ingroup MODULE_OPTION - * \brief Set processor parameters for decoding on PC - * - * \param num_threads Number of additional threads for load distribution in decoding (Maximum 3 threads) - * \param affinity_mask Pointer to an array of thread affinity masks for each thread specified with num_threads. - * \param priority Thread priority of the decoding threads for load balancing - * \param err Optional error code - * - * This function sets the processor parameters for decoding. Use it when you want to change - * processors or thread priority for decoding load distribution. - * - * If this function is called, it must be called before calling any of the playback functions - * (CriMvEasyPlayer::Start(), CriMvEasyPlayer::Prepare(), or CriMvEasyPlayer::DecodeHeader()). - * - * On initialization, CRI Movie prepares three worker threads for distributed decoding.
- * - * \a num_threads specifies how many worker threads CRI Movie should use.
- * \a affinity_mask is an array of affinity masks for the worker threads. This array must have - * \a num_threads many elements. The format of \a affinity_mask is same as for the value passed to the - * Win32 SetThreadAffinityMask() API function.
- * \a priority is used as the thread priority for all of the threads specified by \a num_threads. - * - * If this function is called, three distributed decoding threads will run in parallel by default. - * Also, processor assignment of the decoding threads is handled by the operating system, and their - * priority will be normal. - * - * To reset the parameters, call this function again, passing CRIMV_DEFAULT_AFFNITY_MASK_PC and - * CRIMV_DEFAULT_THREAD_PRIORITY_PC as the affinity masks and thread priority. - * - * \sa CRIMV_DEFAULT_AFFNITY_MASK_PC, CRIMV_DEFAULT_THREAD_PRIORITY_PC - */ - /*JP - * \ingroup MODULE_OPTION - * \brief PCŃfR[hɎgljvZbTݒ - * \param num_threads וUfR[hpɎgpljXbh̐ (őRj - * \param affinity_masks XbhAtBjeB}XN̔zւ̃|C^Bnum_threadsŎw肵XbhƂ̃}XNlB - * \param priority וUfR[hXbh̗Dx - * \param err G[iȗj - * - * fR[h𕪎Uď邽߂̃vZbTwł܂B - * fR[hɍsvZbTXbhDxύXꍇɎgpĂB - * {֐͍ĐJn(Start, Prepare, DecodeHader)OɌĂяoKv܂B - * - * CRI Movie͏̍ۂɂR‚̕UfR[hp̃[J[Xbhpӂ܂B - * num_threadsŁÂ̂‚̃XbhۂɎgp邩wł܂B - * AvP[V疾IɃvZbT蓖ĂsꍇAX̃Xbhɑ΂ - * AtBjeB}XNݒ肵ĂB - * AtBjeB}XN̒ĺAWin32 APISetThreadAffinityMask̈ƓłB - * XbhDx́Anum_threadsŎw肵fR[hɎgpXbhɑ΂ēKp܂B - * - * ̊֐Ă΂ȂꍇAR‚̃XbhŕfR[hs܂B - * fR[hXbh̃vZbT͊蓖Ă͑SOSCŁADx̓XbhWɂȂ܂B - * - * x{֐ŐݒύXAԂ߂ꍇ́ACRIMV_DEFAULT_AFFNITY_MASK_PC, CRIMV_DEFAULT_THREAD_PRIORITY_PC - * ƂĎw肵AēxĂяoĂB - * - * \sa CRIMV_DEFAULT_AFFNITY_MASK_PC, CRIMV_DEFAULT_THREAD_PRIORITY_PC - */ - void SetUsableProcessors_PC(CriSint32 num_threads, const CriUint32 *affinity_mask, CriSint32 priority, - CriError &err=CriMv::ErrorContainer); - -#endif - -#if defined(XPT_TGT_XBOX360) - /*EN - * \ingroup MODULE_OPTION - * \brief Set processor parameters for decoding - * \param processors_param Processor Parameters - * \param err Optional error code - * - * \brief Set processor parameters for decoding - * \param processors_param Processor Parameters - * \param err Optional error code - * - * This function sets the processor parameters for decoding, along the priority of the - * decoding threads. - * - * If this function is called, it must be called before calling any of the playback functions - * (CriMvEasyPlayer::Start(), CriMvEasyPlayer::Prepare(), or CriMvEasyPlayer::DecodeHeader()). - * - * If you don't call this function, the EasyPlayer handle uses Processor 3 (Core 0, Thread 0) - * and Processor 5 (Core 0, Thread 0). - * - * \sa CriMvProcessorParameters_XBOX360 - */ - /*JP - * \ingroup MODULE_OPTION - * \brief Xbox360ŃfR[hɎgvZbTݒ - * \param processors_param gpvZbTp[^ - * \param err G[iȗj - * - * fR[hɎgpvZbTw肵܂B
- * {֐͍ĐJn(Start, Prepare, DecodeHader)OɌĂяoKv܂B - * - * ܂AfR[hɎgpXbh̗Dx̐ݒ肪o܂B - * - * ftHg̃vZbTݒł́AvZbTR(RA1Xbh1)ƃvZbTT - * (RA2Xbh1)gp܂B - * - * \sa CriMvProcessorParameters_XBOX360 - */ - void SetUsableProcessors_XBOX360(const CriMvProcessorParameters_XBOX360 *processors_param, - CriError &err=CriMv::ErrorContainer); -#endif - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Sets the frame where playback will start - * - * \param seek_frame_id Frame (0-based) to start playing from - * \param err Optional error code - * - * To play a movie from other than the first frame, call this function before starting playback. - * To seek to a new frame when the movie is already playing, call CriMvEasyPlayer::Stop() and wait - * for the handle to change to the MVEASY_STATUS_STOP state, call this function with the desired - * frame number, then call CriMvEasyPlayer::Start() again. - * - * Valid values for seek_frame_id are from 0 to \a num_frames - 1, where \a num_frames can be found by - * - *
-	 *
-	 *   CriMvStreamingParameters streaming_params;
-	 *   CriSint32                num_frames;
-	 *
-	 *   GetMovieInfo(streaming_params);
-	 *   num_frames = streaming_params.video_prm[0].total_frames;
-	 *
-	 * 
- * - * Refer to \ref usr_mech7 for more information. - * - * \remarks - * If the value of \a seek_frame_id is out of range, playback will start from frame 0. - * - * \sa CriMvStreamingParameters - */ - /*JP - * \ingroup MODULE_OPTION - * \brief V[NĐJnʒu̐ݒ - * \param seek_frame_id V[NĐJnt[ԍiO`j - * \param err G[iȗj - * - * V[NĐJnt[ԍw肵܂B - * - * ĐJnO( CriMvEasyPlayer::Prepare()܂ CriMvEasyPlayer::Start()ĂяoO)ɖ{֐sĂB - * ܂Å֐̓[r̍ĐɌĂяoƂ͏o܂BĐɃV[Nꍇ́AxĐ~Ă - * {֐ĂяoĂB - * - * {֐sȂꍇA܂̓t[ԍOw肵ꍇ̓[r̐擪ĐJn܂B - * w肵t[ԍA[rf[^̑t[傫蕉̒lꍇ[r̐擪Đ܂B - * - * \ref usr_mech7 킹ĎQƂĂB - * - */ - void SetSeekPosition(CriSint32 seek_frame_id, CriError &err=CriMv::ErrorContainer); - - /*EN - * - * \brief Calculates a frame ID from a frame time - * - * \param count Timer counter - * \param unit Counter increment per second - * \param err Optional error code - * - * \return Frame ID corresponding to given time - * - * Each frame of a movie corresponds to a particular display time, based on the framerate. Given a - * time from the start of playback, this function will return the ID of the specific frame that should - * be displayed, barring any delays or skipped frames, at that time. - * - * The time, in seconds, is specified by \a count / \a unit.
- * - * This function can be used for, among other things, jumping to a particular frame when a cuepoint is reached. - * - * \remarks - * This function can be called once the EasyPlayer handle status has reached MVEASY_STATUS_WAIT_PREP. - * - * \sa CriMvEasyPlayer::CalcTimeFromFrameId(); - */ - /*JP - * \ingroup MODULE_OPTION - * \brief Đt[ԍ̌vZ - * \param count ^C}JEg - * \param unit Pb̃^C}JEglBcount unit ŕbPʂ̎ƂȂ܂B - * \param err G[iȗj - * \return frame ID - * - * Đt[ԍvZ܂B - * ̊֐́AEasyPlayernh̏Ԃ MVEASY_STATUS_WAIT_PREP ȍ~ɂȂƂɎgpł܂B - * - * V[NĐJnʒuAvZƂɎgpĂB - * iႦ΃L[|Cg񂩂V[Nʒu肷ꍇȂǁBj - * - * \sa CriMvEasyPlayer::CalcTimeFromFrameId(); - */ - CriSint32 CalcFrameIdFromTime(CriUint64 count, CriUint64 unit, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Calculates a frame time from a frame ID - * - * \param frame_id Frame ID - * \param unit Counter increment per second - * \param err Optional error code - * - * \return Timer counter corresponding to given frame ID - * - * Each frame of a movie corresponds to a particular display time, based on the framerate. Given a - * frame ID and the number of timer intervals per second, this function will return the timer count - * of the display time for that frame. - * - * The display time, in seconds, for this frame is calculated by dividing the timer count by the timer - * interval. - * - * If you have the movie frame, you do not have to calculate the time. The \a time and \a tunit fields - * of the CriMvFrameInfo structure that is passed the GetFrameOnTimeXXX() and DiscardNextFrame() - * functions will contain this information. - * - * \remarks - * This function can be called once the EasyPlayer handle status has reached MVEASY_STATUS_WAIT_PREP. - * - * \sa CriMvEasyPlayer::CalcFrameIdFromTime(), CriMvFrameInfo - */ - /*JP - * \ingroup MODULE_OPTION - * \brief t[ԍĐ̌vZ - * \param frame_id frame ID - * \param unit Pb̃^C}JEglBcount unit ŕbPʂ̎ƂȂ܂B - * \param err G[iȗj - * \return ^C}JEg - * - * t[ԍĐvZ܂B - * ̊֐́AEasyPlayernh̏Ԃ MVEASY_STATUS_WAIT_PREP ȍ~ɂȂƂɎgpł܂B - * - * ۂɃt[擾ꍇ́AvZ̕Kv͂܂Bt[\̂̎QƂĂB - * - * \sa CriMvEasyPlayer::CalcFrameIdFromTime(), CriMvFrameInfo - */ - CriUint64 CalcTimeFromFrameId(CriSint32 frame_id, CriUint64 unit, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Find the next event point, if any, after the given time counter - * - * \param count Timer counter - * \param unit Counter increment per second - * \param type Type of event point to look for - * \param eventinfo Returned event point information structure - * \param err Optional error code - * - * \return Frame ID corresponding to given time - * - * Event points allow an application to associate arbitrary actions with specific points in a movie. - * This function will search forward in the movie for the next event point after the given time - * (specifed as \a count / \a unit). If an event point is found, \a eventinfo will be populated with - * the information about the event point, and the function will return the corresponding frame ID. - * - * \a type is an application-defined value that can be used to categorize event points, and is specified - * when the movie is encoded (see link to event-point-specification-section for more information - * about creating event points.). If -1 is passed as the value of \a type, all event points will be - * searched. Otherwise, only matching event point types will be searched. - * - * If no event point of the requested type is found, this function will return -1. - * - * \remarks - * This function can be called once the EasyPlayer handle status has reached MVEASY_STATUS_WAIT_PREP. - * - * \sa CriMvEasyPlayer::SearchPrevEventPointByTime(); - */ - /*JP - * \ingroup MODULE_OPTION - * \brief w莞̃Cxg|Cǧ - * \param count ^C}JEg - * \param unit Pb̃^C}JEglBcount unit ŕbPʂ̎ƂȂ܂B - * \param type ΏۂƂCxg|Cgtypel - * \param eventinfo Cxg|Cg̏ - * \param err G[iȗj - * \return frame ID - * - * w莞̎ɂCxg|CgACxg|Cgƃt[ԍ擾܂B - * ̊֐́AEasyPlayernh̏Ԃ MVEASY_STATUS_WAIT_PREP ȍ~ɂȂƂɎgpł܂B - * - * ̑ΏۂƂȂ̂ type Ŏw肵lvCxg|CgłB - * type -1w肵ꍇ́ASẴCxg|CgΏۂƂȂ܂B - * - * ΏۂƂȂCxg|CgłȂꍇ́At[ԍ-1Ԃ܂B - * - * \sa CriMvEasyPlayer::SearchPrevEventPointByTime(); - */ - CriSint32 SearchNextEventPointByTime(CriUint64 count, CriUint64 unit, CriSint32 type, - CriMvEventPoint &eventinfo, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Find the previous event point, if any, before the given time counter - * - * \param count Timer counter - * \param unit Counter increment per second - * \param type Type of event point to look for - * \param eventinfo Returned event point information structure - * \param err Optional error code - * - * \return Frame ID corresponding to given time - * - * Event points allow an application to associate arbitrary actions with specific points in a movie. - * This function will search backward in the movie (i.e. towards the beginning) for the next event - * point before the given time (specifed as \a count / \a unit). If an event point is found, - * \a eventinfo will be populated with the information about the event point, and the function will - * return the corresponding frame ID. - * - * \a type is an application-defined value that can be used to categorize event points, and is specified - * when the movie is encoded (see link to event-point-specification-section for more information - * about creating event points.). If -1 is passed as the value of \a type, all event points will be - * searched. Otherwise, only matching event point types will be searched. - * - * If no event point of the requested type is found, this function will return -1. - * - * \remarks - * This function can be called once the EasyPlayer handle status has reached MVEASY_STATUS_WAIT_PREP. - * - * \sa CriMvEasyPlayer::SearchNextEventPointByTime(); - */ - /*JP - * \ingroup MODULE_OPTION - * \brief w莞ÕCxg|Cǧ - * \param count ^C}JEg - * \param unit Pb̃^C}JEglBcount unit ŕbPʂ̎ƂȂ܂B - * \param type ΏۂƂCxg|Cgtypel - * \param eventinfo Cxg|Cg̏ - * \param err G[iȗj - * \return frame ID - * - * w莞̎OɂCxg|CgACxg|Cgƃt[ԍ擾܂B - * ̊֐́AEasyPlayernh̏Ԃ MVEASY_STATUS_WAIT_PREP ȍ~ɂȂƂɎgpł܂B - * - * ̑ΏۂƂȂ̂ type Ŏw肵lvCxg|CgłB - * type -1w肵ꍇ́ASẴCxg|CgΏۂƂȂ܂B - * - * ΏۂƂȂCxg|CgłȂꍇ́At[ԍ-1Ԃ܂B - * - * \sa CriMvEasyPlayer::SearchNextEventPointByTime(); - */ - CriSint32 SearchPrevEventPointByTime(CriUint64 count, CriUint64 unit, CriSint32 type, - CriMvEventPoint &eventinfo, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Gets the list of all event points in the movie - * - * \param err Optional error code - * - * \return Pointer to the list of event points, or NULL if there are no event points - * - * CRI Movie considers a cue point list to be the number of event points in a movie, and a pointer to - * an array of event point structures. Event points allow an application to associate arbitrary actions - * with specific points in a movie. - * - * The returned pointer points to an area inside of the EasyPlayer's work buffer. An application should - * not attempt to write to it. - * - * \remarks - * This function can be called once the EasyPlayer handle status has reached MVEASY_STATUS_WAIT_PREP. - * The returned information is valid through the MVEASY_STATUS_STOP state. Once the EasyPlayer handle - * has been destroyed, or the movie has been restarted (by calling CriMvEasyPlayer::Start(), - * CriMvEasyPlayer::Prepare(), or CriMvEasyPlayer::DecodeHeader()), the cuepoint information will be - * invalid. - * - */ - /*JP - * \ingroup MODULE_OPTION - * \brief L[|CgiCxg|Cgꗗj̎擾 - * \param err G[iȗj - * \return Cue point info (Event point list) - * - * L[|CgiCxg|Cgꗗj擾܂B - * ̊֐́AEasyPlayernh̏Ԃ MVEASY_STATUS_WAIT_PREP ȍ~ɂȂƂɎgpł܂B - * - * ̊֐Ŏ擾L[|CǵAĐnh̃[Nobt@𒼐ڎQƂĂ܂B
- * Đ~Ԃł̎QƂ͉”\łA̍ĐJn͎QƂ֎~܂B
- * ̃L[|Cgʂ̃ɃRs[ꍇ͕̏ς܂B - * - */ - CriMvCuePointInfo* GetCuePointInfo(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Sets a function that will be called when a cue point is reached - * - * \param func Callback function - * \param usrobj Pointer to user-provided data - * \param err Optional error code - * - * Beginning with version 2.0, CRI Movie allows a movie to specify arbitrary actions to - * happen at various points on the timeline. These are referred to as \a cue \a points, or, - * more generally, as \a event \a points. If a cue point callback has been installed for the - * movie, it will be called whenever a cuepoint has been reached. - * - * The \a usrobj parameter specifies a pointer to arbitrary data, that will be passed as the - * third parameter to the callback. - * - * The prototype of the callback function is - * - * void callback(CriMvEasyPlayer *mveasy, CriMvEventPoint *eventinfo, void *usrobj) - * - * where - * - * mveasy is the EasyPlayer object
- * eventinfo is the event info structure that was reached
- * usrobj is the pointer to user data that was passed to SetFileRequestCallback().
- * - * \remarks - * Do not call any movie playback functions (for example, CriMvEasyPlayer::Stop()) from the callback - * function. If you need to do this, set a flag from the callback and refer to it in your main loop. - * - * \sa CriMvEventPoint - */ - /*JP - * \ingroup MODULE_OPTION - * \brief L[|CgR[obN֐̓o^ - * \param func L[|CgR[obN֐ - * \param usrobj [UIuWFNg - * \param err G[iȗj - * - * L[|Cg̃R[obN֐o^܂B - * ̃R[obN֐́A[r̍ĐeCxg|CgŎw肳ꂽo߂ɔ܂B - * R[obN֐̌Ăяo CriMvEasyPlayer::Update() s܂B - * - * L[|CgR[obNAR[obN֐̑Q eventinfo ɂ̓Gxg|Cg񂪁A - * Rusrobjɂ́Ao^Ɏw肵[UIuWFNgn܂B - * - * L[|CgR[obN֐ł́A[rĐRg[֐iႦ CriMvEasyPlayer::Stop()j - * ĂяoĂ͂܂B - * - * \sa CriMvEventPoint - */ - void SetCuePointCallback(void (*func)(CriMvEasyPlayer *mveasy, CriMvEventPoint *eventinfo, void *usrobj), - void *usrobj, CriError &err=CriMv::ErrorContainer); - - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Resets movie handle parameters to their default values - * - * \param err Optional error code - * - * This function will reset most parameters back to their default values. Call this when you are - * reusing an EasyPlayer handle and need to quickly undo changes to a number of parameters. - * - * Note that this will not remove a subaudio interface (set by CriMvEasyPlayer::AttachSubAudioInterface()). - * CriMvEasyPlayer::DetachSubAudioInterface() must be called instead. - * - * \remarks - * This function can be called once the EasyPlayer handle status is either MVEASY_STATUS_STOP or - * MVEASY_STATUS_PLAYEND. - * - * - *
Setting API Reset by ResetAllParameters() Reset by Stop() - *
SetFile YES (*1) - *
SetData YES (*1) - *
Pause YES YES - *
SetMasterTimer YES NO - *
SetNumberOfFramePools YES NO - *
SetBufferingTime YES NO - *
SetReloadThresholdTime YES NO - *
SetMaxBitrate YES NO - *
SetAudioTrack YES NO - *
SetLoopFlag YES NO - *
SetStreamingParameters YES NO - *
AttachSubAudioInterface NO NO - *
SetSubAudioTrack YES NO - *
ReplaceCenterVoice YES NO - *
SetFileRequestCallback YES NO - *
SetSeekPosition YES NO - *
SetCuePointCallback YES NO - *
- * - * (*1) Normally, values set by SetFile() or SetData() are not reset by a call to Stop(). However, - * if a file request callback has been set (via CriMvEasyPlayer::SetFileRequestCallback()), this - * setting will be reset. - * - * \sa CriMvEasyPlayer::Stop(), CriMvEasyPlayer::SetFileRequestCallback() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief p[^̃Zbg - * \param err G[iȗj - * - * Đnhɐݒ肳ꂽp[^ނZbg܂B
- * TuI[fBIpC^tF[X̓Zbg܂̂ŁAAvP[VŖI - * CriMvEasyPlayer::DetachSubAudioInterface() ĂяoĂB - * - * {֐̓nhԂ MVEASY_STATUS_STOP ܂ MVEASY_STATUS_PLAYEND ̎ɌĂяoĂB - * - * - *
ݒ֐ ResetAllParametersɂ
Zbg
Stopɂ
Zbg - *
SetFile o (*1) - *
SetData o (*1) - *
Pause o o - *
SetMasterTimer o x - *
SetNumberOfFramePools o x - *
SetBufferingTime o x - *
SetReloadThresholdTime o x - *
SetMaxBitrate o x - *
SetAudioTrack o x - *
SetLoopFlag o x - *
SetStreamingParameters o x - *
AttachSubAudioInterface x x - *
SetSubAudioTrack o x - *
ReplaceCenterVoice o x - *
SetFileRequestCallback o x - *
SetSeekPosition o x - *
SetCuePointCallback o x - *
- * (*1) ʏ̓Zbg܂Bt@CvR[obNo^Ăꍇ̓Zbg܂B - * - * \sa CriMvEasyPlayer::Stop() - */ - void ResetAllParameters(CriError &err=CriMv::ErrorContainer); - - /* Đp[Nobt@щʃW[̉iIȌĂяopj */ - void ReleasePlaybackWork(CriError &err=CriMv::ErrorContainer); - -public: /* for DEBUG */ - /*//EN - * \ingroup MODULE_OPTION - * - * \brief Sets the maximum movie data read size - * - * \param max_chunk_size The maximum read size, in bytes - * \param err Optional error code - * - * This is a DEBUG function and should not normally need to be used by applications. - * - * Sets the maximum read size. CRI Movie will attempt to read this many bytes each time it - * needs to load more movie data from disk. - * - * If this function is called, it must be called before calling any of the playback functions - * (CriMvEasyPlayer::Start(), CriMvEasyPlayer::Prepare(), or CriMvEasyPlayer::DecodeHeader()). - * - * To revert to the default behavior, pass 0 as \a max_chunk_size. - * - * \remarks - * If this function is called, the new value for \a max_chunk_size will not be reflected in the - * CriMvStreapingParameters structure. A call to CriMvEasyPlayer::GetMovieInfo() will return the - * original value that was set in the movie header. - * - * \remarks - * If you call CriMvEasyPlayer::SetStreamingParameters(), this function can not be used. - * - * \sa CriMvEasyPlayer::GetMovieInfo(), CriMvEasyPlayer::SetMinBufferSize() - */ - /*//JP - * \ingroup MODULE_OPTION - * \brief ő`NTCY̎w - * \param max_chunk_size ő`NTCY[byte] - * \param err G[iȗj - * - * [rf[^̍ő`NTCYw肵܂B
- * ݂̃Cuł́A{֐̓AvP[VgpKv͂܂B
- * - * {֐Őݒ肵ő`NTCÝACriMvEasyPlayer::GetMovieInfo ֐Ŏ擾郀[rɂ͔f܂B - * CriMvEasyPlayer::GetMovieInfo ֐Ŏ擾ł̂̓[rf[^̖{̏łB
- * - * {֐̌ĂяóA CriMvEasyPlayer::Prepare ֐܂ CriMvEasyPlayer::Start ֐̑O܂łɎsĂB - * - * ő`NTCY 0w肵ꍇAő`NTCY̓[rf[^̎’lƂȂ܂B
- * ܂AAvP[V CriMvEasyPlayer::SetStreamingParameters ֐Ăяoꍇ͖{֐ - * ݒ肵lA CriMvEasyPlayer::SetStreamingParameters ֐̎w肪D悳܂B - * - * \sa CriMvEasyPlayer::GetMovieInfo(), CriMvEasyPlayer::SetMinBufferSize() - */ - void SetMaxChunkSize(CriUint32 max_chunk_size, CriError &err=CriMv::ErrorContainer); - - /*//EN - * \ingroup MODULE_OPTION - * - * \brief Sets the minimum movie data buffer size - * - * \param min_buffer_size The minimum buffer size, in bytes - * \param err Optional error code - * - * This is a DEBUG function and should not normally need to be used by applications. - * - * Sets the minimum buffer size used for reading movie data from disk. - * - * If this function is called, it must be called before calling any of the playback functions - * (CriMvEasyPlayer::Start(), CriMvEasyPlayer::Prepare(), or CriMvEasyPlayer::DecodeHeader()). - * - * To revert to the default behavior, pass 0 as \a max_chunk_size. - * - * \remarks - * If this function is called, the new value for \a min_buffer_size will not be reflected in the - * CriMvStreapingParameters structure. A call to CriMvEasyPlayer::GetMovieInfo() will return the - * original value that was set in the movie header. - * - * \remarks - * If you call CriMvEasyPlayer::SetStreamingParameters(), this function can not be used. - * - * \sa CriMvEasyPlayer::GetMovieInfo(), CriMvEasyPlayer::SetMaxChunkSize() - */ - /*//JP - * \ingroup MODULE_OPTION - * \brief ŏobt@TCY̎w - * \param min_buffer_size ŏobt@TCY[byte] - * \param err G[iȗj - * - * [rf[^̍ŏobt@TCYw肵܂B
- * ݂̃Cuł́A{֐̓AvP[VgpKv͂܂B
- * - * {֐Őݒ肵ŏobt@TCÝACriMvEasyPlayer::GetMovieInfo ֐Ŏ擾郀[rɂ͔f܂B - * CriMvEasyPlayer::GetMovieInfo ֐Ŏ擾ł̂̓[rf[^̖{̏łB
- * - * {֐̌ĂяóA CriMvEasyPlayer::Prepare ֐܂ CriMvEasyPlayer::Start ֐̑O܂łɎsĂB - * - * ŏobt@TCY 0w肵ꍇAŏobt@TCY̓[rf[^̎’lƂȂ܂B
- * ܂AAvP[V CriMvEasyPlayer::SetStreamingParameters ֐Ăяoꍇ͖{֐ - * ݒ肵lA CriMvEasyPlayer::SetStreamingParameters ֐̎w肪D悳܂B - * - * \sa CriMvEasyPlayer::GetMovieInfo(), CriMvEasyPlayer::SetMaxChunkSize() - */ - void SetMinBufferSize(CriUint32 min_buffer_size, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Retrieves various movie playback statistics - * - * \param playinfo Playback statistics structure - * \param err Optional error code - * - * This is a DEBUG function and is not normally needed by applications. - * - * Retrieves a number of performance statistics dealing with movie playback, including how often - * a frame could not be retrieved and how close the plaback framerate is to the movie's expected - * playback. - * - * This information is updated on every call to CriMvEasyPlayer::IsNextFrameOnTime(). In order for - * the values to be accurate, an application should call IsNextFrameOnTime() once each time through - * its main loop. Calling IsNextFrameOnTime() too often or not often enough will result in - * misleading statistics. - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief [rĐ̎擾 - * \param playinfo [riԂlj - * \param err G[iȗj - * - * {֐͒ʏAAvP[V͎gp܂BfobOp̊֐łB - * - * ݍĐĂ郀[r̍Đ CriMvPlaybackInfo \̂擾ł܂B
- * ̏񂩂rfIt[̎擾ԊuArfIt[̃fR[hxȂǂm邱Ƃł܂B
- * - * Đ̓AvĂяo CriMvEasyPlayer::IsNextFrameOnTime() ōXV܂B
- * AvP[V CriMvEasyPlayer::IsNextFrameOnTime()ĂяoȂꍇAC[vŕ - * Ăяoꍇ͏񂪐XVȂ̂ŒӂĂB
- * - * \sa CriMvEasyPlayer::IsNextFrameOnTime() - */ - void GetPlaybackInfo(CriMvPlaybackInfo & playinfo, CriError & err = CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Gets the result of the last attempt to retrieve a video frame - * - * \param err Optional error code - * - * \return The result of the last frame retrieval - * - * Returns one of the following values: - * - * - * - * - * - * - * - *
Value Meaning
CRIMV_LASTFRAME_OK The frame was successfully retrieved.
CRIMV_LASTFRAME_TIME_EARLY It is too soon to display this frame. The frame time - * is greater than the current playback time.
CRIMV_LASTFRAME_DECODE_DELAY The frame has not been decoded yet, or CRI Movie is not - * done decoding it.
CRIMV_LASTFRAME_DISCARDED The frame was discarded, by calling - * CriMvEasyPlayer::DiscardNextFrame()
- * - * \remarks - * The result is determined by calling CriMvEasyPlayer::IsNextFrameOnTime(), not the GetFrameOnTimeXXX() - * functions. - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime(), CriMvEasyPlayer::DiscardNextFrame() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief ÕrfIt[擾̌ʂ擾 - * \param err G[iȗj - * \return t[擾ʂ̗񋓒l - * - * {֐͒ʏAAvP[V͎gp܂BfobOp̊֐łB - * - * ÕrfIt[擾̌ʂԂ܂B - * rfIt[̃fR[hԂɍĂ̂ǂ`FbN邱Ƃo܂B - * - * :
- * rfIt[擾̌ʂƂ́A{IɃAvP[VĂяo CriMvEasyPlayer::IsNextFrameOnTime() ̌ʂ - * XV܂BGetFrameOnTime֐̌ʂł͂܂B - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime() - */ - CriMvLastFrameResult GetLastFrameResult(CriError & err = CriMv::ErrorContainer); - - /* [Unofficial] */ - /* Set the number of decoded frames to keep internally during the MVEASY_STATUS_PREP status. */ - /* Adjust the number if you need to reduce latesy for the first frame */ - void SetNumberOfFramesForPrep(CriUint32 num_frames, CriError & err = CriMv::ErrorContainer); - - /* [Unofficial] - * \ingroup MODULE_OPTION - * \brief ĐI/~ʒmR[obN֐̓o^ - * \param func ĐI/~ʒmR[obN֐ - * \param usrobj [UIuWFNg - * \param err G[iȗj - * - * ĐIэĐ~ʒmR[obN֐o^܂B - * ̃R[obN֐́Awb_/Đ/ĐԂĐ~/ĐIԂ - * JڂɈxĂяo܂B - * R[obN֐̌Ăяo CriMvEasyPlayer::Update() s܂B - * - * o^R[obN֐ł́A[rĐRg[֐iႦ CriMvEasyPlayer::Stop()j - * ĂяoĂ͂܂B - * - * : MVEASY_STATUS_PLAYENDԂMVEASY_STATUS_STOPԂւ̑Jڎɂ̓R[obN֐͌Ăяo܂B - */ - void SetStopCompleteCallback(void (*func)(CriMvEasyPlayer *mveasy, void *usrobj), - void *usrobj, CriError &err=CriMv::ErrorContainer); - - /* For FAST_LATENCY */ - /*************************************************************************************/ - /* RtBOw̃nh쐬֐ */ - static CriMvEasyPlayer* CRIAPI Create(CriHeap heap, - CriMvHandleConfig *config, - CriMvFileReaderInterface *freader, - CriMvSystemTimerInterface *stimer, - CriMvSoundInterface *sound, - CriError &err=CriMv::ErrorContainer); - - /* For Sofdec2 */ - /*************************************************************************************/ - enum MetaFlag { - MVEASY_META_FLAG_CUE = 0x0001, - MVEASY_META_FLAG_SEEK = 0x0002, - MVEASY_META_FLAG_ALL = MVEASY_META_FLAG_CUE + MVEASY_META_FLAG_SEEK, - - /* Keep enum 4bytes */ - MVEASY_META_FLAG_MAKE_ENUM_SINT32 = 0x7FFFFFFF - }; - - enum ReferFrameResult { - MVEASY_REFER_FRAME_RESULT_OK = (1), - MVEASY_REFER_FRAME_RESULT_SHORT_INPUT = (2), - MVEASY_REFER_FRAME_RESULT_SHORT_CPUTIME = (3), - MVEASY_REFER_FRAME_RESULT_DEMUX_STUCK = (4), - - /* Keep enum 4bytes */ - MVEASY_REFER_FRAME_RESULT_MAKE_ENUM_SINT32 = 0x7FFFFFFF - }; - - /* [Ũ[N̈nŁAnh쐬֐ */ - static CriMvEasyPlayer* CRIAPI Create(void *work, CriSint32 work_size, - CriMvHandleConfig *config, - CriMvFileReaderInterface *freader, - CriMvSystemTimerInterface *stimer, - CriMvSoundInterface *sound, - CriError &err=CriMv::ErrorContainer); - - /* Đp[N̈TCY̌vZ */ - CriSint32 CalcPlaybackWorkSize(const CriMvStreamingParameters *stmprm, CriError & err = CriMv::ErrorContainer); - - /* Đp[N̈̐ݒ֐ */ - void SetPlaybackWork(void *work, Sint32 work_size, CriError & err = CriMv::ErrorContainer); - - /* ^f[^[NpR[obN֐ */ - void SetMetaDataWorkAllocator(CriMvMetaDataWorkMallocFunc allocfunc, CriMvMetaDataWorkFreeFunc freefunc,void *usrobj, CriMvMetaFlag meta_flag); - - /* Ŏw肵t[̕\ */ - CriBool IsFrameOnTime(const CriMvFrameInfo *frameinfo, CriError &err=CriMv::ErrorContainer); - - /* t[̎QƁ@*/ - ReferFrameResult ReferFrame(CriMvFrameInfo &frameinfo, CriError &err=CriMv::ErrorContainer); - - /* YUV•ʃobt@tH[}bgł̃obt@擾 */ - CriBool LockFrameYUVBuffersWithAlpha(CriMvYuvBuffers &yuvbuffers, CriMvFrameInfo &frameinfo, CriMvAlphaFrameInfo &alpha_frameinfo, CriError &err=CriMv::ErrorContainer); - - /* LockFrameYUVBuffersWithAlphaŃbNt[̉ */ - CriBool UnlockFrameBufferWithAlpha(CriMvFrameInfo *frameinfo, CriMvAlphaFrameInfo *alpha_frameinfo, CriError &err=CriMv::ErrorContainer); - - /* 32bitARGBobt@tH[}bgւ̃Rs[֐ */ - CriBool CopyFrameToBufferARGB32(CriUint8 *dstbuf, CriUint32 dst_pitch, CriUint32 dst_bufsize, - const CriMvYuvBuffers *srcbufs, const CriMvFrameInfo *src_vinf, const CriMvAlphaFrameInfo *src_ainf, CriError &err=CriMv::ErrorContainer); - - /* 32bitARGBobt@tH[}bgփ݂̂̃Rs[֐ */ - CriBool CopyAlphaToBufferARGB32( - const CriMvFrameInfo *src_vinf, - CriUint8 *dst_buf, - CriUint32 dst_pitch, - CriUint32 dst_bufsize, - CriError &err=CriMv::ErrorContainer - ); - -#if defined(XPT_TGT_IPHONE) || defined(XPT_TGT_WINMO) || defined(XPT_TGT_ANDROID) || defined(XPT_TGT_CQSH2A) || defined(XPT_TGT_ACRODEA) || defined(XPT_TGT_NACL) || defined(XPT_TGT_SH7269) || defined(XPT_TGT_PC)|| defined(XPT_TGT_TRGP6K) - CriBool CopyFrameToBufferRGB565(CriUint8 *dstbuf, CriUint32 dst_pitch, CriUint32 dst_bufsize, - const CriMvYuvBuffers *srcbufs, const CriMvFrameInfo *src_vinf, const CriMvAlphaFrameInfo *src_ainf, CriError &err=CriMv::ErrorContainer); -#endif - - /* YUV•ʃobt@tH[}bg̃Rs[֐ */ - CriBool CopyFrameToBuffersYUV(CriMvYuvBuffers *dstbufs, - const CriMvFrameInfo *src_vinf, const CriMvAlphaFrameInfo *src_ainf, CriError &err=CriMv::ErrorContainer); - - /* [hobt@TCY̋w */ - void SetReadBufferSize(CriUint32 buffer_size, CriError &err=CriMv::ErrorContainer); - - CriUint32 GetMinBufferSize(CriError &err=CriMv::ErrorContainer); - /**************************************************************************************/ - void SetVideoFramerate(CriUint32 framerate_n, CriUint32 framerate_d); - - void SetCompareFrameTimeCallback( - CriBool (*func)(CriMvEasyPlayer *mveasy, CriMvFrameInfo *frameinfo, CriUint64 count, CriUint64 unit, void *usrobj), - void *usrobj, CriError &err=CriMv::ErrorContainer); - void SetSeekFrameAndOffset(CriSint32 seek_frame_id, CriUint64 seek_byte, CriError &err=CriMv::ErrorContainer); - - enum InputMode { - MVEASY_INPUT_UNDEFINED, - MVEASY_INPUT_STREAMING, /* Xg[~O */ - MVEASY_INPUT_MEMORY, /* ڎQƁijrij */ - - /* Keep enum 4bytes */ - MVEASY_INPUT_MAKE_ENUM_SINT32 = 0x7FFFFFFF - }; - /* : ̊֐̂߂ InputMode `bpublicֈړ */ - void SetMemoryPlaybackType(InputMode memplay_type, CriError &err=CriMv::ErrorContainer); - - /* fR[hXLbv̎s[h */ - //void SetAutoSkipDecode(CriBool sw, CriFloat32 margin_msec, CriError &err=CriMv::ErrorContainer) - - /* t@Cv̍ăR[obNv */ - void DeferFileRequest(CriError &err=CriMv::ErrorContainer); - - /* for specific use */ - void SetHeaderAndBodyData(const CriUint64Adr header_ptr, CriSint64 header_size, - const CriUint64Adr body_ptr, CriSint64 body_size); - CriSint32 CalcFramepoolWorkSize(const CriMvStreamingParameters *stmprm, CriError & err = CriMv::ErrorContainer); - void SetFramepoolWork(void *work, CriSint32 work_size, CriError & err = CriMv::ErrorContainer); - void SetFramepoolWorkAllocator(CriMvFramepoolWorkMallocFunc allocfunc, CriMvFramepoolWorkFreeFunc freefunc, void *usrobj); - void SetCapacityOfPictureSize(CriSint32 video_picsize, CriSint32 alpha_picsize, CriError &err); - void GetUsrCapacityOfPictureSize(CriSint32 *video_picsize, CriSint32 *alpha_picsize); - void SetMaxMovieSize(CriUint32 max_width, CriUint32 max_height, CriError &err); - void GetMaxMovieSize(CriUint32 *max_width, CriUint32 *max_height); - CriBool PlaybackResourceAllocated() const; - CriBool CanReusePlaybackResource(const CriMvStreamingParameters *stmprm) const; - CriBool GetReusePlaybackResourceFlag() const; - -private: - /* CRI internal use only */ - - void initializeHandleParameters(void); - void initializeCompareFrameParameters(void); - void resetHandleParameters(void); - CriBool startInputAndDecoding(void); - CriBool isEndReadFile(void); - void reinputDataForLooping(void); - void executeFileCloseServer(void); - void supplyDataFromStreamer(void); - void executeFileReadServer(void); - void executeFileOpenServer(void); - void executeCuePointServer(void); - //void executeAutoSkipDecode(void); - void executeWaitStatusServer(CriError &err = CriMv::ErrorContainer); - void surveilTerminationInput(void); - CriBool isAvailableCenterVoice(const CriMvStreamingParameters *stmprm); - CriBool isAvailableSubAudio(const CriMvStreamingParameters *stmprm); - CriBool attachCenterVoice(void); - void detachCenterVoice(void); - - CriBool attachSubAudioHandle(CriHeap heap); - void detachSubAudioHandle(void); - - void getAudioTime(CriUint64 &out_count, CriUint64 &out_unit, CriUint64 s_count, CriUint64 s_unit); - - CriBool allocAndCreateModules(void); - void startModules(void); - void requestStopModules(void); - CriBool closeFileIfOpening(void); - CriBool isCompleteStopModules(void); - void tryCleanupModules(CriMvPlyStatus mvstat); - CriBool tryFreeAndDestroySubmodules(void); - void freeAndDestroyModules(void); - - CriUint32 adjustNumTrackAudioOut(void); - - /* Xg[~Op̃p[^擾 */ - /* GetMovieInfo()Ƃ̈Ⴂ̓[Uwlǂ܂Ŕf邩B - * Ⴆ΁Aő`NTCY͂̊֐ł̓[UwlƂ邪AGetMovieInfoƃt@C̒lB - * ̊֐́AʼnʃW[쐬уmۂ鎞ɎgB */ - CriBool GetStreamingParameters(CriMvStreamingParameters &stmprm, CriError &err=CriMv::ErrorContainer); - - void setNormalErrorStatus(const CriChar8 *errmsg); - - CriBool compareFrameTimeSimple(CriMvEasyPlayer *mveasy, CriMvFrameInfo *frameinfo, CriUint64 count, CriUint64 unit, void *usrobj); - static CriBool compareFrameTimeFluctuation(CriMvEasyPlayer *mveasy, CriMvFrameInfo *frameinfo, CriUint64 count, CriUint64 unit, void *usrobj); - - Bool isNextFrameOnTime(CriBool update_stats, CriError &err); - Bool checkFrameTime(CriMvFrameInfo *frameinfo); - void updateGetFrameInfo(CriBool time_ready, CriBool acquired_frame, CriBool discard_frame, CriUint64 frame_count, CriUint64 frame_unit); - - /* for DEBUG */ - void crimveasy_SetSeekInfo(void); - - void executeUpdate(CriError &err); - -private: - static CriUint32 crimveasy_SupplyPcmDataByFloat32(void *obj, CriUint32 nch, CriFloat32 *pcmbuf[], CriUint32 req_nsmpl); - static CriUint32 crimveasy_SupplyPcmDataBySint16(void *obj, CriUint32 nch, CriSint16 *pcmbuf[], CriUint32 req_nsmpl); - static CriUint32 crimveasy_CalcAvailableNumSmpls(CriMvEasyPlayer *mveasy); - static CriUint32 crimveasy_GetWave16(CriMvEasyPlayer *mveasy, CriUint32 nch, CriSint16 *pcmbuf[], CriUint32 req_nsmpl); - static CriUint32 crimveasy_GetWave32(CriMvEasyPlayer *mveasy, CriUint32 nch, CriFloat32 *pcmbuf[], CriUint32 req_nsmpl); - - static CriUint32 crimveasy_SupplySubAudioDataByFloat32(void *obj, CriUint32 nch, CriFloat32 *pcmbuf[], CriUint32 req_nsmpl); - static CriUint32 crimveasy_GetSubAudioWave32(CriMvEasyPlayer *mveasy, CriUint32 nch, CriFloat32 *pcmbuf[], CriUint32 req_nsmpl); - static CriUint32 crimveasy_SupplySubAudioDataBySint16(void *obj, CriUint32 nch, CriSint16 *pcmbuf[], CriUint32 req_nsmpl); - static CriUint32 crimveasy_GetSubAudioWave16(CriMvEasyPlayer *mveasy, CriUint32 nch, CriSint16 *pcmbuf[], CriUint32 req_nsmpl); - -public: - CriMvPly mvply; /* Temporally allowed to access for debug */ - -private: - CriHeap heap; - CriBool user_stmprm_flag; - CriMvStreamingParameters stmprm; - CriBool alloced_submodules_flag; - CriMvFrameInfo frameinfo; - CriMvAlphaFrameInfo alpha_frame; - CriMvFileReaderInterface *freader; - CriMvSoundInterface *sndout; - CriMvSystemTimerInterface *stimer; - TimerType timertype; - Status pre_ezstat; - CriBool req_decode_header_flag; - CriBool req_prepare_flag; - CriBool pause_flag; - CriUint32 npools; - CriSint32 track_play_audio; - CriUint32 num_track_audio_data; - CriUint32 num_track_audio_out; - CriBool loop_flag; - CriUint64 time_count; - CriUint64 time_unit; - CriSint64 total_read; - CriSint64 fsize_byte; - CriChunk read_crick; - CriBool exe_open; - CriBool exe_close; - CriBool exe_read; - - CriUint64 time_syslog_count; /* VXe^C}̋L^ */ - CriUint64 time_syslog_unit; - CriUint64 time_ofs_count; /* I[fBIĨVXe^C} */ - CriUint64 time_ofs_unit; - CriUint64 time_prev_audio_count; /* I[fBIω`FbNp */ - CriUint64 time_prev_audio_unit; - - CriFloat32 user_buffering_sec; /* 0.0f means AUTO */ - CriUint32 user_max_bitrate; /* 0 means AUTO */ - CriUint32 user_max_chunk_size; /* 0 means AUTO */ - CriUint32 user_min_buffer_size; /* 0 means AUTO */ - CriSint32 user_read_buffer_size; /* CRIMV_READ_BUFFER_SIZE_AUTO means AUTO */ - CriSint32 user_video_capacity_of_picsize; /* 0 means AUTO */ - CriSint32 user_alpha_capacity_of_picsize; /* 0 means AUTO */ - CriUint32 user_max_width; - CriUint32 user_max_height; - - CriSint32 usr_subtitle_channel; - CriMvSubtitleInfo sbtinfo; - CriFloat32 sbt_start_msec; - CriFloat32 sbt_end_msec; - CriUint8 *sbtbuf; - - enum InputSrc { - MVEASY_INPUT_SRC_UNDEFINED, - MVEASY_INPUT_SRC_FILE, - MVEASY_INPUT_SRC_MEMORY, - /* Keep enum 4bytes */ - MVEASY_INPUT_SRC_MAKE_ENUM_SINT32 = 0x7FFFFFFF - }; - InputSrc input_src; - CriMvFileReaderInterface *ext_reader; - CriMvFileReaderInterface *mem_reader; - - enum InputSupplyStatus { - MVEASY_SUPPLY_STOP, - MVEASY_SUPPLY_REQ_OPEN, - MVEASY_SUPPLY_OPENING, - MVEASY_SUPPLY_READING, - MVEASY_SUPPLY_REQ_CLOSE, - MVEASY_SUPPLY_CLOSING, - - /* Keep enum 4bytes */ - MVEASY_SUPPLY_MAKE_ENUM_SINT32 = 0x7FFFFFFF - }; - - InputMode memplay_type; /* ĐXg[邩jri邩 */ - InputMode input_mode; - InputSupplyStatus supply_stat; - CriBool change_file_mode; - CriChar8 file_name[CRIMV_MAX_FILE_NAME]; - CriUint64 file_offset; - CriSint64 file_range; - CriUint8 *dataptr; - CriUint32 datasize; - CriBool terminate_flag; - CriSint32 reinput_cnt; - - enum NextEntryState { - MVEASY_NEXT_ENTRY_NONE, - MVEASY_NEXT_ENTRY_READY, - MVEASY_NEXT_ENTRY_DEFER, - /* Keep enum 4bytes */ - MVEASY_NEXT_ENTRY_MAKE_ENUM_SINT32 = 0x7FFFFFFF - }; - NextEntryState next_entry_state; - - CriUint32 center_ch; - CriSint32 usr_voice_track; // by SetCenterVoice() - CriSint32 voice_attached_track; - - // Sub Audio - CriMvSoundInterface *if_subaudio; - CriSint32 usr_subaudio_track; - CriSint32 attached_subaudio_track; - - void (*cbfunc_file_request)(CriMvEasyPlayer *mveasy, void *usrobj); - void *usrobj_file_request; - - CriBool (*cbfunc_compare_ftime)(CriMvEasyPlayer *mveasy, CriMvFrameInfo *frameinfo, CriUint64 count, CriUint64 unit, void *usrobj); - void *usrobj_compare_ftime; - - /* Seek Playback */ - CriSint32 seek_frame_id; - CriUint64 seek_byte; - - /* CuePoint */ - void (*cbfunc_cuepoint)(CriMvEasyPlayer *mveasy, CriMvEventPoint *eventinfo, void *usrobj); - void *usrobj_cuepoint; - - /* Playback Statistics */ - CriBool start_getfrm; - CriUint64 last_getfrm_count; - CriFloat32 sum_diff_time; - CriMvPlaybackInfo playinfo; - CriMvLastFrameResult last_frm_result; - - /* Block flag for simultanious calls on multi-threads */ - CriSint32 execute_decode_block_flag; - CriSint32 update_block_flag; - - /* Stop Completion Notification */ - void (*cbfunc_stopcomplete)(CriMvEasyPlayer *mveasy, void *usrobj); - void *usrobj_stopcomplete; - - /* For Sofdec2 */ - void *playback_work; - CriSint32 playback_work_size; - void *mvply_work; - CriHeap heap_mveasy; - CriHeap heap_extra_sound; - CriBool reuse_modules_flag; - - /* For Debug */ - volatile CriUint8 end_sequence_info; - - /* Handle Protection */ - void *cshn; - void *cs_work; - - /* Skip Decoding */ - //CriBool skip_auto_flag; - //CriFloat32 margin_msec; - -public: - enum FrameCompareMode { - MVEASY_COMPARE_MODE_JUST, /* mɎr */ - MVEASY_COMPARE_MODE_DELAY_GET, /* ^C}O|t[͂ȂׂnȂ */ - MVEASY_COMPARE_MODE_FAST_GET, /* ^C}𐅑t[͂Ȃׂn */ - - /* Keep enum 4bytes */ - MVEASY_COMPARE_MODE_MAKE_ENUM_SINT32 = 0x7FFFFFFF - }; - FrameCompareMode compare_mode; - CriFloat32 accuracy_system_tmr_msec; /* VXex milli sec */ - CriFloat32 accuracy_audio_tmr_msec; /* I[fBIx milli sec */ - CriFloat32 fluctuation_system; /* VXeiSyncFrame)̗h炬 milli sec */ - CriFloat32 fluctuation_adjust; /* h炬␳ */ -// CriFloat32 fluctuation_system_msec; /* VXe炬 milli sec */ -// CriFloat32 fluctuation_audio_msec; /* I[fBI炬 milli sec */ -// CriFloat32 fluctuation_adjust; /* 炬␳{ */ -// CriSint32 fluctuation_system_usec; /* VXe炬 micro sec */ -// CriSint32 fluctuation_audio_usec; /* I[fBI炬 micro sec */ -// CriFloat32 fluctuation_adjust_multi; /* 炬␳{ */ -// CriSint32 fluctuation_adjust_add; /* 炬␳ItZbg */ - -private: - CriBool req_stop_modules; - CriBool error_flag; - CriBool req_start_modules; - -protected: - CriMvEasyPlayer(CriHeap heap, - CriMvFileReaderInterface *freader, - CriMvSystemTimerInterface *stimer, - CriMvSoundInterface *sound, - CriError &err=CriMv::ErrorContainer); - virtual ~CriMvEasyPlayer(); - -private: - CriMvEasyPlayer(void); //disabled -}; - - - - -#endif /* CRI_MOVIE_H_INCLUDED */ diff --git a/3rdParty/cri/XboxOne/include/cri_movie_core.h b/3rdParty/cri/XboxOne/include/cri_movie_core.h deleted file mode 100644 index 705bbbf6..00000000 --- a/3rdParty/cri/XboxOne/include/cri_movie_core.h +++ /dev/null @@ -1,2554 +0,0 @@ -/**************************************************************************** - * - * CRI Middleware SDK - * - * Copyright (c) 2005-2013 CRI Middleware Co., Ltd. - * - * Library : CRI Movie - * Module : Library User's Header - * File : cri_movie_core.h - * Date : 2013-11-21 - * Version : (see CRIMVPLY_VER) - * - ****************************************************************************/ -/*! - * \file cri_movie_core.h - */ -#ifndef CRI_MOVIE_CORE_H_INCLUDED /* Re-definition prevention */ -#define CRI_MOVIE_CORE_H_INCLUDED - -/* Version No. */ -#define CRIMVPLY_VER "3.50" -#define CRIMVPLY_NAME "criMvPly" - -/*************************************************************************** - * Include file - ***************************************************************************/ -#include -#include -#include - -/*************************************************************************** - * MACRO CONSTANT - ***************************************************************************/ - -/*EN - * \brief Audio OFF setting of Audio Track - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetAudioTrack() - */ -/*JP - * \brief I[fBIĐOFF̎wl - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetAudioTrack() - */ -#define CRIMV_AUDIO_TRACK_OFF (-1) - -/*EN - * \brief Default setting of Audio Track - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetAudioTrack() - */ -/*JP - * \brief I[fBI`l̃ftHgl - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetAudioTrack() - */ -#define CRIMV_AUDIO_TRACK_AUTO (100) - -/*EN - * \brief Maximum number of PCM tracks in one audio stream - * \ingroup MDL_MV_OPTION - */ -/*JP - * \brief I[fBIf[^̍őPCMgbN - * \ingroup MDL_MV_OPTION - */ -#define CRIMV_PCM_BUFFER_MAX (8) - -/*EN - * \brief Subtitle OFF setting - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetSubtitleChannel() - */ -/*JP - * \brief ĐOFF̎wl - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetSubtitleChannel() - */ -#define CRIMV_SUBTITLE_CHANNEL_OFF (-1) - -/*EN - * \brief Maximum number of video tracks in a movie file - * \ingroup MDL_MV_OPTION - */ -/*JP - * \brief [rt@C̍őrfIXg[ - * \ingroup MDL_MV_OPTION - */ -#define CRIMV_MAX_VIDEO_NUM (1) - -/*EN - * \brief Maximum number of audio tracks in a movie file - * \ingroup MDL_MV_OPTION - */ -/*JP - * \brief [rt@C̍őI[fBIXg[ - * \ingroup MDL_MV_OPTION - */ -#define CRIMV_MAX_AUDIO_NUM (32) - -/*EN - * \brief Maximum number of alpha tracks in a movie file - * \ingroup MDL_MV_OPTION - */ -/*JP - * \brief [rt@C̍őAt@Xg[ - * \ingroup MDL_MV_OPTION - */ -#define CRIMV_MAX_ALPHA_NUM (1) - -#if defined(XPT_TGT_PC) -/*EN - * \brief Number of extra threads for multicore decoding - * \ingroup MDL_MV_OPTION - * The number of additional decoding threads that CRI Movie library internally creates. - * The threads are intended to run on multiple processors in parallel. - * \sa CriMvEasyPlayer::SetUsableProcessors_PC() - */ -/*JP - * \brief }`RAfR[hp̒lj̃fR[hXbh - * \ingroup MDL_MV_OPTION - * CRI MovieCuō쐬lj̃fR[h̐łB̃Xbh́A}`RAPC - * fR[h񕪎U邽߂ɍ܂B - * \sa CriMvEasyPlayer::SetUsableProcessors_PC() - */ -#define CRIMV_NUM_EXT_DECTHREAD_PC (3) - -/*EN - * \brief Default affnity mask of a thread - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetUsableProcessors_PC() - */ -/*JP - * \brief XbhAtBjeB}XÑftHgݒl - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetUsableProcessors_PC() - */ -#define CRIMV_DEFAULT_AFFNITY_MASK_PC (0xFFFFFFFF) - - -/*EN - * \brief Default priority of a thread - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetUsableProcessors_PC() - */ -/*JP - * \brief Xbh̃ftHgDx - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetUsableProcessors_PC() - */ -#define CRIMV_DEFAULT_THREAD_PRIORITY_PC (0x8000000) -#endif - -/*EN - * \brief Default value of the read buffer size - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetReadBufferSize() - */ -/*JP - * \brief [hobt@TCYftHgl - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetReadBufferSize() - */ -#define CRIMV_READ_BUFFER_SIZE_AUTO (-1) - - -/*************************************************************************** - * Library Spec Defenition - ***************************************************************************/ - -/* */ - -/* 2007-09-06:URUSHI I[fBĨTuW[ * - * MvPlỹI[fBICriMvPlyAmngƂVȃNXɐ؂oB* - * CriMvPlyAmng̓f}`vNTSgbNf[^󂯎āA * - * gbNƂɊUꂽAdecɏn܂B * - * ړI͈ȉ̓ * - * 1) I[fBIgbN̓Iؑ * - * 2) [vĐł̈قȂ`uڂ̓ */ - -#define NUM_MAX_ADEC (2) /* Adec̍ő吔 */ -/* ADEC̃CfbNX` */ -/* indexgCriMvPlyAmngAdecRg[ĂB */ -#define MAIN_ADEC_IDX (0) // CgbNp -#define SUB_ADEC_IDX (1) // {CXgbNp - -/* I[fBI̓Iؑ֋@\T|[g邩 */ -//#define ENABLE_DYNAMIC_AUDIO_SWITCH - -#if defined(ENABLE_DYNAMIC_AUDIO_SWITCH) - #define CRIMVPLYAMNG_TRACK_OFF (512) // ؂ւgbNԍ̃ftHgliؑւneej - - /* gbN̓Iؑւ̂߂̏Ԓ` */ - typedef enum _crimvplyamng_track_state { - CRIMVPLYAMNG_TRACK_STATE_FIXED = (1), // ftHg - CRIMVPLYAMNG_TRACK_STATE_PREP_SWITCHING, // [Uؑւ𖽗߂Aؑւ̏iKî߂̊ԂZbgj - CRIMVPLYAMNG_TRACK_STATE_SWITCHING // ؑ֌Ɛ̎sȂĐؑւsȂ - } CriMvPlyAmngTrackState; -#endif - -/* AĐA2–ڈȍ~̃wb_擾ł悤ɂ邽 */ -#define CRIMVPLY_HEAD_CONTAINER_NUM (2) - -/* ēǂݍ臒l̃ftHgl */ -#define CRIMV_DEFAULT_RELOAD_THRESHOLD (0.8f) // 0.8[sec] - -/* Đ̒t[ftHgl */ -#define CRIMV_DEFAULT_NUM_FRAMES_FOR_PREP (-1) /* ftHgFsgp (t[v[̗p) */ - -/* [N̈̊mۂCRI HeapgpȂ */ -#define CRIMV_REMOVE_CRIHEAP - -/* @ŗLt[ */ -#define CRIMV_FRAME_DETAILS_NUM (2) - -/* CriVavfios Ŏw肷Ot@C̃pX̏ */ -#if defined(XPT_TGT_IOS) - #define CRIMVPLY_VAVFIOS_MAX_FILEPATH (256) -#endif - -/*************************************************************************** - * Process MACRO - ***************************************************************************/ -#define criMv_SetDefaultHandleConfig(p_config) \ -{\ - (p_config)->readbuffer_size = 0;\ -} - -/*************************************************************************** - * Enum declaration - ***************************************************************************/ -/*EN - * \brief Speaker index of CRI Movie PCM output - * \ingroup MDL_MV_OPTION - */ -/*JP - * \brief CRI Movie PCMo͂̃Xs[J[zu - * \ingroup MDL_MV_OPTION - */ -typedef enum { - CRIMV_PCM_BUFFER_L = 0, /*EN< The LEFT channel of CRI Movie output */ - /*JP< CRI Movie I[fBIo͂ LEFT `l */ - CRIMV_PCM_BUFFER_R = 1, /*EN< The RIGHT channel of CRI Movie output */ - /*JP< CRI Movie I[fBIo͂ RIGHT `l */ - CRIMV_PCM_BUFFER_LS = 2, /*EN< The Surround LEFT channel of CRI Movie output */ - /*JP< CRI Movie I[fBIo͂ Surround LEFT `l */ - CRIMV_PCM_BUFFER_RS = 3, /*EN< The Surround RIGHT channel of CRI Movie output */ - /*JP< CRI Movie I[fBIo͂ Surround RIGHT `l */ - CRIMV_PCM_BUFFER_C = 4, /*EN< The CENTER channel of CRI Movie output */ - /*JP< CRI Movie I[fBIo͂ CENTER `l */ - CRIMV_PCM_BUFFER_LFE = 5, /*EN< The LFE channel of CRI Movie output */ - /*JP< CRI Movie I[fBIo͂ LFE `l */ - CRIMV_PCM_BUFFER_EXT1 = 6, /*EN< The EXT1(Rear Left) channel of CRI Movie output */ - /*JP< CRI Movie I[fBIo͂ EXT1(Rear Left) `l */ - CRIMV_PCM_BUFFER_EXT2 = 7, /*EN< The EXT2(Rear Right) channel of CRI Movie output */ - /*JP< CRI Movie I[fBIo͂ EXT2(Rear Right) `l */ - - /* Keep enum 4bytes */ - CRIMV_PCM_BUFFER_MAKE_ENUM_SINT32 = 0x7FFFFFFF -} CriMvPcmBufferIndex; - - -/*EN - * \brief Composite mode of alpha movie - * \ingroup MDL_MV_OPTION - */ -/*JP - * \brief At@[r̍[h - * \ingroup MDL_MV_OPTION - */ -typedef enum { - CRIMV_COMPO_OPAQ = 0, /*EN< Opacity, no alpha value */ - /*JP< sAAt@Ȃ */ - CRIMV_COMPO_ALPHFULL = 1, /*EN< Full alpha blending (8bits-alpha data) */ - /*JP< tAlphaiAt@pf[^8rbg) */ - CRIMV_COMPO_ALPH3STEP = 2, /*EN< 3 Step Alpha */ - /*JP< 3lAt@ */ - CRIMV_COMPO_ALPH32BIT = 3, /*EN< Full alpha blending (32bits color + alpha data) */ - /*JP< tAlphaAiJ[ƃAt@f[^32rbgj */ - CRIMV_COMPO_ALPH1BIT = 4, /*EN< Alpha blending (24bits color + 1->8bits alpha) */ - /*JP< tAlphaAiJ[ƃAt@f[^32bitAl2lj */ - CRIMV_COMPO_ALPH2BIT = 5, /*EN< Alpha blending (24bits color + 2->8bits alpha) */ - /*JP< tAlphaAiJ[ƃAt@f[^32bitAl4lj */ - CRIMV_COMPO_ALPH3BIT = 6, /*EN< Alpha blending (24bits color + 3->8bits alpha) */ - /*JP< tAlphaAiJ[ƃAt@f[^32bitAl8lj */ - CRIMV_COMPO_ALPH4BIT = 7, /*EN< Alpha blending (24bits color + 4->8bits alpha) */ - /*JP< tAlphaAiJ[ƃAt@f[^32bitAl16lj*/ - - /* Keep enum 4bytes */ - CRIMV_COMPO_MAKE_ENUM_SINT32 = 0x7FFFFFFF -} CriMvAlphaType; - - -/*EN - * \brief Result of the last video frame retrieval - * \ingroup MDL_MV_OPTION - */ -/*JP - * \brief ÕrfIt[擾̌ - * \ingroup MDL_MV_OPTION - */ -typedef enum { - CRIMV_LASTFRAME_OK = 0, /*EN< Succeeded */ - /*JP< 擾 */ - CRIMV_LASTFRAME_TIME_EARLY = 1, /*EN< Failed. The frame is not yet the time to draw */ - /*JP< 擾sBt[\ĐԂɒBĂȂ */ - CRIMV_LASTFRAME_DECODE_DELAY = 2, /*EN< Failed. The frame to draw is not decoded yet */ - /*JP< 擾sBrfIt[̃fR[hԂɍȂ */ - CRIMV_LASTFRAME_DISCARDED = 3, /*EN< Failed. The video frame is discarded by app */ - /*JP< 擾sBAvɂĔjꂽ */ - //CRIMV_LASTFRAME_NO_INPUT_DATA = 4, //Not supported yet - //CRIMV_LASTFRAME_SKIPPED = 5, //Not supported yet - //CRIMV_LASTFRAME_DEMUX_STUCKED = 6, //Not supported yet - - /* Keep enum 4bytes */ - CRIMV_LASTFRAME_MAKE_ENUM_SINT32 = 0x7FFFFFFF -} CriMvLastFrameResult; - -#if defined(XPT_TGT_PS3PPU) -/*EN - * \brief Graphic Environment type for PS3 - * \ingroup MDL_MV_OPTION - */ -/*JP - * \brief PS3̃OtBbN‹ - * \ingroup MDL_MV_OPTION - */ -typedef enum { - CRIMV_GRAPHIC_ENV_GCM = 0, /*EN< GCM. (or same ARGB 32bit texture format of GCM) */ - /*JP< GCM‹ (܂̓eNX`tH[}bgGCMƓ‹) */ - CRIMV_GRAPHIC_ENV_PSGL = 1, /*EN< PSGL. (or same ARGB 32bit texture format of PSGL) */ - /*JP< PSGL‹ (܂̓eNX`tH[}bgPSGLƓ‹) */ - - /* Keep enum 4bytes */ - CRIMV_GRAPHIC_ENV_MAKE_ENUM_SINT32 = 0x7FFFFFFF -} CriMvGraphicEnv; -#endif - - -/* CRI Movie Interanl handle status - * - * The possible legal states of a CriMvPly handle. Over the course of your application - * the CriMvPly handle will walk through the following states in roughly the following - * order. In states that are waiting states, you can request the - * CriMvPly handle to advance to the next state by calling the criMvPly_IncrementState() - * function. You can check the status of a valid CriMvPly handle at any time - * by calling criMvPly_GetStatus(). - * - * It is not possible to jump from a state to an arbitrary other state. Normal play - * proceeds from the CRIMVPLY_STATUS_STOP state through the CRIMV_PLY_STATUS_PLAYEND - * state in that order. Premature termination can be requested with the criMvPly_Stop() - * function. - * - * \sa criMvPly_IncrementState(), criMvPly_GetStatus(), criMvPly_Stop() - */ -typedef enum { - CRIMVPLY_STATUS_STOP = 0, /* Standstill. No processing is occurring. - * CriMvPly handles are created into this state. - */ - /* ~ */ - CRIMVPLY_STATUS_DECHDR = 1, /* The CriMvPly structure is now parsing the header - * of the file, including information on height and width - * of the video stream. - */ - /* wb_͒ */ - CRIMVPLY_STATUS_WAIT_PREP = 2, /* The header has been decoded and criMvPly_GetStreamingParameters() - * will now provide valid values. Typically you will call - * criMvPly_AllocateWorkBuffer() with this information at this point. - */ - /* PREPԂւIncrementState҂
- AllocateWorkBufferĂ玟ւ */ - CRIMVPLY_STATUS_PREP = 3, /* Transition to this state to acknowledge to the - * CriMvPly handle that you have allocated your work buffers. */ - /* Đ */ - CRIMVPLY_STATUS_WAIT_PLAYING = 4, /* The audio and video decoders are now ready to begin playback.*/ - /* PLAYINGԂւIncrementState҂
- ̏ԂŊɃrfIƃI[fBĨfR[hʂ͎擾łB*/ - CRIMVPLY_STATUS_PLAYING = 5, /* The decoders are currently decoding and playing output. */ - /* Đ */ - CRIMVPLY_STATUS_WAIT_PLAYEND = 6, /* The library is waiting for you to acknowledge the end of the movie. You - * have informed the CriMvPly structure that an end-of-file condition exists, - * but final frames of video and audio may still be pending in your application. */ - /* PLAYENDԂւIncrementState҂ */ - CRIMVPLY_STATUS_PLAYEND = 7, /* You have acknowledged the end of the movie. Teardown can occur at this point. */ - /* ĐI */ - CRIMVPLY_STATUS_STOP_PROCESSING = 8, /* A request to stop has been received by the CriMvPly structure, - * that is, you have called criMvPly_Stop(), and a stop is now pending. */ - /* ~ */ - CRIMVPLY_STATUS_WAIT_STOP = 9, /* The CriMvPly handle has acknowledged the stop request and - * you may now call criMvPly_IncrementState() to transition to - * the CRIMVPLY_STATUS_STOP state. */ - /* STOPԂւIncrementState҂ */ - CRIMVPLY_STATUS_ERROR = 10, /* An error has occurred. */ - /* G[ */ - - /* Keep enum 4bytes */ - CRIMVPLY_STATUS_MAKE_ENUM_SINT32 = 0x7FFFFFFF -} CriMvPlyStatus; - - -/* Sofdec2 */ -typedef enum { - CRIMVPLY_META_FLAG_OFF = 0x0000, - CRIMVPLY_META_FLAG_CUE = 0x0001, - CRIMVPLY_META_FLAG_SEEK = 0x0002, - CRIMVPLY_META_FLAG_ALL = CRIMVPLY_META_FLAG_CUE + CRIMVPLY_META_FLAG_SEEK, - - /* Keep enum 4bytes */ - CRIMVPLY_META_FLAG_MAKE_ENUM_SINT32 = 0x7FFFFFFF -} CriMvMetaFlag; - -/* Color Conversion*/ -typedef enum{ - CRIMV_COLORSPACE_CONVERSION_TYPE_ITU_R_BT601_LIMITED = 0, - CRIMV_COLORSPACE_CONVERSION_TYPE_ITU_R_BT601_FULLRANGE = 1, - - /* Keep enum 4bytes */ - CRIMV_COLORSPACE_CONVERSION_TYPE_ENUM_SINT32 = 0x7FFFFFFF -}CriMvColorSpaceConversionType; - -typedef void *(*CriMvMetaDataWorkMallocFunc)(void *obj, CriUint32 size); -typedef void (*CriMvMetaDataWorkFreeFunc)(void *obj, void *mem); - -/* OUTER_FRAMEPOOL_WORK */ -#define CriMvFramepoolWorkMallocFunc CriMvMetaDataWorkMallocFunc -#define CriMvFramepoolWorkFreeFunc CriMvMetaDataWorkFreeFunc - -/*************************************************************************** - * Data type declaration - ***************************************************************************/ - -/*EN - * \brief Audio parameters - * \ingroup MDL_MV_INFO - * - * \sa CriMvStreamingParameters, CriMvWaveInfo - */ -/*JP - * \brief I[fBIp[^ - * \ingroup MDL_MV_INFO - * - * I[fBIXg[̃p[^ - * \sa CriMvStreamingParameters, CriMvWaveInfo - */ -typedef struct { - CriUint32 sampling_rate; /*EN< Sampling rate */ - /*JP< TvOg */ - CriUint32 num_channel; /*EN< Number of channels. Monaural = 1, Stereo = 2 */ - /*JP< I[fBI`l */ - CriUint32 total_samples; /*EN< Total number of samples */ - /*JP< Tv */ - CriUint32 output_buffer_samples; /*EN< Output wave buffer size */ - /*JP< TEho̓obt@̃Tv */ - CriUint32 codec_type; /*EN< Codec type */ - /*JP< R[fbN */ - -} CriMvAudioParameters; - -/*EN - * \brief Video Parameters - * \ingroup MDL_MV_INFO - * \sa CriMvStreamingParameters - */ -/*JP - * \brief rfIp[^ - * \ingroup MDL_MV_INFO - * rfIXg[̃p[^ - * \sa CriMvStreamingParameters - */ -typedef struct { - CriUint32 max_width; /*EN< Maximum video width for stream. (multiple of 8) */ - /*JP< [rő啝iW̔{j */ - CriUint32 max_height; /*EN< Maximum video height for stream. (multiple of 8)*/ - /*JP< [rő卂iW̔{j */ - CriUint32 disp_width; /*EN< Width of the image to draw. */ - /*JP< \f̉sNZi[j */ - CriUint32 disp_height; /*EN< Height of the image to draw. */ - /*JP< \f̏csNZi[j */ - CriUint32 num_frame_pool; /*EN< Number of frame pools required for stream */ - /*JP< t[v[ */ - CriUint32 framerate; /*EN< Frame rate per second [x1000]. */ - /*JP< t[[g[x1000] */ - CriUint32 framerate_n; /*EN< Frame rate (in rational as numerator). framerate_n/framerate_d = framerate */ /* UTODO: ϐ */ - /*JP< t[[g̕q(L`)Bframerate_n/framerate_d = framerate */ - CriUint32 framerate_d; /*EN< Frame rate (in rational as denominator). */ - /*JP< t[[g̕(L`)B */ - CriUint32 total_frames; /*EN< Total number of video frames */ - /*JP< t[ */ - - CriUint32 material_width; /*EN< Width of the video source resolustion before encoding. */ - /*JP< GR[hÕrfIfނ̉sNZ */ - CriUint32 material_height; /*EN< Height of the video source resolustion before encoding. */ - /*JP< GR[hÕrfIfނ̏csNZ */ - CriUint32 screen_width; /*EN< Screen width set by encoding and cropping. - * This parameter is only available when you encoded the movie with "Widescreen TV Support" option. - * Normally this value is 0. */ - /*JP< GR[hɎw肵XN[B - * ̒l̓GR[hɁuCherx@\vgpꍇ̂ݗLɂȂ܂B - * ʏ͂OłB */ - - CriUint32 codec_type; /*EN< Video Codec Type. If you encoded the movie for PS2, this value is 2. - * Normally this value is 1 or 0(no info). - * If the codec_type is 1, the CRI Movie for ONLY PS2 can play the movie file. */ - /*JP< rfIR[fbNʁBPS2pɃGR[hꍇ 2ɂȂ܂B - * ʏ 1܂ 0(񖳂)łB - * R[fbNʂQ̃[ŕAPS2ŃCuŁû݁vД\łB */ - CriUint32 codec_dc_option; /*EN< Video Codec DC Option. If you encoded the movie for PS2, this value is 10. - * Normally this value is 11 or 0(no info). - * If the codec_type is 11, the CRI Movie for PS2 can NOT play the movie file. */ - /*JP< rfIR[fbNDCIvVʁBPS2pɃGR[hꍇ10ɂȂ܂B - * ʏ11܂ 0(񖳂)łB - * R[fbNDCIvV11̃[ŕAPS2ŃCuuł́vĐł܂B */ - CriUint32 color_conversion_type; /*EN< Color space converion type. Fullrange or Limited.*/ - /*JP< Fϊ^CvB */ - CriSint32 capacity_of_picsize; /*EN< Capacity size of video pictures. */ - /*JP< sN`TCYl */ - CriUint32 average_bitrate; /*EN< Average bitrate. */ - /*JP< σrbg[g */ -} CriMvVideoParameters; - -/*EN - * \brief Alpha Parameters - * \ingroup MDL_MV_INFO - * \sa CriMvStreamingParameters - */ -/*JP - * \brief At@p[^ - * \ingroup MDL_MV_INFO - * At@Xg[̃p[^ - * \sa CriMvStreamingParameters - */ -typedef struct { - CriUint32 max_width; /*EN< Maximum alpha width for stream */ - /*JP< At@t[̍ő啝 */ - CriUint32 max_height; /*EN< Maximum alpha height for stream */ - /*JP< At@t[̍ő卂 */ - CriUint32 disp_width; /*EN< valid alpha width */ - /*JP< At@t[̎L */ - CriUint32 disp_height; /*EN< valid alpha height */ - /*JP< At@t[̎L */ - CriUint32 framerate; /*EN< Frame rate per second [x1000]. */ - /*JP< At@̃t[[g[x1000] */ - CriUint32 framerate_n; /*EN< Frame rate (in rational as numerator). framerate_n/framerate_d = framerate */ /* UTODO: ϐ */ - /*JP< t[[g̕q(L`)Bframerate_n/framerate_d = framerate */ - CriUint32 framerate_d; /*EN< Frame rate (in rational as denominator). */ - /*JP< t[[g̕(L`)B */ - CriUint32 total_frames; /*EN< Total number of alpha frames */ - /*JP< t[ */ - CriMvAlphaType alpha_type; /*EN< Alpha Composite Type. */ - /*JP< At@ʁB */ - CriUint32 codec_type; /*EN< Internal use only. Do not access this */ - /*JP< Cugpϐ */ - CriUint32 color_conversion_type; /*EN< Color space converion type. Fullrange or Limited.*/ - /*JP< Fϊ^CvB */ - CriSint32 capacity_of_picsize; /*EN< Capacity size of video pictures. */ - /*JP< sN`TCYl */ - CriUint32 average_bitrate; /*EN< Average bitrate. */ - /*JP< σrbg[g */ -} CriMvAlphaParameters; - - -/*EN - * \brief Streaming Parameters - * \ingroup MDL_MV_INFO - * This structure includes streaming parameters and playing parameters. - * \sa CriMvEasyPlayer::GetMovieInfo() - */ -/*JP - * \brief Xg[~OĐp[^ - * \ingroup MDL_MV_INFO - * Xg[~OĐp[^B
- * Xg[̂̏ƁAĐ̂߂ɕKvȃp[^̗܂łB - * \sa CriMvEasyPlayer::GetMovieInfo() - */ -typedef struct { - /* Stream */ - CriUint32 is_playable; /*EN< Flag of the movie file is playable or not. 1 is playable. 0 is not playable.*/ - /*JP< Д\tOi1: Д\A0: Đsj */ - CriFloat32 buffering_time; /*EN< Amount of time to buffer in the stream, in seconds */ - /*JP< ǂݍ݃f[^̃obt@OԁBP[sec]B */ - CriUint32 max_bitrate; /*EN< Maximum bits per second for stream. This value includes video and audio both. */ - /*JP< őrbg[g(GƉ̍v) */ - CriUint32 max_chunk_size; /*EN< Maximum chunk size of incoming stream (USF) file */ - /*JP< őUSF`NTCY */ - CriUint32 min_buffer_size; /*EN< Minimum buffer size for reading */ - /*JP< ŒKvȓǂݍ݃obt@TCYB
I[fBIƃrfI̍v */ - CriSint32 read_buffer_size; /*EN< Input buffer size for reading data */ - /*JP< [hobt@TCY */ - /* Video */ - CriUint32 num_video; /*EN< Number of simultaneous video streams */ - /*JP< rfIfR[_̐B݂1ŒB*/ - CriMvVideoParameters video_prm[CRIMV_MAX_VIDEO_NUM]; /*EN< Video parameters see CriMvVideoParameters struct for details */ - /*JP< rfIp[^ */ - /* Audio */ - CriUint32 num_audio; /*EN< Number of simultaneous audio streams */ - /*JP< I[fBIfR[_̐B݂1ŒB*/ - CriSint32 track_play_audio; /*EN< Track of audio playback. */ - /*JP< ĐI[fBI`lԍB-1wōĐB */ - CriMvAudioParameters audio_prm[CRIMV_MAX_AUDIO_NUM]; /*EN< Audio parameters see CriMvAudioParameters struct for details */ - /*JP< I[fBIp[^ */ - /* Subtitle */ - CriUint32 num_subtitle; /*EN< Number of subtitles */ - /*JP< `l */ - CriSint32 channel_play_subtitle; /*EN< Channel for playing subtitles */ - /*JP< Đ鎚`lԍ */ - CriUint32 max_subtitle_size; /*EN< Maximum size of subtitle data */ - /*JP< f[^̍őTCY*/ - - /* Composite mode */ - CriUint32 num_alpha; /*EN< Number of alpha channels (current spec allows only one) */ - /*JP< At@fR[_̐B݂1ŒB */ - CriMvAlphaParameters alpha_prm[CRIMV_MAX_ALPHA_NUM]; /*EN< Alpha parameters see CriMvAlphaParameters struct for details */ - /*JP< At@p[^ */ - - CriBool seekinfo_flag; /*EN< Flag of the movie file inclues seek info */ - /*JP< V[NtO */ - CriUint32 format_ver; /*EN< Format version */ - /*JP< tH[}bgo[W */ -} CriMvStreamingParameters; - - -/*EN - * \brief Input Buffer Information - * \ingroup MDL_MV_INFO - * \sa CriMvEasyPlayer::GetInputBufferInfo(), - * CriMvEasyPlayer::SetReloadThresholdTime(), CriMvEasyPlayer::SetBufferingTime() - */ -/*JP - * \brief ̓obt@ - * \ingroup MDL_MV_INFO - * \sa CriMvEasyPlayer::GetInputBufferInfo(), - * CriMvEasyPlayer::SetReloadThresholdTime(), CriMvEasyPlayer::SetBufferingTime() - */ -typedef struct { - CriUint32 buffer_size; /*EN< Input buffer size [byte] */ - /*JP< ̓obt@TCY[byte] */ - CriUint32 data_size; /*EN< Data size in input buffer[byte] */ - /*JP< ̓obt@ɂf[^TCY[byte] */ - CriUint32 reload_threshold; /*EN< Re-load threshold. When data size is less than re-load threshold, next read is requested. */ - /*JP< ēǂݍ臒l[byte]Bf[^TCY̒lȉɂȂƓǂݍ݂s܂B */ -} CriMvInputBufferInfo; - - -// TEMP: for internal use -typedef struct { - CriUint8 *imageptr; - CriUint32 bufsize; // [Byte] - CriUint32 line_pitch; // [Byte] - CriUint32 line_size; // [Byte] - CriUint32 num_lines; -} CriMvImageBufferInfo; - -/*EN - * \brief Video Frame Information - * \ingroup MDL_MV_INFO - * \sa CriMvEasyPlayer::GetFrameOnTimeAs32bitARGB(), CriMvEasyPlayer::GetFrameOnTimeAsYUVBuffers, - * CriMvEasyPlayer::GetFrameOnTimeAsYUV422(), CriMvEasyPlayer::DiscardNextFrame() - */ -/*JP - * \brief rfIt[ - * \ingroup MDL_MV_INFO - * rfIt[ - * \sa CriMvEasyPlayer::GetFrameOnTimeAs32bitARGB(), CriMvEasyPlayer::GetFrameOnTimeAsYUVBuffers, - * CriMvEasyPlayer::GetFrameOnTimeAsYUV422(), CriMvEasyPlayer::DiscardNextFrame() - */ -typedef struct { - CriUint8 *imageptr; /*EN< Pointer to image data */ - /*JP< 摜f[^̃|C^ */ - CriSint32 frame_id; /*EN< Frame ID ot the playback */ - /*JP< t[IDi[v^AĐ͒ʎZj */ - CriUint32 width; /*EN< Width of movie frame [pixel] (multiple of 8) */ - /*JP< [r̉[pixel] (W̔{) */ - CriUint32 height; /*EN< Height of movie frame [pixel] (multiple of 8) */ - /*JP< [r̍[pixel] (W̔{) */ - CriUint32 pitch; /*EN< Pitch of movie frame [byte]*/ - /*JP< [r̃sb`[byte] */ - CriUint32 disp_width; /*EN< Width of the image to draw. */ - /*JP< \f̉sNZi[j */ - CriUint32 disp_height; /*EN< Height of the image to draw. */ - /*JP< \f̏csNZi[j */ - CriUint32 framerate; /*EN< Frames per second times 1000 */ - /*JP< t[[g1000{̒l */ - CriUint32 framerate_n; /*EN< Frame rate (in rational as numerator). framerate_n/framerate_d = framerate */ /* UTODO: ϐ */ - /*JP< t[[g̕q(L`)Bframerate_n/framerate_d = framerate */ - CriUint32 framerate_d; /*EN< Frame rate (in rational as denominator). */ - /*JP< t[[g̕(L`)B */ - CriUint64 time; /*EN< Frame time ('time / tunit' indicates time in seconds) */ - /*JP< Btime / tunit ŕb\B */ - CriUint64 tunit; /*EN< Unit of time measurement */ - /*JP< P */ - CriUint32 cnt_concatenated_movie; /*EN< Number of concatenated movie data */ - /*JP< [r̘A */ - CriSint32 frame_id_per_data; /*EN< Frame ID of the movie data */ - /*JP< [rf[^Ƃ̃t[ԍ */ - - CriBool csc_flag; /*EN< This is temporary variable. Please don't access. */ - /*JP< eXg̕ϐłBANZXȂłB */ - - CriMvAlphaType alpha_type; /*EN< Composite mode */ - /*JP< At@̍[h*/ - - void *details_ptr[CRIMV_FRAME_DETAILS_NUM]; // for internal use - - CriSint32 num_images; // TEMP: for internal use - CriMvImageBufferInfo image_info[4]; // TEMP: for internal use - - CriUint32 color_conversion_type; /*EN< Color space converion type. Fullrange or Limited.*/ - /*JP< Fϊ^CvB */ - CriUint32 total_frames_per_data; /*EN< Total frames of the movie data*/ - /*JP< [rf[^Pʂ̑t[ */ - CriUint32 cnt_skipped_frames; /*EN< Number of skipped frames to decode */ - /*JP< fR[hXLbvꂽt[ */ -} CriMvFrameInfo; - -/*EN - * \brief Subtitle Information - * \ingroup MDL_MV_INFO - * \sa CriMvEasyPlayer::GetSubtitleOnTime() - */ -/*JP - * \brief - * \ingroup MDL_MV_INFO - * \sa CriMvEasyPlayer::GetSubtitleOnTime() - */ -typedef struct { - CriUint8 *dataptr; /*EN< Pointer to subtitle data */ - /*JP< f[^̃|C^ */ - CriUint32 data_size; /*EN< Size of subtitle data */ - /*JP< f[^TCY */ - CriSint32 channel_no; /*EN< Channel number of subtitle data */ - /*JP< f[^̃`lԍ */ - CriUint64 time_unit; /*EN< Unit of time measurement */ - /*JP< P */ - CriUint64 in_time; /*EN< Display start time */ - /*JP< \Jn*/ - CriUint64 duration_time; /*EN< Display duration time */ - /*JP< \ */ - CriUint32 cnt_concatenated_movie; /*EN< Number of concatenated movie data */ - /*JP< [r̘A */ - CriUint64 in_time_per_data; /*EN< Display start time per movie data*/ - /*JP< [rf[^Ƃɕ\Jn*/ -} CriMvSubtitleInfo; - -/*EN - * \brief Event Point Info - * \ingroup MDL_MV_INFO - * Event point info is the each timing info was embeded to movie data as cue point info. - * \sa CriMvEasyPlayer::GetCuePointInfo() - */ -/*JP - * \brief Cxg|Cg - * \ingroup MDL_MV_INFO - * L[|Cg@\Ń[rf[^ɖߍ܂ꂽX̃^C~OłB - * \sa CriMvEasyPlayer::GetCuePointInfo() - */ -typedef struct { - CriChar8 *cue_name; /*EN< The name string of event point. Char code depends on cue point text. */ - /*JP< Cxg|CgBR[h̓L[|CgeLXgɏ]܂B */ - CriUint32 size_name; /*EN< The data size of name string */ - /*JP< Cxg|Cg̃f[^TCY */ - CriUint64 time; /*EN< Timer counter */ - /*JP< ^C}JEg */ - CriUint64 tunit; /*EN< Counter per 1 second. "count / unit" indicates the timer on the second time scale. */ - /*JP< Pb̃^C}JEglBcount unit ŕbPʂ̎ƂȂ܂B */ - CriSint32 type; /*EN< Event point type */ - /*JP< Cxg|Cg */ - CriChar8 *param_string; /*EN< The string of user parameters. Char code depends on cue point text. */ - /*JP< [Up[^BR[h̓L[|CgeLXgɏ]܂B */ - CriUint32 size_param; /*EN< The data size of user parameters string */ - /*JP< [Up[^̃f[^TCY */ - CriUint32 cnt_callback; /*EN< The counter of calling cue point callback. */ - /*JP< L[|CgR[obŇĂяoJE^ */ -} CriMvEventPoint; - -/*EN - * \brief Cue Point Info - * \ingroup MDL_MV_INFO - * Cue point info includes the number of event points and the list. - * \sa CriMvEasyPlayer::GetCuePointInfo() - */ -/*JP - * \brief L[|Cg - * \ingroup MDL_MV_INFO - * L[|CǵACxg|CǧƈꗗłB
- * \sa CriMvEasyPlayer::GetCuePointInfo() - */ -typedef struct { - CriUint32 num_eventpoint; /*EN< The number of event points */ - /*JP< Cxg|Cg */ - CriMvEventPoint *eventtable; /*EN< The list of event points */ - /*JP< Cxg|Cgꗗ */ -} CriMvCuePointInfo; - -/*EN - * \brief YUV Texture Buffer Parameters - * \ingroup MDL_MV_INFO - * The output buffer parameters for CriMvEasyPlayer::GetFrameOnTimeAsYUVBuffers(). - * CriMvEasyPlayer::GetFrameOnTimeAsYUVBuffers() outputs data for pixel shader.
- * If an application doesn't play alpha movie, CRI Movie library doesn't use alpha buffer parameters.
- * \sa CriMvEasyPlayer::GetFrameOnTimeAsYUVBuffers() - */ -/*JP - * \brief YUV•ʃobt@ - * \ingroup MDL_MV_INFO - * CriMvEasyPlayer::GetFrameOnTimeAsYUVBuffers() ̏o̓obt@łB
- * CriMvEasyPlayer::GetFrameOnTimeAsYUVBuffers() Pixel Shader ̃fR[hʂo͂܂B
- * At@[rĐsȂꍇis̒ʏĐj́AAlphaeNX`֘Ãp[^͎gp܂B
- * \sa CriMvEasyPlayer::GetFrameOnTimeAsYUVBuffers() - */ -typedef struct { - CriUint8 *y_imagebuf; /*EN< Pointer to the buffer of Y texture */ - /*JP< YeNX`̃obt@|C^ */ - CriUint32 y_bufsize; /*EN< Size of the buffer of Y texture [byte] */ - /*JP< YeNX`̃obt@TCY[byte] */ - CriUint32 y_pitch; /*EN< Pitch of the buffer of Y texture [byte] */ - /*JP< YeNX`̃sb`[byte] */ - CriUint8 *u_imagebuf; /*EN< Pointer to the buffer of U texture */ - /*JP< UeNX`̃obt@|C^ */ - CriUint32 u_bufsize; /*EN< Size of the buffer of U texture [byte] */ - /*JP< UeNX`̃obt@TCY[byte] */ - CriUint32 u_pitch; /*EN< Pitch of the buffer of U texture [byte] */ - /*JP< UeNX`̃sb`[byte] */ - CriUint8 *v_imagebuf; /*EN< Pointer to the buffer of V texture */ - /*JP< VeNX`̃obt@|C^ */ - CriUint32 v_bufsize; /*EN< Size of the buffer of V texture [byte] */ - /*JP< VeNX`̃obt@TCY[byte] */ - CriUint32 v_pitch; /*EN< Pitch of the buffer of V texture [byte] */ - /*JP< VeNX`̃sb`[byte] */ - CriUint8 *a_imagebuf; /*EN< Pointer to the buffer of Alpha texture */ - /*JP< AlphaeNX`̃obt@|C^ */ - CriUint32 a_bufsize; /*EN< Size of the buffer of Alpha texture [byte] */ - /*JP< AlphaeNX`̃obt@TCY[byte] */ - CriUint32 a_pitch; /*EN< Pitch of the buffer of Alpha texture [byte] */ - /*JP< AlphaeNX`̃sb`[byte] */ -} CriMvYuvBuffers; - - -/*EN - * \brief Playback Information - * \ingroup MDL_MV_INFO - * The output playback information of CriMvEasyPlayer::GetPlaybackInfo(). - * These parameters represents current movie playback information such as decode delay of movie data and - * interval of video frames retrieval. - * \sa CriMvEasyPlayer::GetPlaybackInfo() - */ -/*JP - * \brief Đ - * \ingroup MDL_MV_INFO - * CriMvEasyPlayer::GetPlaybackInfo() ̏o͍ĐłB
- * t[̎擾ԊufR[h̒xȂǂ̌ݍĐĂ郀[r̍Đ\܂B
- * \sa CriMvEasyPlayer::GetPlaybackInfo() - */ -typedef struct { - CriUint64 cnt_app_loop; /*EN< Loop count of application. Precisely, this is a number of calls of CriMvEasyPlayer::Update(). The count up will start after app is able to acquire the first video frame */ - /*JP< AvP[Ṽ[vJEgB̓Iɂ CriMvEasyPlayer::Update() ̌Ăяo񐔂ɂȂ܂Bŏ̃t[擾”\ɂȂƃJEgn܂܂B*/ - CriUint64 cnt_frame_interval[4]; /*EN< Interval of video frames retrieval. These values are count up when CriMvEasyPlayer::IsNextFrameOnTime() returns TRUE. - * - * The interval of video frames retrieval indicates a number of the loop count when your application calls CriMvEasyPlayer::IsNextFrameOnTime() in the main loop. - * In case that the application waits for vertical retrace, 1 interval equals about 16.7 msec. - * The index of array represents the count of intervals as follows: - * - *
Index Interval of video frames retrieval - *
0 Every main loop - *
1 2 main loops - *
2 3 main loops - *
3 4 or more main loops - *
- * With these values, you can check if the application gets video frames with appropriate intervals. Please use the values as measuring playback smoothness - * - * In order to use these values, the application must meet the following conditions: - * - The main loop should work periodically and stably (Ideally sync with vertical retrace) - * - The application should call CriMvEasyPlayer::IsNextFrameOnTime() once in everly main loop - * - * For example, if the application runs at 59.94fps by waiting for vertical retrace and a framerate of playing movie file is 29.97fps, - * only cnt_frame_interval[1] should be increased. - */ - /*JP< t[̎擾ԊuB̒ĺA CriMvEasyPlayer::IsNextFrameOnTime() TRUEԂɃJEgAbv܂B
- * - * t[̎擾ԊuƂ́AAvP[VC[vŃt[擾֐ǂ񂾎̃[v̉񐔂Ӗ܂B - * C[vVSyncƓĂꍇ́A1 Interval = 16.7msecƂƂɂȂ܂B - * z̃CfbNX́Aȉ̂悤Ɏ擾Ԋu\܂B
- * - *
CfbNX t[̎擾Ԋu - *
0 C[v - *
1 2 C[v - *
2 3 C[v - *
3 4 C[vȏ - *
- * ̒l邱ƂŁAAvԊuŃt[擾ł̂ǂ`FbN邱Ƃł܂B[r炩ɍĐłĂ邩̖ڈɂĂB
- * - * OƂāAȉ̏AvĂKv܂B - * - AvVSyncȂǁA̎ň肵ē삵Ă - * - C[vŖ CriMvEasyPlayer::IsNextFrameOnTime() Ăяo - * - * L̏ɂāAႦ΃Av59.94fpsœ삵ĂԂŁAt[[g29.97fps̃[rĐꍇAcnt_frame_interval[1]݂̂ - * ԊuŃt[̎擾oƂɂȂ܂B - */ - CriUint64 cnt_time_early; /*EN< A count of how many times CriMvEasyPlayer::IsNextFrameOnTime() returns FALSE due to the determination if it is the time to provide the next video frame */ - /*JP< CriMvEasyPlayer::IsNextFrameOnTime() At[\ɂFALSEԂ񐔁B*/ - CriUint64 cnt_decode_delay; /*EN< A count of how many times CriMvEasyPlayer::IsNextFrameOnTime() returns FALSE due to the delay of decoding movie data */ - /*JP< CriMvEasyPlayer::IsNextFrameOnTime()ArfIt[̃fR[hxɂFALSEԂ */ - CriFloat32 time_max_delay; /*EN< Maximum delay time [msec] of the actual time a video frame retrieved against the original time should be retrieved */ - /*JP< rfIt[擾ۂ̎ƁA{\ׂƂ̍őx [msec]B */ - CriFloat32 time_average_delay; /*EN< Average delay time [msec] of the actual time a video frame retrieved against the original time should be retrieved */ - /*JP< rfIt[擾ۂ̎ƁA{\ׂƂ̕ϒx [msec]B */ -} CriMvPlaybackInfo; - -#if defined(XPT_TGT_PS3PPU) -/*EN - * \brief Parameters of SPURS and PPU for decoding - * \ingroup MDL_MV_BASIC - * - * \sa CriMv::SetupSpursParameters_PS3(), CriMv::CalcSpursWorkSize_PS3() - */ -/*JP - * \brief fR[hɎgSPURSPPŨp[^ - * \ingroup MDL_MV_BASIC - * - * \sa CriMv::SetupSpursParameters_PS3(), CriMv::CalcSpursWorkSize_PS3() - */ -typedef struct { - void *spurs_handler; /*EN< SPURS handler */ - /*JP< SPURSnh */ - void *spurs_work; /*EN< SPURS work area. The size is spurs_worksize. The alignment is 128 byte. */ - /*JP< SPURSp[Nobt@Bobt@TCY spurs_worksize 128oCgEB */ - CriSint32 spurs_worksize; /*EN< SPURS work size. This size is calculated by CriMv::CalcSpursWorkSize_PS3 function. */ - /*JP< SPURSp[NTCYBCriMv::CalcSpursWorkSize_PS3 ֐Ŏ擾lB */ - CriSint32 spurs_max_contention; /*EN< SPURS max contention */ - /*JP< SPURS Ń[rfR[hpɎgSPU̍ő吔 */ - CriUint8 *spurs_task_priority; /*EN< SPURS task priority x 8 */ - /*JP< SPURS ̃^XNvCIeBzBzvf͂WB */ - - CriUint32 ppu_num; /*EN< The number of PPU for decoding (0-2) */ - /*JP< The number of PPU for decoding (0-2) */ - CriSint32 ppu_thread_prio; /*EN< PPU Thread Priority. This priority is used for decoding thread in the case of ppu_num equal 2. */ - /*JP< PPU Thread Priority. ̒l ppu_num 2w肵ꍇɍ쐬XbhɎgB */ -} CriMvProcessorParameters_PS3; - -// [NOT SUPPORT on normal library] -// for SPU Thread -typedef struct { - CriUint32 ppu_num; /* The number of PPU for decoding (0-2) */ - CriSint32 ppu_prio; /* PPU Thread Priority */ - CriUint32 spu_num; /* The number of SPU for decoding (0-6) */ - CriSint32 spu_grp_prio; /* SPU Thread Group Priority */ -} CriMvSpuThreadParameters_PS3; - -#endif - -#if defined(XPT_TGT_XBOX360) -/*EN - * \brief Parameters of Xbox360 processors for decoding - * \ingroup MDL_MV_BASIC - * - * \sa CriMvEasyPlayer::SetUsableProcessors_XBOX360() - */ -/*JP - * \brief fR[hɎgXbox360vZbT̃p[^ - * \ingroup MDL_MV_BASIC - * - * \sa CriMvEasyPlayer::SetUsableProcessors_XBOX360() - */ -typedef struct { - CriBool processor0_flag; /*EN< Processor 0 (Core 0, Thread 0) usable flag */ - /*JP< vZbT0 (RA0Xbh0) gp”\tO */ - CriBool processor1_flag; /*EN< Processor 1 (Core 0, Thread 1) usable flag */ - /*JP< vZbT1 (RA0Xbh1) gp”\tO */ - CriBool processor2_flag; /*EN< Processor 2 (Core 1, Thread 0) usable flag */ - /*JP< vZbT2 (RA1Xbh0) gp”\tO */ - CriBool processor3_flag; /*EN< Processor 3 (Core 1, Thread 1) usable flag */ - /*JP< vZbT3 (RA1Xbh1) gp”\tO */ - CriBool processor4_flag; /*EN< Processor 4 (Core 2, Thread 0) usable flag */ - /*JP< vZbT4 (RA2Xbh0) gp”\tO */ - CriBool processor5_flag; /*EN< Processor 5 (Core 2, Thread 1) usable flag */ - /*JP< vZbT5 (RA2Xbh1) gp”\tO */ - CriSint32 thread_priority; /*EN< Priority of decoding threads on the active processors */ - /*JP< evZbTŃfR[hsXbh̗Dx */ -} CriMvProcessorParameters_XBOX360; -#endif - -#if defined(XPT_TGT_VITA) -/*EN - * \brief AVC Decoder Parameters - * \ingroup MDL_MV_BASIC - * - * \sa CriMv::SetupAvcDecoderParameters_VITA() - */ -/*JP - * \brief AVCfR[_p[^ - * \ingroup MDL_MV_BASIC - * - * \sa CriMv::SetupAvcDecoderParameters_VITA() - */ -typedef struct { - CriUint32 horizontal; /*EN< Maximum width for decoding (in pixel) */ - /*JP< őfR[h摜̉ (PʁFsNZ) */ - CriUint32 vertical; /*EN< Maximum height for decoding (in pixel) */ - /*JP< őfR[h摜̍ (PʁFsNZ) */ - CriUint32 n_ref_frames; /*EN< Maximum reference frames on decoding (default:3) */ - /*JP< fR[h̍őQƉ摜̖ */ - CriUint32 n_decoders; /*EN< Maximum number of avc decoders (max:1) */ - /*JP< ɎgpAVCŃR[_̍ő吔 (1Œ) */ - -} CriMvAvcDecoderParameters_VITA; -#endif - -/*--------------------------------------------------------------------------*/ -/* */ -/*--------------------------------------------------------------------------*/ -typedef enum { - CRIMV_PCM_FORMAT_SINT16 = 0, - CRIMV_PCM_FORMAT_FLOAT32 = 1, - - /* Keep enum 4bytes */ - CRIMV_PCM_FORMAT__MAKE_ENUM_SINT32 = 0x7FFFFFFF -} CriMvPcmFormat; -/* - * \brief 16bit wave data information - * \ingroup MDL_MV_INFO - * Information about a 16-bit waveform. - */ -/* 16bit Waveform */ -typedef struct { - CriUint32 num_channel; /* Number of Channels. monaural = 1, stereo = 2 */ - /* Number of Channels. monaural = 1, stereo = 2 */ - CriUint32 num_samples; /* Number of sample */ - /* Tv */ - CriUint32 sampling_rate; /* Sampling rate */ - /* TvOg */ -} CriMvWaveInfo; - -/* I[fBIwb_ */ -typedef struct { - /* Xg[~Op[^Ƌ */ - CriUint32 sampling_rate; - CriUint32 num_channel; - CriUint32 total_samples; - CriUint32 codec_type; - - CriUint32 metadata_count; - CriUint32 metadata_size; - - /* wb_ŗL */ - CriUint32 a_input_xsize; -} CriMvPlyAudioHeader; - -/* rfIwb_ */ -typedef struct { - /* wb_ŗL */ - CriUint32 width; - CriUint32 height; - CriUint32 disp_width; - CriUint32 disp_height; - CriUint32 framerate_n; - CriUint32 framerate_d; - CriUint32 total_frames; - - CriUint32 material_width; /* width of video original source. 0 means no info. */ - CriUint32 material_height; /* height of video original source. 0 means no info. */ - CriUint32 screen_width; /* screen width for Wii */ - - CriUint32 codec_type; - CriUint32 codec_dc_option; /* 11 or 10 */ - - CriUint32 metadata_count; - CriUint32 metadata_size; - - CriUint32 pre_padding; - CriUint32 color_conversion_type; - CriSint32 max_picture_size; - CriSint32 average_bitrate; -} CriMvPlyVideoHeader; - -/* Tu^Cgwb_ */ -typedef struct { - CriBool is_subtitle_data; - CriUint32 num_channel; - CriUint64 time_unit; - CriUint32 max_subtitle_size; -} CriMvPlySubtitleHeader; - -/* L[|Cgwb_ */ -typedef struct { - CriBool is_cuepoint_data; - CriUint32 metadata_count; - CriUint32 metadata_size; - CriUint32 num_eventpoint; - CriUint64 time_unit; -} CriMvPlyCuePointHeader; - -/* At@wb_ */ -typedef struct { - /* wb_ŗL */ - CriUint32 width; - CriUint32 height; - CriUint32 disp_width; - CriUint32 disp_height; - CriUint32 framerate_n; - CriUint32 framerate_d; - CriUint32 total_frames; - - CriMvAlphaType alpha_type; - CriUint32 codec_type; - - CriUint32 metadata_count; - CriUint32 metadata_size; - - CriUint32 pre_padding; - CriUint32 color_conversion_type; - CriSint32 max_picture_size; - CriSint32 average_bitrate; -} CriMvPlyAlphaHeader; - -/* At@݂̂̃t[ */ -typedef struct { - CriUint8 *imageptr; /*EN< Pointer to image data */ - /*JP< 摜f[^̃|C^ */ - CriSint32 frame_id; /*EN< Frame ID */ - /*JP< t[ID */ - CriUint32 width; /*EN< Width of movie frame [pixel] */ - /*JP< [r̉[pixel] */ - CriUint32 height; /*EN< Height of movie frame [pixel] */ - /*JP< [r̍[pixel] */ - CriUint32 disp_width; /*EN< Width of image [pixel] */ - /*JP< Lȉf̉[pixel] */ - CriUint32 disp_height; /*EN< Height of image [pixel] */ - /*JP< Lȉf̍[pixel] */ - CriUint32 pitch; /*EN< Pitch of movie frame [byte]*/ - /*JP< [r̃sb`[byte] */ - CriUint64 time; /*EN< Frame time ('time / tunit' indicates time in seconds) */ - /*JP< Btime / tunit ŕb\B */ - CriUint64 tunit; /*EN< Unit of time measurement */ - /*JP< P */ - CriSint32 frame_id_per_data; /*EN< Frame ID of the movie data */ - /*JP< [rf[^Ƃ̃t[ԍ */ - CriMvAlphaType alpha_type; /*EN< Composite mode */ - /*JP< At@̍[h*/ - void *detail_ptr; /* TEMP: for internal use */ - CriUint32 color_conversion_type; /*EN< Color space converion type. Fullrange or Limited.*/ - /*JP< Fϊ^CvB */ -} CriMvAlphaFrameInfo; - -// ǗpB[r[Uɓn͂Ƃقړ낤B -/* Information of USF File */ -typedef struct { - CriBool is_usf_file; - CriUint32 max_chunk_size; - CriUint32 min_buffer_size; - CriUint32 bitrate; - CriUint32 format_version; - /* Video */ - CriUint32 num_video; - CriMvPlyVideoHeader videohead[CRIMV_MAX_VIDEO_NUM]; - /* Audio */ - CriUint32 num_audio; - CriMvPlyAudioHeader audiohead[CRIMV_MAX_AUDIO_NUM]; - /* Subtitle */ - CriUint32 num_subtitle; - CriMvPlySubtitleHeader subtitlehead; - /* Alpha */ - CriUint32 num_alpha; - CriMvPlyAlphaHeader alphahead[CRIMV_MAX_ALPHA_NUM]; - /* CuePoint */ - CriUint32 num_cuepoint; - CriMvPlyCuePointHeader cuepointhead; -} CriMvPlyHeaderInfo; - -/* Video Elementary Stream */ -typedef struct { - CriUint32 fcid; - CriSint32 track_no; // `Ñ`lԍ - void *vdec; -} CriMvPlyVideo; - -typedef struct { - CriUint32 fcid; - CriSint32 track_no; // `Ñ`lԍ - void *dec; -} CriMvPlyAlpha; - -/* [rwb_Ǘ邽߂̍\ */ -typedef struct { - CriMvPlyHeaderInfo info; - CriBool write_new_head_flag; // CRID‚Ď̃wb_ޏłH - CriUint32 num_remaining_adec_head; // KvȎc̃I[fBIwb_̐ - CriUint32 num_remaining_vdec_head; // KvȎc̃rfĨwb_̐ - CriUint32 num_remaining_subtitle_head; // KvȎc̎̃wb_̐ - CriUint32 num_remaining_alpha_head; // KvȎc̃At@̃wb_ - CriUint32 num_remaining_cuepoint_head; // KvȎc̃L[|Cg̃wb_ - /* 2010-08-19: TEMP: CONCAT_KAI: Don't refer this member. */ - CriUint64 accumulated_tcount; -} CriMvHeaderInfoContainer; - -typedef struct { - CriBool is_play_audio; - CriUint32 fcid; - CriUint32 track_no; // `Ñ`lԍ - void *adec; // ۂ̃I[fBIR[fbN - CriUint32 num_channel; // f[^̃`l - CriUint32 sampling_rate; // TvOg - CriUint32 output_buffer_samples; - CriSj sji; // UNI - CriSj sjo[CRIMV_PCM_BUFFER_MAX]; // RBF - CriUint32 sjo_bufsize[CRIMV_PCM_BUFFER_MAX]; - CriBool term_supply; // f[^IʒmtO - CriBool is_working; // Rec`N - -#if defined(ENABLE_DYNAMIC_AUDIO_SWITCH) - CriUint32 next_track_no; // [Uw肵ؑ֐̃gbNԍ - CriUint32 last_track_switch_time; // ؑ֌̃gbN̍ŌɃ`NƂ - CriUint32 last_track_switch_tunit; // L̒P (in Hz?) - CriMvPlyAmngTrackState switch_state; // gbNؑւɂ -#endif -} *CriMvPlyAdec, CriMvPlyAdecObj; - -typedef struct { - - CriMvPlyAdec mvply_adecs[NUM_MAX_ADEC]; - CriSint32 num_adecs; - CriUint32 size_smpl; - CriSj sji; - CriUint32 chunk_num_per_server; - - CriBool (*cbfunc_nofify_found_header)(void *usrobj, CriChunk *ckc, CriUint8 chno); - void *usrobj_nofify_found_header; - -} *CriMvPlyAmng, CriMvPlyAmngObj; - - -/* V[NubN */ -typedef struct { - CriSint32 top_frame_id; -} CriMvSeekBlockInfo; - -/* Xg[}p */ -typedef struct { - CriUint32 max_chunk_size; - CriUint32 average_bitrate; -} CriMvStreamerInfo; - - -/* nh쐬pRtBO\ */ -typedef struct { - CriUint32 readbuffer_size; -} CriMvHandleConfig; - - -/*JP CRI Movie nh */ -/*EN - * A handle for a single movie. If multiple movies are to be played simultaneously, - * create a CriMvPly handle for each movie. - * - * \sa criMvPly_Create(), criMvPly_Destroy() */ -typedef struct { - /*** Member variable is ***/ - CriBool used; - CriMvPlyStatus stat; - CriBool request_stop; - CriBool restrain_supply; - CriBool term_supply; - void *cs_work; - void *cshn; - /* USF Header */ - - CriMvHeaderInfoContainer headinfo_container[CRIMVPLY_HEAD_CONTAINER_NUM]; - Uint16 cur_dechead_idx; - CriUint32 cnt_dechead; /* wb_͂ƂɍXV */ - CriUint32 cnt_concat; /* GetFrameōXV */ - - CriMvPlyHeaderInfo headinfo; - CriUint32 num_headck; /* wb_͏`N */ - CriFloat32 def_buffering_time; - CriUint32 def_max_stream; - CriUint32 def_sound_output_buffer_samples; - CriSint32 def_track_play_audio; /* -1 ŃI[fBIĐ */ - - /* fQ[gp[^\ */ - CriSint32 size_dlgparams; - CriUint8 *ptr_dlgparams; - - CriBool is_prepare_work; - CriMvStreamingParameters stmprm; /* Xg[~Op[^̋L^ */ - /* Demultiplexer */ - CriSint32 inputtype; /* Xg[~OHjriĐ */ - CriBool is_usf_data; /* ̓t@CUSFt@CH */ - void *demux; /* USFf}`vNTnh */ - CriUint32 max_demuxout; /* f}`vNTo͂̍őʐ */ - CriUint32 num_demuxout; /* f}`vNTo͂ɐݒς݂̎ʐ */ - CriSj headanaly_in_sj; // RBF - CriSj headanaly_out_sj; // UNI - CriSj read_sj; // RBF - CriChunk readck; - - CriSj memplay_sj; // UNI (for memory playback) - CriChunk movie_on_mem; /* w̃[rf[^LpiPj */ - CriUint32 offset_content; /* w擪f[^̃Rec{̂܂ł̃TCY */ - - /* === nh쐬Ɋm === */ - CriHeap heap_gen; - /* wb_͗p̓ǂݍݗ̈ */ - CriUint32 headanaly_bufsize; - /* nh͍ŏ10kbytemۂĎg܂킷B̓Iɂ̓wb_͗pB */ - CriHeap local_heap; /* nhpHeap */ - CriSint32 local_bufsize; /* nhpHeapp̃obt@TCY */ - CriUint8 *local_bufptr; /* nhpHeapp̃obt@|C^ */ - /* === ^[Nobt@ (wb_͎Ɋm) === */ - CriHeap heap_meta; - /* === [Nobt@쐬Ɋm === */ - CriHeap heap_core; - /* ǂݍ݃obt@ */ - CriUint32 size_readbuf_main; - CriUint32 size_readbuf_ext; - /* Video Decoder */ - CriMvPlyVideo video; - CriUint32 framerate_n; - CriUint32 framerate_d; - /* Audio Decoder */ - CriMvPlyAmng audio_mngr; - CriMvPcmFormat pcmfmt; - CriUint32 size_smpl; - CriHeap heap_audio2; - /* Subtitle */ - CriSj sjo_subtitle; - CriSint32 concat_subtitle_cnt; /* ̘A */ - CriSint32 ch_subtitle; /* ̘A */ - /* Alpha */ - CriMvPlyAlpha alpha; - - /* ܂Ԃ`NΉpigǂɊ֌WȂϐ͒`j */ - CriUint32 bufsize_read_main; /* SJ̃obt@{̃TCY */ - CriUint32 bufsize_read_ext; /* SĴ̂肵TCY */ - CriUint8 *read_sj_bufptr; /* RBSJ̐擪obt@AhX */ - - /* Xg[~Op[^ɓƂiAH */ - CriSint32 seek_frame_id; /* V[Nt[IDiGOP̓r̉”\j */ - CriSint32 video_gop_top_id; /* V[ÑrfIGOP擪t[ID : 0ȉŃV[N */ - CriSint32 alpha_gop_top_id; /* V[ÑAt@GOP擪t[ID : 0ȉŃV[N */ - CriBool seek_video_prep_flag; /* V[NĐ̃rfItOiGOPr܂Ői񂾂Hj */ - CriBool seek_alpha_prep_flag; /* V[NĐ̃At@tOiGOPr܂Ői񂾂Hj */ - CriBool seek_audio_prep_flag; /* V[NĐ̃I[fBItOiV[Nw莞܂Ŏ̂ĂHj */ - - CriSint32 dechdr_stage; /* DECHDR̐i݋ */ - CriSint32 sji_meta_bufsize; /* ^f[^p̓obt@TCY */ - CriSj sji_meta; /* ^f[^pSJ */ - CriUint32 cnt_meta_ck; /* ^f[^pSJ */ - void *video_seektbl_ptr; - CriUint32 video_seektbl_size; - CriSint32 video_gop_num; - void *alpha_seektbl_ptr; - CriUint32 alpha_seektbl_size; - CriSint32 alpha_gop_num; - - void *audio_header_ptr[CRIMV_MAX_AUDIO_NUM]; - CriUint16 audio_header_size[CRIMV_MAX_AUDIO_NUM]; - - void *cuepoint_meta_ptr; - CriUint32 cuepoint_meta_size; - CriMvCuePointInfo cuepoint_info; - - CriMvInputBufferInfo ibuf_info; - CriFloat32 reload_sec_threshold; - - CriSint32 num_frames_for_prep; - - /* For Sofdec2 */ - CriHeap heap_playback; - CriMvMetaDataWorkMallocFunc cbfunc_meta_alloc; - CriMvMetaDataWorkFreeFunc cbfunc_meta_free; - void* usrobj_meta_data; - void* meta_data_work_allocated; /* [UAP[^Ŋmۂꂽ^f[^[N */ - void* event_table_work_allocated; /* [UAP[^ŊmۂꂽCxge[u */ - CriMvStreamerInfo streamer_info; - - /* OUTER_FRAMEPOOL_WORK */ - CriMvFramepoolWorkMallocFunc cbfunc_framepool_alloc; - CriMvFramepoolWorkFreeFunc cbfunc_framepool_free; - void* usrobj_framepool; - void* framepool_work_allocated; /* [UAP[^Ŋmۂꂽt[v[[NiKvj */ - void* framepool_work_set; /* ڃobt@w肳ꂽt[v[[Nisvj */ - - /* For Debug */ - volatile CriUint8 end_sequence_info; - CriUint64Adr header_ptr; - CriSint64 header_size; - CriUint64Adr body_ptr; - CriSint64 body_size; - - CriBool sync_flag; - - CriBool error_flag; - -#if defined(XPT_TGT_IOS) - CriChar8 vavfios_filepath[CRIMVPLY_VAVFIOS_MAX_FILEPATH]; -#endif - - /* For Tools */ - void *extended_mvinfo_config; - - /* nh쐬RtBO֘A */ - CriBool use_hn_config_flag; /* nh쐬RtBOw肪ǂ */ - CriMvHandleConfig hn_config; - -} *CriMvPly, CriMvPlyObj; - -/*************************************************************************** - * Function Declaration - ***************************************************************************/ - -#ifdef __cplusplus -extern "C" { -#endif - -/* Cu */ -/* - * \brief Cȕ - * \param Ȃ - * \return Ȃ - * \par : - * Cȕs܂B
- * Aŏꍇ́Aŏ̂P̂ݏs܂B - */ -/* - * \ingroup MODULE_INIT - * \brief Initialize library - * - * This function initializes the CRI Movie library, including internal audio, - * streaming and video subsystems. This function must be - * called before any other function in this library will work properly. - * This function initializes only the first time it is called; if it is - * called again, it simply increments an internal counter and returns; it - * does not re-initialize, nor does it create an error condition. - * - * Therefore, it is safe to call criMvPly_Initialize() and criMvPly_Finalize() - * at the beginning and end, respectively, within each of the independent - * modules in your program. If you match these functions call for call, - * only the first criMvPly_Initialize() function and the last criMvPly_Finalize() - * functions should have any effect. - * - * \sa criMvPly_Finalize() - */ -void CRIAPI criMvPly_Initialize(void); - -/* CuI */ -/* - * \brief CuI - * \param Ȃ - * \return Ȃ - * \par : - * CȕIs܂B
- * 񏉊Ăꍇ́A񐔂IsĂB - */ -/* - * \ingroup MODULE_INIT - * \brief Finalize library - * - * This function deallocates any resources in use by the library. - * It should be called the same number of times that the criMvPly_Initialize() - * function is called. If the criMvPly_Initialize() function is called n - * times, on the nth time the criMvPly_Finalize() function is called, - * criMvPly_Finalize() releases any resources allocated by CRI Movie. - * - * Therefore, it is safe to call criMvPly_Initialize() and criMvPly_Finalize() - * at the beginning and end, respectively, within each of the independent - * modules in your program. If you match these functions call for call, - * only the first criMvPly_Initialize() function and the last criMvPly_Finalize() - * functions should have any effect. - * - * \sa criMvPly_Initialize() - */ -void CRIAPI criMvPly_Finalize(void); - -/* nh쐬 */ -/* - * \brief nh쐬 - * \param heap : mۂɎgpHeapnh - * \return CriMvPlynh - * \par : - * CRI Movie nh쐬܂B
- * KvȃnhǗ̈HeapnhgĎIɊmۂ܂B
- * 쐬̃nhԂSTOPԂłB - */ -/* - * \ingroup MODULE_INIT - * \brief Create a handle - * \param heap A valid CriHeap handle - * \return A valid CriMvPly handle, or NULL if the handle cannot be allocated - * - * This function creates a CriMvPly handle in the CRIMVPLY_STATUS_STOP state. - * Memory for the handle is allocated from the CriHeap structure that you provide. - * Any memory allocation failure during this function results in a text error message to output, and the program hangs. - * Make sure to initialize and create your heap with criHeap_Initialize() and - * criHeap_Create() before calling this function. - * - * \sa CriMvPly, CriMvPlyStatus, criHeap_Initialize(), criHeap_Create() - */ -CriMvPly CRIAPI criMvPly_Create(CriHeap heap); - -/* RtBOw̃nh쐬 */ -/* config NULLw̏ꍇ̓RtBOw薳Ɠl */ -CriMvPly CRIAPI criMvPly_CreateWithConfig(CriHeap heap, CriMvHandleConfig *config); - -/* nhj */ -/* - * \brief nhj - * \param mvply : CRI Movie nh - * \return Ȃ - * \par : - * CRI Movie nh̔js܂B
- * nh쐬ɈŎw肵HeapnhgāAnhǗ̈܂B
- * [Nobt@mۂ܂܂̏ꍇ́A[Nobt@mێɎw肵Heapnhgă[Nobt@܂B
- * nh̔j́AnhԂSTOPPLAYEND̎ɂsł܂B - */ -/* - * \ingroup MODULE_INIT - * \brief Destroy a handle - * \param mvply A valid CriMvPly handle to be destroyed - * - * This function destroys the CriMvPly handle previously created - * with criMvPly_Create(). - * - * You can only destroy the handle if it is in either the CRIMVPLY_STATUS_STOP or the - * the CRIMVPLY_STATUS_PLAYEND states. Attempting to destroy the handle in - * any other state will produce an error message. You can check the status of - * the handle at any time with criMvPly_GetStatus(). - * - * Any work buffers allocated via criMvPly_AllocateWorkBuffer(), if they are - * still associated with the handle, are freed when criMvPly_Destroy() is called. - * - * \sa CriMvPly, CriMvPlyStatus, criMvPly_GetStatus(), criMvPly_AllocateWorkBuffer() - */ -void CRIAPI criMvPly_Destroy(CriMvPly mvply); - -/* Xg[~Op[^̎擾 */ -/* - * \brief Xg[~Op[^̎擾 - * \param mvply : CRI Movie nh - * \param stmprm : Xg[~Op[^ - * \return Ȃ - * \par : - * wb_͂̌ʂƂɁA[rĐɕKvȃXg[~Op[^擾܂B
- * nhԂWAIT_PREPɂȂƎ擾ł悤ɂȂ܂B
- * ̃p[^ƂcriMvPly_AllocateWorkBuffer֐ĂяoƂł܂B
- * KvȂ΂̃p[^̒lύXāAႦΉ胀[rʼnĐȂAƂƂ”\łB
- */ -/* - * \ingroup MODULE_BUFFER - * \brief Get streaming parameters - * \param mvply A valid CriMvPly handle - * \param stmprm An empty CriMvStreamingParameters structure to be filled with data - * - * This function permits you to get detailed information about the stream and - * dynamically allocate resources just before the video and audio sequence - * begins playback. - * - * This function does nothing if the current state of the CriMvPly handle is - * CRIMVPLY_STATUS_DECHDR or CRIMVPLY_STATUS_STOP. The only useful state in - * which to call criMvPly_GetStreamingParameters() is the CRIMVPLY_WAIT_PREP - * status. When the CriMvPly handle is in the CRIMVPLY_WAIT_PREP status, - * calling this function will cause the CriMvStreamingParameters field to be - * filled with data. - * - * Some of the CriMvStreamingParameters, such as buffering time and the - * maximum number of files to read, are copied from the CriMvPly structure. - * However, maximum bitrate, video size, audio stream rate and channel - * info are calculated from the incoming stream. - * - * After calling criMvPly_GetStreamingParameters(), you can programmatically - * override any of the fields in the CriMvStreamingParameters struct yourself - * before calling criMvPly_AllocateWorkBuffer() with it. For example, you might - * need to read a stream containing both audio and video, but only output the - * video from the stream. In this case you could allocate trivial audio buffers - * for output by modifying the CriMvStreamingParameters struct accordingly after - * calling this function. - * - * \sa criMvPly_AllocateWorkBuffer(), CriMvPly, CriMvStreamingParameters - */ - void CRIAPI criMvPly_GetStreamingParameters(CriMvPly mvply, CriMvStreamingParameters *stmprm); - -/* [Nobt@̊m */ -/* - * \brief [Nobt@̊m - * \param mvply : CRI Movie nh - * \param heap : - * \param stmprm : Xg[~Op[^ - * \return Ȃ - * \par : - * HeapnhgāAǂݍ݃obt@rfI^I[fBĨ[Nobt@mۂ܂B
- * ̊֐Ăяo”\Ȃ̂́ASTOPԂWAIT_PREPԂ݂̎̂łB
- * nhɑ΂ĂQxĂяoƁAPxڂ̃[Nobt@SĉĂA߂ă[Nobt@mۂ܂B
- * criMvPly_Start֐Ƀ[Nobt@mۂĂƂł܂B - */ -/* - * \ingroup MODULE_BUFFER - * \brief Allocate internal streaming work buffers - * \param mvply A CriMvPly handle - * \param heap A CriHeap handle - * \param stmprm An initialized CriMvStreamingParameters structure - * - * This function allocates internal streaming buffers for the CriMvPly movie - * player from the CriHeap. The amount of memory required is based - * on the maximum bitrate of the stream, the requested buffering time, the - * maximum chunk size, and the height and width of the incoming video frame. - * However, a small amount of memory is allocated for the - * video and audio decoders from the CriHeap as well. - * - * The CriHeap handle passed as a parameter to this function need not - * be the same CriHeap handle you passed to the criMvPly_Create() function. - * You may prefer to use either one or two heaps. - * - * This function can be called only if the CriMvPly handle is in the - * CRIMVPLY_STATUS_STOP or the CRIMVPLY_STATUS_WAIT_PREP status. Calling - * this function any other time will produce an error message. - * - * If this function is called twice without calling criMvPly_FreeWorkBuffer(), - * it releases the previously allocated buffers before allocating them again. - * - * This function must be called sometime before criMvPly_Start(). - * - * \if ps2 - * \par PS2 only: - * The PS2 implementation of this function additionally allocates buffers for - * internal DMA tags. If these allocations fail due to lack of memory, the - * library will hang. - * \endif - * - * \sa CriMvPly, CriHeap, CriMvPlyStatus, CriMvStreamingParameters, criMvPly_FreeWorkBuffer(), - * criMvPly_Start() - */ -CriBool CRIAPI criMvPly_AllocateWorkBuffer(CriMvPly mvply, CriHeap heap, CriMvStreamingParameters *stmprm); - -/* [Nobt@̉ */ -/* - * \brief [Nobt@̉ - * \param mvply : CRI Movie nh - * \return Ȃ - * \par : - * criMvPly_AllocateWorkBuffer֐Ŋmۂ[Nobt@Sĉ܂B
- * ̊֐Ăяo”\Ȃ̂́ASTOP^WAIT_PREP^PLAYENDԂ݂̎̂łB
- * CRI Movie Ver.0.60 ł͖łB - */ -/* - * \ingroup MODULE_BUFFER - * \brief Release streaming work buffer - * \param mvply A valid CriMvPly handle - * - * This function releases streaming work buffers allocated from the CriHeap - * previously associated with criMvPly_AllocateWorkBuffer(). - * This function should only be called at CRIMVPLY_STATUS_STOP, - * CRIMVPLY_STATUS_WAIT_PREP or CRIMVPLY_STATUS_PLAYEND states. However, this - * function does not verify the current stream status before releasing - * all the buffers; it merely deallocates them. Expect interesting crashes - * if you call this function while playing a movie. - * - * You can verify the current CriMvPly handle status with criMvPly_GetStatus() if - * necessary. - * - */ -void CRIAPI criMvPly_FreeWorkBuffer(CriMvPly mvply); - -/* ĐI[fBI`l̐ݒ */ -/* - * \brief ĐI[fBI`l̐ݒ - * \param mvply : CRI Movie nh - * \param ch : I[fBI`lԍ - * \return Ȃ - * \par : - * CriMvStreamingParameters\̂̃o track_play_audiõftHglݒ肵܂B
- * criMvPly_GetStreamingParameters֐CriMvStreamingParameters\̂擾Ƃɂ̒li[܂B
- * ݒ肵ĂȂꍇAbuffering_timeɂ0܂B - * -1w肷ƃI[fBIĐȂݒɂȂ܂B - */ -void CRIAPI criMvPly_SetAudioTrack(CriMvPly mvply, CriSint32 track); - -/* obt@O(P[sec])̐ݒ */ -/* - * \brief obt@O(P[sec])̐ݒ - * \param mvply : CRI Movie nh - * \param time : obt@O - * \return Ȃ - * \par : - * CriMvStreamingParameters\̂̃obuffering_timẽftHglݒ肵܂B
- * criMvPly_GetStreamingParameters֐ CriMvStreamingParameters\̂擾Ƃɂ̒li[܂B
- * ݒ肵ĂȂꍇAbuffering_timeɂ1.0bĂ܂B - */ -/* - * \ingroup MODULE_BUFFER - * \brief Set default buffering time (unit[sec]) - * \param mvply A valid CriMvPly handle - * \param time Buffering time in seconds - * - * This function tells the CriMvPly handle how much time of the stream to buffer in - * memory. Buffering is necessary to cover seeks, error retries, latency and - * other various hiccups in most data sources. - * - * This value is stored in the buffering_time field of the CriMvStreamingParameters - * struct. It is set to a default of 1.0 seconds when the CriMvPly handle is created. - * This is typically safe for most DVD type file systems. - * - * \sa CriMvPly, CriMvStreamingParameters - */ -//void CRIAPI criMvPly_SetBufferingTime(CriMvPly mvply, CriFloat32 time); - -/* ǂݍ݃t@C̐ݒ */ -/* - * \brief ǂݍ݃t@C̐ݒ - * \param mvply : CRI Movie nh - * \param max_stm : ǂݍ݃t@C - * \return Ȃ - * \par : - * CriMvStreamingParameters\̂̃omax_simultaneous_read_files̃ftHglݒ肵܂B
- * criMvPly_GetStreamingParameters֐ CriMvStreamingParameters\̂擾Ƃɂ̒li[܂B
- * ݒ肵ĂȂꍇAmax_simultaneous_read_filesɂ1Ă܂B - */ -/* - * \ingroup MODULE_BUFFER - * \brief Set maximum number of simultaneous streams - * \param mvply A valid CriMvPly handle - * \param max_stm The maximum number of simultaneous streams - * - * This function sets the default value of the "max_simultaneous_read_files" field of - * the CriMvStreamingParameters struct. Currently, setting this value has no effect. - */ -//void CRIAPI criMvPly_SetMaxSimultaneousStreams(CriMvPly mvply, CriUint32 max_stm); - -/* TEho̓obt@Tv̐ݒ */ -/* - * \brief GetWave16ŗvőTv̐ݒ - * \param mvply : CRI Movie nh - * \param max_smpl : őTv - * \return Ȃ - * \par : - * CriMvAudioParameters\̂̃ooutput_buffer_samples̃ftHglݒ肵܂B
- * criMvPly_GetStreamingParameters֐ CriMvStreamingParameters\̂擾Ƃɂ̒li[܂B
- * ݒ肵ĂȂꍇAoutput_buffer_samplesɂ16*1024Ă܂B - */ -/* - * \ingroup MODULE_AUDIO - * \brief Set default sound output buffer samples - * \param mvply A valid CriMvPly handle - * \param smpls : sound output buffer samples - * - * This function sets the default value of the "output_buffer_samples" field in the - * CriMvAudioParameters struct. The default value is 16384, which is set when - * criMvPly_Create() is called. - * - * This function only has an effect if it is called before the - * criMvPly_AllocateWorkBuffer() function is called, since this is when the audio - * output buffer is allocated. - * - * \sa CriMvAudioParameters, criMvPly_Create(), criMvPly_AllocateWorkBuffer(), - * criMvPly_GetWave16() - */ -//void criMvPly_SetMaxSamplesOfGetWave16(CriMvPly mvply, CriUint32 max_smpl); -void CRIAPI criMvPly_SetSoundOutputBufferSamples(CriMvPly mvply, CriUint32 smpls); - -/* nhԂ̎擾 */ -/* - * \brief nhԂ̎擾 - * \param mvply : CRI Movie nh - * \return nh - * \par : - * nhԂ擾܂B - */ -/* - * \ingroup MODULE_STATE - * \brief Get the handle status - * \param mvply A valid CriMvPly handle - * \return One of the CriMvPlyStatus enum values - * - * This function gets the current status of the CRI Movie handle. Check the - * following link for possible return values. - * - * \sa CriMvPlyStatus - */ -CriMvPlyStatus CRIAPI criMvPly_GetStatus(CriMvPly mvply); - -/* WAITԂ玟̏Ԃւ̑Jڒʒm */ -/* - * \brief WAITԂ玟̏Ԃւ̑Jڒʒm - * \param mvply : CRI Movie nh - * \return Ȃ - * \par : - * nhԂWAIT_**** Ԃ玟̏ԂɑJڂ܂BԂɉĎ̂悤Ɏgp܂B
- * EWAIT_PREP : criMvPly_AllocateWorkBuffer֐Ń[NmۂĂяoĂB
- * EWAIT_PLAYING : rfIt[AI[fBIf[^擾ĕ\Eo͂̏łA - * o͂JnāA{֐ĂяoĂB
- * EWAIT_PLAYEND : Ō̃rfIt[̕\AŌ̃I[fBIf[^̏o͂IĂяoĂB
- * EWAIT_STOP : rfII[fBȈo͂~ĂԂɂȂAĂяoĂB
- * {֐ĂяoƊeԂ͑Ɏ̏ԂɑJڂ܂B
- * {֐ WAIT_**** ȊȌԂŌĂяoĂAԂ͉ς܂B - */ -/* - * \ingroup MODULE_STATE - * \brief Notify transition from WAIT status - * \param mvply A valid CriMvPly handle - * - * This function notifies the CriMvPly handle that your application is ready to - * go from the current WAIT state to the next state. There are exactly four states - * in which it is appropriate to call this function: - * - * - CRIMVPLY_STATUS_WAIT_PREP After your application has allocated buffers with - * criMvPly_AllocateWorkBuffer() - * - CRIMVPLY_STATUS_WAIT_PLAYING After your application has prerolled stream data (if - * necessary) - * - CRIMVPLY_STATUS_WAIT_PLAYEND After your application has displayed the last frames of audio and - * video from the stream - * - CRIMVPLY_STATUS_WAIT_STOP After your application suspends playback from the stream - * - * You can check the current status of the CriMvPly handle by calling the criMvPly_GetStatus() - * function. This function has no effect if called in states other than those listed above. - * - * \sa CriMvPly, CriMvPlyStatus - */ -void CRIAPI criMvPly_IncrementState(CriMvPly mvply); - -/* Ԃ̍XV */ -/* - * \brief CriMvPlyW[̃T[o֐ - * \param mvply : CRI Movie nh - * \return Ȃ - * \par : - * Ƀf}`vNT̃f[^̍XVs܂B
- * {֐̓AvP[ṼCXbhłŖĂяo悤ɂĂB
- */ -void CRIAPI criMvPly_Update(CriMvPly mvply); - -/* ĐJn */ -/* - * \brief ĐJn - * \param mvply : CRI Movie nh - * \return ĐJnłꍇCRI_TRUE, sꍇCRI_FALSE - * \par : - * Đ̂߂̏Jn܂B
- * {֐ďoAnhԂDECHDRɑJڂ܂B
- */ -/* - * \ingroup MODULE_STATE - * \brief Start of playback processing - * \param mvply A valid CriMvPly handle - * - * This function initiates playback processing. This function should be called - * after the CriMvPly handle is created and the data source has been opened, - * but before the work buffers are allocated with criMvPly_AllocateWorkBuffer(). - * This function sets the current status of the CriMvPly handle to - * CRIMVPLY_STATUS_DECHDR, which prepares it to decode the header information - * from the data source. - * - * \sa CriMvPly, CriMvPlyStatus, criMvPly_AllocateWorkBuffer() - */ -CriBool CRIAPI criMvPly_Start(CriMvPly mvply); - -/* Đ~NGXg(A) */ -/* - * \brief Đ~NGXg(A) - * \param mvply : CRI Movie nh - * \return Ȃ - * \par : - * Đ~̃NGXg𔭍sđA܂B
- * {֐ďoAnhԂSTOP_PROCESSINGԂɑJڂ܂B
- * ~̂߂̏IƁAnhԂWAIT_STOPɑJڂ܂B
- * WAIT_STOPԂɂȂAcriMvPly_IncrementState֐STOPԂɑJڂāA - * AvP[V̒~sĂB - */ -/* - * \ingroup MODULE_STATE - * \brief Non-blocking request to stop playback - * \param mvply A currently playing CriMvPly handle - * - * This function records a request to terminate playback. Termination of - * playback is not synchronous to this function; this function sets the current - * state of the CriMvPly handle to CRIMVPLY_STATUS_STOP_PROCESSING. After - * movie processing is halted, the state of the handle transitions to - * CRIMWPLY_STATUS_WAIT_STOP. - * - * This function is useful for prematurely terminating a movie, e.g. "press - * X to skip this movie". - * - * Video frames will keep being delivered until you detect a CRIMVPLY_STATUS_WAIT_STOP - * state in the CriMvPly handle, and then call criMvPly_IncrementState to transition - * back to the CRIMVPLY_STATUS_STOP state. - * - * \note Pausing is not accomplished through this function. The system clock, including - * whether or not to pause or advance frames, is controlled entirely through user - * code. So the effect of "pausing" a CriMvPly handle can be accomplished by simply - * not updating your system clock as long as your pause is in effect. - * - * \sa CriMvPly, CriMvPlyStatus - */ -void CRIAPI criMvPly_Stop(CriMvPly mvply); - -/* T[o(nhw) */ -/* - * \brief T[o(nhw) - * \param mvply : CRI Movie nh - * \return Ȃ - * \par : - * CRI Movie nhw肵ăT[os܂B
- * eWAIT_**** Ԃւ̏ԑJڂ̓T[o֐Ŏs܂B - */ -/* - * \ingroup MODULE_VIDEO - * \brief Execute heartbeat functions for a handle - * \param mvply A valid CriMvPly handle - * - * This function executes heartbeat functions for the specified CriMvPly handle only, - * including handoff and parsing of input buffers and audio decoding. Additionally, - * it checks for buffer situations in which the CriMvPly handle should transition to - * one of the four WAIT states of CriMvPlyStatus, and it makes these transitions if - * necessary. - * - * However, video decoding does NOT occur in criMvPly_Execute(). - * - * Expect that criMvPly_Execute() will take a relatively low CPU load. Typically, - * this function should be called on every vertical blank. However, it may be called - * more frequently in a CriMvPly wait state, in conjunction with criMvPly_IncrementState(), - * in order to "force" a transition into the next state without waiting for - * another vertical blank. This type of transition is not generically - * necessary. - * - * \sa CriMvPly, CriMvPlyStatus, criMvPly_ExecuteAll() - */ -void CRIAPI criMvPly_Execute(CriMvPly mvply); - -/* t@Cǂݍ݃obt@̋󂫃`N擾 */ -/* - * \brief t@Cǂݍ݃obt@̋󂫃`N擾 - * \param mvply : CRI Movie nh - * \param ck : `N - * \return Ȃ - * \par : - * t@Cǂݍ݃obt@̋󂫗̈擾܂B
- * 擾󂫗̈i`NƌĂт܂j́Af[^݂ʒm邳 - * ̂܂܎gp܂̂ŁAAvP[VŋLĂB
- * PxɎ擾ł`N͂P‚݂̂łB
- * `N擾łۂ́A`ÑTCYŔł܂B
- * f[^݂̏IAcriMvPly_PutInputChunk֐ŏ݃TCYʒmĂB
- */ -/* - * \ingroup MODULE_SUPPLY - * \brief Get a free chunk from file reading buffer - * \param mvply A valid CriMvPly handle - * \param ck A CriChunk structure to be filled with data by this function - * - * This function selects an empty internal buffer for your data source to read its data into. - * An area of this type is referred to as a "chunk." - * After calling this function, the ck->data and ck->size - * fields will provide a valid pointer and size, respectively, that your data - * source should copy its data into. - * If no buffers can internally be allocated, this function will return 0 as the - * ck->size field. If this occurs, your program should choke input until a free - * buffer can be allocated. - * Typical data sources are native file reading, sequential memory access, or - * playback from a network source. - * The ck->size field is dynamically calculated when criMvPly_AllocateWorkBuffer() - * is called; it is calculated based on expected data rate and video resolutions - * embedded in the stream file. - * - * After you receive a valid chunk from criMvPly_GetInputChunk(), - * you can fill the provided chunk up to the ck->size limit. After you - * fill the chunk with valid data, call the criMvPly_PutInputChunk() function - * to queue the data for processing. The functions criMvPly_GetInputChunk() and - * criMvPly_PutInputChunk() should be called in equal pairs; calling these - * functions out of order will produce odd results. No dynamic chunk reordering - * is permitted; serial calls with out-of-order chunks will be - * flagged at run-time as an error. - * - * This function will only return a valid chunk if the CriMvPly handle is in - * one of two playback states: CRIMVPLY_STATUS_PLAY or CRIMVPLY_STATUS_DECHDR. - * You can verify the current playback state with criMvPly_GetStatus(). - * - * \sa criMvPly_GetStatus(), criMvPly_PutInputChunk(), criMvPly_AllocateWorkBuffer(), - * CriChunk, CriMvPlyStatus - */ -void CRIAPI criMvPly_GetInputChunk(CriMvPly mvply, CriChunk *ck); - -/* t@Cǂݍ݃obt@ւ̃f[^ݒʒm */ -/* - * \brief t@Cǂݍ݃obt@ւ̃f[^ݒʒm - * \param mvply : CRI Movie nh - * \param ck : - * \param inputsize : - * \return Ȃ - * \par : - * criMvPly_GetInputChunk֐Ŏ擾󂫗̈i`NƌĂт܂j - * f[^ݏIAinputsizeɃf[^TCYĖ{֐ĂяoĂB
- * ̍ہA`N criMvPly_GetInputChunk֐Ŏ擾̂Ɠ`NKw肵ĂB - */ -/* - * \ingroup MODULE_SUPPLY - * \brief Put a data chunk into file read buffer - * \param mvply A valid CriMvPly handle - * \param ck A CriChunk structure containing source data - * \param inputsize The number of bytes actually supplied - * - * This function informs the CriMvPly handle that the CriChunk structure - * now contains valid data from the data source. Typically, you would call - * this function after your asynchronous file read reports that the buffer is - * full of data. - * - * The inputsize field should contain the number of bytes actually provided. - * This value can be less than or equal to ck->size. In an end-of-file condition, - * be sure to supply the actual number of bytes remaining in the file, and not - * merely the size of the input buffer, to criMvPly_PutInputChunk(). - * Do not modify the contents of the CriChunk after calling this function; - * instead, call criMvPly_GetInputChunk() to get a new chunk for further input. - * - * This function invalidates the CriChunk provided if the function is called - * while the CriMvPly handle is in the CRIMVPLY_STATUS_STOP, the - * CRIMVPLY_STATUS_WAIT_PREP, or the CRIMVPLY_STATUS_STOP_PROCESSING state. - * You can verify the current playback state with criMvPly_GetStatus(). - * - * After you receive a valid chunk from criMvPly_GetInputChunk(), - * you can fill the provided chunk up to the ck->size limit. After you call - * fill the chunk with valid data, call the criMvPly_PutInputChunk() function - * to queue the data for processing. The function criMvPly_GetInputChunk() and - * criMvPly_PutInputChunk() should be called in equal pairs; calling these - * functions out of order will produce odd results. No dynamic chunk reordering - * is permitted; serial calls with out-of-order chunks will be - * flagged at run-time as an error. - * - * After putting the final chunk of data in the stream, call - * criMvPly_TerminateSupply() to indicate that an end-of-file condition exists. - * - * \sa criMvPly_GetStatus(), criMvPly_GetInputChunk(), criMvPly_AllocateWorkBuffer(), - * criMvPly_TerminateSupply(), CriChunk, CriMvPlyStatus - */ -void CRIAPI criMvPly_PutInputChunk(CriMvPly mvply, CriChunk *ck, CriUint32 inputsize); - -/* t@CǂݍݏI̒ʒm */ -/* - * \brief t@CǂݍݏI̒ʒm - * \param mvply : CRI Movie nh - * \return Ȃ - * \par : - * ĐSẴf[^ǂݍŁA criMvPly_PutInputChunk֐ŒʒmIA - * {֐Ńt@CǂݍݏI̒ʒmKsĂB
- * Iʒmꂽ_œǂݍ݃obt@ɏ܂ꂽSẴf[^fR[hIƁA - * nhԂWAIT_PLAYENDɑJڂ܂B
- * {֐ĂяoȂAWAIT_PLAYENDԂɂȂ邱Ƃ͂܂B - */ -/* - * \ingroup MODULE_SUPPLY - * \brief Notify end of reading data - * \param mvply A valid CriMvPly structure - * - * After you put all the source data into the CriMvPly handle with - * criMvPly_PutInputChunk(), indicate the end of the movie file by calling - * criMvPly_TerminateSupply(). After calling this function, the CriMvPly - * handle's status is changed by the library to CRIMVPLY_STATUS_WAIT_PLAYEND - * and the library completes processing of whatever frames it has internally - * buffered. - * - * If you do not call this function, the CriMvPly handle will never transition - * to the CRIMVPLY_STATUS_WAIT_PLAYEND state, making teardown impossible. - * - * \sa criMvPly_PutInputChunk(), CriMvPly, CriMvPlyStatus - */ -void CRIAPI criMvPly_TerminateSupply(CriMvPly mvply); - -#if 0//defined(XPT_TGT_EE) -/* RGB32tH[}bg̃rfIt[̎擾 */ -/* - * \if ps2 - * \brief RGB32tH[}bg̃rfIt[̎擾 - * \param mvply : CRI Movie nh - * \param imagebuf : rfIt[obt@ - * \param bufsize : obt@TCY - * \param frameinfo : t[ - * \return 擾łꍇTRUE, łȂꍇFALSE - * \par : - * Ŏw肵obt@ɁAPS2̃}NubNRGBA32tH[}bgŃt[擾܂B
- * CriMvFrameInfo\̂ɂ́A擾t[ɂ‚Ă̏񂪊i[܂B
- * t[擾ł̂́AnhԂWAIT_PLAYING^PLAYING݂̎̂łB
- * ȊȌԂŌĂяoA܂͓̓f[^s̏ꍇɂ́A{֐̓t[̎擾ɎsAɕA܂B
- * t[擾łȂꍇ́A֐lFALSEԂ܂B
- * ۂ̃rfIfR[h{֐œ߁At[擾łꍇɂ́Ȁd֐ƂȂ܂B - * \endif - */ -/* - * \if ps2 - * \ingroup MODULE_VIDEO - * \brief Get a video frame in PS2 macroblock RGB32 format - * \param mvply A valid CriMvPly handle - * \param imagebuf a pointer to the video buffer in memory to receive the frame - * \param bufsize video buffer size in bytes - * \param frameinfo Information about the decoded frame - * \return returns true if a frame has been copied into the buffer, false otherwise - * - * This function finds and decodes the current frame, if any, to the imagebuf buffer. - * The format of this buffer is specific to the PS2. This function will only return - * a valid frame if the CriMvPly handle is in the CRIMVPLY_STATUS_WAIT_PLAYING or the - * CRIMVPLY_STATUS_PLAYING state. - * - * This function is an EE-intensive activity, and the amount of time required - * is variable, depending on the complexity and size of the video frame being decoded. - * Therefore the preferred method of calling this function is in a low priority thread, - * separate from your I/O, buffer management, and criMvPly_Execute() routines. - * - * If this function returns true, the preferred display time of the video frame is calculated - * as: - * - * \code - * frameinfo.time / frameinfo.tunit - * \endcode - * - * Humans notice audio stuttering much more readily than a dropped video frame during - * a video decode process. If the frame reported by criMvPly_GetFrameRGBA32_PS2() - * arrives after your system clock says the frame should be displayed, you should - * simply drop the frame without bothering to DMA it to video memory. - * - * Here is an example showing how to drop frames in this case: - * - * \dontinclude crimvt01_simple_playback_ps2.c - * \skip Get video frame - * \until *tutor_update_video_frame_on_display_time* - * - * It is not preferred, but it is possible, to call this function in a single-threaded - * playback model. In this case, it is important to allocate more heap space - * and service the CriMvPly handle with criMvPly_Execute() or criMvPly_ExecuteAll() - * frequently, as well as criMvPly_GetWave16() frequently. This helps to cover - * for the case where other I/O needs to occur when a frame is currently being decoded by - * criMvPly_GetFrameRGBA32_PS2(). - * - * \image html crimvply_getframergba32_ps2.png The DMA reordering step on PS2 - * - * In order to get acceptable performance on the PS2, a macroblock reordering step - * must take place during the DMA transfer from EE RAM to video RAM. - * \endif - */ -CriBool CRIAPI criMvPly_GetFrameRGBA32_PS2(CriMvPly mvply, CriUint8 *imagebuf, CriUint32 bufsize, CriMvFrameInfo *frameinfo); - -CriBool CRIAPI criMvPly_DecodeFrameRGBA32_PS2(CriMvPly mvply, CriUint8 *imagebuf, CriUint32 bufsize, CriMvFrameInfo *frameinfo); -#endif - -#if defined(XPT_TGT_PC) || defined(XPT_TGT_XBOX360) || defined(XPT_TGT_WII) || defined(XPT_TGT_SH7269) || defined(XPT_TGT_TRGP6K) -/* - * \if pc - * \ingroup MODULE_VIDEO - * \brief Get a video frame in YUV422 format - * \param mvply A valid CriMvPly handle - * \param imagebuf A pointer to the video buffer in memory to receive the frame - * \param pitch Number of bytes in one row of the video buffer - * \param bufsize Video buffer size in bytes - * \param frameinfo Information about the decoded frame - * \return returns true if a frame has been copied into the buffer, false otherwise - * - * This function finds and decodes the current frame, if any, to the imagebuf buffer. - * This function will only return a valid frame if the CriMvPly handle is in the - * CRIMVPLY_STATUS_WAIT_PLAYING or the CRIMVPLY_STATUS_PLAYING state. - * - * This function is a CPU-intensive activity, and the amount of time required - * is variable, depending on the complexity and size of the video frame being decoded. - * Therefore the preferred method of calling this function is in a low priority thread, - * separate from your I/O, buffer management, and criMvPly_Execute() routines. - * - * If this function returns true, the preferred display time of the video frame is calculated - * as: - * - * \code - * frameinfo.time / frameinfo.tunit - * \endcode - * - * It is not preferred, but it is possible, to call this function in a single-threaded - * playback model. In this case, it is important to allocate more heap space - * and service the CriMvPly handle with criMvPly_Execute() or criMvPly_ExecuteAll() - * frequently, as well as criMvPly_GetWave16() frequently. - * - * \endif - */ -CriBool CRIAPI criMvPly_GetFrameYUV422(CriMvPly mvply, CriUint8 *imagebuf, CriUint32 pitch, CriUint32 bufsize, CriMvFrameInfo *frameinfo); -#endif - -/* 16bit WAVEtH[}bg̃I[fBIf[^擾 */ -/* - * \brief 16bit WAVEtH[}bg̃I[fBIf[^擾 - * \param mvply : CRI Movie nh - * \param nch : `l - * \param waveptr : I[fBIf[^obt@ - * \param wavesmpl : vTv(obt@TCY) - * \param waveinfo : 16bit Waveform - * \return 擾łTv - * \par : - * 16bitWAVEtH[}bgŃI[fBIf[^擾܂Bwaveptrɂ́Anch̃obt@|C^i[ - * zw肵ĂB
- * CriMvWaveInfo\̂ɂ́A擾I[fBIf[^ɂ‚Ă̏񂪊i[܂B
- * ̓f[^sȂǂŗvꂽTṽfR[hłȂꍇ܂B
- * (@\) {֐̏dȂĂłAȂׂvꂽ̃I[fBIf[^擾郂[hB - */ -/* - * \ingroup MODULE_AUDIO - * \brief Get 16bit wave audio data - * \param mvply A currently playing CriMvPly handle - * \param nch The number of audio channels to get in this call - * \param waveptr An array of audio data buffers to copy audio data into - * \param wavesmpl The number of requested wave data samples (must be less than buffer size) - * \param waveinfo A structure filled by this function with info about this wave - * \return The number of wave data samples actually copied into the buffer - * - * This function copies currently decoding audio data into your output buffer - * for you to send to the audio output. The output format is a sixteen-bit PCM - * format. The data provided is "current", e.g. you should try to minimize latency. - * while delivering the audio data to the output device. - * - * This function will return an empty audio buffer if the input to the CriMvPly - * handle is starving for data, or if criMvPly_Execute() or criMvPly_ExecuteAll() - * has not been called recently. - * - * Note that this function actually copies data. However, the expected bandwidth - * for moving audio data in memory is minimal -- about 176400 bytes per second for - * a stereo stream, which is typically a fraction of 1% of the bandwidth available - * on modern game systems. - * - * For debugging tips on stuttering, see \ref crim_section_stuttering . - */ -CriUint32 CRIAPI criMvPly_GetWave16(CriMvPly mvply, CriUint32 nch, CriSint16 *waveptr[], - CriUint32 wavesmpl, CriMvWaveInfo *waveinfo); -CriUint32 CRIAPI criMvPly_GetWave32(CriMvPly mvply, CriUint32 nch, CriFloat32 *waveptr[], - CriUint32 wavesmpl, CriMvWaveInfo *waveinfo); - - -#if defined(XPT_TGT_EE) -/* XNb`pbhRAMgpݒ */ -/* XNb`pbhRAM̎gpݒ(nh쐬OɌĂяo) */ -/* - * \brief XNb`pbhRAMgpݒ - * \param sw : - * \return Ȃ - * \par : - * XNb`pbhRAM̎gpݒs܂B
- * ftHgOFFłB - */ -/* - * \if ps2 - * \ingroup MODULE_INIT - * \brief Enable or disable PS2 scratch pad (SPRAM) usage - * \param sw : ON to enable scratch pad use, OFF to disable - * - * This function determines whether the video decode step uses the PS2 - * SPRAM memory area for its work. The performance of this library is - * increased by around 30% when using SPRAM; however, this use might - * conflict with graphics engines that depend on exclusive access to SPRAM. - * However, on the PS2, the video decode step occurs synchronously to the - * criMvPly_GetFrameRGBA32_PS2() function, so you can take appropriate external - * locking measures to intelligently synchronize SPRAM utilization. - * The value set by criMvPly_SetUseScratchPadRAM_PS2() is internally checked - * exactly once, during the criMvPly_Create() step; calling this function - * after criMvPly_Create() has no effect. The default setting for this - * function is OFF. - * \endif - */ -void CRIAPI criMvPly_SetUseScratchPadRAM_PS2(CriBool sw); -#endif - - -/* ̍ĐJn */ -/* - * \brief ̍ĐJn - * \param mvply : CRI Movie nh - * \param memptr : ̃[rf[^̐擪AhX - * \param memsize : ̃[rf[^̃TCY - * \return Ȃ - * \par : - * ̃[rĐJn܂B
- * {֐̌ĂяoOɁA炩߃[rf[^̑SĂɓǂݍłĂB - */ -/* - * \ingroup MODULE_STATE - * \brief Start playback from movie file on memory - * \param mvply A currently playing CriMvPly handle - * \param memptr A address of movie file - * \param memsize The size of movie file - * - * Start playback from memory.
- * Please read movie file to memory before playback. - */ -void CRIAPI criMvPly_StartMemory(CriMvPly mvply, CriUint8* memptr, CriUint32 memsize); - - -/* - * YUV•ʃobt@ւ̃t[擾 - */ -/* - * \if xbox360 - * \ingroup MODULE_VIDEO - * \brief Get a video frame to Y,U,V independently texture buffers - * \param mvply A valid CriMvPly handle - * \param yuvbuffers Information about Y,U,V independently texture buffers - * \param frameinfo Information about the decoded frame - * \return returns true if a frame has been copied into the buffer, false otherwise - * - * This function finds and decodes the current frame, if any, to the Y,U,V texture buffers. - * This function will only return a valid frame if the CriMvPly handle is in the - * CRIMVPLY_STATUS_WAIT_PLAYING or the CRIMVPLY_STATUS_PLAYING state. - * \endif - */ -CriBool CRIAPI criMvPly_GetFrameYUVBuffers(CriMvPly mvply, CriMvYuvBuffers *yuvbuffers, CriMvFrameInfo *frameinfo); - - -/* - * rfĨfR[h - */ -/* - * \ingroup MODULE_VIDEO - * \param mvply The movie player handle - * \return returns the number of decoded frames - * - */ -CriUint32 CRIAPI criMvPly_DecodeVideo(CriMvPly mvply); - -/* - * wb_̃fR[h - */ -/* - * - * \ingroup MODULE_VIDEO - * \param mvply The movie player handle - * - */ -void CRIAPI criMvPly_DecodeHeader(CriMvPly mvply); - -/* - * fR[hXLbvw - * \par : - * ̊֐s񐔂Ǎ̃fR[hɎIɂPBsN`XLbvB
- * XLbvwõt[́Aۂ̃XLbvsĂȂĂ - * \̓XLbv̂Ƃĕ␳B - */ -/* - * \ingroup MODULE_VIDEO - * \param mvply The movie player handle - * \return returns the number of decoded frames - * - * After calling SkipFrame function, Decoding function skip B-picture. - * To avoid that application judge continuous wrong skip, After calling - * SkipFrame function, next frame time will be adjusted. - */ -void CRIAPI criMvPly_SkipFrame(CriMvPly mvply); - - -#if 0 -/* - * YUVA8tH[}bg̃t[擾 - */ -/* - * \if ps3 - * \ingroup MODULE_VIDEO - * \brief Get a video frame in YUVA8 format. - * \param mvply A valid CriMvPly handle - * \param imagebuf A pointer to the video buffer in memory to receive the frame - * \param pitch Number of bytes in one row of the video buffer - * \param bufsize Video buffer size in bytes - * \param frameinfo Information about the decoded frame - * \return returns true if a frame has been copied into the buffer, false otherwise - * - * This function finds and decodes the current frame, if any, to the imagebuf buffer. - * This function will only return a valid frame if the CriMvPly handle is in the - * CRIMVPLY_STATUS_WAIT_PLAYING or the CRIMVPLY_STATUS_PLAYING state. - * \endif - */ -CriBool CRIAPI criMvPly_GetFrameYUVA8_PS3(CriMvPly mvply, CriUint8 *imagebuf, CriUint32 pitch, CriUint32 bufsize, CriMvFrameInfo *frameinfo); -#endif - -/* - * ARGB8888tH[}bgŃt[擾 - */ -/* - * \if ps3 - * \ingroup MODULE_VIDEO - * \brief Get a video frame in ARGB8888 format. - * \param mvply A valid CriMvPly handle - * \param imagebuf A pointer to the video buffer in memory to receive the frame - * \param pitch Number of bytes in one row of the video buffer - * \param bufsize Video buffer size in bytes - * \param frameinfo Information about the decoded frame - * \return returns true if a frame has been copied into the buffer, false otherwise - * - * This function finds and decodes the current frame, if any, to the imagebuf buffer. - * This function will only return a valid frame if the CriMvPly handle is in the - * CRIMVPLY_STATUS_WAIT_PLAYING or the CRIMVPLY_STATUS_PLAYING state. - * \endif - */ -CriBool CRIAPI criMvPly_GetFrameARGB8888(CriMvPly mvply, CriUint8 *imagebuf, CriUint32 pitch, CriUint32 bufsize, CriMvFrameInfo *frameinfo); -void CRIAPI criMvPly_InitializeFrameARGB8888(void); - - -#if defined(XPT_TGT_IPHONE) || defined(XPT_TGT_WINMO) || defined(XPT_TGT_ANDROID) || defined(XPT_TGT_CQSH2A) || defined(XPT_TGT_ACRODEA) || defined(XPT_TGT_NACL) || defined(XPT_TGT_SH7269) || defined(XPT_TGT_TRGP6K) -/* - * RGB565tH[}bgŃt[擾 - */ -/* - * \ingroup MODULE_VIDEO - * \brief Get a video frame in RGB565 format - */ -CriBool CRIAPI criMvPly_GetFrameRGB565(CriMvPly mvply, CriUint8 *imagebuf, CriUint32 pitch, CriUint32 bufsize, CriMvFrameInfo *frameinfo); -void CRIAPI criMvPly_InitializeFrameRGB565(void); -#endif - -/* - * ̃t[̏񂾂擾 - */ -/* - * \ingroup MODULE_VIDEO - * \brief Get a information of next video frame (without actual video frame). - */ -CriUint8* CRIAPI criMvPly_GetNextFrameInfo(CriMvPly mvply, CriMvFrameInfo *frameinfo); - -/* - * ̃t[̂Ă - */ -CriBool CRIAPI criMvPly_DiscardNextFrame(CriMvPly mvply, CriMvFrameInfo *frameinfo); - -/* - * Đ(PREPWAIT_PLAYING)ɂȂ܂łɒt[̎w - * ̊֐ĂяoȂ΁At[ = t[v[ - */ -void CRIAPI criMvPly_SetNumberOfFramesForPrep(CriMvPly mvply, CriSint32 nframes); - -/* - * For Debug use. - */ -void CRIAPI criMvPly_SetSeekPosition(CriMvPly mvply, CriSint32 seek_frame_id, CriSint32 video_gop_top_id); -void CRIAPI criMvPly_SetSeekAlphaPosition(CriMvPly mvply, CriSint32 alpha_gop_top_id); -void CRIAPI criMvPly_CalcSeekPosition(CriMvPly mvply, void *seektbl_ptr, CriUint32 seektbl_size, Sint32 frame_id, Uint64 *offset, Sint32 *gop_top_id); - -/* for specific use */ -/* {fBAhX̐ݒ */ -void CRIAPI criMvPly_SetBodyData(CriMvPly mvply, const CriUint64Adr body_ptr, CriSint64 body_size); - -/* SJуobt@TCY̎擾iobt@TCYA[hTCYNULLwŏȗj */ -CriSj CRIAPI criMvPly_GetInputSj(CriMvPly mvply, CriUint32 *buffer_size, CriUint32 *reload_threshold); - -/* O^CvwɂCxg|Cg̎擾 */ -//Bool criMvPly_SearchEventPointByName(CriMvPly mvply, Char8 *cue_name, Sint32 type, CriMvEventPoint *eventinfo); -/* Cxg|Cg񂩂t[IDւ̕ϊ */ -//Sint32 criMvPly_CalcFrameIdFromCuePoint(CriMvPly mvply, CriMvEventPoint *eventinfo); - -CriBool CRIAPI criMvPly_AttachSubAudio(CriMvPly mvply, CriHeap heap, CriUint32 track); -CriUint32 CRIAPI criMvPly_GetSubAudioWave16(CriMvPly mvply, CriUint32 nch, CriSint16 *waveptr[], CriUint32 wavesmpl, CriMvWaveInfo *waveinfo); -CriUint32 CRIAPI criMvPly_GetSubAudioWave32(CriMvPly mvply, CriUint32 nch, CriFloat32 *waveptr[], CriUint32 wavesmpl, CriMvWaveInfo *waveinfo); -void CRIAPI criMvPly_DetachSubAudio(CriMvPly mvply); - -void CRIAPI criMvPly_GetSubtitle(CriMvPly mvply, CriUint8 *bufptr, CriUint32 bufsize, CriMvSubtitleInfo *info); -void CRIAPI criMvPly_GetNextSubtitleInfo(CriMvPly mvply, CriMvSubtitleInfo *info); - -/* ̓obt@̃f[^ʂ[byte] */ -CriUint32 CRIAPI criMvPly_PeekInputBufferData(CriMvPly mvply); -/* ̃[rSJɒlj */ -void CRIAPI criMvPly_AddInputMemory(CriMvPly mvply, CriUint8* memptr, CriUint32 memsize); - - -/* 擾łI[fBIf[^̃Tv𒲂ׂ */ -CriUint32 CRIAPI criMvPly_GetDataSizeMainAudio(CriMvPly mvply, CriUint32 nch); -/* 擾łI[fBIf[^̃Tv𒲂ׂ */ -CriUint32 CRIAPI criMvPly_GetDataSizeSubAudio(CriMvPly mvply, CriUint32 nch); - -/* C̃I[fBI̍ĐIĂ邩ǂ𒲂ׂ */ -CriBool CRIAPI criMvPly_IsEndMainAudioPlayback(CriMvPly mvply); -/* TũI[fBI̍ĐIĂ邩ǂ𒲂ׂ */ -CriBool CRIAPI criMvPly_IsEndSubAudioPlayback(CriMvPly mvply); - -/* CI[fBIǂ𒲂ׂ (fR[ho̓obt@) */ -CriBool CRIAPI criMvPly_IsActiveMainAudioPlayback(CriMvPly mvply); - -/* [NmۑOɐݒύX邱 */ -void CRIAPI criMvPly_SetPcmFormat(CriMvPly mvply, CriMvPcmFormat pcmfmt); - -#if defined(XPT_TGT_PC) -/* [PC] }`vZbT̎w */ -//void CRIAPI criMvPly_SetProcessorParameters_PC(CriMvPly mvply, Sint32 thread_num, Uint32 *affinity_masks, Sint32 *priorities); -#endif - -#if defined(XPT_TGT_XBOX360) -/* [Xbox360] }`vZbT̎w */ -void CRIAPI criMvPly_SetProcessorParameters_XBOX360(CriMvPly mvply, Sint32 thread_num, CriUint32 processor_mask, CriSint32 *priorities); -#endif - -#if defined(XPT_TGT_PS3PPU) -/* [PS3] SPURS̎w */ -void CRIAPI criMvPly_SetupSpursParameters_PS3(const CriMvProcessorParameters_PS3 *processor_param); - /* [PS3] SPUXbhɂ}`vZbT̎w */ -void CRIAPI criMvPly_SetupSpuThreadParameters_PS3(const CriMvSpuThreadParameters_PS3 *spu_thread_param); -void CRIAPI criMvPly_SetGraphicEnv(CriMvGraphicEnv env); -CriMvGraphicEnv CRIAPI criMvPly_GetGraphicEnv(void); -#endif - -/* t[v[̎擾 */ -void CRIAPI criMvPly_GetFramePoolInfo(CriMvPly mvply, CriSint32 *num_input, CriUint32* num_data, CriUint32* num_ref, CriUint32* num_hold, CriUint32* num_free); - -/* Đł`l؂ւ */ -void CRIAPI criMvPly_SetSubtitleChannel(CriMvPly mvply, CriSint32 chno); - -/* |C^擾ăt[v[̃obt@bN */ -CriBool CRIAPI criMvPly_LockFrameBuffer(CriMvPly mvply, CriMvYuvBuffers *yuvbuffers, CriMvFrameInfo *frameinfo); -/* bNĂt[v[ */ -CriBool CRIAPI criMvPly_UnlockFrameBuffer(CriMvPly mvply, CriMvFrameInfo *frameinfo); - -/* - * For Sofdec2 - */ -CriMvPly CRIAPI criMvPly_CreateWithWork(void *work, CriSint32 size, CriMvHandleConfig *config); -CriSint32 CRIAPI criMvPly_CalcHandleWorkSize(CriMvHandleConfig *config); -CriSint32 CRIAPI criMvPly_CalcPlaybackWorkSize(CriMvPly mvply, CriMvStreamingParameters *stmprm); -CriBool CRIAPI criMvPly_AllocateWorkBufferWithWork(CriMvPly mvply, void *work ,Sint32 work_size, CriMvStreamingParameters *stmprm); -void CRIAPI criMvPly_SetMetaDataWorkAllocator(CriMvPly mvply, CriMvMetaDataWorkMallocFunc allocfunc, CriMvMetaDataWorkFreeFunc freefunc, void *usrobj, CriMvMetaFlag meta_flag); -CriSint32 criMvPly_CalcSubAudioWorkSize(CriMvPly mvply, const CriMvAudioParameters *aprm); -CriBool criMvPly_CopyFrameYUVBuffers(CriMvPly mvply, CriMvYuvBuffers *yuvbuffers, - const CriMvFrameInfo *frameinfo,const CriMvAlphaFrameInfo *alpha_frameinfo); -CriBool criMvPly_CopyFrameARGB8888Buffer(CriMvPly mvply, CriUint8 *dst_buf, CriUint32 dst_pitch, CriUint32 dst_bufsize, - const CriMvYuvBuffers *src_bufs, const CriMvFrameInfo *src_vinf, const CriMvAlphaFrameInfo *src_ainf); -#if defined(XPT_TGT_IPHONE) || defined(XPT_TGT_WINMO) || defined(XPT_TGT_ANDROID) || defined(XPT_TGT_CQSH2A) || defined(XPT_TGT_ACRODEA) || defined(XPT_TGT_NACL) || defined(XPT_TGT_SH7269) || defined(XPT_TGT_TRGP6K) || defined(XPT_TGT_TRGP6K) -CriBool criMvPly_CopyFrameRGB565Buffer(CriMvPly mvply, CriUint8 *dst_buf, CriUint32 dst_pitch, CriUint32 dst_bufsize, - const CriMvYuvBuffers *src_bufs, const CriMvFrameInfo *src_vinf, const CriMvAlphaFrameInfo *src_ainf); -#endif -CriBool criMvPly_LockAlphaFrameBuffer(CriMvPly mvply, CriMvYuvBuffers *yuvbuffers, CriMvAlphaFrameInfo *alpha_frameinfo); -CriBool criMvPly_UnlockAlphaFrameBuffer(CriMvPly mvply, CriMvAlphaFrameInfo *alpha_frameinfo); -CriSint32 criMvPly_GetNumPictureData(CriMvPly mvply); -const CriMvPlyHeaderInfo* criMvPly_GetCurrentStreamInfo(CriMvPly mvply); -/* for debug */ -CriBool CRIAPI criMvPly_GetAlphaFrame(CriMvPly mvply, CriUint8 *imagebuf, CriUint32 pitch, CriMvAlphaFrameInfo *alpha_frameinfo); - -/* OUTER_FRAMEPOOL_WORK */ -/* t[v[p[NvZBnhNULLwOKB */ -CriSint32 criMvPly_CalcFramepoolWorkSize(CriMvPly mvply, const CriMvStreamingParameters *stmprm); -/* t[v[p[Nݒ */ -void criMvPly_SetFramepoolWork(CriMvPly mvply, void *work, CriSint32 work_size); -/* t[v[p[NAP[^ݒ */ -void criMvPly_SetFramepoolWorkAllocator(CriMvPly mvply, CriMvFramepoolWorkMallocFunc allocfunc, CriMvFramepoolWorkFreeFunc freefunc, void *usrobj); - -/* V[NubN̎擾 */ -/* <> - * - seektbl_ptr : UTFAhX - * - seektbl_size : UTFTCY - * - num_seekblock : o͔z̗vf - * - * - blockinfo : V[NubNzւ̃|C^inum_seekblock̗̈mۂēnƁj - */ -void criMvPly_GetSeekBlockInfo(CriMvPly mvply, void *seektbl_ptr, CriUint32 seektbl_size, CriSint32 num_seekblock, CriMvSeekBlockInfo *blockinfo); - -/* t[[g̋w */ -void criMvPly_SetVideoFramerate(CriMvPly mvply, CriUint32 framerate_n, CriUint32 framerate_d); - -/* L̐ݒ */ -void criMvPly_SetSyncFlag(CriMvPly mvply, CriBool sync_flag); - -/* Д\̖₢킹 */ -CriBool criMvPly_IsPlayable(CriMvPly mvply, const CriMvStreamingParameters *stmprm); - - - -#ifdef __cplusplus -} -#endif - -#endif /* CRI_MOVIE_CORE_H_INCLUDED */ diff --git a/3rdParty/cri/XboxOne/include/cri_movie_xboxone.h b/3rdParty/cri/XboxOne/include/cri_movie_xboxone.h deleted file mode 100644 index 519d1c30..00000000 --- a/3rdParty/cri/XboxOne/include/cri_movie_xboxone.h +++ /dev/null @@ -1,96 +0,0 @@ -/**************************************************************************** - * - * CRI Middleware SDK - * - * Copyright (c) 2013 CRI Middleware Co., Ltd. - * - * Library : CRI Movie - * Module : Library User's Header - * File : cri_movie_xboxone.h - * Date : 2013-11-25 - * - ****************************************************************************/ -/*! - * \file cri_movie_xboxone.h - */ -#ifndef CRI_MOVIE_XBOXONE_H_INCLUDED /* Re-definition prevention */ -#define CRI_MOVIE_XBOXONE_H_INCLUDED - -/*************************************************************************** - * Include file - ***************************************************************************/ -#include -#include - -#include -#include - -/*************************************************************************** - * Variable Declaration - ***************************************************************************/ -namespace CriMv { - extern CriError ErrorContainer; -} - -/*************************************************************************** - * Prototype Functions - ***************************************************************************/ -namespace CriMv { - /*EN - * \ingroup MODULE_OPTION - * \brief Set processor parameters for decoding (Library Global) - * - * \param num_threads Number of additional threads for load distribution in decoding (Maximum 5 threads) - * \param affinity_mask Pointer to an array of thread affinity masks for each thread specified with num_threads. - * \param priorities Pointer to an array of thread priority for each thread specified with num_threads. - * \param err Optional error code - * - * This function sets the processor parameters for decoding as default setting of library global. - * Use it when you want to change processors or thread priority for decoding load distribution. - * - * If this function is called, it must be called before library initialization. - * - * On initialization, CRI Movie prepares 5 worker threads for distributed decoding.
- * - * \a num_threads specifies how many worker threads CRI Movie should use.
- * \a affinity_mask is an array of affinity masks for the worker threads. This array must have - * \a num_threads many elements. - * \a priorities is an array of thread priority for the worker threads. This array must have - * \a num_threads many elements. - * The format of \a affinity_mask and \a priorities is same as for the value passed to the OS standard API.
- * - * If this function is not called, 5 distributed decoding threads will run in parallel by default. - * Also, processor assignment of the decoding threads is handled by the operating system, and their - * priority will be THREAD_PRIORITY_BELOW_NORMAL. - */ - /*JP - * \ingroup MODULE_OPTION - * \brief fR[hɎgljvZbTݒiCuŚj - * \param num_threads וUfR[hpɎgpljXbh̐ (őTj - * \param affinity_masks XbhAtBjeB}XN̔zւ̃|C^Bnum_threadsŎw肵XbhƂ̃}XNlB - * \param priorities ljXbh̗Dxzւ̃|C^B - * \param err G[iȗj - * - * fR[h𕪎Uď邽߂̃vZbTCuŜɎw肵܂B - * fR[hɍsvZbTXbhDxύXꍇɎgpĂB - * {֐̓CuOɌĂяoKv܂B - * - * CRI Movie͏̍ۂɂT‚̕UfR[hp̃[J[Xbhpӂ܂B - * num_threadsŁÂ̂‚̃XbhۂɎgp邩wł܂B - * AvP[V疾IɃvZbT蓖ĂsꍇAX̃Xbhɑ΂ - * AtBjeB}XNƃXbhDxݒ肵ĂB - * AtBjeB}XNƃXbhDx̒ĺAOSW֐̈ƓłB - * - * ̊֐Ă΂ȂꍇAT‚̃XbhŕfR[hs܂B - * fR[hXbh̃vZbT͊蓖Ă͑SOSCŁADxTHREAD_PRIORITY_BELOW_NORMALɂȂ܂B - */ - void SetUsableProcessors_XBOXONE( - CriSint32 num_threads, - const DWORD_PTR *affinity_masks, - const int *priorities, - CriError &err = CriMv::ErrorContainer); -} - - - -#endif /* CRI_MOVIE_XBOXONE_H_INCLUDED */ diff --git a/3rdParty/cri/XboxOne/include/cri_sj.h b/3rdParty/cri/XboxOne/include/cri_sj.h deleted file mode 100644 index 9b7047b4..00000000 --- a/3rdParty/cri/XboxOne/include/cri_sj.h +++ /dev/null @@ -1,189 +0,0 @@ -/**************************************************************************** - * - * CRI Middleware SDK - * - * Copyright (c) 2006-2010 CRI Middleware Co., Ltd. - * - ****************************************************************************/ - -#ifndef _CRI_SJ_H_INCLUDED -#define _CRI_SJ_H_INCLUDED -/**************************************************************************** - * * - * CRI Stream Joint "CriSj" Library * - * * - * 2005-06-21 written by M.Oshimi * - * * - ****************************************************************************/ - -/**************************************************************************** - * Include file * - ****************************************************************************/ -#include "cri_xpt.h" -#include "cri_heap.h" - -/**************************************************************************** - * MACRO CONSTANT * - ****************************************************************************/ - -/* Version number of CriSj */ -#define CRISJ_NAME_STRINGS "CRI Stream Joint" -#define CRISJ_VERSION_STRINGS "1.01.00" - -#define CRISJUNI_MAX_LINE (4) -#define CRICHUNK_MAX_SIZE (0xffffffff) - -/*********************************************************************** - * Process MACRO - ***********************************************************************/ - -/**************************************************************************** - * Data type declaration * - ****************************************************************************/ - -/* Xg[C */ -typedef enum { - CRISJ_LINE_FREE = (0), - CRISJ_LINE_DATA = (1), - CRISJ_LINE_HOLD = (2), - CRISJ_LINE_EXTRA = (3), - /* enum be 4bytes */ - CRISJ_LINE_ENUM_BE_SINT32 = 0x7FFFFFFF -} CriSjLine; - -/* `N */ -#ifndef TYPEDEF_CRICHUNK -#define TYPEDEF_CRICHUNK -typedef struct { - CriUint8 *data; /* f[^ */ - CriUint32 size; /* oCg */ -} CriChunk; -#endif - -/* CriSjnh */ -/* CriSj handle */ -typedef struct { - struct _crisj_function_table *vtbl; - const CriChar8 *name; -} CriSjObj, *CriSj; - -typedef struct _crisj_function_table { - /* nh̏ */ - void (*Destroy)(CriSj sj); - /* Zbg */ - void (*Reset)(CriSj sj); - /* `N̎擾 (FIFO̐擪擾) */ - void (*GetChunk)(CriSj sj, CriSjLine id, CriUint32 nbyte, CriChunk *ck); - /* `N߂@(FIFO̐擪ɑ}) */ - void (*UngetChunk)(CriSj sj, CriSjLine id, CriChunk *ck); - /* `N} (FIFO̍Ōɑ}) */ - void (*PutChunk)(CriSj sj, CriSjLine id, CriChunk *ck); - /* C擾ł鑍oCg̎擾 */ - CriUint32 (*GetTotalSize)(CriSj sj, CriSjLine id); -} CriSjVirtualFunctionTable; - -typedef enum { - CRISJ_UNIMODE_SEPARATE = (0), - CRISJ_UNIMODE_JOIN = (1), - /* enum be 4bytes */ - CRISJ_UNIMODE_ENUM_BE_SINT32 = 0x7FFFFFFF -} CriSjUniversalMode; - - -typedef struct CriSjRbfConfig { - CriBool use_cs; - CriUint32 buffer_size; - CriUint32 extra_size; - CriUint32 alignment; - const CriChar8 *buffer_name; -} CriSjRbfConfig; - -typedef struct CriSjMemConfig { - CriBool use_cs; - CriUint8 *data; - CriUint32 data_size; -} CriSjMemConfig; - -typedef struct CriSjUniConfig { - CriBool use_cs; - CriSjUniversalMode mode; - CriUint32 num_chunks; -} CriSjUniConfig; - -/**************************************************************************** - * Function Declaration * - ****************************************************************************/ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* Oobt@^SJ̍쐬 */ -CriSint32 CRIAPI criSjRbf_CalculateWorkSize(const CriSjRbfConfig* config); -CriSj CRIAPI criSjRbf_Create(const CriSjRbfConfig *config, void *work, CriSint32 work_size); -CriSj CRIAPI criSjRbf_CreateByHeap(const CriSjRbfConfig *config, CriHeap heap, CriHeapType heap_type); - -/* 풓^SJ̍쐬 */ -CriSint32 CRIAPI criSjMem_CalculateWorkSize(const CriSjMemConfig* config); -CriSj CRIAPI criSjMem_Create(const CriSjMemConfig *config, void *work, CriSint32 work_size); -CriSj CRIAPI criSjMem_CreateByHeap(const CriSjMemConfig *config, CriHeap heap, CriHeapType heap_type); - -/* jo[TSJ̍쐬 */ -CriSint32 CRIAPI criSjUni_CalculateWorkSize(const CriSjUniConfig* config); -CriSj CRIAPI criSjUni_Create(const CriSjUniConfig *config, void *work, CriSint32 work_size); -CriSj CRIAPI criSjUni_CreateByHeap(const CriSjUniConfig *config, CriHeap heap, CriHeapType heap_type); -/* `FCv[̎擾 */ -CriSint32 CRIAPI criSjUni_GetNumChainPool(CriSj sj); - -void CRIAPI criSj_Destroy(CriSj sj); -void CRIAPI criSj_Reset(CriSj sj); -void CRIAPI criSj_GetChunk(CriSj sj, CriSjLine line, CriUint32 nbyte, CriChunk *ck); -void CRIAPI criSj_UngetChunk(CriSj sj, CriSjLine line, CriChunk *ck); -void CRIAPI criSj_PutChunk(CriSj sj, CriSjLine line, CriChunk *ck); -CriUint32 CRIAPI criSj_GetTotalSize(CriSj sj, CriSjLine line); -void CRIAPI criSj_SplitChunk(CriChunk *ck, CriUint32 nbyte, CriChunk *ck1, CriChunk *ck2); - -/*** -* New APIs -***/ - -CriUint32 CRIAPI criSj_GetInputFreeSize(CriSj sj); -void CRIAPI criSj_GetInputChunk(CriSj sj, CriChunk *ck); -void CRIAPI criSj_PutInputChunk(CriSj sj, CriChunk *ck, CriUint32 input_size); -CriUint32 CRIAPI criSj_GetOutputDataSize(CriSj sj); -void CRIAPI criSj_GetOutputChunk(CriSj sj, CriChunk *ck); -void CRIAPI criSj_PutOutputChunk(CriSj sj, CriChunk *ck, CriUint32 output_size); - -CriUint32 CRIAPI criSj_PutOutputChunk2(CriSj sj, CriChunk *ck1, CriChunk *ck2, CriUint32 output_size); - - -/*** -* Old Interface (for compatibility) -***/ -typedef struct _CriSjConfig { - CriBool use_cs; - CriHeapType heap_type; -} CriSjConfig; - -CriSj CRIAPI criSj_CreateRingBuffer(CriHeap heap, CriUint32 bsize, CriUint32 xsize, CriUint32 align); -CriSj CRIAPI criSj_CreateNamedRingBuffer(CriHeap heap, CriUint32 bsize, CriUint32 xsize, CriUint32 align, const CriChar8 *bname); -CriSj CRIAPI criSj_CreateRingBufferWithConfig(CriHeap heap, CriUint32 bsize, CriUint32 xsize, CriUint32 align, const CriSjConfig *config); -CriSj CRIAPI criSj_CreateNamedRingBufferWithConfig(CriHeap heap, CriUint32 bsize, CriUint32 xsize, CriUint32 align, const CriChar8 *bname, const CriSjConfig *config); -CriSint32 CRIAPI criSjRbf_GetRequiredMemorySizeWithConfig(CriUint32 bsize, CriUint32 xsize, CriUint32 align, const CriSjConfig *config); - -CriSj CRIAPI criSj_CreateMemory(CriHeap heap, CriUint8 *data, CriUint32 dtsize, CriUint32 align); -CriSj CRIAPI criSj_CreateMemoryWithConfig(CriHeap heap, CriUint8 *data, CriUint32 dtsize, CriUint32 align, const CriSjConfig *config); -CriSint32 CRIAPI criSjMem_GetRequiredMemorySizeWithConfig(CriUint32 align, const CriSjConfig *config); - -CriSj CRIAPI criSj_CreateUniversal(CriHeap heap, CriSjUniversalMode mode, CriUint32 nchunk); -CriSj CRIAPI criSj_CreateUniversalWithConfig(CriHeap heap, CriSjUniversalMode mode, CriUint32 nchunk, const CriSjConfig *config); -CriSint32 CRIAPI criSjUni_GetRequiredMemorySizeWithConfig(CriSjUniversalMode mode, CriUint32 nchunk, const CriSjConfig *config); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#endif - -/* end of file */ diff --git a/3rdParty/cri/XboxOne/include/cri_xpt.h b/3rdParty/cri/XboxOne/include/cri_xpt.h deleted file mode 100644 index 5dbf4f36..00000000 --- a/3rdParty/cri/XboxOne/include/cri_xpt.h +++ /dev/null @@ -1,26 +0,0 @@ -/**************************************************************************** - * - * CRI Middleware SDK - * - * Copyright (c) 2004-2009 CRI Middleware Co., Ltd. - * - * Library : CRI Middleware Library - * Module : CRI Common Header for XboxOne - * File : cri_xpt.h - * Date : 2013-03-04 - * Version : 1.16 - * - ****************************************************************************/ -#ifndef CRI_INCL_CRI_XPT_H -#define CRI_INCL_CRI_XPT_H - -#define XPT_TGT_XBOXONE -#define XPT_CCS_LEND -#define XPT_SUPPORT_MULTICHANNEL -#define CRI_TARGET_STR "XboxOne" - -#include "cri_xpts_xboxone.h" -#include "cri_xpt_post.h" - -#endif /* CRI_INCL_CRI_XPT_H */ -/* End Of File */ diff --git a/3rdParty/cri/XboxOne/include/cri_xpt_post.h b/3rdParty/cri/XboxOne/include/cri_xpt_post.h deleted file mode 100644 index de333b7b..00000000 --- a/3rdParty/cri/XboxOne/include/cri_xpt_post.h +++ /dev/null @@ -1,256 +0,0 @@ -/***************************************************************************** - * - * CRI Middleware SDK - * - * Copyright (c) 1998-2012 CRI Middleware Co., Ltd. - * - * Library : CRI Middleware Library - * Module : CRI Common Header / Post-Process - * File : cri_xpt_post.h - * Date : 2012-05-15 - * Version : 2.07 - * - *****************************************************************************/ -#ifndef CRI_INCL_CRI_XPT_POST_H -#define CRI_INCL_CRI_XPT_POST_H - - -/***************************************************************************** - * }N` - * Macro definition - *****************************************************************************/ - -/* RpC̐ÓIAT[g - * C++ BoostSTATIC_ASSERTƓ̋@\CŎB - * ^ł邱Ƃ؂BȔꍇ̓RpCG[NāAR - * pC~B - * Static Asart when compiling - * This function is equal to STATIC_ASSERT of C++ Boost, and is imprementated - * by C language. If the condition is false, a compiler error is caused and - * it stop compiling. - */ -#define XPT_STATIC_ASSERT(cond) extern int xpt_static_assert_array[(cond)?1:-1] - - -/***************************************************************************** - * RpCIvV̌ - * Compiler option test - *****************************************************************************/ - -/* enum^̌ - * @enum^int^ɐ邱Ƃ؂B - * @K؂ȃG[bZ[W\̂ŁA”\ȂRpCIvVɂ - * @`FbNsBs”\ȏꍇAėpIȐÓIAT[gɂ`FbNB - * Enum type test - * It is verified that the enum type adjusts to the int type. - * To display an appropriate error message, it checks the compiler option - * if possible. General static asart test works if it is impossible. - */ -#if defined(__MWERKS__) /* CodeWarrior */ - //#if !__option(enumsalwaysint) - // #error ERROR cri_xpt_post.h : Compiler option 'Enums Always Int' should be ON. - //#endif -#elif defined(__GNUC__) - //#if Compiler option -fshort-enums is used - // #error ERROR cri_xpt_post.h : Compiler option '-fshort-enums' should not be used. - //#endif -#endif -//typedef enum {XPT_TEST_ENUM_0, XPT_TEST_ENUM_1, XPT_TEST_ENUM_2} XptTestEnum; -//XPT_STATIC_ASSERT(sizeof(XptTestEnum) == sizeof(Uint32)); /* enum should be 4byte. */ - -/***************************************************************************** - * 萔}N - * Macros of constant value - *****************************************************************************/ - -/* NULL |C^^ */ -#if !defined(CRI_NULL) -#ifdef __cplusplus -#define CRI_NULL (0) -#else -#define CRI_NULL ((void *)0) -#endif -#endif - -/* _萔PiUA^j */ -#if !defined(CRI_FALSE) -#define CRI_FALSE (0) -#endif -#if !defined(CRI_TRUE) -#define CRI_TRUE (1) -#endif - -/* _萔QiXCb`j */ -#if !defined(CRI_OFF) -#define CRI_OFF (0) -#endif -#if !defined(CRI_ON) -#define CRI_ON (1) -#endif - -/* ʔ̒萔iAsj */ -#if !defined(CRI_OK) -#define CRI_OK (0) /* */ -#endif -#if !defined(CRI_NG) -#define CRI_NG (-1) /* s */ -#endif - -/***************************************************************************** - * |C^܂64rbgAhXi[ł鐮^ - * l: |C^32bitROMAhX64bit̊‹ŁA҂𓧉ߓIɈB - * The integer type which can hold an pointer or an address up to 64 bits. - * NOTE: In the environment of pointer 32bit and ROM address space 64bit, - * this type can treat both transparently. - *****************************************************************************/ - -#if !defined(_TYPEDEF_CriUint64Adr) -#define _TYPEDEF_CriUint64Adr -typedef CriUint64 CriUint64Adr; /* |C^܂64rbgAhXi[ł鐮^ */ -#endif - -#if !defined(CRI_PTR_TO_UINT64ADR) -#define CRI_PTR_TO_UINT64ADR(ptr) ((CriUint64Adr)(ptr)) /* Convert pointer to CriUint64Adr */ -#endif - -#if !defined(CRI_UINT64ADR_TO_PTR) -#define CRI_UINT64ADR_TO_PTR(uint64adr) ((void *)(CriUintPtr)(uint64adr)) /* Convert CriUint64Adr to pointer */ -#endif - -#if !defined(CRI_XPT_DISABLE_UNPREFIXED_TYPE) - -/***************************************************************************** - * ݊ێ̂߂̒萔}N - * Macros for compatibility with old version - *****************************************************************************/ - -/* NULL |C^^ */ -#if !defined(NULL) -#define NULL (CRI_NULL) -#endif - -/* _萔PiUA^j */ -#if !defined(FALSE) -#define FALSE (CRI_FALSE) -#endif -#if !defined(TRUE) -#define TRUE (CRI_TRUE) -#endif - -/* _萔QiXCb`j */ -#if !defined(OFF) -#define OFF (CRI_OFF) -#endif -#if !defined(ON) -#define ON (CRI_ON) -#endif - -/* ʔ̒萔iAsj */ -#if !defined(OK) -#define OK (CRI_OK) -#endif -#if !defined(NG) -#define NG (CRI_NG) -#endif - -/***************************************************************************** - * ݊ێ̂߂̃f[^^錾 - * Types for compatibility with old version - *****************************************************************************/ - -#if !defined(_TYPEDEF_Uint8) -#define _TYPEDEF_Uint8 -typedef CriUint8 Uint8; /* ȂPoCg */ -#endif - -#if !defined(_TYPEDEF_Sint8) -#define _TYPEDEF_Sint8 -typedef CriSint8 Sint8; /* ‚PoCg */ -#endif - -#if !defined(_TYPEDEF_Uint16) -#define _TYPEDEF_Uint16 -typedef CriUint16 Uint16; /* ȂQoCg */ -#endif - -#if !defined(_TYPEDEF_Sint16) -#define _TYPEDEF_Sint16 -typedef CriSint16 Sint16; /* ‚QoCg */ -#endif - -#if !defined(_TYPEDEF_Uint32) -#define _TYPEDEF_Uint32 -typedef CriUint32 Uint32; /* ȂSoCg */ -#endif - -#if !defined(_TYPEDEF_Sint32) -#define _TYPEDEF_Sint32 -typedef CriSint32 Sint32; /* ‚SoCg */ -#endif - -#if !defined(_TYPEDEF_Uint64) -#define _TYPEDEF_Uint64 -typedef CriUint64 Uint64; /* ȂWoCg */ -#endif - -#if !defined(_TYPEDEF_Sint64) -#define _TYPEDEF_Sint64 -typedef CriSint64 Sint64; /* ‚WoCg */ -#endif - -#if !defined(_TYPEDEF_Uint128) -#define _TYPEDEF_Uint128 -typedef CriUint128 Uint128; /* Ȃ16oCg */ -#endif - -#if !defined(_TYPEDEF_Sint128) -#define _TYPEDEF_Sint128 -typedef CriSint128 Sint128; /* ‚16oCg */ -#endif - -#if !defined(_TYPEDEF_Float16) -#define _TYPEDEF_Float16 -typedef CriFloat16 Float16; /* QoCg */ -#endif - -#if !defined(_TYPEDEF_Float32) -#define _TYPEDEF_Float32 -typedef CriFloat32 Float32; /* SoCg */ -#endif - -#if !defined(_TYPEDEF_Float64) -#define _TYPEDEF_Float64 -typedef CriFloat64 Float64; /* WoCg */ -#endif - -#if !defined(_TYPEDEF_Fixed32) -#define _TYPEDEF_Fixed32 -typedef CriFixed32 Fixed32; /* Œ菬_32rbg */ -#endif - -/* X11 APIixtrapproto.hjƂ̋p */ -#if !defined(_TYPEDEF_Bool) && !defined(Bool) -#define _TYPEDEF_Bool -typedef CriBool Bool; /* _^i_萔lɂƂj */ -#endif - -#if !defined(_TYPEDEF_Char8) -#define _TYPEDEF_Char8 -typedef CriChar8 Char8; /* ^ */ -#endif - -#if !defined(_TYPEDEF_SintPtr) -#define _TYPEDEF_SintPtr -typedef CriSintPtr SintPtr; -#endif - -#if !defined(_TYPEDEF_UintPtr) -#define _TYPEDEF_UintPtr -typedef CriUintPtr UintPtr; -#endif - -#endif /* CRI_XPT_DISABLE_UNPREFIXED_TYPE */ - -#endif /* CRI_INCL_CRI_XPT_POST_H */ - -/* end of file */ diff --git a/3rdParty/cri/XboxOne/include/cri_xpts_xboxone.h b/3rdParty/cri/XboxOne/include/cri_xpts_xboxone.h deleted file mode 100644 index 589cc56c..00000000 --- a/3rdParty/cri/XboxOne/include/cri_xpts_xboxone.h +++ /dev/null @@ -1,132 +0,0 @@ -/**************************************************************************** - * - * CRI Middleware SDK - * - * Copyright (c) 1998-2011 CRI Middleware Co., Ltd. - * - * Library : CRI Middleware Library - * Module : CRI Common Header for XboxOne - * File : cri_xpts_xboxone.h - * Date : 2013-03-04 - * Version : 2.05 - * - ****************************************************************************/ - -#ifndef CRI_INCL_CRI_XPTS_H -#define CRI_INCL_CRI_XPTS_H - -/***************************************************************************** - * {f[^^錾 - *****************************************************************************/ - -#if !defined(_TYPEDEF_CriUint8) -#define _TYPEDEF_CriUint8 -typedef unsigned __int8 CriUint8; /* ȂPoCg */ -#endif - -#if !defined(_TYPEDEF_CriSint8) -#define _TYPEDEF_CriSint8 -typedef signed __int8 CriSint8; /* ‚PoCg */ -#endif - -#if !defined(_TYPEDEF_CriUint16) -#define _TYPEDEF_CriUint16 -typedef unsigned __int16 CriUint16; /* ȂQoCg */ -#endif - -#if !defined(_TYPEDEF_CriSint16) -#define _TYPEDEF_CriSint16 -typedef signed __int16 CriSint16; /* ‚QoCg */ -#endif - -#if !defined(_TYPEDEF_CriUint32) -#define _TYPEDEF_CriUint32 -typedef unsigned __int32 CriUint32; /* ȂSoCg */ -#endif - -#if !defined(_TYPEDEF_CriSint32) -#define _TYPEDEF_CriSint32 -typedef signed __int32 CriSint32; /* ‚SoCg */ -#endif - -#if !defined(_TYPEDEF_CriUint64) -#define _TYPEDEF_CriUint64 -typedef unsigned __int64 CriUint64; /* ȂWoCg */ -#endif - -#if !defined(_TYPEDEF_CriSint64) -#define _TYPEDEF_CriSint64 -typedef signed __int64 CriSint64; /* ‚WoCg */ -#endif - -#if !defined(_TYPEDEF_CriUint128) -#define _TYPEDEF_CriUint128 -typedef struct { /* Ȃ16oCg */ - CriUint64 h; /* 64rbg */ - CriUint64 l; /* 64rbg */ -} CriUint128; -#endif - -#if !defined(_TYPEDEF_CriSint128) -#define _TYPEDEF_CriSint128 -typedef struct { /* ‚16oCg */ - CriSint64 h; /* 64rbg */ - CriUint64 l; /* 64rbg */ -} CriSint128; -#endif - -#if !defined(_TYPEDEF_CriFloat16) -#define _TYPEDEF_CriFloat16 -typedef signed __int16 CriFloat16; /* QoCg */ -#endif - -#if !defined(_TYPEDEF_CriFloat32) -#define _TYPEDEF_CriFloat32 -typedef float CriFloat32; /* SoCg */ -#endif - -#if !defined(_TYPEDEF_CriFloat64) -#define _TYPEDEF_CriFloat64 -typedef double CriFloat64; /* WoCg */ -#endif - -#if !defined(_TYPEDEF_CriFixed32) -#define _TYPEDEF_CriFixed32 -typedef signed __int32 CriFixed32; /* Œ菬_32rbg */ -#endif - -#if !defined(_TYPEDEF_CriBool) -#define _TYPEDEF_CriBool -typedef CriSint32 CriBool; /* _^i_萔lɂƂj */ -#endif - -#if !defined(_TYPEDEF_CriChar8) -#define _TYPEDEF_CriChar8 -typedef char CriChar8; /* ^ */ -#endif - -/***************************************************************************** - * |C^i[”\Ȑ^ - *****************************************************************************/ - -#if !defined(_TYPEDEF_CriSintPtr) -#define _TYPEDEF_CriSintPtr -typedef signed __int64 CriSintPtr; -#endif - -#if !defined(_TYPEDEF_CriUintPtr) -#define _TYPEDEF_CriUintPtr -typedef unsigned __int64 CriUintPtr; -#endif - -/***************************************************************************** - * ĂяoK - *****************************************************************************/ - -#if !defined(CRIAPI) -#define CRIAPI __cdecl -#endif - -#endif /* CRI_INCL_CRI_XPTS_H */ - -/* end of file */ diff --git a/3rdParty/cri/XboxOne/libs/cri_base_xboxone.lib b/3rdParty/cri/XboxOne/libs/cri_base_xboxone.lib deleted file mode 100644 index 9b35306e..00000000 Binary files a/3rdParty/cri/XboxOne/libs/cri_base_xboxone.lib and /dev/null differ diff --git a/3rdParty/cri/XboxOne/libs/cri_movie_xboxone.lib b/3rdParty/cri/XboxOne/libs/cri_movie_xboxone.lib deleted file mode 100644 index 9ad045c4..00000000 Binary files a/3rdParty/cri/XboxOne/libs/cri_movie_xboxone.lib and /dev/null differ diff --git a/3rdParty/cri/orbis/include/cri_allocator.h b/3rdParty/cri/orbis/include/cri_allocator.h deleted file mode 100644 index e3c18997..00000000 --- a/3rdParty/cri/orbis/include/cri_allocator.h +++ /dev/null @@ -1,63 +0,0 @@ -#ifndef _CRI_ALLOCATOR_H_INCLUDED -#define _CRI_ALLOCATOR_H_INCLUDED -/**************************************************************************** - * * - * CRI Allocator * - * * - * 2006-01-05 written by M.Oshimi * - * * - ****************************************************************************/ - -/**************************************************************************** - * Include file - ****************************************************************************/ -#include -#include "cri_xpt.h" -#include "cri_heap.h" - -/**************************************************************************** - * Macro Constants - ****************************************************************************/ -#if defined(XPT_UNSUPPORT_CPLUSPLUS_THROW) -#define CRI_ALLOCATOR_CPLUSPLUS_THROW -#else -#define CRI_ALLOCATOR_CPLUSPLUS_THROW throw() -#endif - -/**************************************************************************** - * Class Declaration - ****************************************************************************/ -#ifdef __cplusplus - -class CriAllocator -{ -public: - static const CriSint32 DEFAULT_ALIGNMENT = CRIHEAP_DEFAULT_MEM_ALIGN; - - - static void* CRIAPI operator new(size_t size, CriHeap heap) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void* CRIAPI operator new(size_t size, CriHeap heap, CriHeapType heap_type) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void* CRIAPI operator new(size_t size, CriHeap heap, const CriChar8 *name, CriUint32 align=DEFAULT_ALIGNMENT) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void* CRIAPI operator new(size_t size, CriHeap heap, CriHeapType heap_type, const CriChar8 *name, CriUint32 align=DEFAULT_ALIGNMENT) CRI_ALLOCATOR_CPLUSPLUS_THROW; - - static void CRIAPI operator delete(void *p, size_t size); - - static void* CRIAPI operator new(size_t size, void *work, CriSint32 wksize) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void CRIAPI operator delete(void *p, void *work, CriSint32 wksize) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void* CRIAPI operator new(size_t size, void *work, CriSint32 wksize, CriUint32 align) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void CRIAPI operator delete(void *p, void *work, CriSint32 wksize, CriUint32 align) CRI_ALLOCATOR_CPLUSPLUS_THROW; - -#if !defined(XPT_TGT_BCB) - static void CRIAPI operator delete(void *p, CriHeap heap) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void CRIAPI operator delete(void *p, CriHeap heap, CriHeapType heap_type) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void CRIAPI operator delete(void *p, CriHeap heap, const CriChar8 *name, CriUint32 align) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void CRIAPI operator delete(void *p, CriHeap heap, CriHeapType heap_type, const CriChar8 *name, CriUint32 align) CRI_ALLOCATOR_CPLUSPLUS_THROW; -#endif - - static CriSint32 GetWorstExtraSize(CriUint32 align); -}; -#endif // _CRI_ALLOCATOR_H_INCLUDED - -#endif /* end of __cplusplus */ - -/* --- end of file --- */ diff --git a/3rdParty/cri/orbis/include/cri_error.h b/3rdParty/cri/orbis/include/cri_error.h deleted file mode 100644 index 6152a7b5..00000000 --- a/3rdParty/cri/orbis/include/cri_error.h +++ /dev/null @@ -1,368 +0,0 @@ -#ifndef _CRI_ERROR_H_INCLUDED -#define _CRI_ERROR_H_INCLUDED -/**************************************************************************** - * - * CRI Middleware SDK - * - * Copyright (c) 2006-2009 CRI Middleware Co., Ltd. - * - * Library : CRI Error - * Module : - * File : cri_error.h - * - ****************************************************************************/ -/*! - * \file cri_error.h - */ -/*JP - * \addtogroup CRI_ERROR G[nhOp֐Q - * @{ - */ -/*EN - * \addtogroup CRI_ERROR Functions for error handling - * @{ - */ - -/**************************************************************************** - * Include file * - ****************************************************************************/ -#include "cri_xpt.h" - -/**************************************************************************** - * MACRO CONSTANT * - ****************************************************************************/ - -/* o[Wԍ */ -/* Version number */ -#define CRIERROR_VER_NAME "CRI Error" -#define CRIERROR_VER_NUM "1.04.00" -#define CRIERROR_VER_OPTION - -/*JP - * \brief G[R[h - */ -/*EN - * \brief Error codes - */ -typedef enum { - CRIERR_OK = 0, /*JP< I */ - /*EN< Succeeded */ - CRIERR_NG = -1, /*JP< G[ */ - /*EN< Error occurred */ - CRIERR_INVALID_PARAMETER = -2, /*JP< s */ - /*EN< Invalid argument */ - CRIERR_FAILED_TO_ALLOCATE_MEMORY = -3, /*JP< ̊mۂɎs */ - /*EN< Failed to allocate memory */ - CRIERR_UNSAFE_FUNCTION_CALL = -4, /*JP< XbhZ[t֐̕s */ - /*EN< Parallel execution of thread-unsafe function */ - CRIERR_FUNCTION_NOT_IMPLEMENTED = -5, /*JP< ֐̎s */ - /*EN< Function not implemented */ - CRIERR_LIBRARY_NOT_INITIALIZED = -6, /*JP< Cu */ - /*EN< Library not initialized */ - /* enum be 4bytes */ - CRIERR_ENUM_BE_SINT32 = 0x7FFFFFFF -} CriError; - -/*JP - * \brief G[ʒmx - */ -/*EN - * \brief Error notification level - */ -typedef enum { - CRIERR_NOTIFY_ALL = 0, /*JP< SẴG[ʒm */ - /*EN< Notify all errors */ - CRIERR_NOTIFY_FATAL = 1, /*JP< G[̂ݒʒmix͖j */ - /*EN< Notify error (Disregards warning) */ - /* enum be 4bytes */ - CRIERR_NOTIFY_ENUM_BE_SINT32 = 0x7FFFFFFF -} CriErrorNotificationLevel; - -/* G[x */ -/* Error level */ -typedef enum { - CRIERR_LEVEL_ERROR = 0, - CRIERR_LEVEL_WARNING = 1, - /* enum be 4bytes */ - CRIERR_LEVEL_ENUM_BE_SINT32 = 0x7FFFFFFF -} CriErrorLevel; - -/**************************************************************************** - * PROCESS MACRO * - ****************************************************************************/ - -#if defined(CRIERROR_SIMPLIFY) - /* G[̒ʒm */ - /* Notification of Error */ - #define criErr_NotifyError(id, msg) criErr_NotifyErrorSimple() - #define criErr_NotifyError1(id, msg, p1) criErr_NotifyErrorSimple() - #define criErr_NotifyError2(id, msg, p1, p2) criErr_NotifyErrorSimple() - #define criErr_NotifyErrorPrmArray(id, msg, p1, p2, pa) criErr_NotifyErrorSimple() - #define criErr_NotifyErrorGeneric(_error_id, _error_no) criErr_NotifyErrorSimple() - /* x̒ʒm */ - /* Notification of Warning */ - #define criErr_NotifyWarning(id, msg) criErr_NotifyWarningSimple() - #define criErr_NotifyWarning1(id, msg, p1) criErr_NotifyWarningSimple() - #define criErr_NotifyWarning2(id, msg, p1, p2) criErr_NotifyWarningSimple() - #define criErr_NotifyWarningPrmArray(id, msg, p1, p2, pa) criErr_NotifyWarningSimple() - #define criErr_NotifyWarningGeneric(_error_id, _error_no) criErr_NotifyWarningSimple() -#else - /* G[̒ʒm */ - /* Notification of Error */ - #define criErr_NotifyError(id, msg) criErr_Notify(CRIERR_LEVEL_ERROR, id ":" msg) - #define criErr_NotifyError1(id, msg, p1) criErr_Notify1(CRIERR_LEVEL_ERROR, (id ":" msg), (CriUintPtr)(p1)) - #define criErr_NotifyError2(id, msg, p1, p2) criErr_Notify2(CRIERR_LEVEL_ERROR, (id ":" msg), (CriUintPtr)(p1), (CriUintPtr)(p2)) - #define criErr_NotifyErrorPrmArray(id, msg, p1, p2, pa) criErr_NotifyPrmArray(CRIERR_LEVEL_ERROR, (id ":" msg), (CriUintPtr)(p1), (CriUintPtr)(p2), (CriUintPtr *)(pa)) - #define criErr_NotifyErrorGeneric(_error_id, _error_no) criErr_NotifyGeneric(CRIERR_LEVEL_ERROR, _error_id, _error_no) - /* x̒ʒm */ - /* Notification of Warning */ - #define criErr_NotifyWarning(id, msg) criErr_Notify(CRIERR_LEVEL_WARNING, id ":" msg) - #define criErr_NotifyWarning1(id, msg, p1) criErr_Notify1(CRIERR_LEVEL_WARNING, (id ":" msg), (CriUintPtr)(p1)) - #define criErr_NotifyWarning2(id, msg, p1, p2) criErr_Notify2(CRIERR_LEVEL_WARNING, (id ":" msg), (CriUintPtr)(p1), (CriUintPtr)(p2)) - #define criErr_NotifyWarningPrmArray(id, msg, p1, p2, pa) criErr_NotifyPrmArray(CRIERR_LEVEL_WARNING, (id ":" msg), (CriUintPtr)(p1), (CriUintPtr)(p2), (CriUintPtr *)(pa)) - #define criErr_NotifyWarningGeneric(_error_id, _error_no) criErr_NotifyGeneric(CRIERR_LEVEL_WARNING, _error_id, _error_no) -#endif - -/**************************************************************************** - * Data type declaration * - ****************************************************************************/ - -/* Error Callback Function type */ -typedef void (CRIAPI *CriErrCbFunc)(const CriChar8 *errid, CriUint32 p1, CriUint32 p2, CriUint32 *parray); - -/**************************************************************************** - * ϐ̐錾 * - * Variable Declaration * - ****************************************************************************/ -/* G[o͏ȗpϐ */ -/* default argument of CriError */ -#ifdef __cplusplus -namespace criErr { - extern CriError ErrorContainer; -} -#endif /* __cplusplus */ - -/**************************************************************************** - * ֐̐錾 * - * Function Declaration * - ****************************************************************************/ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/*JP - * \brief G[ID񂩂G[bZ[W֕ϊ - * \ingroup CRI_ERROR - * \param[in] errid G[ID - * \return G[bZ[W - * \par : - * G[ID񂩂ڍׂȃG[bZ[W֕ϊ܂B
- * \attention - * ̊֐͋dl̊֐łB
- * ::criErr_ConvertIdToMessage ֐gpĂB - * \sa criErr_ConvertIdToMessage - */ -/*EN - * \brief Convert error ID to error message - * \ingroup CRI_ERROR - * \param[in] errid error ID - * \return error message - * \par Explanation: - * This function converts error ID to detailed error message.
- * \attention - * This function is an obsolete one.
- * Please use the ::criErr_ConvertIdToMessage function instead. - * \sa criErr_ConvertIdToMessage - */ -const CriChar8* CRIAPI criErr_ConvertIdToMsg(const CriChar8 *errid); - -/*JP - * \brief G[ID񂩂G[bZ[W֕ϊ - * \ingroup CRI_ERROR - * \param[in] errid G[ID - * \param[in] p1 ⑫1 - * \param[in] p2 ⑫2 - * \return G[bZ[W - * \par : - * G[ID񂩂ڍׂȃG[bZ[W֕ϊ܂B
- * \par p: - * \code - * void user_error_callback_func(const CriChar8 *errid, CriUint32 p1, CriUint32 p2, CriUint32 *parray); - * { - * const CriChar8 *errmsg; - * errmsg = criErr_ConvertIdToMessage(errid, p1, p2); - * printf("%s\n", errmsg); - * } - * \endcode - */ -/*EN - * \brief Convert error ID to error message - * \ingroup CRI_ERROR - * \param[in] errid error ID - * \param[in] p1 supplementary information 1 - * \param[in] p2 supplementary information 2 - * \return error message - * \par Explanation: - * This function converts error ID to detailed error message.
- * \par Example: - * \code - * void user_error_callback_func(const CriChar8 *errid, CriUint32 p1, CriUint32 p2, CriUint32 *parray); - * { - * const CriChar8 *errmsg; - * errmsg = criErr_ConvertIdToMessage(errid, p1, p2); - * printf("%s\n", errmsg); - * } - * \endcode - */ -const CriChar8* CRIAPI criErr_ConvertIdToMessage(const CriChar8 *errid, CriUint32 p1, CriUint32 p2); - -/*JP - * \brief G[R[obN֐̓o^ - * \ingroup CRI_ERROR - * \param[in] cbf G[R[obN֐ - * \return Ȃ - * \par : - * G[R[obN֐o^܂B
- * o^ꂽ֐́ACRI~hEGACuŃG[ƂɌĂяo܂B
- * ɓo^łG[R[obN֐͂P‚łB
- * o^ɍēx{֐Ăяoꍇ݂͌̓o^㏑܂B - * \par p: - * \code - * void user_error_callback_func(const CriChar8 *errid, CriUint32 p1, CriUint32 p2, CriUint32 *parray); - * { - * const CriChar8 *errmsg; - * errmsg = criErr_ConvertIdToMessage(errid, p1, p2); - * printf("%s\n", errmsg); - * } - * - * void main(int ac, char *av[]) - * { - * F - * // G[R[obN̓o^ - * criErr_SetCallback(user_error_callback_func); - * F - * } - * \endcode - */ -/*EN - * \brief Register error callback function - * \ingroup CRI_ERROR - * \param[in] cbf error callback function - * \return NONE - * \par Explanation: - * This function registers an error callback function.
- * The registered function is called if an error occurs within the CRI middleware library. - * \par Example: - * \code - * void user_error_callback_func(const CriChar8 *errid, CriUint32 p1, CriUint32 p2, CriUint32 *parray); - * { - * const CriChar8 *errmsg; - * errmsg = criErr_ConvertIdToMessage(errid, p1, p2); - * printf("%s\n", errmsg); - * } - * - * void main(int ac, char *av[]) - * { - * : - * // Registers the error callback function - * criErr_SetCallback(user_error_callback_func); - * : - * } - * \endcode - */ -void CRIAPI criErr_SetCallback(CriErrCbFunc cbf); - -/*JP - * \brief G[ʒmx̕ύX - * \ingroup CRI_ERROR - * \param[in] level G[ʒmx - * \return Ȃ - * \par : - * G[R[obNɒʒmG[̃xύX܂B - */ -/*EN - * \brief Change error notification level - * \ingroup CRI_ERROR - * \param[in] level error notification level - * \return NONE - * \par Explanation: - * This function changes the level of error information that is notified to the error callback. - */ -void CRIAPI criErr_SetErrorNotificationLevel(CriErrorNotificationLevel level); - -/*JP - * \brief G[񐔂̎擾 - * \ingroup CRI_ERROR - * \param[in] level G[x - * \return G[ - * \par : - * G[񐔂擾܂B - */ -/*EN - * \brief Retrieve error count - * \ingroup CRI_ERROR - * \param[in] level error level - * \return number of errors occured - * \par Explanation: - * This function retrieves the number of errors occured. - */ -CriUint32 CRIAPI criErr_GetErrorCount(CriErrorLevel level); - -/*JP - * \brief G[񐔂̃Zbg - * \ingroup CRI_ERROR - * \param[in] level G[x - * \return Ȃ - * \par : - * G[񐔂̃JE^0ɖ߂܂B - */ -/*EN - * \brief Resets error count - * \ingroup CRI_ERROR - * \param[in] level error level - * \return NONE - * \par Explanation: - * This function resets the counter for number of errors occured. - */ -void CRIAPI criErr_ResetErrorCount(CriErrorLevel level); - -/* G[R[obN𔭐 (֐) */ -/* Error notification (Internal functions) */ -void CRIAPI criErr_Notify(CriErrorLevel level, const CriChar8 *errid); -void CRIAPI criErr_Notify1(CriErrorLevel level, const CriChar8 *errid, CriUintPtr p1); -void CRIAPI criErr_Notify2(CriErrorLevel level, const CriChar8 *errid, CriUintPtr p1, CriUintPtr p2); -void CRIAPI criErr_NotifyPrmArray(CriErrorLevel level, const CriChar8 *errid, CriUintPtr p1, CriUintPtr p2, CriUintPtr *pa); -void CRIAPI criErr_NotifyGeneric(CriErrorLevel level, const CriChar8 *error_id, CriError error_no); -void CRIAPI criErr_NotifyErrorSimple(void); -void CRIAPI criErr_NotifyWarningSimple(void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -/*************************************************************************** - * o[WƂ̌݊p - * For compatibility with old versions - ***************************************************************************/ -#define criErr_Invoke(errid) criErr_Notify(CRIERR_LEVEL_ERROR, errid) -#define criErr_Invoke1(errid, p1) criErr_Notify1(CRIERR_LEVEL_ERROR, errid, p1) -#define criErr_Invoke2(errid, p1, p2) criErr_Notify2(CRIERR_LEVEL_ERROR, errid, p1, p2) -#define criErr_InvokePrmArray(errid, p1, p2, pa) criErr_NotifyPrmArray(CRIERR_LEVEL_ERROR, errid, p1, p2, pa) -#define criErr_InvokeGeneric(error_id, error_no) criErr_NotifyGeneric(CRIERR_LEVEL_ERROR, error_id, error_no) -#define criErr_Occur(id, msg) criErr_Notify(CRIERR_LEVEL_ERROR, id ":" msg) -#define criErr_Occur1(id, msg, p1) criErr_Notify1(CRIERR_LEVEL_ERROR, (id ":" msg), (CriUintPtr)(p1)) -#define criErr_Occur2(id, msg, p1, p2) criErr_Notify2(CRIERR_LEVEL_ERROR, (id ":" msg), (CriUintPtr)(p1), (CriUintPtr)(p2)) -#define criErr_OccurPrmArray(id, msg, p1, p2, pa) criErr_NotifyPrmArray(CRIERR_LEVEL_ERROR, (id ":" msg), (CriUintPtr)(p1), (CriUintPtr)(p2), (CriUintPtr*)(pa)) -#define criErr_OccurGeneric(_error_id, _error_no) criErr_NotifyGeneric(CRIERR_LEVEL_ERROR, _error_id, _error_no) - -/*EN - * @} - */ -/*JP - * @} - */ - -#endif // _CRI_ERROR_H_INCLUDED - -/* --- end of file --- */ diff --git a/3rdParty/cri/orbis/include/cri_sj.h b/3rdParty/cri/orbis/include/cri_sj.h deleted file mode 100644 index 9b7047b4..00000000 --- a/3rdParty/cri/orbis/include/cri_sj.h +++ /dev/null @@ -1,189 +0,0 @@ -/**************************************************************************** - * - * CRI Middleware SDK - * - * Copyright (c) 2006-2010 CRI Middleware Co., Ltd. - * - ****************************************************************************/ - -#ifndef _CRI_SJ_H_INCLUDED -#define _CRI_SJ_H_INCLUDED -/**************************************************************************** - * * - * CRI Stream Joint "CriSj" Library * - * * - * 2005-06-21 written by M.Oshimi * - * * - ****************************************************************************/ - -/**************************************************************************** - * Include file * - ****************************************************************************/ -#include "cri_xpt.h" -#include "cri_heap.h" - -/**************************************************************************** - * MACRO CONSTANT * - ****************************************************************************/ - -/* Version number of CriSj */ -#define CRISJ_NAME_STRINGS "CRI Stream Joint" -#define CRISJ_VERSION_STRINGS "1.01.00" - -#define CRISJUNI_MAX_LINE (4) -#define CRICHUNK_MAX_SIZE (0xffffffff) - -/*********************************************************************** - * Process MACRO - ***********************************************************************/ - -/**************************************************************************** - * Data type declaration * - ****************************************************************************/ - -/* Xg[C */ -typedef enum { - CRISJ_LINE_FREE = (0), - CRISJ_LINE_DATA = (1), - CRISJ_LINE_HOLD = (2), - CRISJ_LINE_EXTRA = (3), - /* enum be 4bytes */ - CRISJ_LINE_ENUM_BE_SINT32 = 0x7FFFFFFF -} CriSjLine; - -/* `N */ -#ifndef TYPEDEF_CRICHUNK -#define TYPEDEF_CRICHUNK -typedef struct { - CriUint8 *data; /* f[^ */ - CriUint32 size; /* oCg */ -} CriChunk; -#endif - -/* CriSjnh */ -/* CriSj handle */ -typedef struct { - struct _crisj_function_table *vtbl; - const CriChar8 *name; -} CriSjObj, *CriSj; - -typedef struct _crisj_function_table { - /* nh̏ */ - void (*Destroy)(CriSj sj); - /* Zbg */ - void (*Reset)(CriSj sj); - /* `N̎擾 (FIFO̐擪擾) */ - void (*GetChunk)(CriSj sj, CriSjLine id, CriUint32 nbyte, CriChunk *ck); - /* `N߂@(FIFO̐擪ɑ}) */ - void (*UngetChunk)(CriSj sj, CriSjLine id, CriChunk *ck); - /* `N} (FIFO̍Ōɑ}) */ - void (*PutChunk)(CriSj sj, CriSjLine id, CriChunk *ck); - /* C擾ł鑍oCg̎擾 */ - CriUint32 (*GetTotalSize)(CriSj sj, CriSjLine id); -} CriSjVirtualFunctionTable; - -typedef enum { - CRISJ_UNIMODE_SEPARATE = (0), - CRISJ_UNIMODE_JOIN = (1), - /* enum be 4bytes */ - CRISJ_UNIMODE_ENUM_BE_SINT32 = 0x7FFFFFFF -} CriSjUniversalMode; - - -typedef struct CriSjRbfConfig { - CriBool use_cs; - CriUint32 buffer_size; - CriUint32 extra_size; - CriUint32 alignment; - const CriChar8 *buffer_name; -} CriSjRbfConfig; - -typedef struct CriSjMemConfig { - CriBool use_cs; - CriUint8 *data; - CriUint32 data_size; -} CriSjMemConfig; - -typedef struct CriSjUniConfig { - CriBool use_cs; - CriSjUniversalMode mode; - CriUint32 num_chunks; -} CriSjUniConfig; - -/**************************************************************************** - * Function Declaration * - ****************************************************************************/ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* Oobt@^SJ̍쐬 */ -CriSint32 CRIAPI criSjRbf_CalculateWorkSize(const CriSjRbfConfig* config); -CriSj CRIAPI criSjRbf_Create(const CriSjRbfConfig *config, void *work, CriSint32 work_size); -CriSj CRIAPI criSjRbf_CreateByHeap(const CriSjRbfConfig *config, CriHeap heap, CriHeapType heap_type); - -/* 풓^SJ̍쐬 */ -CriSint32 CRIAPI criSjMem_CalculateWorkSize(const CriSjMemConfig* config); -CriSj CRIAPI criSjMem_Create(const CriSjMemConfig *config, void *work, CriSint32 work_size); -CriSj CRIAPI criSjMem_CreateByHeap(const CriSjMemConfig *config, CriHeap heap, CriHeapType heap_type); - -/* jo[TSJ̍쐬 */ -CriSint32 CRIAPI criSjUni_CalculateWorkSize(const CriSjUniConfig* config); -CriSj CRIAPI criSjUni_Create(const CriSjUniConfig *config, void *work, CriSint32 work_size); -CriSj CRIAPI criSjUni_CreateByHeap(const CriSjUniConfig *config, CriHeap heap, CriHeapType heap_type); -/* `FCv[̎擾 */ -CriSint32 CRIAPI criSjUni_GetNumChainPool(CriSj sj); - -void CRIAPI criSj_Destroy(CriSj sj); -void CRIAPI criSj_Reset(CriSj sj); -void CRIAPI criSj_GetChunk(CriSj sj, CriSjLine line, CriUint32 nbyte, CriChunk *ck); -void CRIAPI criSj_UngetChunk(CriSj sj, CriSjLine line, CriChunk *ck); -void CRIAPI criSj_PutChunk(CriSj sj, CriSjLine line, CriChunk *ck); -CriUint32 CRIAPI criSj_GetTotalSize(CriSj sj, CriSjLine line); -void CRIAPI criSj_SplitChunk(CriChunk *ck, CriUint32 nbyte, CriChunk *ck1, CriChunk *ck2); - -/*** -* New APIs -***/ - -CriUint32 CRIAPI criSj_GetInputFreeSize(CriSj sj); -void CRIAPI criSj_GetInputChunk(CriSj sj, CriChunk *ck); -void CRIAPI criSj_PutInputChunk(CriSj sj, CriChunk *ck, CriUint32 input_size); -CriUint32 CRIAPI criSj_GetOutputDataSize(CriSj sj); -void CRIAPI criSj_GetOutputChunk(CriSj sj, CriChunk *ck); -void CRIAPI criSj_PutOutputChunk(CriSj sj, CriChunk *ck, CriUint32 output_size); - -CriUint32 CRIAPI criSj_PutOutputChunk2(CriSj sj, CriChunk *ck1, CriChunk *ck2, CriUint32 output_size); - - -/*** -* Old Interface (for compatibility) -***/ -typedef struct _CriSjConfig { - CriBool use_cs; - CriHeapType heap_type; -} CriSjConfig; - -CriSj CRIAPI criSj_CreateRingBuffer(CriHeap heap, CriUint32 bsize, CriUint32 xsize, CriUint32 align); -CriSj CRIAPI criSj_CreateNamedRingBuffer(CriHeap heap, CriUint32 bsize, CriUint32 xsize, CriUint32 align, const CriChar8 *bname); -CriSj CRIAPI criSj_CreateRingBufferWithConfig(CriHeap heap, CriUint32 bsize, CriUint32 xsize, CriUint32 align, const CriSjConfig *config); -CriSj CRIAPI criSj_CreateNamedRingBufferWithConfig(CriHeap heap, CriUint32 bsize, CriUint32 xsize, CriUint32 align, const CriChar8 *bname, const CriSjConfig *config); -CriSint32 CRIAPI criSjRbf_GetRequiredMemorySizeWithConfig(CriUint32 bsize, CriUint32 xsize, CriUint32 align, const CriSjConfig *config); - -CriSj CRIAPI criSj_CreateMemory(CriHeap heap, CriUint8 *data, CriUint32 dtsize, CriUint32 align); -CriSj CRIAPI criSj_CreateMemoryWithConfig(CriHeap heap, CriUint8 *data, CriUint32 dtsize, CriUint32 align, const CriSjConfig *config); -CriSint32 CRIAPI criSjMem_GetRequiredMemorySizeWithConfig(CriUint32 align, const CriSjConfig *config); - -CriSj CRIAPI criSj_CreateUniversal(CriHeap heap, CriSjUniversalMode mode, CriUint32 nchunk); -CriSj CRIAPI criSj_CreateUniversalWithConfig(CriHeap heap, CriSjUniversalMode mode, CriUint32 nchunk, const CriSjConfig *config); -CriSint32 CRIAPI criSjUni_GetRequiredMemorySizeWithConfig(CriSjUniversalMode mode, CriUint32 nchunk, const CriSjConfig *config); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#endif - -/* end of file */ diff --git a/3rdParty/cri/orbis/include/cri_xpt.h b/3rdParty/cri/orbis/include/cri_xpt.h deleted file mode 100644 index 8f3d09a0..00000000 --- a/3rdParty/cri/orbis/include/cri_xpt.h +++ /dev/null @@ -1,27 +0,0 @@ -/**************************************************************************** - * - * CRI Middleware SDK - * - * Copyright (c) 2012 CRI Middleware Co., Ltd. - * - * Library : CRI Middleware Library - * Module : CRI Common Header for PS4 - * File : cri_xpt.h - * Date : 2012-10-04 - * Version : 1.00 - * - ****************************************************************************/ -#ifndef CRI_INCL_CRI_XPT_H -#define CRI_INCL_CRI_XPT_H - -#define XPT_TGT_PS4 -#define XPT_CCS_LEND -#define XPT_DISABLE_FSV1API -#define CRI_TARGET_STR "PS4" - - -#include "cri_xpts_orbis.h" -#include "cri_xpt_post.h" - -#endif /* CRI_INCL_CRI_XPT_H */ -/* End Of File */ diff --git a/3rdParty/cri/orbis/include/cri_xpts_orbis.h b/3rdParty/cri/orbis/include/cri_xpts_orbis.h deleted file mode 100644 index 71aee5fd..00000000 --- a/3rdParty/cri/orbis/include/cri_xpts_orbis.h +++ /dev/null @@ -1,133 +0,0 @@ -/**************************************************************************** - * - * CRI Middleware SDK - * - * Copyright (c) 1998-2012 CRI Middleware Co., Ltd. - * - * Library : CRI Middleware Library - * Module : CRI Common Header for PS4 - * File : cri_xpts_ps4.h - * Date : 2012-10-04 - * Version : 2.01 - * - ****************************************************************************/ - -#if !defined(CRI_INCL_CRI_XPTS_PS4_H) -#define CRI_INCL_CRI_XPTS_PS4_H - -/***************************************************************************** - * {f[^^錾 - *****************************************************************************/ - -#if !defined(_TYPEDEF_CriUint8) -#define _TYPEDEF_CriUint8 -typedef unsigned char CriUint8; /* ȂPoCg */ -#endif - -#if !defined(_TYPEDEF_CriSint8) -#define _TYPEDEF_CriSint8 -typedef signed char CriSint8; /* ‚PoCg */ -#endif - -#if !defined(_TYPEDEF_CriUint16) -#define _TYPEDEF_CriUint16 -typedef unsigned short CriUint16; /* ȂQoCg */ -#endif - -#if !defined(_TYPEDEF_CriSint16) -#define _TYPEDEF_CriSint16 -typedef signed short CriSint16; /* ‚QoCg */ -#endif - -#if !defined(_TYPEDEF_CriUint32) -#define _TYPEDEF_CriUint32 -typedef unsigned int CriUint32; /* ȂSoCg */ -#endif - -#if !defined(_TYPEDEF_CriSint32) -#define _TYPEDEF_CriSint32 -typedef signed int CriSint32; /* ‚SoCg */ -#endif - -#if !defined(_TYPEDEF_CriUint64) -#define _TYPEDEF_CriUint64 -typedef unsigned long CriUint64; /* ȂWoCg */ -#endif - -#if !defined(_TYPEDEF_CriSint64) -#define _TYPEDEF_CriSint64 -typedef signed long CriSint64; /* ‚WoCg */ -#endif - -#if !defined(_TYPEDEF_CriUint128) -#define _TYPEDEF_CriUint128 -//typedef unsigned __int128 CriUint128; /* Ȃ16oCg */ -typedef struct { /* Ȃ16oCg */ - CriUint64 h; /* 64rbg */ - CriUint64 l; /* 64rbg */ -} CriUint128; -#endif - -#if !defined(_TYPEDEF_CriSint128) -#define _TYPEDEF_CriSint128 -//typedef signed __int128 CriSint128; /* ‚16oCg */ -typedef struct { /* ‚16oCg */ - CriSint64 h; /* 64rbg */ - CriUint64 l; /* 64rbg */ -} CriSint128; -#endif - -#if !defined(_TYPEDEF_CriFloat16) -#define _TYPEDEF_CriFloat16 -typedef signed short CriFloat16; /* QoCg */ -#endif - -#if !defined(_TYPEDEF_CriFloat32) -#define _TYPEDEF_CriFloat32 -typedef float CriFloat32; /* SoCg */ -#endif - -#if !defined(_TYPEDEF_CriFloat64) -#define _TYPEDEF_CriFloat64 -typedef double CriFloat64; /* WoCg */ -#endif - -#if !defined(_TYPEDEF_CriFixed32) -#define _TYPEDEF_CriFixed32 -typedef signed int CriFixed32; /* Œ菬_32rbg */ -#endif - -#if !defined(_TYPEDEF_CriBool) -#define _TYPEDEF_CriBool -typedef CriSint32 CriBool; /* _^i_萔lɂƂj */ -#endif - -#if !defined(_TYPEDEF_CriChar8) -#define _TYPEDEF_CriChar8 -typedef char CriChar8; /* ^ */ -#endif - -/***************************************************************************** - * |C^i[”\Ȑ^ - *****************************************************************************/ -#if !defined(_TYPEDEF_CriSintPtr) -#define _TYPEDEF_CriSintPtr -typedef signed long CriSintPtr; // 8 bytes pointer -#endif - -#if !defined(_TYPEDEF_CriUintPtr) -#define _TYPEDEF_CriUintPtr -typedef unsigned long CriUintPtr; // 8 bytes pointer -#endif - -/***************************************************************************** - * ĂяoK - *****************************************************************************/ - -#if !defined(CRIAPI) -#define CRIAPI -#endif - -#endif /* CRI_INCL_CRI_XPTS_PS4_H */ - -/* end of file */ diff --git a/3rdParty/cri/pc/include/cri_allocator.h b/3rdParty/cri/pc/include/cri_allocator.h deleted file mode 100644 index e3c18997..00000000 --- a/3rdParty/cri/pc/include/cri_allocator.h +++ /dev/null @@ -1,63 +0,0 @@ -#ifndef _CRI_ALLOCATOR_H_INCLUDED -#define _CRI_ALLOCATOR_H_INCLUDED -/**************************************************************************** - * * - * CRI Allocator * - * * - * 2006-01-05 written by M.Oshimi * - * * - ****************************************************************************/ - -/**************************************************************************** - * Include file - ****************************************************************************/ -#include -#include "cri_xpt.h" -#include "cri_heap.h" - -/**************************************************************************** - * Macro Constants - ****************************************************************************/ -#if defined(XPT_UNSUPPORT_CPLUSPLUS_THROW) -#define CRI_ALLOCATOR_CPLUSPLUS_THROW -#else -#define CRI_ALLOCATOR_CPLUSPLUS_THROW throw() -#endif - -/**************************************************************************** - * Class Declaration - ****************************************************************************/ -#ifdef __cplusplus - -class CriAllocator -{ -public: - static const CriSint32 DEFAULT_ALIGNMENT = CRIHEAP_DEFAULT_MEM_ALIGN; - - - static void* CRIAPI operator new(size_t size, CriHeap heap) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void* CRIAPI operator new(size_t size, CriHeap heap, CriHeapType heap_type) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void* CRIAPI operator new(size_t size, CriHeap heap, const CriChar8 *name, CriUint32 align=DEFAULT_ALIGNMENT) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void* CRIAPI operator new(size_t size, CriHeap heap, CriHeapType heap_type, const CriChar8 *name, CriUint32 align=DEFAULT_ALIGNMENT) CRI_ALLOCATOR_CPLUSPLUS_THROW; - - static void CRIAPI operator delete(void *p, size_t size); - - static void* CRIAPI operator new(size_t size, void *work, CriSint32 wksize) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void CRIAPI operator delete(void *p, void *work, CriSint32 wksize) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void* CRIAPI operator new(size_t size, void *work, CriSint32 wksize, CriUint32 align) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void CRIAPI operator delete(void *p, void *work, CriSint32 wksize, CriUint32 align) CRI_ALLOCATOR_CPLUSPLUS_THROW; - -#if !defined(XPT_TGT_BCB) - static void CRIAPI operator delete(void *p, CriHeap heap) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void CRIAPI operator delete(void *p, CriHeap heap, CriHeapType heap_type) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void CRIAPI operator delete(void *p, CriHeap heap, const CriChar8 *name, CriUint32 align) CRI_ALLOCATOR_CPLUSPLUS_THROW; - static void CRIAPI operator delete(void *p, CriHeap heap, CriHeapType heap_type, const CriChar8 *name, CriUint32 align) CRI_ALLOCATOR_CPLUSPLUS_THROW; -#endif - - static CriSint32 GetWorstExtraSize(CriUint32 align); -}; -#endif // _CRI_ALLOCATOR_H_INCLUDED - -#endif /* end of __cplusplus */ - -/* --- end of file --- */ diff --git a/3rdParty/cri/pc/include/cri_error.h b/3rdParty/cri/pc/include/cri_error.h deleted file mode 100644 index ea913979..00000000 --- a/3rdParty/cri/pc/include/cri_error.h +++ /dev/null @@ -1,368 +0,0 @@ -#ifndef _CRI_ERROR_H_INCLUDED -#define _CRI_ERROR_H_INCLUDED -/**************************************************************************** - * - * CRI Middleware SDK - * - * Copyright (c) 2006-2009 CRI Middleware Co., Ltd. - * - * Library : CRI Error - * Module : - * File : cri_error.h - * - ****************************************************************************/ -/*! - * \file cri_error.h - */ -/*JP - * \addtogroup CRI_ERROR エラーハンドリング用関数群 - * @{ - */ -/*EN - * \addtogroup CRI_ERROR Functions for error handling - * @{ - */ - -/**************************************************************************** - * Include file * - ****************************************************************************/ -#include "cri_xpt.h" - -/**************************************************************************** - * MACRO CONSTANT * - ****************************************************************************/ - -/* バージョン番号 */ -/* Version number */ -#define CRIERROR_VER_NAME "CRI Error" -#define CRIERROR_VER_NUM "1.04.00" -#define CRIERROR_VER_OPTION - -/*JP - * \brief エラーコード - */ -/*EN - * \brief Error codes - */ -typedef enum { - CRIERR_OK = 0, /*JP< 正常終了 */ - /*EN< Succeeded */ - CRIERR_NG = -1, /*JP< エラーが発生 */ - /*EN< Error occurred */ - CRIERR_INVALID_PARAMETER = -2, /*JP< 引数が不正 */ - /*EN< Invalid argument */ - CRIERR_FAILED_TO_ALLOCATE_MEMORY = -3, /*JP< メモリの確保に失敗 */ - /*EN< Failed to allocate memory */ - CRIERR_UNSAFE_FUNCTION_CALL = -4, /*JP< 非スレッドセーフ関数の並列実行 */ - /*EN< Parallel execution of thread-unsafe function */ - CRIERR_FUNCTION_NOT_IMPLEMENTED = -5, /*JP< 未実装関数の実行 */ - /*EN< Function not implemented */ - CRIERR_LIBRARY_NOT_INITIALIZED = -6, /*JP< ライブラリが未初期化 */ - /*EN< Library not initialized */ - /* enum be 4bytes */ - CRIERR_ENUM_BE_SINT32 = 0x7FFFFFFF -} CriError; - -/*JP - * \brief エラー通知レベル - */ -/*EN - * \brief Error notification level - */ -typedef enum { - CRIERR_NOTIFY_ALL = 0, /*JP< 全てのエラーを通知 */ - /*EN< Notify all errors */ - CRIERR_NOTIFY_FATAL = 1, /*JP< エラーのみ通知(警告は無視) */ - /*EN< Notify error (Disregards warning) */ - /* enum be 4bytes */ - CRIERR_NOTIFY_ENUM_BE_SINT32 = 0x7FFFFFFF -} CriErrorNotificationLevel; - -/* エラーレベル */ -/* Error level */ -typedef enum { - CRIERR_LEVEL_ERROR = 0, - CRIERR_LEVEL_WARNING = 1, - /* enum be 4bytes */ - CRIERR_LEVEL_ENUM_BE_SINT32 = 0x7FFFFFFF -} CriErrorLevel; - -/**************************************************************************** - * PROCESS MACRO * - ****************************************************************************/ - -#if defined(CRIERROR_SIMPLIFY) - /* エラーの通知 */ - /* Notification of Error */ - #define criErr_NotifyError(id, msg) criErr_NotifyErrorSimple() - #define criErr_NotifyError1(id, msg, p1) criErr_NotifyErrorSimple() - #define criErr_NotifyError2(id, msg, p1, p2) criErr_NotifyErrorSimple() - #define criErr_NotifyErrorPrmArray(id, msg, p1, p2, pa) criErr_NotifyErrorSimple() - #define criErr_NotifyErrorGeneric(_error_id, _error_no) criErr_NotifyErrorSimple() - /* 警告の通知 */ - /* Notification of Warning */ - #define criErr_NotifyWarning(id, msg) criErr_NotifyWarningSimple() - #define criErr_NotifyWarning1(id, msg, p1) criErr_NotifyWarningSimple() - #define criErr_NotifyWarning2(id, msg, p1, p2) criErr_NotifyWarningSimple() - #define criErr_NotifyWarningPrmArray(id, msg, p1, p2, pa) criErr_NotifyWarningSimple() - #define criErr_NotifyWarningGeneric(_error_id, _error_no) criErr_NotifyWarningSimple() -#else - /* エラーの通知 */ - /* Notification of Error */ - #define criErr_NotifyError(id, msg) criErr_Notify(CRIERR_LEVEL_ERROR, id ":" msg) - #define criErr_NotifyError1(id, msg, p1) criErr_Notify1(CRIERR_LEVEL_ERROR, (id ":" msg), (CriUintPtr)(p1)) - #define criErr_NotifyError2(id, msg, p1, p2) criErr_Notify2(CRIERR_LEVEL_ERROR, (id ":" msg), (CriUintPtr)(p1), (CriUintPtr)(p2)) - #define criErr_NotifyErrorPrmArray(id, msg, p1, p2, pa) criErr_NotifyPrmArray(CRIERR_LEVEL_ERROR, (id ":" msg), (CriUintPtr)(p1), (CriUintPtr)(p2), (CriUintPtr *)(pa)) - #define criErr_NotifyErrorGeneric(_error_id, _error_no) criErr_NotifyGeneric(CRIERR_LEVEL_ERROR, _error_id, _error_no) - /* 警告の通知 */ - /* Notification of Warning */ - #define criErr_NotifyWarning(id, msg) criErr_Notify(CRIERR_LEVEL_WARNING, id ":" msg) - #define criErr_NotifyWarning1(id, msg, p1) criErr_Notify1(CRIERR_LEVEL_WARNING, (id ":" msg), (CriUintPtr)(p1)) - #define criErr_NotifyWarning2(id, msg, p1, p2) criErr_Notify2(CRIERR_LEVEL_WARNING, (id ":" msg), (CriUintPtr)(p1), (CriUintPtr)(p2)) - #define criErr_NotifyWarningPrmArray(id, msg, p1, p2, pa) criErr_NotifyPrmArray(CRIERR_LEVEL_WARNING, (id ":" msg), (CriUintPtr)(p1), (CriUintPtr)(p2), (CriUintPtr *)(pa)) - #define criErr_NotifyWarningGeneric(_error_id, _error_no) criErr_NotifyGeneric(CRIERR_LEVEL_WARNING, _error_id, _error_no) -#endif - -/**************************************************************************** - * Data type declaration * - ****************************************************************************/ - -/* Error Callback Function type */ -typedef void (CRIAPI *CriErrCbFunc)(const CriChar8 *errid, CriUint32 p1, CriUint32 p2, CriUint32 *parray); - -/**************************************************************************** - * 変数の宣言 * - * Variable Declaration * - ****************************************************************************/ -/* エラー出力省略用変数 */ -/* default argument of CriError */ -#ifdef __cplusplus -namespace criErr { - extern CriError ErrorContainer; -} -#endif /* __cplusplus */ - -/**************************************************************************** - * 関数の宣言 * - * Function Declaration * - ****************************************************************************/ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/*JP - * \brief エラーID文字列からエラーメッセージへ変換 - * \ingroup CRI_ERROR - * \param[in] errid エラーID文字列 - * \return エラーメッセージ - * \par 説明: - * エラーID文字列から詳細なエラーメッセージへ変換します。
- * \attention - * この関数は旧仕様の関数です。
- * 代わりに ::criErr_ConvertIdToMessage 関数を使用してください。 - * \sa criErr_ConvertIdToMessage - */ -/*EN - * \brief Convert error ID to error message - * \ingroup CRI_ERROR - * \param[in] errid error ID - * \return error message - * \par Explanation: - * This function converts error ID to detailed error message.
- * \attention - * This function is an obsolete one.
- * Please use the ::criErr_ConvertIdToMessage function instead. - * \sa criErr_ConvertIdToMessage - */ -const CriChar8* CRIAPI criErr_ConvertIdToMsg(const CriChar8 *errid); - -/*JP - * \brief エラーID文字列からエラーメッセージへ変換 - * \ingroup CRI_ERROR - * \param[in] errid エラーID文字列 - * \param[in] p1 補足情報1 - * \param[in] p2 補足情報2 - * \return エラーメッセージ - * \par 説明: - * エラーID文字列から詳細なエラーメッセージへ変換します。
- * \par 用例: - * \code - * void user_error_callback_func(const CriChar8 *errid, CriUint32 p1, CriUint32 p2, CriUint32 *parray); - * { - * const CriChar8 *errmsg; - * errmsg = criErr_ConvertIdToMessage(errid, p1, p2); - * printf("%s\n", errmsg); - * } - * \endcode - */ -/*EN - * \brief Convert error ID to error message - * \ingroup CRI_ERROR - * \param[in] errid error ID - * \param[in] p1 supplementary information 1 - * \param[in] p2 supplementary information 2 - * \return error message - * \par Explanation: - * This function converts error ID to detailed error message.
- * \par Example: - * \code - * void user_error_callback_func(const CriChar8 *errid, CriUint32 p1, CriUint32 p2, CriUint32 *parray); - * { - * const CriChar8 *errmsg; - * errmsg = criErr_ConvertIdToMessage(errid, p1, p2); - * printf("%s\n", errmsg); - * } - * \endcode - */ -const CriChar8* CRIAPI criErr_ConvertIdToMessage(const CriChar8 *errid, CriUint32 p1, CriUint32 p2); - -/*JP - * \brief エラーコールバック関数の登録 - * \ingroup CRI_ERROR - * \param[in] cbf エラーコールバック関数 - * \return なし - * \par 説明: - * エラーコールバック関数を登録します。
- * 登録された関数は、CRIミドルウエアライブラリ内でエラーが発生したときに呼び出されます。
- * 同時に登録できるエラーコールバック関数は1つです。
- * 登録後に再度本関数を呼び出した場合は現在の登録を上書きします。 - * \par 用例: - * \code - * void user_error_callback_func(const CriChar8 *errid, CriUint32 p1, CriUint32 p2, CriUint32 *parray); - * { - * const CriChar8 *errmsg; - * errmsg = criErr_ConvertIdToMessage(errid, p1, p2); - * printf("%s\n", errmsg); - * } - * - * void main(int ac, char *av[]) - * { - * : - * // エラーコールバックの登録 - * criErr_SetCallback(user_error_callback_func); - * : - * } - * \endcode - */ -/*EN - * \brief Register error callback function - * \ingroup CRI_ERROR - * \param[in] cbf error callback function - * \return NONE - * \par Explanation: - * This function registers an error callback function.
- * The registered function is called if an error occurs within the CRI middleware library. - * \par Example: - * \code - * void user_error_callback_func(const CriChar8 *errid, CriUint32 p1, CriUint32 p2, CriUint32 *parray); - * { - * const CriChar8 *errmsg; - * errmsg = criErr_ConvertIdToMessage(errid, p1, p2); - * printf("%s\n", errmsg); - * } - * - * void main(int ac, char *av[]) - * { - * : - * // Registers the error callback function - * criErr_SetCallback(user_error_callback_func); - * : - * } - * \endcode - */ -void CRIAPI criErr_SetCallback(CriErrCbFunc cbf); - -/*JP - * \brief エラー通知レベルの変更 - * \ingroup CRI_ERROR - * \param[in] level エラー通知レベル - * \return なし - * \par 説明: - * エラーコールバックに通知するエラーのレベルを変更します。 - */ -/*EN - * \brief Change error notification level - * \ingroup CRI_ERROR - * \param[in] level error notification level - * \return NONE - * \par Explanation: - * This function changes the level of error information that is notified to the error callback. - */ -void CRIAPI criErr_SetErrorNotificationLevel(CriErrorNotificationLevel level); - -/*JP - * \brief エラー発生回数の取得 - * \ingroup CRI_ERROR - * \param[in] level エラーレベル - * \return エラー発生回数 - * \par 説明: - * エラー発生回数を取得します。 - */ -/*EN - * \brief Retrieve error count - * \ingroup CRI_ERROR - * \param[in] level error level - * \return number of errors occured - * \par Explanation: - * This function retrieves the number of errors occured. - */ -CriUint32 CRIAPI criErr_GetErrorCount(CriErrorLevel level); - -/*JP - * \brief エラー発生回数のリセット - * \ingroup CRI_ERROR - * \param[in] level エラーレベル - * \return なし - * \par 説明: - * エラー発生回数のカウンタを0に戻します。 - */ -/*EN - * \brief Resets error count - * \ingroup CRI_ERROR - * \param[in] level error level - * \return NONE - * \par Explanation: - * This function resets the counter for number of errors occured. - */ -void CRIAPI criErr_ResetErrorCount(CriErrorLevel level); - -/* エラーコールバックを発生させる (内部関数) */ -/* Error notification (Internal functions) */ -void CRIAPI criErr_Notify(CriErrorLevel level, const CriChar8 *errid); -void CRIAPI criErr_Notify1(CriErrorLevel level, const CriChar8 *errid, CriUintPtr p1); -void CRIAPI criErr_Notify2(CriErrorLevel level, const CriChar8 *errid, CriUintPtr p1, CriUintPtr p2); -void CRIAPI criErr_NotifyPrmArray(CriErrorLevel level, const CriChar8 *errid, CriUintPtr p1, CriUintPtr p2, CriUintPtr *pa); -void CRIAPI criErr_NotifyGeneric(CriErrorLevel level, const CriChar8 *error_id, CriError error_no); -void CRIAPI criErr_NotifyErrorSimple(void); -void CRIAPI criErr_NotifyWarningSimple(void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -/*************************************************************************** - * 旧バージョンとの互換用 - * For compatibility with old versions - ***************************************************************************/ -#define criErr_Invoke(errid) criErr_Notify(CRIERR_LEVEL_ERROR, errid) -#define criErr_Invoke1(errid, p1) criErr_Notify1(CRIERR_LEVEL_ERROR, errid, p1) -#define criErr_Invoke2(errid, p1, p2) criErr_Notify2(CRIERR_LEVEL_ERROR, errid, p1, p2) -#define criErr_InvokePrmArray(errid, p1, p2, pa) criErr_NotifyPrmArray(CRIERR_LEVEL_ERROR, errid, p1, p2, pa) -#define criErr_InvokeGeneric(error_id, error_no) criErr_NotifyGeneric(CRIERR_LEVEL_ERROR, error_id, error_no) -#define criErr_Occur(id, msg) criErr_Notify(CRIERR_LEVEL_ERROR, id ":" msg) -#define criErr_Occur1(id, msg, p1) criErr_Notify1(CRIERR_LEVEL_ERROR, (id ":" msg), (CriUintPtr)(p1)) -#define criErr_Occur2(id, msg, p1, p2) criErr_Notify2(CRIERR_LEVEL_ERROR, (id ":" msg), (CriUintPtr)(p1), (CriUintPtr)(p2)) -#define criErr_OccurPrmArray(id, msg, p1, p2, pa) criErr_NotifyPrmArray(CRIERR_LEVEL_ERROR, (id ":" msg), (CriUintPtr)(p1), (CriUintPtr)(p2), (CriUintPtr*)(pa)) -#define criErr_OccurGeneric(_error_id, _error_no) criErr_NotifyGeneric(CRIERR_LEVEL_ERROR, _error_id, _error_no) - -/*EN - * @} - */ -/*JP - * @} - */ - -#endif // _CRI_ERROR_H_INCLUDED - -/* --- end of file --- */ diff --git a/3rdParty/cri/pc/include/cri_heap.h b/3rdParty/cri/pc/include/cri_heap.h deleted file mode 100644 index 18ec11c2..00000000 --- a/3rdParty/cri/pc/include/cri_heap.h +++ /dev/null @@ -1,640 +0,0 @@ -#ifndef _CRI_HEAP_H_INCLUDED -#define _CRI_HEAP_H_INCLUDED -/**************************************************************************** - * * - * CRI Heap Manager "CriHeap" Library * - * * - * 2005-03-17 written by satouo * - * * - ****************************************************************************/ -/*! - * \file cri_heap.h - */ - -/**************************************************************************** - * インクルードファイル * - * Include file * - ****************************************************************************/ -#include "cri_xpt.h" - -#ifdef XPT_TGT_PC -#pragma pack(push) -#pragma pack(1) //The boundary value of structure is adjusted to 1 byte. -#endif - -/**************************************************************************** - * 定数マクロ * - * MACRO CONSTANT * - ****************************************************************************/ -/* Version number of CRIHEAP */ -#define CRIHEAP_NAME_STRINGS "CRI Heap" -#define CRIHEAP_VERSION_STRINGS "1.21.02" - -/* Default memory alignment */ -#define CRIHEAP_DEFAULT_MEM_ALIGN (8) - -/**************************************************************************** - * 列挙定数マクロ * - * ENUM CONSTANT * - ****************************************************************************/ -/*JP - * \brief メモリのタイプ - */ -/*EN - * \brief Types of heap - */ -typedef enum { - CRIHEAP_TYPE_FIX = (1), - CRIHEAP_TYPE_TEMPORARY = (2), - CRIHEAP_TYPE_DYNAMIC = (3), // unuse - CRIHEAP_TYPE_NONE = (0), - /* enum be 4bytes */ - CRIHEAP_TYPE_ENUM_BE_SINT32 = 0x7FFFFFFF -} CriHeapType; - -/**************************************************************************** - * データ型 * - * Data type declaration * - ****************************************************************************/ -/* CriHeapハンドル */ -/* CriHeap handle */ -#ifndef CRIHEAP_DEFINED -#define CRIHEAP_DEFINED - -/* internal */ -typedef struct CriHeapBlockTag { - struct CriHeapBlockTag *prevblock; - struct CriHeapBlockTag *nextblock; - CriSint32 memsize; - CriUint8 used; - CriUint8 type; - CriUint16 alignspc; - CriUint16 gap; - CriChar8 *nameadr; -} CriHeapBlock, *CriHeapBlockPtr; - -/*JP - * \brief CRI Heapハンドル - * \struct CriHeap - * \ingroup CRIHEAP_BASIC - * CRI Heapを用いてメモリアロケートを行うために必要なハンドルです。
- * このハンドルに対して、メモリアロケートやメモリフリーを行います。 - * \sa criHeap_Create(), criHeap_Destroy() - */ -/*EN - * \brief CRI Heap handle - * \struct CriHeap - * \ingroup CRIHEAP_BASIC - * \par Description: - * The heap handle. This data structure needs to exist through the life cycle of - * the heap. It allows the library to allocate and deallocate memory - * internally within the heap. Typically this handle gets allocated at the - * beginning of the heap memory that you've provided for the heap, but don't - * depend on this behavior. The heap itself is opaque. You can of course - * allocate multiple non-contiguous heaps, but these will be separate heap - * structures and a single allocation won't choose between them. - * - * \sa criHeap_Create(), criHeap_Destroy() - */ -typedef struct _criheap_struct { - struct _criheap_vfunctiontable *vtbl; - CriSint32 totalsize; - CriSint32 peaksize; - CriSint32 currentsize; - CriHeapBlock *topblock; - CriHeapBlock *taleblock; -} CriHeapObj, *CriHeap; - -/*JP - * \brief CRI Heap仮想関数テーブル - * \struct criHeapVirtualFunctionTable - * \ingroup CRIHEAP_BASIC - * 独自のメモリアロケート関数を実装する際に使用する仮想関数テーブル構造体です。
- * 各関数はマルチスレッドセーフである必要があります。
- * \par 備考: - * 3番目のアロケート関数は現在未使用です。 - */ -/*EN - * \brief CRI Heap Virtual Function Table - * \struct criHeapVirtualFunctionTable - * \ingroup CRIHEAP_BASIC - * \par Description: - * The virtual functions table for original allocation functions.
- * The third allocation function is not in use currently. - */ -typedef struct _criheap_vfunctiontable { - /*JP - * \brief メモリのアロケート(メモリ領域の先端から) - * \par 説明: - * criHeap_AllocFix関数呼び出し時に呼ばれます。 - * \sa criHeap_AllocFix() - */ - /*EN - * \brief Memory allocation (allocating from the top of the memory area) - * \par Description: - * Called from criHeap_AllocFix(). - * \sa criHeap_AllocFix() - */ - void *(*AllocFix)(CriHeap heap, CriSint32 size, const CriChar8 *name, CriSint32 align); - /*JP - * \brief メモリのアロケート(メモリ領域の終端から) - * \par 説明: - * criHeap_AllocFix関数呼び出し時に呼ばれます。 - * \sa criHeap_AllocTemporary() - */ - /*EN - * \brief Memory allocation (allocating from the tail of the memory area) - * \par Description: - * Called from criHeap_AllocTemporary(). - * \sa criHeap_AllocTemporary() - */ - void *(*AllocTemporary)(CriHeap heap, CriSint32 size, const CriChar8 *name, CriSint32 align); - /*JP - * \brief 未使用関数 - */ - /*EN - * \brief Unused - */ - void *(*AllocDynamic)(CriHeap heap, CriSint32 size, const CriChar8 *name, CriSint32 align); // unused - - /*JP - * \brief メモリのフリー - * \par 説明: - * criHeap_Free関数呼び出し時に呼ばれます。 - * \sa criHeap_Free() - */ - /*EN - * \brief Memory deallocation - * \par Description: - * Called from criHeap_Free(). - * \sa criHeap_Free() - */ - CriSint32 (*Free)(CriHeap heap, void *ptr); -} criHeapVirtualFunctionTable; - -#endif - - -/**************************************************************************** - * 関数の宣言 - * Function Declaration - ****************************************************************************/ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/*==========================================================================* - * ライブラリの初期化と終了処理 - * Initialize and Finalize of Library - *==========================================================================*/ -/*JP - * \brief CRI Heapライブラリの初期化 - * \ingroup CRIHEAP_BASIC - * \par 説明: - * CRI Heapライブラリを使用するために必要な初期化関数です。
- * CRI Heapを使用する際はあらかじめ本関数をコールする必要があります。 - * \sa criHeap_Finalize() - */ -/*EN - * \brief Initialize the heap manager. - * \ingroup CRIHEAP_BASIC - * \par Description: - * This function initializes the heap manager and prepares it to manage heaps. - * This function only has an effect the first time it is called in your program. - * Subsequent calls only increment an internal counter. This allows your - * program to call criHeap_Initialize() in pairs with criHeap_Finalize() - * throughout your program modules, and only the initial call to criHeap_Initialize() - * and the final call to criHeap_Finalize() will have any effect. - * \if ps2 - * \par PS2 only: - * This function does a sanity check to make sure that the size of the CriHeapObj - * data structure is a factor of 16. If it is not a factor of 16, this function - * hangs. - * \endif - * \sa criHeap_Finalize() - */ -void CRIAPI criHeap_Initialize(void); - -/*JP - * \brief CRI Heapライブラリの終了 - * \ingroup CRIHEAP_BASIC - * \par 説明: - * CRI Heapライブラリを終了するために必要な終了関数です。
- * CRI Heapの使用を終了する際は本関数をコールしてください。 - * \sa criHeap_Initialize() - */ -/*EN - * \brief Finalize the heap manager. - * \ingroup CRIHEAP_BASIC - * \par Description: - * This function finalizes the heap manager. If the criHeap_Initialize() function - * is called n times, then the nth time that criHeap_Finalize() - * is called, this function invalidates any heaps currently in use. Calling - * any heap function after the nth call to criHeap_Finalize() will - * have unpredictable results. - * \sa criHeap_Initialize() - */ -void CRIAPI criHeap_Finalize(void); - -/*==========================================================================* - * ハンドルの生成・解放 - *==========================================================================*/ -/*JP - * \brief CRI Heapハンドルの生成 - * \ingroup CRIHEAP_BASIC - * \param ptr メモリ領域のポインタ。 - * \param size メモリ領域のサイズ。 - * \return CRI Heapハンドル。
生成に失敗した場合は、NULLが返ります。 - * \par 説明: - * CRI Heapハンドルを生成します。
- * 本関数で与えるメモリ領域は、CRI Heap自身のハンドル領域やアロケート時に - * 確保されるメモリ領域となります。
- * 管理領域を含むため、メモリ領域すべてがアロケート出来ない点に注意してください。 - * 管理領域の目安は「1ハンドルあたりsizeof(CriHeapObj)」+「1アロケートあたり - * sizeof(CriHeapBlock)+各メモリアライメントに必要なサイズ」となります。 - * \code - * CriChar8 heap_buffer[0x2000]; - * CriHeap heap = criHeap_Create((void *)heap_buffer, sizeof(heap_buffer); - * \endcode - * \sa criHeap_Destroy() - */ -/*EN - * \brief Create a contiguous heap in memory. - * \ingroup CRIHEAP_BASIC - * \param ptr A pointer to the start of the memory region to use as a heap. - * \param size The size of the region to be used as a heap. - * \return A valid CriHeap handle if successful, or NULL if unsuccessful. - * \par Description: - * This function allows you to set aside a region of memory for this library's - * use as a "heap". Heap allocation is required before active playback - * can begin. - * This function will fail and return NULL if the size of the memory region - * is smaller than the CriHeapObj structure. - * \code - * CriChar8 heap_buffer[0x2000]; - * CriHeap heap = criHeap_Create((void *)heap_buffer, sizeof(heap_buffer); - * \endcode - * \sa criHeap_Destroy() - */ -CriHeap CRIAPI criHeap_Create(void *ptr, CriSint32 size); - -/*JP - * \brief 非スレッドセーフなCRI Heapハンドルの生成 - * \ingroup CRIHEAP_BASIC - * \param ptr メモリ領域のポインタ。 - * \param size メモリ領域のサイズ。 - * \return CRI Heapハンドル。
生成に失敗した場合は、NULLが返ります。 - * \par 説明: - * CRI Heapハンドルを生成します。
- * 本関数を使用して作成されたヒープは、排他制御が行なわれません。
- * 複数スレッドから同時に参照されるヒープの作成には、criHeap_Create関数をご利用ください。 - * \sa criHeap_Create(), criHeap_Destroy() - */ -/*EN - * \brief Create a contiguous heap in memory. - * \ingroup CRIHEAP_BASIC - * \param ptr A pointer to the start of the memory region to use as a heap. - * \param size The size of the region to be used as a heap. - * \return A valid CriHeap handle if successful, or NULL if unsuccessful. - * \par Description: - * This function creates a heap to use the static memory as dynamically allocatable memory. - * The heap created by using this function is not threadsafe. - * If heap will be accessed by multiple threads, you must create the heap by using the criHeap_Create function. - * \sa criHeap_Create(), criHeap_Destroy() - */ -CriHeap CRIAPI criHeap_CreateNoSerialize(void *ptr, CriSint32 size); - -/*JP - * \brief CRI Heapハンドルの解放 - * \ingroup CRIHEAP_BASIC - * \param heap CRI Heapハンドル。 - * \par 説明: - * CRI Heapハンドルを解放します。
criHeap_Create() で指定されたメモリ領域が - * 解放され、CRI Heapハンドルは無効となります。 - * \sa criHeap_Create() - */ -/*EN - * \brief Destroy a previously created heap. - * \ingroup CRIHEAP_BASIC - * \param heap A CriHeap handle previously created with criHeap_Create(). - * \par Description: - * This function frees all internal allocations previously performed on - * the heap and frees the memory. Internally, this function does in - * fact walk through the heap, finding and freeing all allocations, e.g. - * it is not stubbed. So calling this function on a trashed heap - * will have unpredictable results. - * \sa criHeap_Create() - */ -void CRIAPI criHeap_Destroy(CriHeap heap); - -/*==========================================================================* - * Allocation - *==========================================================================*/ -/*JP - * \brief メモリのアロケート(メモリ領域の先端から) - * \ingroup CRIHEAP_ALLOC - * \param heap CRI Heapハンドル。 - * \param size アロケートするメモリのサイズ。 - * \param name アロケートするメモリの名前。名前はデバッグ時に使用されます。 - * \param align アロケートするメモリのアライメント。 - * \return アロケートしたメモリへのポインタ。
アロケートに失敗した場合はNULLが返ります。 - * \par 説明: - * メモリ領域の先端側から確保するメモリアロケーション関数です。ヒープ領域内に\ref block_fix "Fixブロック"を作成します。
- * メモリの断片化を防ぐため、同じサイズ/アライメントの解放済み\ref block_fix "Fixブロック"を先端側から探して、再利用するように試みます。それが見つからない場合は、未使用の空き領域(\ref block_free "Freeブロック")を分割してメモリを取得します。 - * \code - * CriChar8 heap_buffer[0x2000]; - * CriHeap heap = criHeap_Create((void *)heap_buffer, sizeof(heap_buffer); - * void *memptr = criHeap_AllocFix(heap, 0x100, "forTexture1", 64); - * \endcode - * \sa criHeap_AllocTemporary(), criHeap_Free() - */ -/*EN - * \brief Memory allocation (allocating from the top of the memory area) - * \ingroup CRIHEAP_ALLOC - * \param heap CRI Heap handle - * \param size Memory block size to be allocated - * \param name Memory block name, which is used on debugging - * \param align Memory block alignment - * \return A pointer to the allocated memory block.
Returns NULL if unsuccessful. - * \par Description: - * This function allocates a memory block from the top of the memory area and creates a \ref block_fix "Fix block" in the heap area.
- * To prevent memory fragmentation, a released \ref block_fix "Fix block" with the same size and alignment is searched for in the heap area from the top to the bottom and tries to reused the block. And if not found, an unused free block (\ref block_free "Free block") is divided and a new block is allocated. - * \code - * CriChar8 heap_buffer[0x2000]; - * CriHeap heap = criHeap_Create((void *)heap_buffer, sizeof(heap_buffer); - * void *memptr = criHeap_AllocFix(heap, 0x100, "forTexture1", 64); - * \endcode - * \sa criHeap_AllocTemporary(), criHeap_Free() - */ -void * CRIAPI criHeap_AllocFix(CriHeap heap, CriSint32 size, const CriChar8 *name, CriSint32 align); - -/*JP - * \brief メモリのアロケート(メモリ領域の終端から) - * \ingroup CRIHEAP_ALLOC - * \param heap CRI Heapハンドル。 - * \param size アロケートするメモリのサイズ。 - * \param name アロケートするメモリの名前。名前はデバッグ時に使用されます。 - * \param align アロケートするメモリのアライメント。 - * \return アロケートしたメモリへのポインタ。
アロケートに失敗した場合はNULLが返ります。 - * \par 説明: - * メモリ領域の終端側から確保するメモリアロケーション関数です。ヒープ領域内に\ref block_temporary "Temporaryブロック"を作成します。
- * 要求したサイズ/アライメントをアロケート可能な解放済み\ref block_temporary "Temporaryブロック"を終端側から探して、分割または再利用するように試みます。それが見つからない場合は、未使用の空き領域(\ref block_free "Freeブロック")を分割してメモリを取得します。
- * ヒープ領域の終端側からメモリをアロケートするため、先端側での断片化を防ぐことが出来ます。
- * 主に、一時的に利用するメモリに使用します。 - * \sa criHeap_AllocFix(), criHeap_Free() - */ -/*EN - * \brief Memory allocation (allocating from the tail of the memory area) - * \ingroup CRIHEAP_ALLOC - * \param heap CRI Heap handle - * \param size Memory block size to be allocated - * \param name Memory block name, which is used on debugging - * \param align Memory block alignment - * \return A pointer to the allocated memory block.
Returns NULL if unsuccessful. - * \par Description: - * This function allocates a memory block from the bottom of the memory area and creates a \ref block_temporary "Temporary block" in the heap area.
- * A released \ref block_temporary "Temporary block" available with the requested size and alignment is searched for in the heap area from the bottom and tries to divide and to reuse the block. And if not found, an unused free block (\ref block_free "Free block") is divided and a new block is allocated.
- * Allocating from the bottom of the heap area will prevent fragmentation in the top of the heap area.
- * Temporary block is mainly used for the memory area that is temporarily used. - * \sa criHeap_AllocFix(), criHeap_Free() - */ -void * CRIAPI criHeap_AllocTemporary(CriHeap heap, CriSint32 size, const CriChar8 *name, CriSint32 align); - -/* DYNAMIC (unuse) */ -//void * CRIAPI criHeap_AllocDynamic(CriHeap heap, CriSint32 size, const CriChar8 *name, CriSint32 align); - -void * CRIAPI criHeap_Alloc(CriHeap heap, CriSint32 size, const CriChar8 *name, CriSint32 align, CriSint32 type); - -/*==========================================================================* - * Free - *==========================================================================*/ -/*JP - * \brief メモリのフリー - * \ingroup CRIHEAP_ALLOC - * \param heap CRI Heapハンドル。 - * \param ptr アロケートしたメモリのポインタ。 - * \return フリーされたメモリサイズ。 - * \par 説明: - * アロケートされたメモリをフリーします。
- * \code - * void *memptr = criHeap_AllocFix(heap, 0x100, "forTexture1", 64); - * criHeap_Free(heap, memptr); - * \endcode - * \sa criHeap_AllocFix(), criHeap_AllocTemporary() - */ -/*EN - * \brief Memory deallocation - * \ingroup CRIHEAP_ALLOC - * \param heap CRI Heap handle - * \param ptr The pointer to the allocated memory block - * \return Deallocated memory block size - * \par Description: - * This function deallocates the allocated memory block.
- * \code - * void *memptr = criHeap_AllocFix(heap, 0x100, "forTexture1", 64); - * criHeap_Free(heap, memptr); - * \endcode - * \sa criHeap_AllocFix(), criHeap_AllocTemporary() - */ -CriSint32 CRIAPI criHeap_Free(CriHeap heap, void *ptr); - -/*==========================================================================* - * 排他制御用関数 - *==========================================================================*/ -CriSint32 CRIAPI criHeap_EnterCriticalSection(void); -CriSint32 CRIAPI criHeap_LeaveCriticalSection(void); - -/*==========================================================================* - * その他の関数 - *==========================================================================*/ -/* For only internal use */ -CriSint32 CRIAPI criHeap_SwitchAllocFunctions(CriHeap heap); - -/*==========================================================================* - * デバッグ関連 - *==========================================================================*/ -/*JP - * \brief ピークメモリサイズの取得 - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heapハンドル。 - * \return 使用されたメモリの最大値。 - * \par 説明: - * 過去、使用されたメモリ量の最大値を返します。
- * 最大値はcriHeap_DebugResetPeakMemorySize() でリセットすることが出来ます。 - * \sa criHeap_DebugResetPeakMemorySize() - */ -/*EN - * \brief Returns peak memory usage of the heap. - * \ingroup CRIHEAP_DEBUG - * \param heap The heap previously allocated by criHeap_Create(). - * \return The maximum number of bytes used by the heap. - * \par Description: - * The amount of memory used by these libraries is variable and depends - * on the number of simultaneous streams being read, the seek and error - * frequency within the stream being read, video resolution and other - * factors. This function allows you to tune the allocation of the heap - * to achieve a required performance level while allocating minimal - * heap space for this library. To get accurate readings, this function - * should typically be called just before criHeap_Destroy(), and after - * exercising all the video and audio functions in your program. - */ -CriSint32 CRIAPI criHeap_DebugGetPeakMemorySize(CriHeap heap); - -/*JP - * \brief ピークメモリサイズのリセット - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heapハンドル。 - * \par 説明: - * ピークメモリサイズをリセットします。 - * \sa criHeap_DebugGetPeakMemorySize() - */ -/*EN - * \brief Reset peak memory size - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heap handle - * \par Description: - * The peak memory size is reset. - * \sa criHeap_DebugGetPeakMemorySize() - */ -void CRIAPI criHeap_DebugResetPeakMemorySize(CriHeap heap); - -/*JP - * \brief メモリブロック数の取得 - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heapハンドル。 - * \return メモリブロック数。 - * \par 説明: - * アロケートされたメモリのブロック数を返します。
- * CRI Heapハンドル生成直後は未使用のメモリブロックが1つ存在する状態 - * となります。また、フリーされた断片化されたメモリブロックもこの数に - * 含みます。 - * \sa criHeap_DebugGetUsedBlocks() - */ -/*EN - * \brief Get number of allocated memory blocks - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heap handle - * \return Number of allocated memory blocks - * \par Description: - * The number of allocated memory blocks is returned.
- * One unused memory block exists right after CRI Heap handle creation. - * The number of released fragmented memory blocks is also included. - * \sa criHeap_DebugGetUsedBlocks() - */ - CriSint32 CRIAPI criHeap_DebugGetNumBlocks(CriHeap heap); - -/*JP - * \brief 使用メモリブロック数の取得 - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heapハンドル。 - * \return 使用メモリブロック数。 - * \par 説明: - * アロケートされているメモリブロックの数を返します。 - * \sa criHeap_DebugGetNumBlocks() - */ -/*EN - * \brief Get number of used memory blocks - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heap - * \return Number of used memory blocks - * \par Description: - * The number of used memory blocks is returned.
- * \sa criHeap_DebugGetNumBlocks() - */ -CriSint32 CRIAPI criHeap_DebugGetUsedBlocks(CriHeap heap); - -/*JP - * \brief メモリブロック名の取得 - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heapハンドル。 - * \param ptr アロケートしたメモリのポインタ。 - * \return メモリブロック名。 - * \par 説明: - * アロケート時に設定したメモリブロック名へのポインタを返します。
- */ -/*EN - * \brief Get memory block name - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heap - * \param ptr A pointer to the allocated memory block - * \return Memory block name - * \par Description: - * The pointer to the memory block name specified on allocation is returned.
- */ -CriChar8 * CRIAPI criHeap_DebugGetBlockName(CriHeap heap, void *ptr); - -/* メモリブロック番号の取得 */ -//CriSint32 CRIAPI criHeap_DebugGetBlockNumberFromPointer(CriHeap heap, void *ptr); - -/* メモリブロック情報の取得 */ -//void CRIAPI criHeap_DebugGetBlockInformation(CriHeap heap, -// CriSint32 blocknumber, CriHeapBlock *heapblock); - -/* メモリブロック情報の表示 */ -//void CRIAPI criHeap_DebugPrintBlockInformation(CriHeap heap, -// CriSint32 blocknumber, CriHeapBlock *heapblock); - -/*JP - * \brief メモリブロック情報の表示 - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heapハンドル。 - * \par 説明: - * 現在のメモリブロック情報を表示します。
- * printf関数などの標準出力に表示を行います。 - */ -/*EN - * \brief Print memory block information - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heap - * \par Description: - * The current memory block information is displayed.
- * It is displayed on the standard output for the printf function. - */ - void CRIAPI criHeap_DebugPrintBlockInformationAll(CriHeap heap); - -/*JP - * \brief メモリアロケートサイズの取得 - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heapハンドル。 - * \par 説明: - * 現在のメモリアロケートサイズの合計値を返します。 - */ -/*EN - * \brief Get total allocation size - * \ingroup CRIHEAP_DEBUG - * \param heap CRI Heap - * \par Description: - * The total size of allocated memory blocks is returned. - */ -CriSint32 CRIAPI criHeap_DebugGetTotalAllocSize(CriHeap heap); - -/* フリーサイズの取得 */ -//CriSint32 CRIAPI criHeap_DebugGetTotalFreeSize(CriHeap heap); - -/* メモリアロケートサイズの取得(タイプ別) */ -CriSint32 CRIAPI criHeap_DebugGetAllocSize(CriHeap heap, CriSint32 type); - -/* ヒープヘッダサイズの取得 */ -CriSint64 CRIAPI criHeap_DebugGetHandleHeaderSize(CriHeap heap); - -/* メモリブロックヘッダサイズの取得 ptr: Allocated Pointer */ -CriSint64 CRIAPI criHeap_DebugGetMemBlockHeaderSize(void *ptr); - -/* 追加で必要となるサイズの最大値 */ -CriSint32 CRIAPI criHeap_DebugGetWorstExtraSize(CriSint32 alignment); - -/* criHeap_AllocFixでアロケート可能なサイズ */ -CriSint32 CRIAPI criHeap_DebugGetFixAllocatableSize(CriHeap heap, CriSint32 alignment); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#ifdef XPT_TGT_PC -#pragma pack(pop) -#endif - -#endif // _CRI_HEAP_H_INCLUDED - -/* end of file */ diff --git a/3rdParty/cri/pc/include/cri_movie.h b/3rdParty/cri/pc/include/cri_movie.h deleted file mode 100644 index 7dad4454..00000000 --- a/3rdParty/cri/pc/include/cri_movie.h +++ /dev/null @@ -1,4402 +0,0 @@ -/**************************************************************************** - * - * CRI Middleware SDK - * - * Copyright (c) 2006-2013 CRI Middleware Co., Ltd. - * - * Library : CRI Movie - * Module : Library User's Header - * File : cri_movie.h - * Date : 2013-11-27 - * Version : (see CRIMOVIE_VER) - * - ****************************************************************************/ -/*! - * \file cri_movie.h - */ -#ifndef CRI_MOVIE_H_INCLUDED /* Re-definition prevention */ -#define CRI_MOVIE_H_INCLUDED - -/* Version No. */ -#define CRIMOVIE_VER "3.50" -#define CRIMOVIE_NAME "CRI Movie" - -/*************************************************************************** - * Include file - ***************************************************************************/ -#include -#include -#include -#include -#include -#include - -/*************************************************************************** - * MACRO CONSTANT - ***************************************************************************/ -/*EN - * \brief Maximum length of a filename that can be opened by EasyPlayer - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetFile() - */ -/*JP - * \brief EasyPlayerに指定可能なファイル名の最大長さ - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetFile() - */ -#define CRIMV_MAX_FILE_NAME (256) - -/*EN - * \brief Default audio track setting used by AttachSubAudioInterface(), ReplaceCenterVoice() - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::ReplaceCenterVoice(), CriMvEasyPlayer::AttachSubAudioInterface() - */ -/*JP - * \brief サブオーディオ(またはセンターボイス)のデフォルト値 - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::ReplaceCenterVoice(), CriMvEasyPlayer::AttachSubAudioInterface() - */ -#define CRIMV_CENTER_VOICE_OFF (-1) - - -/*************************************************************************** - * Variable Declaration - ***************************************************************************/ -namespace CriMv { - extern CriError ErrorContainer; -} - -/*************************************************************************** - * Prototype Functions - ***************************************************************************/ -/*EN - * \brief CRI Movie Namespace - * \ingroup MDL_MV_BASIC - * \par - * Namespace for all CRI Movie methods, constants, and declarations - */ -/*JP - * \brief CRI Movie Namespace - * \ingroup MDL_MV_BASIC - * \par - * Namespace for all CRI Movie methods, constants, and declarations - */ -namespace CriMv { - - /*EN - * \brief Returns the version number and build information of CRI Movie - * \param none - * \return A string constant - * - * Returns the version number and build information of CRI Movie as a constant - * string, in the form - * - * "CRI Movie/{PLATFORM} {VERSION} Build:{BUILD DATE}" - */ - /*JP - * \brief CRI Movieのバージョン番号やビルド情報を返します。 - * \return ライブラリ情報文字列 - * - */ - const CriChar8* CRIAPI GetLibraryVersionString(void); - - /*EN - * \brief Initialize the CRI Movie library - * \param err Optional error code - * - * Does one-time initialization of the CRI Movie library.
- * This function must be successfully called before calling CriMvEasyPlayer::Create().
- *
- * In general, all CRI Movie APIs are available after calling CriMv::Initialize(), - * until CriMv::Finalize() is called. However, there are some methods that set options - * for the library as a whole which must be called before CriMv::Initialize():
- *
- * It is safe to call CriMv::Initialize() more than once, as long as your application calls - * CriMv::Finalize() once for each call to CriMv::Initialize(). Multiple calls will not - * have an effect on the library, other than to increment or decrement an internal counter. - * - * \sa CriMv::Finalize() - */ - /*JP - * \brief CRI Movieライブラリの初期化 - * \param err エラー情報(省略可) - * - * CRI Movie ライブラリを初期化します。
- * CriMvEasyPlayer::Create 関数よりも先に呼び出してください。
- *
- * 原則として全ての CRI Movie ライブラリ関数は初期化後、終了関数呼び出しまでの間にのみ使用します。
- * ただし、いくつかの設定関数は初期化関数よりも先に呼び出す必要があるものがあります。 - * 詳細は各設定関数の説明を参照してください。 - *
- * 初期化関数を複数回呼び出した場合、2回目以降の呼び出しでは呼び出し回数を記録するだけで再初期化は行いません。
- * この場合、正しく終了処理を行うには同じ回数だけ終了関数を呼び出す必要があります。 - * 初期化関数と終了関数は必ず対で呼び出すように実装してください。
- * - * \sa CriMv::Finalize() - */ - void CRIAPI Initialize(CriError &err = CriMv::ErrorContainer); - - /* MEMO: - * If an application calls this function instead of CriMv::Initialize(), - * an application need to call CriMv::SetupMovieHandleWork() before CriMv::InitializeMana(). - */ - void CRIAPI InitializeMana(CriError &err = CriMv::ErrorContainer); - - /*EN - * \brief Initialize 32bit ARGB frame conversion - * - * This function initializes 32bit ARGB frame conversion.
- * When an application uses CriMvEasyPlayer::GetFrameOnTimeAs32bitARGB(), - * please call this function after CriMv::Initialize().
- * - * \sa CriMvEasyPlayer::GetFrameOnTimeAs32bitARGB() - */ - /*JP - * \brief 32bitARGB用フレーム変換の初期化 - * - * 32bitARGB用フレーム変換処理を初期化します。
- * CriMvEasyPlayer::GetFrameOnTimeAs32bitARGB() を使用する場合は CRI Movie ライブラリの - * 初期化後に必ず呼び出してください。
- * - * \sa CriMvEasyPlayer::GetFrameOnTimeAs32bitARGB() - */ - void CRIAPI InitializeFrame32bitARGB(void); - -#if defined(XPT_TGT_IPHONE) || defined(XPT_TGT_WINMO) || defined(XPT_TGT_ANDROID) || defined(XPT_TGT_CQSH2A) || defined(XPT_TGT_ACRODEA) || defined(XPT_TGT_NACL) || defined(XPT_TGT_SH7269) || defined(XPT_TGT_PC) || defined(XPT_TGT_TRGP6K) - void CRIAPI InitializeFrameRGB565(void); -#endif - - /*EN - * \brief De-initializes the CRI Movie library - * \param err Optional error code - * - * This function finalize whole CRI Movie library.
- * An application needs to destroy all CriMvEasyPlayer handles and decoding threads before callign CriMv::Finalize().
- *
- * In principle, all CRI Movie library APIs are enabled after CriMv::Initialize() until CriMv::Finalize().
- * But there are some APIs for parameter setting, which need to be called after CriMv::Finalize(). - * For details, refer to each explanations of setting APIs. - *
- * \remarks - * CriMv::Finalize() must be called once for each call to CriMv::Initialize(). When the - * internal initialization count reaches 0, the library will be finalized. - * - * \sa CriMv::Initialize() - */ - /*JP - * \brief CRI Movieライブラリの終了 - * \param err エラー情報(省略可) - * - * CRI Movie ライブラリを終了します。
- * この関数を呼び出す前に、全ての CriMvEasyPlayer ハンドルおよびデコードスレッドを破棄してください。
- *
- * 原則として全ての CRI Movie ライブラリ関数は初期化後、終了関数呼び出しまでの間にのみ使用します。
- * ただし、いくつかの設定関数は終了関数よりも後に呼び出す必要があるものがあります。 - * 詳細は各設定関数の説明を参照してください。 - *
- * 初期化関数を複数回呼び出した場合、正しく終了処理を行うには同じ回数だけ終了関数を呼び出す必要があります。 - * 初期化関数と終了関数は必ず対で呼び出すように実装してください。
- * - * \sa CriMv::Initialize() - */ - void CRIAPI Finalize(CriError &err = CriMv::ErrorContainer); - -#if !defined(XPT_TGT_EE) - /*EN - * \brief Calculates the work buffer size needed for the given number of movie handles - * \param max_num Maximum number of movie handles desired - * \param err Optional error code - * \return The necessary work buffer size, in bytes - * - * Each active movie handle requires an internal work buffer. If your application - * needs to have multiple movies open at one time, it should determine how many handles - * it needs, allocate a buffer of the size returned by this function, and pass it to - * CriMv::SetupMovieHandleWork().
- * - * Each CriMvEasy object uses a movie handle. Alpha movie playback uses two handles. - * If you need to play aplha movies, be sure to double the number of handles requested. - * - * \remarks - * The number of movie handles must be set before calling CriMv::Initialize(). - * - * \sa CriMv::SetupMovieHandleWork() - */ - /*JP - * \brief マルチハンドル用ワークバッファサイズの計算 - * \param max_num 最大ハンドル数(不透明ムービの再生時) - * \param err エラー情報(省略可) - * \return ワークサイズ - * - * 同時に使用する CriMvEasyPlayer ハンドルの最大数を増加させる場合に必要なワークバッファ - * サイズを計算します。 - * - * アルファムービを再生するとハンドル資源を2つ消費します。 - * もし複数のアルファムービ再生を行いたい場合は、最大ハンドル数は倍にして指定してください。 - * - * \sa CriMv::SetupMovieHandleWork() - */ - CriUint32 CRIAPI CalcMovieHandleWork(CriUint32 max_num, CriError &err = CriMv::ErrorContainer); - - /*EN - * \brief Increases the default number of available movie handles - * \param max_num Maximium number of movie handles - * \param workbuf Work buffer - * \param worksize Size of work buffer - * \param err Optional error code - * - * Call this function if your application needs to increase the maximum number of open movies - * beyond the default. Note that playing an alpha movie requires a second handle.
- * - * The default number of movie handles depends on the platform.
- * - * The work buffer must be allocated based on the size returned by CriMv::CalcMovieHandleWork().
- * - * \remarks - * This function must be called before calling CriMv::Initialize(). - * - * \sa CriMv::CalcMovieHandleWork() - */ - /*JP - * \brief マルチハンドル用ワークバッファの設定 - * \param max_num 最大ハンドル数(不透明ムービの再生時) - * \param workbuf ワークバッファアドレス - * \param worksize ワークバッファサイズ - * \param err エラー情報(省略可) - * - * 同時に使用する CriMvEasyPlayer ハンドルの最大数を増加させるためのワークバッファを設定します。 - * なお、ワークバッファを指定しない場合のハンドル数上限は機種によって異なります。 - * - * ワークバッファの設定は、 CriMv::Initialize() の呼び出しに実行してください。 - * - * \sa CriMv::CalcMovieHandleWork() - */ - void CRIAPI SetupMovieHandleWork(CriUint32 max_num, void *workbuf, CriUint32 worksize, CriError &err = CriMv::ErrorContainer); - - /*EN - * \brief Get max number of movie handles - * \param err Optional error code - * \return Max number of movie handles you set by CriMv::SetupMovieHandleWork(). - * - * Returns the maximum number of movie handles that are available to CRI Movie.
- * - * Note that this is not necessarily equal to the number of movies that can be - * opened at a time. In general, each movie will use one handle; however, - * alpha channel movies uses two handles. - * - * \sa CriMv::SetupMovieHandleWork(), CriMv::CalcMovieHandleWork() - */ - /*JP - * \brief 最大ハンドル数の取得 - * \param err エラー情報(省略可) - * \return CriMv::SetupMovieHandleWork() で設定した最大ハンドル数 - * - * CriMv::CalcMovieHandleWork() で最大ハンドル数を増加させた場合に、 - * 設定した最大ハンドル数を取得します。 - * - * \sa CriMv::SetupMovieHandleWork(), CriMv::CalcMovieHandleWork() - */ - CriUint32 CRIAPI GetMaxNumberOfHandles(CriError &err = CriMv::ErrorContainer); -#endif - - /* For Sofdec2 */ - CriSint32 CRIAPI CalcHandleWorkSize(CriMvHandleConfig *config, CriError &err = CriMv::ErrorContainer); - void CRIAPI SetDelayDestroySubmodules(CriBool sw); -} - -/*************************************************************************** - * CLASS - ***************************************************************************/ -/*EN - * \brief File Reading Interface Class for EasyPlayer - * \ingroup MDL_IF_READER - * \par - * You can implement your own streaming filesystem for movie playback by deriving - * from this class.
- * - * Pass an instance of this subclass to CriMvEasyPlayer::Create().
- * - * This class is designed for asynchronous operation. All functions are pure virtual. - * - * \sa CriMvEasyPlayer::Create() - */ -/*JP - * \brief ファイル読み込みインタフェース for EasyPlayer - * \ingroup MDL_IF_READER - * - * このクラスを定義することで、自前のファイルシステムを使ってEasyPlayerの - * ストリーミング再生が可能になります。
- * 全ての関数は純粋仮想関数として定義されているので、全ての関数を必ず実装してください。 - * - * \sa CriMvEasyPlayer::Create() - */ -class CriMvFileReaderInterface -{ -public: - /*EN Status of an asynchronous operation */ - /*JP 非同期処理ステータス */ - enum AsyncStatus { - ASYNC_STATUS_STOP, /*EN< No action */ - /*JP< 何もしていない状態。*/ - ASYNC_STATUS_BUSY, /*EN< Currently processing */ - /*JP< 処理中 */ - ASYNC_STATUS_COMPLETE, /*EN< Processing completed */ - /*JP< 処理終了 */ - ASYNC_STATUS_ERROR, /*EN< An error occured */ - /*JP< エラー */ - - /* Keep enum 4bytes */ - ASYNC_STATUS_MAKE_ENUM_SINT32 = 0x7FFFFFFF - }; - /*EN Offset values for Seek() */ - /*JP シーク開始位置 */ - enum SeekOrigin { - SEEK_FROM_BEGIN, /*EN< Start of file */ - /*JP< ファイル先頭 */ - SEEK_FROM_CURRENT, /*EN< Current position in file */ - /*JP< ファイルの現在位置 */ - SEEK_FROM_END, /*EN< End of file */ - /*JP< ファイル終端 */ - - /* Keep enum 4bytes */ - SEEK_FROM_MAKE_ENUM_SINT32 = 0x7FFFFFFF - }; - /*EN - * \brief Opens a file asynchronously - * \param fname Name of file to open - * - * Initiates a file open request, and returns immediately. - * - * To determine success or failure, call CriMvFileReaderInterface::GetOpenStatus().
- * - * \remarks - * CRI Movie may call CriMvFileReaderInterface::Read() and CriMvFileReaderInterface::Close() - * before CriMvFileReaderInterface::GetOpenStatus() returns ASYNC_STATUS_COMPLETE. - * - * \sa CriMvFileReaderInterface::GetOpenStatus() - */ - /*JP - * \brief ファイル名によるファイルオープン(即時復帰) - * \param fname ファイル名の文字列 - * - * ファイル名指定でファイルのオープン要求を出します。
- * この関数は即時復帰の関数として呼び出されます。
- * オープン処理が終わったかどうかは CriMvFileReaderInterface::GetOpenStatus関数 - * でチェックできるようにしてください。
- * CRI Movie ライブラリはオープン処理が終わる(= CriMvFileReaderInterface::GetOpenStatus関数が - * ASYNC_STATUS_COMPLETEを返す)前に、リード、クローズの要求を呼び出す可能性があります。 - * - * \sa CriMvFileReaderInterface::GetOpenStatus() - */ - /* pure */ virtual void Open(CriChar8 *fname)=0; - - /*EN - * \brief Closes a file asynchronously - * - * Initiates a file close request, and returns immediately.
- * - * To determine success or failure, call CriMvFileReaderInterface::GetCloseStatus().
- * - * \sa CriMvFileReaderInterface::GetCloseStatus() - */ - /*JP - * \brief ファイルのクローズ(即時復帰) - * - * オープン済みのファイルのクローズ要求を出します。
- * この関数は即時復帰の関数として呼び出されます。
- * クローズ処理が終わったかどうかは CriMvFileReaderInterface::GetCloseStatus() - * でチェックできるようにしてください。 - * - * \sa CriMvFileReaderInterface::GetCloseStatus() - */ - /* pure */ virtual void Close(void)=0; - - /*EN - * \brief Reads from a file - * \param buffer Buffer to read into - * \param req_size Size of the buffer - * - * Initiates a file read request, and returns immediately.
- * - * The buffer must be available and writable until the read request completes.
- * - * To determine success or failure, call CriMvFileReaderInterface::GetReadStatus().
- * - * To determine the number of bytes actually read, call CriMvFileReaderInterface::GetReadSize() - * after CriMvFileReaderInterface::GetReadStatus() has returned ASYNC_STATUS_COMPLETE. - * - * \remarks - * CRI Movie may call CriMvFileReaderInterface::Close() before - * CriMvFileReaderInterface::GetReadStatus() returns ASYNC_STATUS_COMPLETE. - * - * \sa CriMvFileReaderInterface::GetReadStatus(), CriMvFileReaderInterface::GetReadSize() - */ - /*JP - * \brief 読み込み要求(即時復帰) - * \param buffer 書き出しバッファのポインタ。読み込み要求サイズを満たすだけのバッファを確保しておく必要があります。 - * \param req_size 読み込み要求サイズ。単位はバイト単位です。 - * - * ファイルの読み込み要求を出します。
- * この関数は即時復帰の関数として呼び出されます。
- * リード処理が終わったかどうかは CriMvFileReaderInterface::GetReadStatus() - * でチェックできるようにしてください。
- * CRI Movie ライブラリはリード処理が終わる(= CriMvFileReaderInterface::GetReadStatus()が - * ASYNC_STATUS_COMPLETEを返す)前に、クローズ要求を呼び出す可能性があります。
- * この関数は読み込んだサイズを返しません。
- * 読み込み済みサイズは、 CriMvFileReaderInterface::GetReadStatus()が ASYNC_STATUS_COMPLETEを - * 返したあとに CriMvFileReaderInterface::GetReadSize()で返すように実装してください。 - * - * \sa CriMvFileReaderInterface::GetReadStatus(), CriMvFileReaderInterface::GetReadSize() - */ - /* pure */ virtual void Read(CriUint8 *buffer, CriSint64 req_size)=0; - - /*EN - * \brief Gets asynchronous status of a call to CriMvFileReaderInterface::Open() - * - * \return Status of the call - * - * While the Open() call is in process, this will return ASYNC_STATUS_BUSY.
- * If the call fails, this will return ASYNC_STATUS_ERROR.
- * On success, this will return ASYNC_STATUS_COMPLETE.
- * - * \sa CriMvFileReaderInterface::Open() - */ - /*JP - * \brief オープンコマンドの状態取得 - * \return オープンコマンドの処理状態。 - * - * CriMvFileReaderInterface::Open関数の処理状態を取得します。 - * - * \sa CriMvFileReaderInterface::Open() - */ - /* pure */ virtual CriMvFileReaderInterface::AsyncStatus GetOpenStatus(void)=0; - - /*EN - * \brief Gets asynchronous status of a call to CriMvFileReaderInterface::Close() - * - * \return Status of the call - * - * While the Close() call is in process, this will return ASYNC_STATUS_BUSY.
- * If the call fails, this will return ASYNC_STATUS_ERROR.
- * On success, this will return ASYNC_STATUS_COMPLETE.
- * - * \sa CriMvFileReaderInterface::Close() - */ - /*JP - * \brief クローズコマンドの状態取得 - * \return クローズコマンドの処理状態。 - * - * CriMvFileReaderInterface::Close関数の処理状態を取得します。 - * - * \sa CriMvFileReaderInterface::Close() - */ - /* pure */ virtual CriMvFileReaderInterface::AsyncStatus GetCloseStatus(void)=0; - - /*EN - * \brief Gets asynchronous status of a call to CriMvFileReaderInterface::Read() - * - * \return Status of the call - * - * While the Read() call is in process, this will return ASYNC_STATUS_BUSY.
- * If the call fails, this will return ASYNC_STATUS_ERROR.
- * On success, this will return ASYNC_STATUS_COMPLETE.
- * - * \sa CriMvFileReaderInterface::Read() - */ - /*JP - * \brief リードコマンドの状態取得 - * \return リードコマンドの処理状態。 - * - * CriMvFileReaderInterface::Read関数の処理状態を取得します。 - * - * \sa CriMvFileReaderInterface::Read() - */ - /* pure */ virtual CriMvFileReaderInterface::AsyncStatus GetReadStatus(void)=0; - - /*EN - * \brief Gets the number of bytes read by a successful call to CriMvFileReaderInterface::Read() - * - * \return Number of bytes read - * - * Once CriMvFileReaderInterface::GetReadStatus() returns ASYNC_STATUS_COMPLETE, this - * function can be called to determine the number of bytes read by - * CriMvFileReaderInterface::Read().
- * - * If no call to Read() has been made, this function will return 0.
- * - * If called multiple times after completing the read, the same value will be returned each time. - * - * \sa CriMvFileReaderInterface::Read(), CriMvFileReaderInterface::GetReadStatus() - */ - /*JP - * \brief 前回読み込み要求に対する読み込み完了サイズ - * \return 読み込み完了サイズ。単位はByte。 - * - * 前回の読み込み要求に対して読み込み完了したサイズを返します。 - * まだ読み込みが1度も要求されていない場合は0を返します。 - * 読み込み完了後に繰り返しこの関数が呼び出された場合は、すべて同じ値を返します。 - * - * \sa CriMvFileReaderInterface::Read(), CriMvFileReaderInterface::GetReadStatus() - */ - /* pure */ virtual CriSint64 GetReadSize(void)=0; - - /*EN - * \brief Seeks to a new position in the file - * - * \param size Number of bytes to seek relative to \a offset - * \param offset Starting position of seek - * \return The offset, in bytes, from the previous file position. - * - * If \a offset is SEEK_FROM_BEGIN, seeking will start from the beginning of the file.
- * If \a offset is SEEK_FROM_CURRENT, seeking will start from the current file position.
- * If \a offset is SEEK_FROM_END, seeking will start from the end of the file.
- * - * \sa CriMvFileReaderInterface::SeekOrigin - */ - /*JP - * \brief シーク - * \param size シークサイズ - * \param offset シークの開始位置 - * \return 実際にシークした距離。Byte単位。 - * - * \sa CriMvFileReaderInterface::SeekOrigin - * - */ - /* pure */ virtual CriSint64 Seek(CriSint64 size, CriMvFileReaderInterface::SeekOrigin offset)=0; - - /*EN - * \brief Gets the file size - * - * \return File size, in bytes - * - * This function can safely be called once CriMvFileReaderInterface::Open() has completed - * successfully. - * - * \sa CriMvFileReaderInterface::Open(), CriMvFileReaderInterface::GetOpenStatus() - */ - /*JP - * \brief ファイルサイズの取得 - * \return ファイルサイズ[byte]. - * - * この関数はファイルオープンの終了後に呼び出されます。 - * - * \sa CriMvFileReaderInterface::Open(), CriMvFileReaderInterface::GetOpenStatus() - */ - /* pure */ virtual CriSint64 GetFileSize(void)=0; - -protected: - virtual ~CriMvFileReaderInterface(void) {} -}; - -/*EN - * \brief Sound Interface Class for EasyPlayer - * \ingroup MDL_IF_SOUND - * - * \par - * A class derived from CriMvSoundInterface is required in order to play sound in CRI Movie. - * Pass an instance of this subclass to CriMvEasyPlayer::Create().
- * - * If you do not need audio output, you can pass NULL instead. However, if you do, - * you can not use a movie timer of type MVEASY_TIMER_AUDIO. See CriMvEasyPlayer::SetMasterTimer() - * for more details.
- * - * Sound data must be provided in either 32 or 16 bit PCM format. - * - * All functions are pure virtual. - * - * \sa CriMvEasyPlayer::Create(), CriMvEasyPlayer::SetMasterTimer(), CriMvEasyPlayer::TimerType - */ -/*JP - * \brief サウンド出力インタフェース - * \ingroup MDL_IF_SOUND - * - * \sa CriMvEasyPlayer::Create(), CriMvEasyPlayer::SetMasterTimer(), CriMvEasyPlayer::TimerType - */ -class CriMvSoundInterface -{ -public: - /*EN - * \brief The status of the Sound Module - * - * This is the return value of CriMvSoundInterface::GetStatus().
- * - * After CriMvSoundInterface::Start() is called, the state transitions to MVEASY_SOUND_STATUS_EXEC.
- * While the state is MVEASY_SOUND_STATUS_EXEC, the sound module calls the callback function - * to retrieve sound data as needed.
- * When the EasyPlayer is stopped, or transits to MVEASY_STATUS_PLAYEND, - * CRI Movie will call CriMvSoundInterface::Stop(). Then, CRI Movie waits for - * CriMvSoundInterface::GetStatus() to return MVEASY_SOUND_STATUS_STOP, - * and calls CriMvSoundInterface::DestroyOutput(). - * - * \sa CriMvSoundInterface::GetStatus(), CriMvSoundInterface::Start(), - * CriMvSoundInterface::Stop(), CriMvSoundInterface::DestroyOutput() - */ - /*JP - * \brief サウンドモジュールの状態 - * - * サウンドモジュールの状態を表す列挙型です。
- * CriMvEasyPlayer::GetStatus() の関数値です。
- * CriMvSoundInterface::Start() が呼び出されるとMVEASY_SOUND_STATUS_EXEC状態になります。
- * MVEASY_SOUND_STATUS_EXEC状態の間は、サウンド出力モジュールはコールバック関数を呼び出します。
- * CRI Movie ライブラリは再生終了または再生停止指示を受けた場合、まず CriMvSoundInterface::Stop()を呼び出します。
- * その後、STOP状態になるのを待ってから CriMvSoundInterface::DestroyOutput()を呼び出します。 - * - * \sa CriMvSoundInterface::GetStatus(), CriMvSoundInterface::Start(), - * CriMvSoundInterface::Stop(), CriMvSoundInterface::DestroyOutput() - */ - enum Status { - MVEASY_SOUND_STATUS_STOP, /*EN< No sound processing is happening. */ - /*JP< CRI Movie のサウンド出力をしていない状態 */ - MVEASY_SOUND_STATUS_EXEC, /*EN< Sound data is being retrieved and processed. */ - /*JP< CRI Movie のサウンド出力中 */ - MVEASY_SOUND_STATUS_ERROR, /*EN< An error has occurred. */ - /*JP< エラー状態 */ - - /* Keep enum 4bytes */ - MVEASY_SOUND_STATUS_MAKE_ENUM_SINT32 = 0x7FFFFFFF - }; - - /*EN - * \brief PCM audio data format - * - * CRI Movie only operates on PCM encoded data. Two formats are supported: 32 bit floating - * point values, and 16 bit integer values. - * - * Return one of these values from CriMvSoundInterface::GetPcmFormat(). - * According to the returned format, CRI Movie calls a SetCallback for the specified PCM format. - * - * \sa CriMvSoundInterface::GetPcmFormat(), CriMvSoundInterface::SetCallbackGetFloat32PcmData(), - * CriMvSoundInterface::SetCallbackGetSint16PcmData() - */ - /*JP - * \brief PCMデータフォーマット - * - * PCMの出力フォーマットはPcmFormat型で定義されたいずれかでなければいけません。
- * EasyPlayerは CriMvSoundInterface::GetPcmFormat()で取得できるデータ型のみ使用します。
- * アプリケーションはこのクラスの全ての関数を実装しなければいけないので、使わないフォーマット - * のコールバック登録関数はカラ関数として実装してください。 - * - * \sa CriMvSoundInterface::GetPcmFormat(), CriMvSoundInterface::SetCallbackGetFloat32PcmData(), - * CriMvSoundInterface::SetCallbackGetSint16PcmData() - */ - enum PcmFormat { - MVEASY_PCM_FLOAT32, /*EN< PCM data is in 32 bit floating point format. */ - /*JP< 32bit 浮動小数型のPCMフォーマット */ - MVEASY_PCM_SINT16, /*EN< PCM data is in 16 bit integer format. */ - /*JP< 16bit 整数型のPCMフォーマット */ - - /* Keep enum 4bytes */ - MVEASY_PCM_MAKE_ENUM_SINT32 = 0x7FFFFFFF - }; - - /*EN - * \brief Creates a sound output module - * \param heap Handle to a CriHeap object - * \param channel Number of sound channels (1 = monaural, 2 = stereo, 6 = 5.1ch) - * \param samplerate Sample rate of audio data (ex. 48000 = 48k) - * \return TRUE if the sound module was created successfully - * \return FALSE if there was an error - * - * Creates a CRI Movie sound output module and prepares it for use. Memory for the module - * is taken from the provided CriHeap object.
- * - * CRI Movie calls this method once it has determined that a movie has an active audio track - * and has analyzed the number of channels (mono, stereo, 5.1ch, etc.) and the sample rate. - * - */ - /*JP - * \brief サウンド出力の作成 - * \param heap メモリハンドル - * \param channel 出力するサウンドのチャネル数 (1=monaural, 2=stereo, 6=5.1ch) - * \param samplerate サンプリングレート (ex. 48k = 48000) - * \return 作成結果。成功の場合はTRUE、失敗の場合はFALSEが返ります。 - * - * サウンド出力を作成します。
- * この関数は CRI Movie が再生するサウンドが決定したあとに、そのサウンドのチャネル数や - * サンプリングレートを引数として実行されます。 - * - */ - /* pure */ virtual CriBool CreateOutput(CriHeap heap, CriUint32 channel, CriUint32 samplerate)=0; - - /*EN - * \brief Destroys the sound output module - * - * Deletes the sound output module that was created by - * CriMvSoundInterface::CreateOutput().
- * - * CRI Movie calls this method once CriMvSoundInterface::GetStatus() returns MVEASY_SOUND_STATUS_STOP. - * - */ - /*JP - * \brief サウンド出力の破棄 - * - * サウンド出力を破棄します。
- * この関数はサウンド出力が MVEASY_SOUND_STATUS_STOP 状態になった後に呼び出されます。 - * - */ - /* pure */ virtual void DestroyOutput(void)=0; - - /*EN - * \brief Gets the PCM format of audio data - * \return The type of PCM format supported by this CriMvSoundInterface instance - * - * CRI Movie supports audio data in one of two PCM formats: 32 bit floating point (MVEASY_PCM_FLOAT32) - * or 16 bit integer (MVEASY_PCM_SINT16). EasyPlayer uses the return value from this method to - * determine which format is being used, and will call the appropriate callback function to retrieve - * data samples. - * - * \sa CriMvSoundInterface::PcmFormat - */ - /*JP - * \brief PCMデータフォーマットの取得 - * \return CriMvSoundInterface が使用するPCMフォーマットを返します。 - * - * EasyPlayerはこの関数によって、出力するPCMフォーマットを判断します。 - * - * \sa CriMvSoundInterface::PcmFormat - */ - /* pure */ virtual PcmFormat GetPcmFormat(void)=0; - - /*EN - * \brief Sets the callback function for retrieving 32 bit floating point PCM sound samples - * \param func Function that is called when CriMvSoundInterface gets PCM data (32bit float) - * \param obj Pointer to user-specifed data, passed as the first argument to the callback - * - * Sets a function that CriMvSoundInterface will call when it needs audio data in 32 bit floating point - * PCM format. This callback function takes 4 arguments:
- * - * - \a obj: The user-specified \a obj parameter passed to SetCallbackGetFloat32PcmData().
- * - \a nch: The number of audio channels. Mono is 1, stereo is 2, 5.1 channel is 6.
- * - \a pcmbuf: An array of buffers to hold the returned PCM data. There must be one element of - * this array for each channel.
- * - \a req_nsmpl: The number of samples requested. Each buffer must be large enough to hold this - * many samples (i.e. \a nch * \a req_nsmpl). - * - * \remarks - * The maximum number of channels is CRIMV_PCM_BUFFER_MAX - * - * \sa CriMvSoundInterface::SetCallbackGetSint16PcmData() - */ - /*JP - * \brief 32bit形式でPCMデータを取得するコールバック関数の登録 - * \param func CriMvSoundInterface がPCMデータを要求する際に呼びだすコールバック関数 - * \param obj コールバック関数を実行する際に第一引数に指定するオブジェクト変数 - * - * CriMvSoundInterface がEasyPlayerにPCMデータを要求する際に呼び出すコールバック関数を登録します。 - * コールバック関数は4つの引数を持っています。
- * - "obj" はコールバック関数内で使用するオブジェクトです。 - * コールバック関数を呼び出す際は、関数登録時に指定されたobjを必ずこの引数に入れてください。
- * - "nch" は CriMvSoundInterface が要求するオーディオのチャネル数です。モノラルなら1。ステレオなら2。5.1chなら6となります。
- * - "pcmbuf" はPCMデータを格納するためのバッファポインタ配列です。
- * バッファの実体は CriMvSoundInterface で準備してください。バッファの数は"nch"と同じでなければいけません。
- * - "req_nsmpl" は CriMvSoundInterface が要求するPCMデータの最大サンプル数です。
- * "pcmbuf"で指定した各バッファ実体には、このサンプル数が書き込まれても大丈夫なだけの領域を必ず準備してください。
- * - * 登録されたコールバック関数を呼び出すタイミングは CriMvSoundInterface の任意となります。 - * - * \sa CriMvSoundInterface::SetCallbackGetSint16PcmData() - */ - /* pure */ virtual void SetCallbackGetFloat32PcmData(CriUint32 (*func)(void *obj, CriUint32 nch, CriFloat32 *pcmbuf[], CriUint32 req_nsmpl), void *obj)=0; - - /*EN - * \brief Sets the callback function for retrieving 16 bit integer PCM sound samples - * \param func Function that will be called when 16 bit integer PCM data is needed - * \param obj Pointer to user-specifed data, passed as the first argument to the callback - * - * Sets a function that CriMvSoundInterface will call when it needs audio data in 16 bit integer - * PCM format. This callback function takes 4 arguments:
- * - * - \a obj: The user-specified \a obj parameter passed to SetCallbackGetSint16PcmData().
- * - \a nch: The number of audio channels. Mono is 1, stereo is 2, 5.1 channel is 6.
- * - \a pcmbuf: An array of buffers to hold the returned PCM data. There must be one element of - * this array for each channel.
- * - \a req_nsmpl: The number of samples requested. Each buffer must be large enough to hold this - * many samples (i.e. \a nch * \a req_nsmpl). - * - * \remarks - * The maximum number of channels is CRIMV_PCM_BUFFER_MAX (currently 8) - * - * \sa CriMvSoundInterface::SetCallbackGetFloat32PcmData() - */ - /*JP - * \brief 16bit形式でPCMデータを取得するコールバック関数の登録 - * \param func CriMvSoundInterface がPCMデータを要求する際に呼びだすコールバック関数 - * \param obj コールバック関数を実行する際に第一引数に指定するオブジェクト変数 - * - * PCMフォーマットが違う以外は、 CriMvSoundInterface::SetCallbackGetFloat32PcmData() と同じです。 - * - * \sa CriMvSoundInterface::SetCallbackGetFloat32PcmData() - */ - /* pure */ virtual void SetCallbackGetSint16PcmData(CriUint32 (*func)(void *obj, CriUint32 nch, CriSint16 *pcmbuf[], CriUint32 req_nsmpl), void *obj)=0; - - /*EN - * \brief Starts sound output - * - * CRI Movie will call this method when it needs to start playing sound. The PCM data callback function - * has to be called after this function until movie playback is finished.
- * - * Your sound module should begin incrementing its playback time when this method is called. - * - * \remarks - * On success, this should set the status to CriMvSoundInterface::MVEASY_SOUND_STATUS_EXEC. - */ - /*JP - * \brief サウンド出力の開始 - * - * サウンド出力を開始します。PCMデータ取得用コールバック関数は、本関数の呼出し後から実行してください。 - */ - /* pure */ virtual void Start(void)=0; - - /*EN - * \brief Stops sound output - * - * CRI Movie will call this when the movie playback stops, or the status changes to MVEASY_STATUS_PLAYEND.
- * - * When EasyPlayer wants to pause and restart playback, it will call CriMvSoundInterface::Pause() - * instead of this method.
- * - * Your sound module should set its playback time to 0 when this method is called. - * - * \remarks - * This should set the status to CriMvSoundInterface::MVEASY_SOUND_STATUS_STOP. - * - * \sa CriMvSoundInterface::Pause(), CriMvSoundInterface::Start() - */ - /*JP - * \brief サウンド出力の停止 - * - * サウンド出力を停止します。再開できるようにする必要はありません。
- * EasyPlayerが再開処理を行いたい場合は、本関数ではなく、 CriMvSoundInterface::Pause()を呼び出します。
- * CriMvSoundInterface::Stop() 呼出し後は、コルーバック関数を呼ばないように実装してください。 - * - * \sa CriMvSoundInterface::Pause(), CriMvSoundInterface::Stop() - */ - /* pure */ virtual void Stop(void)=0; - - /*EN - * \brief Gets status of sound module - * \return The module status - * - * This must return one of the enumerated values in CriMvSoundInterface::Status.
- * - * While this method returns CriMvSoundInterface::MVEASY_SOUND_STATUS_EXEC, EasyPlayer will call the - * PCM data callback.
- * When a movie has finished playing and this method returns CriMvSoundInterface::MVEASY_SOUND_STATUS_STOP, - * EasyPlayer will call CriMvSoundInterface::DestroyOutput(). - * - * \sa CriMvSoundInterface::Status - */ - /*JP - * \brief サウンドモジュールの状態取得 - * - * サウンドモジュールの状態を取得します。 - * - * \sa CriMvSoundInterface::Status - */ - /* pure */ virtual Status GetStatus(void)=0; - - /*EN - * \brief Pauses or resumes sound output - * \param sw Pause or resume playback. - * - * If \a sw is 1 (ON), output will be paused.
- * If \a sw is 0 (OFF), output will be resumed.
- * - * Temporarily pauses or resumes sound output.
- * - * When you pause sound output, you must pause your playback timer as well. - */ - /*JP - * \brief サウンド出力の一時停止または再開 - * \param sw ポーズスイッチ。ポーズONの場合は1、ポーズOFF(レジューム)の場合は0を指定します。 - * - * 本関数の動作は引数に依存します。
- * 引数 sw がON(1)なら、一時停止。引数 sw がOFF(0)ならサウンド出力再開です。 - */ - /* pure */ virtual void Pause(CriBool sw)=0; - - /*EN - * \brief Gets the time, in seconds, that sound has been playing - * \param count Playback time counter - * \param unit Counter increment per second - * - * CRI Movie calls this method periodically for some damn reason.
- *
- * The time, in seconds, is specified by \a count / \a unit.
- * - * For example, if \a count was 500 and \a unit was 1000, that would be 0.5 seconds.
- * - * \remarks - * Before Start() is called, and after Stop() is called, \a count should be 0. - */ - /*JP - * \brief 再生時刻の取得 - * \param count タイマカウント - * \param unit 1秒あたりのタイマカウント値。count ÷ unit で秒単位の時刻となります。 - * - * タイマ時刻を取得します。時刻はcountとunitの二つの変数で表現します。
- * count ÷ unit で秒単位の時刻となるような値を返します。
- * 再生開始前( CriMvSoundInterface::Start()呼び出し前)および - * 再生停止後( CriMvSoundInterface::Stop()呼び出し後)は、時刻0(タイマカウントが0)を返します。 - */ - /* pure */ virtual void GetTime(CriUint64 &count, CriUint64 &unit)=0; // sec = count / unit. - -protected: - virtual ~CriMvSoundInterface(void) {} -}; - -/*EN - * \brief System Timer Interface Class for EasyPlayer - * \ingroup MDL_IF_TIMER - * - * If you want to synchronize video frames with something other than the audio track, or if you - * need to play a movie that does not have an audio track, you will need to pass an instance of - * a class derived from CriMvSystemTimerInterface to CriMvEasyPlayer::Create().
- * - * If you do not need any special timer facilities, you can pass NULL to CriMvEasyPlayer::Create() instead.
- * - * All functions are pure virtual. - * - * \sa CriMvEasyPlayer::Create(), CriMvEasyPlayer::SyncMasterTimer() - */ -/*JP - * \brief システムタイマーインタフェース for EasyPlayer - * \ingroup MDL_IF_TIMER - * - * システムタイマーは音無しムービ再生時に、ビデオフレームの送出タイミングを調整するために使用されます。
- * このクラスを定義することで、自前のタイマシステムを使ってEasyPlayerのストリーミング再生が可能になります。
- * 全ての関数は純粋仮想関数として定義されているので、全ての関数を必ず実装してください。 - * - * \sa CriMvEasyPlayer::Create(), CriMvEasyPlayer::SyncMasterTimer() - */ -class CriMvSystemTimerInterface -{ -public: - /*EN - * \brief Starts timer and resets it to 0 - * - * When this method is called, your internal counter should initialize itself to 0 and start - * normal operation. - */ - /*JP - * \brief タイマ開始 - * - * タイマのカウントを開始します。この関数が呼ばれた時が時刻0となります。 - */ - /* pure */ virtual void Start(void)=0; - - /*EN - * \brief Stops the timer and resets it to 0 - * - * When this method is called, your internal counter should stop incrementing, and re-initialize - * itself to 0. After this method has been called, CriMvSystemTimerInterface::GetTime() must - * return a time of 0 seconds. - */ - /*JP - * \brief タイマ停止 - * - * タイマのカウントを停止します。この関数が呼ばれたあとに、そのタイマを再開することはありません。 - */ - /* pure */ virtual void Stop(void)=0; - - /*EN - * \brief Pauses or resumes the timer - * - * \param sw Pause or resume timer operation. - * - * If \a sw is 1 (ON), the timer will be paused.
- * If \a sw is 0 (OFF), the timer will be resumed.
- * - * Temporarily pauses or resumes the timer.
- * - * When you pause the timer, you must maintain the previous value of the counter. - */ - /*JP - * \brief タイマの一時停止または再開 - * \param sw ポーズスイッチ。ON(1)なら一時停止、OFF(0)なら再開。 - * - * 本関数の動作は引数に依存します。
- * 引数 sw がON(1)なら、一時停止。引数 sw がOFF(0)ならタイマカウント再開です。 - */ - /* pure */ virtual void Pause(CriBool sw)=0; - - /*EN - * \brief Gets the time, in seconds, that the timer has been running - * - * \param count Timer counter - * \param unit Counter increment per second - * - * CRI Movie calls this method periodically to synchronize video playback with the - * movie's internal framerate.
- *
- * The time, in seconds, is specified by \a count / \a unit.
- * - * For example, if \a count was 500 and \a unit was 1000, that would be 0.5 seconds.
- * - * \remarks - * Before Start() is called, and after Stop() is called, \a count should be 0. - */ - /*JP - * \brief 経過時刻の取得 - * \param count タイマカウント - * \param unit 1秒あたりのタイマカウント値。count ÷ unit で秒単位の時刻となります。 - * - * タイマ時刻を取得します。時刻はcountとunitの二つの変数で表現します。
- * count ÷ unit で秒単位の時刻となるような値を返します。
- * 再生開始前( CriMvSystemTimerInterface::Start()呼び出し前)および - * 再生停止後( CriMvSystemTimerInterface::Stop()呼び出し後)は、時刻0(タイマカウントが0)を返します。 - */ - /* pure */ virtual void GetTime(CriUint64 &count, CriUint64 &unit)=0; - -protected: - virtual ~CriMvSystemTimerInterface(void) {} -}; - - -/*EN - * \brief EasyPlayer Interface class for CRI Movie - * \ingroup MDL_EASY_PLAYER - */ -/*JP - * \brief EasyPlayerインタフェース - * \ingroup MDL_EASY_PLAYER - */ -class CriMvEasyPlayer : public CriAllocator -{ -public: - /*EN - * \brief The possible states an EasyPlayer handle can be in. - * - * An EasyPlayer handle takes on various states, depending on where it is in the decoding process. - * You can check the status of a valid EasyPlayer handle at any time by calling CriMvEasyPlayer::GetStatus(). - * - * An EasyPlayer handle is created in the MVEASY_STATUS_STOP state. During movie playback, the status - * transitions through various states from MVEASY_STATUS_STOP to MVEASY_STATUS_PLAYEND. - * - * An application does not need to check all states. At a minimum, it only needs to check for - * MVEASY_STATUS_STOP, MVEASY_STATUS_PLAYING, MVEASY_STATUS_PLAYEND, - * and MVEASY_STATUS_ERROR. - * - * If an application calls CriMvEasyPlayer::DecodeHeader(), the status of the EasyPlayer handle will change to - * MVEASY_STATUS_WAIT_PREP when CRI Movie has finished analyzing the movie information. The EasyPlayer - * handle will remain in this state until the application calls CriMvEasyPlayer::Prepare() or - * CriMvEasyPlayer::Start(). Once the state has changed to MVEASY_STATUS_WAIT_PREP, information - * about the movie can be retrieved by calling CriMvEasyPlayer::GetMovieInfo(). - * - * If an application calls CriMvEasyPlayer::Prepare(), the EasyPlayer handle status will change to - * MVEASY_STATUS_READY once CRI Movie has finished buffering enough input and decoded output for playback. - * The handle will remain in this state until CriMvEasyPlayer::Start() is called. This allows the application - * to better control playback timing, since a movie can immediately start playing. - * - * Once CriMvEasyPlayer::Start() is called and the movie is actively playing, the status will alternate - * between MVEASY_STATUS_PLAYING and MVEASY_STATUS_PREP, as CRI Movie plays back frames and decodes - * new ones. - * - * When the movie has finished playing normally, the status of the EasyPlayer handle will automatically change - * to MVEASY_STATUS_PLAYEND. If the movie is in looping mode, however, once the movie reaches the - * end, it will start playing from the beginning and the status will not change to MVEASY_STATUS_PLAYEND. - * - * When CriMvEasyPlayer::Stop() is called, the status of the handle will change to MVEASY_STATUS_STOP - * once it has finished any decoding and playback that is in progress. This does not happen immediately, - * but will take a few cycles. - * - * If there are any problems during playback, for instance insufficient memory or invalid input data, the - * status will change to MVEASY_STATUS_ERROR. When the handle is in state MVEASY_STATUS_ERROR, - * the application must call CriMvEasyPlayer::Stop() and wait until the state changes to MVEASY_STATUS_STOP - * before doing anything else with the handle. - * - * Once the state is MVEASY_STATUS_STOP or MVEASY_STATUS_PLAYEND, the handle can be deleted by - * calling CriMvEasyPlayer::Destroy(). - * - * \attention - * As of CRI Movie version 2.00, the handling of the MVEASY_STATUS_ERROR state has changed. Previously, - * a handle could be destroyed when it was in the MVEASY_STATUS_ERROR state. Now, an application - * must call CriMvEasyPlayer::Stop() and wait for the MVEASY_STATUS_STOP state before destroying - * the handle. - * - * \sa CriMvEasyPlayer::GetStatus(), CriMvEasyPlayer::Start(), CriMvEasyPlayer::DecodeHeader(), - * CriMvEasyPlayer::Prepare(), CriMvEasyPlayer::GetMovieInfo(), CriMvEasyPlayer::Stop(), - * CriMvEasyPlayer::Destroy() - */ - /*JP - * \brief EasyPlayerハンドル状態 - * - * EasyPlayer のハンドル状態です。 - * ハンドル状態は CriMvEasyPlayer::GetStatus() でいつでも取得することが出来ます。
- * ハンドル作成直後は MVEASY_STATUS_STOP 状態です。 - * - * ハンドル状態は MVEASY_STATUS_STOP から MVEASY_STATUS_PLAYEND まで順に遷移していきます。
- * アプリケーションがムービを再生するにあたって、必ずしもこの全ての状態をチェックする必要はありません。
- * 最低限、MVEASY_STATUS_STOP, MVEASY_STATUS_PLAYING, MVEASY_STATUS_PLAYEND, MVEASY_STATUS_ERROR さえ - * チェックすれば、ムービの再生を行うことができます。 - * - * EasyPlayer ハンドル作成後、ムービの解像度などが既に確定している場合は、アプリケーションは - * CriMvEasyPlayer::Start() を直接呼び出すことができます。この場合、ハンドル状態は自動的に - * MVEASY_STATUS_PLAYEND まで遷移していきます。 - * - * 最初に CriMvEasyPlayer::DecodeHeader() を呼び出した場合は、ヘッダ解析が終了するとハンドル状態は - * MVEASY_STATUS_WAIT_PREP となり、アプリケーションから CriMvEasyPlayer::Prepare() または - * CriMvEasyPlayer::Start() が呼ばれるまで待機します。 - * - * MVEASY_STATUS_WAIT_PREP状態以降、 CriMvEasyPlayer::GetMovieInfo() でムービ情報を取得することができます。
- * CriMvEasyPlayer::Prepare() を呼び出した場合は、ヘッダ解析およびデータのバッファリングが終わると、 - * ハンドル状態は MVEASY_STATUS_READY となり、アプリケーションから CriMvEasyPlayer::Start() が - * 呼ばれるまで待機します。これによって再生開始のタイミングを調整することができます。 - * - * 再生が終了すると自動的に MVEASY_STATUS_PLAYEND になります。 - * - * CriMvEasyPlayer::Stop() を呼び出した場合は、デコーダの停止処理が終わったあとに MVEASY_STATUS_STOP - * 状態になります。 CriMvEasyPlayer::Stop() 終了直後に停止状態になるとは限りません。 - * - * メモリ不足やデータエラーなど何らかの問題が発生した場合は MVEASY_STATUS_ERROR 状態となります。
- * MVEASY_STATUS_ERROR 状態になった場合は CriMvEasyPlayer::Stop() を呼び出してハンドル状態が - * MVEASY_STATUS_STOP 状態に遷移させてください。
- * - * CriMvEasyPlayer::Destroy() は MVEASY_STATUS_STOP, MVEASY_STATUS_PLAYEND の - * いずれかの状態の時のみ呼び出すことができます。 - * - * \attention - * CRI Movie Ver.2.00 で MVEASY_STATUS_ERROR 状態についての仕様が変更になりました。
- * MVEASY_STATUS_ERROR 状態でハンドル破棄が出来なくなり、 CriMvEasyPlay::Stop() を呼び出す必要があります。 - * - * \sa CriMvEasyPlayer::GetStatus(), CriMvEasyPlayer::Start(), CriMvEasyPlayer::DecodeHeader(), - * CriMvEasyPlayer::Prepare(), CriMvEasyPlayer::GetMovieInfo(), CriMvEasyPlayer::Stop(), - * CriMvEasyPlayer::Destroy() - */ - enum Status { - MVEASY_STATUS_STOP, /*EN< Standstill. No processing is happening. - * EasyPlayer handles are created in this state. */ - /*JP< 停止中 */ - MVEASY_STATUS_DECHDR, /*EN< The EasyPlayer handle is now parsing the movie header, - * including information about the width and height of the video stream. */ - /*JP< ヘッダ解析中 */ - MVEASY_STATUS_WAIT_PREP, /*EN< The EasyPlayer handle is a waiting for the work buffer to be allocated. */ - /*JP< バッファリング開始待機中 */ - MVEASY_STATUS_PREP, /*EN< The EasyPlayer handle is now buffering video and audio data. */ - /*JP< 再生準備中 */ - MVEASY_STATUS_READY, /*EN< Ready to start playback. */ - /*JP< 再生待機 */ - MVEASY_STATUS_PLAYING, /*EN< The decoders are currently decoding and playing output. */ - /*JP< 再生中 */ - MVEASY_STATUS_PLAYEND, /*EN< The end of the movie has been reached. */ - /*JP< 再生終了 */ - MVEASY_STATUS_ERROR, /*EN< An error has occurred. */ - /*JP< エラー */ - - /* Keep enum 4bytes */ - MVEASY_STATUS_MAKE_ENUM_SINT32 = 0x7FFFFFFF - }; - - /*EN - * \brief Supported timer types; used to synchronize video frames. - */ - /*JP - * \brief タイマ種別 - */ - enum TimerType { - MVEASY_TIMER_NONE, /*EN< No synchronization. The output is available as soon as - * each frame is decoded. */ - /*JP< ビデオフレームは時刻同期をしません。デコードが終わったフレーム - * はすぐに取得することができます。 */ - MVEASY_TIMER_SYSTEM, /*EN< Video frames synchronize to the system timer.
- * You must provide an instance of CriMvSystemTimerInterface to - * CriMvEasyPlayer::Create(). */ - /*JP< ビデオフレームはシステム時刻に同期します。システム時刻はアプリケーション - * が CriMvSystemTimerInterface としてCriMvEasyハンドルに設定する必要があります。 */ - MVEASY_TIMER_AUDIO, /*EN< Video frames synchronize with the movie's audio data.
- * You must provide an instance of CriMvSoundInterface to CriMvEasyPlayer::Create().
- * If the movie does not have audio, video frames will synchronize with the system timer. */ - /*JP< ビデオフレームはムービのオーディオ時刻に同期します。 - * アプリケーションは GetTime関数を含む CriMvSoundInterface をCriMvEasy - * ハンドルに設定する必要があります。もしもムービデータにオーディオが含まれて - * いない場合は、ビデオはシステム時刻に同期します。 */ - - /* Keep enum 4bytes */ - MVEASY_TIMER_MAKE_ENUM_SINT32 = 0x7FFFFFFF - }; - - /*EN - * \ingroup MODULE_INIT - * - * \brief Creates an EasyPlayer handle - * - * \param heap Handle to a CriHeap object - * \param freader File input interface - * \param stimer System timer interface - * \param sound Sound module interface - * \param err Optional error code - * - * \return A valid CriMvEasyPlayer handle, or NULL if the handle cannot be allocated - * - * Creates and initialize a new EasyPlayer handle. Its status is initially MVEASY_STATUS_STOP. - * Memory for the handle is allocated from the provided CriHeap object. - * - * If memory allocation fails, this function will return NULL. Be sure to initialize and create - * your heap with criHeap_Initialize() and criHeap_Create() before calling this function. - * - * \remarks - * CriMv::Initialize() must be called before calling this function. - * - */ - /*JP - * \ingroup MODULE_INIT - * \brief EasyPlayerハンドルの作成 - * \param heap CriHeapハンドル - * \param freader ファイル読み込みインタフェース - * \param stimer システムタイマインタフェース - * \param sound サウンドインタフェース - * \param err エラー情報 - * \return CriMvEasyハンドルを返します。エラーが発生した場合は、NULLを返します。 - * - * 本関数は CriMv::Initialize() 呼び出しよりもに実行してください。
- * ハンドル作成後はハンドル状態はMVEASY_STATUS_STOPとなります。
- * ハンドル確保に必要なメモリは全て、引数で渡された CriHeap を使って確保されます。
- * メモリ不足などでエラーが発生した場合は、本関数はNULLを返します。 - * - */ - static CriMvEasyPlayer* CRIAPI Create(CriHeap heap, - CriMvFileReaderInterface *freader, - CriMvSystemTimerInterface *stimer, - CriMvSoundInterface *sound, - CriError &err=CriMv::ErrorContainer); - /*EN - * \ingroup MODULE_INIT - * \brief Destroy a handle - * \param err Optional error code - * - * \ingroup MODULE_INIT - * - * \brief Destroys an EasyPlayer handle - * \param err Optional error code - * - * Destroys an EasyPlayer handle previously created with CriMvEasyPlayer::Create(), and frees its resources. - * - * An EasyPlayer handle can only be destroyed when it is in the MVEASY_STATUS_STOP or MVEASY_STATUS_PLAYEND state. - * Attempting to destroy a handle when it is in any other state will cause an error. - * - * Any work buffers allocated via CriHeap, if still associated with the handle, are freed by this call. - * - * \sa CriMvEasyPlayer::Create(), CriMvEasyPlayer::Status, CriMvEasyPlayer::GetStatus() - */ - /*JP - * \ingroup MODULE_INIT - * \brief EasyPlayerハンドルの破棄 - * \param err エラー情報(省略可) - * - * CriMvEasyPlayer::Create()で作成したEasyPlayerハンドルを破棄します。 - * - * ハンドル状態が MVEASY_STATUS_STOP 、 MVEASY_STATUS_PLAYEND の時にのみハンドルを破棄することができます。
- * それ以外の状態で呼び出した場合は、エラーになります。
- * - * ハンドル状態が MVEASY_STATUS_ERROR だった場合は、CriMvEasyPlayer::Stop() を呼び出して - * MVEASY_STATUS_STOP 状態になってからハンドル破棄してください。
- * ハンドル状態は CriMvEasyPlayer::GetStatus() で確認することができます。 - * - * ハンドル作成時に指定したCriHeapによって確保されたメモリで未解放の全ては、 - * この関数の呼び出しによって解放されます。 - * - * \sa CriMvEasyPlayer::Create(), CriMvEasyPlayer::Status, CriMvEasyPlayer::GetStatus() - */ - void Destroy(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_BASIC - * - * \brief Returns status of an EasyPlayer handle. - * \param err Optional error code - * \return Handle status - * - * Returns the current status of an EasyPlayer handle. The status will be one of the values - * defined by CriMvEasyPlayer::Status. - * - * \sa CriMvEasyPlayer::Status - */ - /*JP - * \ingroup MODULE_BASIC - * \brief ハンドル状態の取得 - * \param err エラー情報(省略可) - * \return ハンドル状態 CriMvEasyPlayer::Status - * - * ハンドル状態を取得します。 - * - * \sa CriMvEasyPlayer::Status - */ - Status GetStatus(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_BASIC - * - * \brief Executes heatbeat functions for an EasyPlayer handle - * \param err Optional error code - * - * Performs regular processing for an EasyPlayer handle, including handoff and parsing of input - * buffers, and audio decoding. Additionally, it checks for situations where the handle state - * should change to one of the values defined by CriMvEasyPlayer::Status, and changes state as - * necessary. - * - * This function and CriMvEasyPlayer::ExecuteDecode() should be called periodically during movie - * playback or when waiting for CriMvEasyPlayer::DecodeHeader() to complete. It takes a relatively - * low CPU load, and should typically be called on every vertical blank. - * - * \remarks - * Note that this function does not perform any video decoding. Decoding is done in - * CriMvEasyPlayer::ExecuteDecode(). - * - * \sa CriMvEasyPlayer::Status, CriMvEasyPlayer::ExecuteDecode(), CriMvEasyPlayer::DecodeHeader() - */ - /*JP - * \ingroup MODULE_BASIC - * \brief EasyPlayerサーバ関数 - * \param err エラー情報(省略可) - * - * ムービのヘッダ解析や入力バッファ制御、オーディオデコード等を行います。
- * EasyPlayer ハンドルの状態遷移もこの関数で行います。
- * この関数はビデオのデコードは行いません。そのためCPU負荷はあまり高くなりません。
- * 本関数はアプリケーションのメインループで毎回呼び出すようにしてください。 - * - * \sa CriMvEasyPlayer::Status - */ - void Update(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_BASIC - * - * \brief Synchronizes the master timer of an EasyPlayer handle. - * \param err Optional error code - * - * Synchronizes the timing of video frames to the master timer used by this EasyPlayer handle. - * If the master timer is of type MVEASY_TIMER_AUDIO and the movie does not have audio, - * EasyPlayer will use the system timer that was set when the handle was created. - * - * \sa CriMvEasyPlayer::TimerType, CriMvEasyPlayer::SetMasterTimer(), CriMvSystemTimerInterface - */ - /*JP - * \ingroup MODULE_BASIC - * \brief マスタタイマへの同期 - * \param err エラー情報(省略可) - * - * ムービ再生時刻をマスタタイマに同期させます。
- * マスタタイマは CriMvEasyPlayer::SetMasterTimer() によって指定されたタイマを使います。
- * タイマ種別として MVEASY_TIMER_AUDIO が指定されていて、再生するムービにオーディオが - * 含まれていない場合は、ハンドル作成時のシステムタイマを使用します。 - * - * この関数は、ハンドル作成時に指定したシステムタイマインタフェースの - * CriMvSystemTimerInterface::GetTime() を呼び出します。 - * - * \sa CriMvEasyPlayer::TimerType, CriMvEasyPlayer::SetMasterTimer(), CriMvSystemTimerInterface - */ - void SyncMasterTimer(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_BASIC - * - * \brief Decodes a video frame - * \param err Optional error code - * \return \a TRUE If the movie is currently in a playback state - * \return \a FALSE If the movie is not playing - * - * Performs the actual video decoding. Each call to this function decodes a single frame. - * It does not return until the frame has been decoded. - * - * Video decoding can impose a very heavy CPU load, so calling this function from an application's - * main thread may cause your application to miss the vertical blank interval. To avoid this situation, - * ExecuteDecode() can be called from a separate, lower-priority thread. See the Mutithreaded Decoding - * tutorial for a full explanation. - * - * The return value describes the movie playback state. If TRUE, the movie is currently playing - * (or decoding the movie header) or ready to play. If FALSE, playback has not yet been started, - * or playback has finished. - * - * If a decoding thread is used, an application must wait until this function returns FALSE before destroying - * the thread. Otherwise, the handle state will not transition to MVEASY_STATUS_STOP or MVEASY_STATUS_PLAYEND, - * and the EasyPlayer handle cannot be destroyed. - * - * \attention - * ExecuteDecode() is the only CRI Movie function that is safe to call from a separate thread. - * No other CRI Movie functions should be considered to be thead-safe. - * - */ - /*JP - * \ingroup MODULE_BASIC - * \brief ビデオデコード - * \param err エラー情報(省略可) - * \return ムービ再生中はTRUE 、再生終了また停止後はFALSEを返します。 - * - * ビデオデータのデコードを行います。
- * 本関数は1ピクチャ分のデコードを終わるまで終了しません。
- * ピクチャデコードは負荷の高い処理なので、アプリケーションのメインスレッドから呼び出すと処理落ちが発生する可能性があります。
- * その場合は、メインスレッドよりも優先度の低い別スレッドから呼び出すようにしてください。 - * - * 本関数の返り値は、ムービ再生の実行中かどうかを表しています。
- * デコード用スレッドを終了する場合は、返り値がFALSEになるのを待たなければいけません。
- * 返り値がTRUEの間にデコードスレッドを終了してしまうと、ハンドルの状態が MVEASY_STATUS_STOP や - * MVEASY_STATUS_PLAYEND に遷移できず、ハンドル破棄が出来なくなります。
- * - */ - CriBool ExecuteDecode(CriError &err=CriMv::ErrorContainer); - - /* 再生制御 */ - /*EN - * \ingroup MODULE_CONTROL - * - * \brief Sets the name of the movie file to play - * \param fname Name of the movie file - * \param err Optional error code - * - * Sets the name of the movie file to play, but does not open the file. The length of the filename - * (including path) is limited to CRIMV_MAX_FILE_NAME characters. EasyPlayer copies this - * string to internal memory, so a temporary variable can be used. - * - * If an application plays the same movie repeatedly, it only needs to call this function once. - * - * Multiple calls to this function will overwrite previous values. Calling CriMvEasyPlayer::SetData() - * will clear any filename set by this function. - * - * \remarks - * This function can only be called when the handle status is MVEASY_STATUS_STOP or MVEASY_STATUS_PLAYEND, - * or from the file request callback. See CriMvEasyPlayer::SetFileRequestCallback() for details. - * - * \remarks - * Calling this function does not open the file. The file is opened by a call to CriMvEasyPlayer::Update(). - * - * \sa CriMvEasyPlayer::SetFileRequestCallback(), CriMvEasyPlayer::SetData() - */ - /*JP - * \ingroup MODULE_CONTROL - * - * \brief 再生ファイルの指定 - * \param fname ムービファイルパス - * \param err エラー情報(省略可) - * - * 再生するムービのファイルパスを設定します。ファイルパスの最大長は CRIMV_MAX_FILE_NAME バイトです。
- * EasyPlayerは内部でこのファイルパスをコピーするので、引数で渡した文字列は破棄してもかまいません。 - * - * 同じファイルを繰り返し再生する場合は、この関数を再度呼び出す必要はありません。 - * - * この関数を呼び出した直後にもう一度この関数を呼び出すと、前回のファイル情報は新しいファイル情報に上書きされます。 - * CriMvEasyPlayer::SetData()関数を呼び出した場合は、事前に設定したファイル情報がクリアされます。 - * - * \para 備考1: - * この関数はハンドル状態が MVEASY_STATUS_STOP もしくは MVEASY_STATUS_PLAYEND時のみ呼び出し可能です。 - * またはファイル要求コールバック関数内でもこの関数を呼び出すことができます。詳細は CriMvEasyPlayer::SetFileRequestCallback()関数を - * 参照してください。 - * - * \para 備考2: - * この関数の内部ではファイルのオープン要求はしません。ファイルのオープン処理は CriMvEasyPlayer::Update() 関数の中で行われます。 - * - * \sa CriMvEasyPlayer::SetFileRequestCallback(), CriMvEasyPlayer::SetData(), CriMvEasyPlayer::SetFileRange() - */ - void SetFile(CriChar8 *fname, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_CONTROL - * - * \brief Sets in-memory movie data - * \param dataptr Pointer to movie data - * \param datasize Size of data, in bytes - * \param err Optional error code - * - * Sets the in-memory data buffer for this EasyPlayer handle to point to the provided buffer, - * but does not attempt to read that buffer. After this call, the memory pointed to by \a dataptr - * belongs to CRI Movie and must remain valid until playback is complete. - * - * If an application plays the same movie data repeatedly, it only needs to call this function once. - * - * Multiple calls to this function will overwrite previous values. Calling CriMvEasyPlayer::SetFile() - * will clear any pointer set by this function. - * - * \remarks - * This function can only be called when the handle status is MVEASY_STATUS_STOP or MVEASY_STATUS_PLAYEND, - * or from the file request callback. See CriMvEasyPlayer::SetFileRequestCallback() for details. - * - * \remarks - * Calling this function does not attempt to reference the memory. The memory read is initiated by a call - * to CriMvEasyPlayer::DecodeHeader(), CriMvEasyPlayer::Prepare() or CriMvEasyPlayer::Start(). - * - * \sa CriMvEasyPlayer::SetFileRequestCallback(), CriMvEasyPlayer::SetFile(), CriMvEasyPlayer::SetFileRange() - */ - /*JP - * \ingroup MODULE_CONTROL - * \brief メモリ上データの指定 - * \param dataptr データポインタ - * \param datasize データサイズ - * \param err エラー情報(省略可) - * - * この関数はEasyPlayerのハンドル状態がMVEASY_STATUS_STOPかMVEASY_STATUS_PLAYENDの時に呼び出してください。
- * または、ファイル要求コールバックの内部で呼び出すことができます。
- * - * 本関数を繰り返し呼び出した場合は、メモリ情報は上書きされます。
- * CriMvEasyPlayer::SetFile()を呼び出した場合は、本関数で指定したメモリ情報はハンドル内から消去されます。 - * - * 同じハンドルで同じムービデータを繰り返し再生する場合は、本関数の呼び出しは省略することができます。 - * - * 指定されたメモリ領域に実際にアクセスするのは、 CriMvEasyPlayer::DecodeHeader(), CriMvEasyPlayer::Prepare(), - * CriMvEasyPlayer::Start() のいずれかが呼び出された時以降です。
- * - * \sa CriMvEasyPlayer::SetFileRequestCallback(), CriMvEasyPlayer::SetFile(), CriMvEasyPlayer::SetFileRange() - */ - void SetData(CriUint8 *dataptr, CriUint32 datasize, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_CONTROL - * \brief Set a pack file and pass offset and range of movie file to an EasyPlayer handle - * \param fname File name string pointer of the pack file - * \param offset offset in byte to movie data in the packing file [in bytes] - * \param range size of movie data from the offset in the packing file [in bytes] - * \param err Optional error code - * - * Sets the name of the pack file that contains the movie file to play. - * EasyPlayer tries to read data from 'offset' through 'range' in the pack file as the movie data. - * Passing a negative value as range, EasyPlayer reads data until the end of the pack file. - * - * The length of file name is limited until CRIMV_MAX_FILE_NAME. - * EasyPlayer handle copies the file name string into the handle. - * You can use a temporary variable as the file name string. - * - * If an application plays the same movie repeatedly, it only needs to call this function once. - * - * Multiple calls to this function will overwrite previous values. Calling CriMvEasyPlayer::SetData() - * will clear any filename set by this function. - * - * \remarks - * This function can only be called when the handle status is MVEASY_STATUS_STOP or MVEASY_STATUS_PLAYEND, - * or from the file request callback. See CriMvEasyPlayer::SetFileRequestCallback() for details. - * - * \remarks - * Calling this function does not open the file. The file is opened by a call to CriMvEasyPlayer::Update(). - * - * \sa CriMvEasyPlayer::SetFileRequestCallback(), CriMvEasyPlayer::SetData(), CriMvEasyPlayer::SetFile() - */ - /*JP - * \ingroup MODULE_CONTROL - * - * \brief 再生したいムービファイルを含むパックファイルの指定 - * \param fname パックファイル名 (パスを含む) - * \param offset パックファイル内のムービデータまでのオフセット (単位: バイト) - * \param range パックファイル内のムービデータのサイズ (単位:バイト) - * \param err エラー情報(省略可) - * - * 再生するムービを含むパックファイルを指定します。引数で指定した offset 位置から range サイズ分までをパックファイル内に含まれるムービデータみなします。 - * rangeに負値を入力するとパックファイルの終端までをムービとして読み込みます。 - * - * パックファイルのファイルパスの最大長は CRIMV_MAX_FILE_NAME バイトです。 - * EasyPlayerは内部でこのファイルパスをコピーするので、引数で渡した文字列は破棄してもかまいません。 - * - * 同じファイルを繰り返し再生する場合は、この関数を再度呼び出す必要はありません。 - * - * この関数を呼び出した直後に、もう一度この関数を呼び出すと、前回のファイル情報は新しいファイル情報に上書きされます。 - * CriMvEasyPlayer::SetData()関数を呼び出した場合は、事前に設定したファイル情報がクリアされます。 - * - * \para 備考1: - * この関数はハンドル状態が MVEASY_STATUS_STOP もしくは MVEASY_STATUS_PLAYEND時のみ呼び出し可能です。 - * またはファイル要求コールバック関数内でもこの関数を呼び出すことができます。詳細は CriMvEasyPlayer::SetFileRequestCallback()関数を - * 参照してください。 - * - * \para 備考2: - * この関数の内部ではファイルのオープン要求はしません。ファイルのオープン処理は CriMvEasyPlayer::Update() 関数の中で行われます。 - * - * \sa CriMvEasyPlayer::SetFileRequestCallback(), CriMvEasyPlayer::SetData(), CriMvEasyPlayer::SetFile() - */ - void SetFileRange(CriChar8 *fname, CriUint64 offset, CriSint64 range, CriError &err=CriMv::ErrorContainer); - - /* 前回のムービデータをもう一度登録する(ファイル要求コールバック関数でのみ呼ぶこと) */ - void SetPreviousDataAgain(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_CONTROL - * - * \brief Reads movie header and analyzes movie information - * \param err Optional error code - * - * This function opens the movie file, reads the header, and starts to analyze the movie data. - * It does not start movie playback. - * - * When this function is called, the handle status changes to MVEASY_STATUS_DECHDR. Once EasyPlayer - * has finished reading the header and analyzing the movie, the status changes to MVEASY_STATUS_WAIT_PREP. - * When the status is MVEASY_STATUS_WAIT_PREP, CriMvEasyPlayer::GetMovieInfo() can be successfully called. - * - * To continue playback, call CriMvEasyPlayer::Prepare() or CriMvEasyPlayer::Start() when the handle status - * is MVEASY_STATUS_WAIT_PREP. - * - * \remarks - * This function can only be called when the handle status is MVEASY_STATUS_STOP or MVEASY_STATUS_PLAYEND. - * - * \remarks - * You must either call CriMvEasyPlayer::SetFile() or CriMvEasyPlayer::SetData(), or provide a file request - * callback with CriMvEasyPlayer::SetFileRequestCallback(), before calling this function. - * - * \remarks - * Once this function has been called, CriMvEasyPlayer::ExecuteDecode() and CriMvEasyPlayer::Update() must be - * called periodically in order for this function to have any effect. Otherwise, the handle status will - * never change. - * - * \sa CriMvEasyPlayer::GetStatus(), CriMvEasyPlayer::Prepare(), CriMvEasyPlayer::Start(), - * CriMvEasyPlayer::SetFileRequestCallback(), - * CriMvEasyPlayer::ExecuteDecode(), CriMvEasyPlayer::Update() - */ - /*JP - * \ingroup MODULE_CONTROL - * \brief ムービヘッダ解析 - * \param err エラー情報(省略可) - * - * ムービの再生は開始せず、ヘッダ解析のみ行って待機するための関数です。
- * この関数を使用してヘッダ解析を事前に済ませることにより、再生開始前にムービの解像度やオーディオの情報を - * 得ることができます。
- * 本関数を呼び出すと、EasyPlayerのハンドル状態はMVEASY_STATUS_STOP → MVEASY_STATUS_DECHDR と遷移していき、 - * ヘッダ解析が完了するとMVEASY_STATUS_WAIT_PREPとなります。
- * ムービ情報を取得するには、ハンドル状態がMVEASY_STATUS_WAIT_PREPになったあとに CriMvEasyPlayer::GetMovieInfo() - * を実行してください。
- * - * ハンドル状態がMVEASY_STATUS_WAIT_PREPの時に、 CriMvEasyPlayer::Prepare() か CriMvEasyPlayer::Start() を - * 呼ぶことで再生処理を続けることができます。
- * - * 本関数は EasyPlayerのハンドル状態がMVEASY_STATUS_STOPかMVEASY_STATUS_PLAYENDの時に呼び出してください。 - * - * 本関数を呼び出す前に CriMvEasyPlayer::SetFile() か CriMvEasyPlayer::SetData() でムービデータを指定してください。
- * ただし、ファイル要求コールバック関数を登録している場合は事前のムービデータ設定は省略することだきます。 - * - * \sa CriMvEasyPlayer::GetStatus(), CriMvEasyPlayer::Prepare(), CriMvEasyPlayer::Start(), CriMvEasyPlayer::SetFileRequestCallback() - */ - void DecodeHeader(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_CONTROL - * - * \brief Reads movie header, analyzes movie information, and buffers data. - * \param err Optional error code - * - * This function opens the movie file and gets it ready for immediate playback, by reading and analyzing - * the header and decoding and buffering video data. It allows a movie to start playing immediately when - * CriMvEasyPlayer::Start() is called, without an initial delay. - * - * When this function is called, the handle status changes to MVEASY_STATUS_DECHDR. Once EasyPlayer - * has finished reading and analyzing the movie data, the status changes to MVEASY_STATUS_PREP and EasyPlayer - * begins decoding video data. When the initial video data has been decoded and buffered, the status changes to - * MVEASY_STATUS_READY. - * - * The amount of data that is buffered, in seconds, is based on the value set by CriMvEasyPlayer::SetBufferingTime(). - * By default, this is 1 second. - * - * When the status is MVEASY_STATUS_READY, movie playback will start imediately when CriMvEasyPlayer::Start() - * is called. - * - * \remarks - * Unless you CriMvEasyPlayer::DecodeHeader() first, this function can only be called when the handle status - * is MVEASY_STATUS_STOP or MVEASY_STATUS_PLAYEND. - * - * \remarks - * You must either call CriMvEasyPlayer::SetFile() or CriMvEasyPlayer::SetData(), or provide a file request - * callback with CriMvEasyPlayer::SetFileRequestCallback(), before calling this function. - * - * \remarks - * Once this function has been called, CriMvEasyPlayer::ExecuteDecode() and CriMvEasyPlayer::Update() must be - * called periodically in order for this function to have any effect. Otherwise, the handle status will - * never change. - * - * \sa CriMvEasyPlayer::GetStatus(), CriMvEasyPlayer::DecodeHeader(), CriMvEasyPlayer::Start(), - * CriMvEasyPlayer::SetBufferingTime(), CriMvInputBufferInfo - */ - /*JP - * \ingroup MODULE_CONTROL - * \brief 再生準備(ヘッダ解析とバッファリング) - * \param err エラー情報(省略可) - * - * ムービの再生は開始せず、ヘッダ解析と再生準備のみを行って待機するための関数です。
- * この関数を使用して再生準備を事前に済ませることにより、ムービ再生開始のタイミングを細かく制御することができます。
- * (再生準備無しで再生開始関数を呼び出した場合は、実際に再生が始まるまでにタイムラグが発生します。)
- * 本関数を呼び出すと、EasyPlayerのハンドル状態はMVEASY_STATUS_STOP → MVEASY_STATUS_DECHDR → MVEASY_STATUS_PREP と遷移していき、 - * 再生準備が完了するとMVEASY_STATUS_READYとなります。 - * - * ハンドル状態がMVEASY_STATUS_READYの時に、 CriMvEasyPlayer::Start() を呼ぶことで再生を開始することができます。 - * - * CriMvEasyPlayer::DecodeHeader() の呼び出し無しでこの関数を呼び出す場合は、CriMvEasyPlayerのハンドル状態が - * MVEASY_STATUS_STOPかMVEASY_STATUS_PLAYEND でなければいけません。 - * - * 再生開始前には CriMvEasyPlayer::SetFile() か CriMvEasyPlayer::SetData() でムービデータを指定してください。
- * ただし、ファイル要求コールバック関数を登録している場合は事前のムービデータ設定は省略することだきます。 - * - * \sa CriMvEasyPlayer::GetStatus(), CriMvEasyPlayer::DecodeHeader(), CriMvEasyPlayer::Start(), - * CriMvEasyPlayer::SetBufferingTime(), CriMvInputBufferInfo - */ - void Prepare(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_CONTROL - * - * \brief Starts movie playback - * \param err Optional error code - * - * Opens the movie and starts playback. If CriMvEasyPlayer::Prepare() was not called, there will be a - * delay while the library reads the movie header and buffers the initial data. If CriMvEasyPlayer::Prepare() - * was called and the handle status is MVEASY_STATUS_READY, playback will start as soon as this function is called. - * - * \remarks - * If you call this function without calling CriMvEasyPlayer::DecodeHeader() or CriMvEasyPlayer::Prepare() - * first, this function can only be called when the handle status is MVEASY_STATUS_STOP, MVEASY_STATUS_PLAYEND, - * or MVEASY_STATUS_READY. - * - * \remarks - * You must either call CriMvEasyPlayer::SetFile() or CriMvEasyPlayer::SetData(), or provide a file request - * callback with CriMvEasyPlayer::SetFileRequestCallback(), before calling this function. - * - * \remarks - * Once this function has been called, CriMvEasyPlayer::ExecuteDecode() and CriMvEasyPlayer::Update() must be - * called periodically in order for this function to have any effect. Otherwise, the movie will not play and - * the handle status will never change. - * - * \sa CriMvEasyPlayer::GetStatus(), CriMvEasyPlayer::DecodeHeader(), CriMvEasyPlayer::Prepare() - */ - /*JP - * \ingroup MODULE_CONTROL - * \brief 再生開始 - * \param err エラー情報(省略可) - * - * ムービの再生を開始します。
- * CriMvEasyPlayer::Prepare()を呼ばずに、本関数を呼び出した場合は、ムービの解析と再生の準備を行うため、 - * 実際にムービの再生が始まるまでにタイムラグが発生します。
- * CriMvEasyPlayer::Prepare()を先に呼び出して、ハンドル状態がMVEASY_STATUS_READYになっていれば、 - * この関数を呼び出してすぐに再生が始まります。 - * - * CriMvEasyPlayer::DecodeHeader() または CriMvEasyPlayer::Prepare() の呼び出し無しでこの関数を呼び出す場合は、 - * CriMvEasyPlayerのハンドル状態が MVEASY_STATUS_STOPかMVEASY_STATUS_PLAYEND でなければいけません。 - * - * 再生開始前には CriMvEasyPlayer::SetFile() か CriMvEasyPlayer::SetData() でムービデータを指定してください。
- * ただし、ファイル要求コールバック関数を登録している場合は事前のムービデータ設定は省略することだきます。 - * - * \sa CriMvEasyPlayer::GetStatus(), CriMvEasyPlayer::DecodeHeader(), CriMvEasyPlayer::Prepare() - */ - void Start(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_CONTROL - * - * \brief Stops movie playback; resets a handle that is in an ERROR state, - * \param err Optional error code - * - * Tells the movie to stop playing and returns immediately. Note that this does not actually stop playback; - * an application must continue to call CriMvEasyPlayer::Update() and CriMvEasyPlayer::ExecuteDecode() until - * the status changes to MVEASY_STATUS_STOP. - * - * Once the handle is in the MVEASY_STATUS_STOP state, it can be reused for a different movie. - * - * If the handle state is MVEASY_STATUS_ERROR, an application must call this function and wait for the status - * to change to MVEASY_STATUS_STOP before destroying or reusing the player handle. - * - * In principle, this function does not reset any EasyPlayer handle parameters that were explicitly set via - * any of the settings APIs, so an application can replay the same movie by simply calling CriMvEasyPlayer::Start() - * once the state has changed to MVEASY_STATUS_STOP. However, calling this function will reset the following - * parameters: - * - * - The pause state (see CriMvEasyPlayer::Pause()) will be reset to OFF (not paused). - * - If a file request callback has been set (via CriMvEasyPlayer::SetFileRequestCallback()), the movie - * data information will be reset. - * - * See the description of CriMvEasyPlayer::ResetAllParameters() for a comparison of the parameters that are - * affected by that function and by this function. - * - * \remarks - * This function may call CriMvSoundInterface::Stop() and CriMvFileReaderInterface::Close(). For an EasyPlayer - * handle to change to MVEASY_STATUS_STOP, the sound and file interfaces need to transition to their STOP states. - * In the case of CriMvSoundInterface, this means that CriMvSoundInterface::GetStatus() will return - * MVEASY_SOUND_STATUS_STOP. For CriMvFileReaderInterface, this means that CriMvFileReaderInterface::GetCloseStatus() - * will return ASYNC_STATUS_COMPLETE. - * - * \sa CriMvEasyPlayer::Status, CriMvEasyPlayer::GetStatus(), CriMvEasyPlayer::ResetAllParameters() - */ - /*JP - * \ingroup MODULE_CONTROL - * \brief 再生停止/エラー状態からの復帰 - * \param err エラー情報(省略可) - * - * ムービ再生停止の要求を出します。本関数は即時復帰関数です。本関数内で全ての停止処理が実行されるわけではありません。
- * 本関数呼出し後、再生状態が MVEASY_STATUS_STOP なるまでは通常のメインループ処理を動かしてください。
- * 具体的には CriMvEasyPlayer::Update(), CriMvEasyPlayer::ExecuteDecode() が通常通り呼び出される必要があります。 - * - * 再生状態が MVEASY_STATUS_ERROR になった場合は、本関数を呼び出して MVEASY_STATUS_STOP を待ってください。
- * - * forループなどによるローカルループで状態変更待ちをしても MVEASY_STATUS_STOP にはなりません。
- * - * 本関数を呼び出しても、アプリケーションが再生ハンドルに設定した各種パラメータは原則としてリセットされません。
- * MVEASY_STATUS_STOP 状態になったあと、もう一度再生を開始すると前回と同じパラメータで再生を行うことができます。
- * 例外的に本関数でリセットされるパラメータは以下のものがあります。 - * - CriMvEasyPlayer::Pause() によるポーズ状態は、OFFにリセットされます。 - * - ファイル要求コールバック関数の登録がある場合、ムービファイル名(またはメモリ)の情報はリセットされます。 - * - * リセットされるパラメータ一覧は CriMvEasyPlayer::ResetAllParameters() の説明を参照してください。 - * - * 本関数は必要に応じて CriMvSoundInterface::Stop() および CriMvFileReaderInterface::Close() を呼び出します。
- * EasyPlayer ハンドルが MVEASY_STATUS_STOP 状態になるためには、各インタフェースが停止状態にならなければいけません。
- * サウンドインタフェースの場合、 CriMvSoundInterface::GetStatus()が MVEASY_SOUND_STATUS_STOP を返すこと。
- * ファイル読み込みインタフェースの場合、 CriMvFileReaderInterface::GetCloseStatus() が、ASYNC_STATUS_COMPLETE - * を返さなければいけません。 - * - * \sa CriMvEasyPlayer::Status, CriMvEasyPlayer::GetStatus(), CriMvEasyPlayer::ResetAllParameters() - */ - void Stop(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_CONTROL - * - * \brief Pauses or resumes movie playback - * \param sw Pause state. ON (1) will pause playback, OFF (0) will resume it. - * \param err Optional error code - * - * Pauses or resumes movie playback, depending on the argument. If \a sw is ON (1), playback will be paused. - * If \a sw is OFF (0), playback will be resumed. - * - * \remarks - * This function will call CriMvSoundInterface::Pause() and CriMvSystemTimerInterface::Pause() with the - * provided argument. - * - * \remarks - * Calling CriMvEasyPlayer::Stop() or CriMvEasyPlayer::ResetAllParameters() will set the pause state to OFF. - * - * \sa CriMvSoundInterface::Pause(), CriMvSystemTimerInterface::Pause() - */ - /*JP - * \ingroup MODULE_CONTROL - * \brief 再生の一時停止または再開 - * \param sw ポーズスイッチ。ポーズONの場合は1、ポーズOFF(レジューム)の場合は0を指定します。 - * \param err エラー情報(省略可) - * - * 本関数の動作は引数に依存します。
- * 引数 sw がON(1)なら、一時停止。引数 sw がOFF(0)なら再生再開です。 - * - * CriMvEasyPlayer::Stop() または CriMvEasyPlayer::ResetAllParameters を呼び出すとポーズ状態はOFFにリセットされます。 - * - * この関数は CriMvSoundInterface::Pause() と CriMvSystemTimerInterface::Pause() を同じ引数で呼び出します。 - * - * \sa CriMvSoundInterface::Pause(), CriMvSystemTimerInterface::Pause() - */ - void Pause(CriBool sw, CriError &err=CriMv::ErrorContainer); - - CriBool IsPaused(CriError &err=CriMv::ErrorContainer); - - /* オプション設定/取得 */ - /*EN - * \ingroup MODULE_OPTION - * - * \brief Sets the type of timer used for video synchronization - * \param type Type of timer to use - * \param err Optional error code - * - * In order to display video frames at the proper rate, CRI Movie uses a timer to determine when the - * next frame should be shown. For a movie with an audio track, you would typically use the - * MVEASY_TIMER_AUDIO timer type. For a movie with no audio, the MVEASY_TIMER_SYSTEM type timer - * should be used. - * - * The default is the timer type that was passed to CriMvEasyPlayer::Create(). If this value - * was NULL, a system timer (MVEASY_TIMER_SYSTEM) will be used. - * - * \remarks - * If an audio timer (MVEASY_TIMER_AUDIO) is wanted, it must be created and passed to - * CriMvEasyPlayer::Create(). - * - * \remarks - * If the movie does not have an audio track, CRI Movie will use a MVEASY_TIMER_SYSTEM regardless of - * the value set by this function. - * - * \sa CriMvEasyPlayer::GetMasterTimer(), CriMvEasyPlayer::Create(), TimerType - */ - /*JP - * \ingroup MODULE_OPTION - * \brief マスタタイマ種別の指定 - * \param type マスタタイマ種別 - * \param err エラー情報(省略可) - * - * ビデオフレームの時刻管理に使用するタイマ種別を指定します。
- * デフォルトはハンドル作成時に指定するシステムタイマです。
- * ビデオフレームの表示タイミングをオーディオの時刻と同期させたいときはオーディオタイマを指定してください。
- * オーディオタイマを指定した場合でも、再生するムービにオーディオが含まれていない場合はシステムタイマ同期となります。 - * - * \sa CriMvEasyPlayer::GetMasterTimer(), CriMvEasyPlayer::Create() - */ - void SetMasterTimer(TimerType type, CriError &err=CriMv::ErrorContainer); // default is SYSTEM - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Returns the type of timer currently being used by the EasyPlayer handle - * \param err Optional error code - * \return The current timer type - * - * Returns the current type of timer used to synchronize video frames. This value can be changed - * by calling CriMvEasyPlayer::SetMasterTimer(). Otherwise, the timer type is set when the handle - * is created. - * - * \sa CriMvEasyPlayer::SetMasterTimer(), CriMvEasyPlayer::Create(), TimerType - */ - /*JP - * \ingroup MODULE_OPTION - * \brief マスタタイマ種別の取得 - * \param err エラー情報(省略可) - * \return 現在設定されているマスタタイマ種別 - * - * 現在設定されているマスタタイマ種別を取得します。 - * - * \sa CriMvEasyPlayer::SetMasterTimer() - */ - TimerType GetMasterTimer(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Sets the number of internal video buffers - * \param npools The number of buffers to use; must be greater than 0 - * \param err Optional error code - * - * CRI Movie uses internal memory, or frame pools, to buffer decoded frames before display. - * More frame pools can help smooth out playback under high CPU loads. - * - * \remarks - * By default, the number of pools is 1. To change the value, this function must be called - * before starting playback (with either CriMvEasyPlayer::Prepare() or CriMvEasyPlayer::Start()). - */ - /*JP - * \ingroup MODULE_OPTION - * \brief 内部ビデオバッファ(フレームプール)数の指定 - * \param npools 内部ビデオバッファ数(最低でも1) - * \param err エラー情報(省略可) - * - * EasyPlayerハンドル内部のビデオバッファ数を指定します。
- * この内部ビデオバッファはデコード結果を蓄えておくためのもので、フレームプールと呼びます。
- * フレームプールが多いほど先行してビデオデコードを進めることができるため、デコードの - * 負荷変動が大きかったり、デコードに使用できるCPU時間の変動が大きい場合にもスムーズな再生を - * 行いやすくなります。
- * デフォルトのフレームプール数は1です。
- * フレームプール数を変更したい場合は、再生開始前( CriMvEasyPlayer::Prepare()または CriMvEasyPlayer::Start())に - * 本関数を実行してください。 - */ - void SetNumberOfFramePools(CriUint32 npools, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Sets the amount of movie data that will be buffered, in seconds - * \param sec Buffering time, in seconds - * \param err Optional error code - * - * CRI Movie buffers enough raw data from disk to allow for smooth playback and to reduce disk reads. - * The buffer size is based on the bitrate of the movie, and other movie parameters. - * - * By default, this buffer will be large enough to hold 1 second worth of playback. - * - * To determine the current buffering time, look at the \a buffering_time field of the - * CriMvStreamingParameters structure, which is retrieved by calling CriMvEasyPlayer::GetMovieInfo(). - * - * \remarks - * If this function is called, it must be called before starting playback (with either - * CriMvEasyPlayer::Prepare() or CriMvEasyPlayer::Start()). - * - * \remarks - * Passing \a 0.0 as the value of \a sec will reset the buffering time to the default value. - * - * \remarks - * If an application calls CriMvEasyPlayer::SetStreamingParameters() for a handle, this function - * can not be used with that handle. - * - * \remarks - * The value set by this function, along with the value set by CriMvEasyPlayer::SetReloadThresholdTime(), - * determine how often data is read from disk. See the description of - * CriMvEasyPlayer::SetReloadThresholdTime() for details. - * - * \sa CriMvEasyPlayer::SetReloadThresholdTime(), CriMvEasyPlayer::GetInputBufferInfo(), - * CriMvStreamingParameters - */ - /*JP - * \ingroup MODULE_OPTION - * \brief 入力データのバッファリング時間の指定 - * \param sec バッファリング時間。単位は秒。 - * \param err エラー情報(省略可) - * - * ストリーミング再生でバッファリングする入力データの量を秒単位の時間で指定します。
- * EasyPlayerは、バッファリング時間とムービのビットレート等から読み込みバッファのサイズを決定します。 - * - * デフォルトのバッファリング時間は、再生開始時点でアプリケーションが作成済みのEasyPlayerハンドル数 - * に依存して決まります。EasyPlayerハンドル1つにつき1秒のバッファリング時間を確保します。もしもアプリ - * ケーションが3つのEasyPlayerハンドルを作成していた場合、バッファリング時間は3秒となります。 - * - * EasyPlayerハンドルが何秒分のバッファリング時間になっているかは CriMvEasyPlayer::GetMovieInfo - * 関数で取得する CriMvStreamingParameters 構造体の変数 buffering_time で確認できます。 - * - * 本関数の呼び出しは、 CriMvEasyPlayer::Prepare 関数または CriMvEasyPlayer::Start 関数の前までに実行してください。 - * - * バッファリング時間に 0.0f を指定した場合、バッファリング時間はライブラリのデフォルト値となります。
- * また、アプリケーションが CriMvEasyPlayer::SetStreamingParameters 関数を呼び出した場合は本関数で - * 設定した値よりも、 CriMvEasyPlayer::SetStreamingParameters 関数の指定が優先されます。 - * - * \sa CriMvEasyPlayer::SetReloadThresholdTime(), CriMvEasyPlayer::GetInputBufferInfo() - */ - void SetBufferingTime(CriFloat32 sec, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Determines how often the movie data buffer is refilled from disk - * \param sec Number of seconds of playback time to buffer - * \param err Optional error code - * - * EasyPlayer buffers raw data from disk to allow for smooth playback. How often it refills - * its buffers is determined by this function. When the amount of data remaining, in seconds, - * falls below this value, EasyPlayer will call into the FileReader module for this handle in - * order to read more data. - * - * SetBufferingTime() sets a "low water mark" for the data buffer. For instance, if an application - * sets the buffer size to 4 seconds (with CriMvEasyPlayer::SetBufferingTime()), and sets the reload - * threshold to 1 second, then CRI Movie will initially fill the buffer with 4 seconds worth of - * data. After 3 seconds worth of data have been decoded and consumed, there will be less than - * \a reload \a threshold seconds of data remaining, and CRI Movie will refill the buffer. - * - * \remarks - * The default value for \a sec is 0.8s. - * - * \remarks - * If this function is called, it must be called before starting playback (with either - * CriMvEasyPlayer::Prepare() or CriMvEasyPlayer::Start()). - * - * \sa CriMvEasyPlayer::SetBufferingTime(), CriMvEasyPlayer::GetInputBufferInfo(), CriMvFileReaderInterface - */ - /*JP - * \ingroup MODULE_OPTION - * \brief 再読み込み閾値の時間指定 - * \param sec 時間指定による再読み込み閾値。単位は秒。 - * \param err エラー情報(省略可) - * - * EasyPlayerハンドルは、入力バッファ内のデータが再読み込み閾値以下になった時に次のデータ読み込みを実行します。 - * 再読み込み閾値は本関数による指定時間とムービデータのビットレートによって自動的に計算されます。 - * 再読み込み閾値は時間[秒]で指定します。デフォルト値は0.8秒です。 - * - * ムービ再生中にデータを裏読みする場合などにシーク回数を減らすために閾値設定を利用することができます。 - * 例えば、バッファリング時間を2秒、再読み込み閾値を1秒に設定すると、ムービデータの読み込みは約1秒に1回の実行になります。 - * こうすることで、約1秒の間はデータの読み込みを連続的に行うことができます。 - * - * ムービを再生しながらユーザデータの読み込みを行う場合、ユーザデータの読み込みは本関数で指定した時間以内に読み込み - * 処理が終わるようにしてください。サイズの大きなデータは複数に分割して読み込むなどの対処が必要になります。 - * 本関数で指定した時間以内にユーザデータの読み込みが終わらなかった場合、ムービデータが枯渇してムービ再生が滞ります。 - * - * 本関数の呼び出しは、 CriMvEasyPlayer::Prepare 関数または CriMvEasyPlayer::Start 関数の前までに実行してください。 - * - * ムービ再生中の入力バッファのデータ量や再読み込み閾値のサイズは、CriMvEasyPlayer::GetInputBufferInfo で取得可能です。 - * - * \sa CriMvEasyPlayer::SetBufferingTime(), CriMvEasyPlayer::GetInputBufferInfo() - */ - void SetReloadThresholdTime(CriFloat32 sec, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Retrieves input data buffering settings - * \param ibuf_info Input buffer information structure - * \param err Optional error code - * - * Populates the passed CriMvInputBufferInfo structure with the values of the settings - * for the raw input buffer size, the reload interval, and the amount of data currently buffered. - * - * \remarks - * This function can be called once the handle status has transitioned to MVEASY_STATUS_WAIT_PREP. - * - * \sa CriMvInputBufferInfo, CriMvEasyPlayer::SetBufferingTime(), CriMvEasyPlayer::SetReloadThresholdTime() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief 入力バッファ情報の取得 - * \param ibuf_info 入力バッファ情報 - * \param err エラー情報(省略可) - * - * 入力バッファ情報 CriMvInputBufferInfo を取得します。
- * 入力バッファ情報はEasyPlayerハンドルの状態が MVEASY_STATUS_WAIT_PREP 以降になったあと取得できます。
- * - * \sa CriMvInputBufferInfo, CriMvEasyPlayer::SetBufferingTime(), CriMvEasyPlayer::SetReloadThresholdTime() - */ - void GetInputBufferInfo(CriMvInputBufferInfo &ibuf_info, CriError &err=CriMv::ErrorContainer); - - /*EN - * - * \brief Sets the maximum bitrate EasyPlayer will assume for movie data - * \param max_bitrate Maximum bitrate, in bits/second - * \param err Optional error code - * - * EasyPlayer determines the size of its input data buffer by the movie's bitrate, the buffering time, - * and other movie parameters. In normal usage, an application should not need to call this function. - * However, it can be useful when doing concatenated playback of several movies sequentially. - * - * If the bitrate of the first movie is smaller or larger than the next movie, EasyPlayer can choose - * a buffer size that will be appropriate for the first movie, but either too small for the next - * (causing excessive disk reads or playback stuttering) or too large (using more memory than necessary). - * - * Passing a value of 0 for \a max_bitrate will cause the handle to revert to its default behavior - * for determining maximum bitrate. - * - * \remarks - * The value set by this function will not be reflected in the \a max_bitrate field of the - * CriMvStreamingParameters structure, which will contain the actual value as stored in the movie's - * header. - * - * \remarks - * If this function is called, it must be called before starting playback (with either - * CriMvEasyPlayer::Prepare() or CriMvEasyPlayer::Start()). - * - * \remarks - * If an application calls CriMvEasyPlayer::SetStreamingParameters() for a handle, this function - * can not be used with that handle. - * - * \remarks - * For details about concatenated playback, see the description of CriMvEasyPlayer::SetFileRequestCallback(). - * - * \sa CriMvEasyPlayer::SetBufferingTime(), CriMvEasyPlayer::SetReloadThresholdTime(), - * CriMvEasyPlayer::SetFileRequestCallback() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief 最大ビットレートの指定 - * \param max_bitrate 最大ビットレート(bit per second) - * \param err エラー情報(省略可) - * - * ムービデータの最大ビットレートを指定します。最大ビットレートはストリーム再生用に確保するバッファサイズに影響します。
- * - * 単純再生時は本関数を呼び出す必要はありません。EasyPlayerハンドルが自動的に最大ビットレートを取得して必要なだけの - * 読み込みバッファを確保します。
- * - * 連結再生時に、先頭のムービファイルのビットレートが後続のムービファイルと比べて極端に小さい場合には、本関数を使用して - * 明示的に最大ビットレートを大きく指定してください。
- * - * 本関数で設定した最大ビットレートは、CriMvEasyPlayer::GetMovieInfo 関数で取得するムービ情報には反映されません。 - * CriMvEasyPlayer::GetMovieInfo 関数で取得できるのはムービデータの本来の情報です。
- * - * 本関数の呼び出しは、 CriMvEasyPlayer::Prepare 関数または CriMvEasyPlayer::Start 関数の前までに実行してください。
- * - * 最大ビットレートに 0を指定した場合、最大ビットレートはムービデータの持つ値となります。
- * また、アプリケーションが CriMvEasyPlayer::SetStreamingParameters 関数を呼び出した場合は本関数で - * 設定した値よりも、 CriMvEasyPlayer::SetStreamingParameters 関数の指定が優先されます。 - * - * \sa CriMvEasyPlayer::SetBufferingTime(), CriMvEasyPlayer::SetReloadThresholdTime(), - * CriMvEasyPlayer::SetFileRequestCallback() - */ - void SetMaxBitrate(CriUint32 max_bitrate, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Sets the audio playback track - * \param track Audio track number - * \param err Optional error code - * - * If a movie has multiple audio tracks (for instance, English and Spanish versions), this function - * will determine which track plays. By default, the first audio track is used. - * - * To determine the number of audio tracks in the movie, call CriMvEasyPlayer::GetMovieInfo() and - * look at the \a num_audio field of the CriMvStreamingParameters structure. - * - * If the movie does not have any audio, this function has no effect. - * - * \remarks - * To use the default setting, set \a track to CRIMV_AUDIO_TRACK_AUTO. - * - * \remarks - * To turn off audio altogether, set \a track to CRIMV_AUDIO_TRACK_OFF. - * - * \sa CriMvEasyPlayer::GetMovieInfo() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief 再生するオーディオトラックの指定 - * \param track 再生するオーディオトラック - * \param err エラー情報(省略可) - * - * ムービが複数のオーディオトラックを持っている場合に、再生するオーディオを指定します。
- * 再生開始前( CriMvEasyPlayer::Prepare()または CriMvEasyPlayer::Start())に本関数を実行してください。 - * - * 本関数を実行しなかった場合は、もっとも若い番号のオーディオトラックを再生します。
- * CriMvEasyPlayer::DecodeHeader()と CriMvEasyPlayer::GetMovieInfo()を使うことで、どのチャネルに - * どんなオーディオが入っているかを再生開始前に知ることができます。 - * - * データが存在しないトラック番号を指定した場合は、オーディオは再生されません。 - * - * トラック番号としてCRIMV_AUDIO_TRACK_OFFを指定すると、例えムービにオーディオが含まれていたと - * してもオーディオは再生しません。 - * - * また、デフォルト設定(もっとも若いチャネルのオーディオを再生する)にしたい場合は、 - * チャネルとしてCRIMV_AUDIO_TRACK_AUTOを指定してください。 - * - * \sa CriMvEasyPlayer::GetMovieInfo(), CriMvEasyPlayer::DecodeHeader() - */ - void SetAudioTrack(CriSint32 track, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Turns movie looping on or off - * \param sw Looping value - * \param err Optional error code - * - * If \a sw is 1 (ON), the movie will loop continuously. - * If \a sw is 0 (OFF), the movie will play normally. - * - * In normal usage, a movie will play once, with the handle status changing to MVEASY_STATUS_PLAYEND - * when it completes. When looping is ON, this behavior changes. When the movie reaches the - * end, it will immediately start playing again from the beginning, and the status will continue to - * toggle between MVEASY_STATUS_PLAYING and MVEASY_STATUS_PREP. - * - * If looping is ON, and the playback is from a file, EasyPlayer will call CriMvFileReaderInterface::Seek() - * as necessary to reset the file pointer. - * - * \remarks - * If looping is ON, and an application sets it to OFF while the movie is playing, playback might - * not stop at the end of the movie. In that case, playback will end after the next loop iteration. - * - * \sa CriMvEasyPlayer::GetLoopFlag(), CriMvFileReaderInterface::Seek() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief ループ再生フラグの指定 - * \param sw ループスイッチ。ONの場合はループあり、OFFの場合はループ無しになります。 - * \param err エラー情報(省略可) - * - * ループ再生の有無を設定します。デフォルトはループOFFです。
- * ループ再生ONにした場合は、ムービの終端まで再生してもハンドル状態はMVEASY_STATUS_PLAYENDにならず、 - * ムービの先頭から再生を繰り返します。
- * ファイル名指定で再生している場合は、最後まで読み込んだあと CriMvFileReaderInterface::Seek()を使って - * 読み込み位置をファイルの先頭に戻します。 - * - * ループ再生OFFに設定した場合は、そのとき読み込んでいたムービの終端まで再生すると、 - * ハンドル状態がMVEASY_STATUS_PLAYENDに遷移します。
- * 再生中にループOFFにした場合、タイミングによっては、再生中のムービ終端で終わらず、次の繰り返し - * 再生まで実行されます。 - * - * 現在のループ設定を取得するには CriMvEasyPlayer::GetLoopFlag()を使ってください。 - * - * \sa CriMvEasyPlayer::GetLoopFlag(), CriMvFileReaderInterface::Seek() - */ - void SetLoopFlag(CriBool sw, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Retrieves the value of the looping flag - * \return The current looping setting - * - * By default, looping is OFF and playback will stop when it reaches the end. You can - * change this behavior by calling CriMvEasyPlayer::SetLoopFlag(). - * - * \sa CriMvEasyPlayer::SetLoopFlag() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief ループ再生フラグの取得 - * \param err エラー情報(省略可) - * \return 現在のループ再生設定 - * - * 現在のループ設定を取得します。 - * ループ設定は CriMvEasyPlayer::SetLoopFlag() で変更することができます。 - * - * \sa CriMvEasyPlayer::SetLoopFlag() - */ - CriBool GetLoopFlag(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Gets the amount of time that a movie has been playing - * \param count Number of timer units since the movie started playing - * \param unit Number of timer units per second - * \param err Optional error code - * - * This function retrieves the absolute time that has elapsed since a movie started playing. - * The time value is returned in two parts - a counter with an arbitrary interval, and the - * number of timer ticks per second. To determine the playing time in seconds, divide - * \a count by \a unit. - * - * Before playback has started, and after it has stopped, this function will return a \a count value of 0. - * - * The value retrieved is the value of the master timer for the handle, not the time of the current frame itself. - * To get the video frame time, check the CriMvFrameInfo structure once you have retrieved the frame. - * - * \remarks - * Note that this function provides an absolute playback time - it does not wrap to 0 - * when the movie loops. - * - */ - /*JP - * \ingroup MODULE_OPTION - * \brief 再生時刻の取得 - * \param count タイマカウント - * \param unit 1秒あたりのタイマカウント値。count ÷ unit で秒単位の時刻となります。 - * \param err エラー情報(省略可) - * - * タイマ時刻を取得します。時刻はcountとunitの二つの変数で表現します。
- * count ÷ unit で秒単位の時刻となるような値を返します。
- * 再生開始前( CriMvSoundInterface::Start()呼び出し前)および - * 再生停止後( CriMvSoundInterface::Stop()呼び出し後)は、時刻0(タイマカウントが0)を返します。
- * 本関数はマスタタイマで指定されたタイマの時刻を返すだけで、ビデオフレームの時刻を返すものではありません。
- * 取得したビデオフレームの本来の表示時刻は、ビデオフレーム取得時の CriMvFrameInfo 構造体を参照してください。 - */ - void GetTime(CriUint64 &count, CriUint64 &unit, CriError &err=CriMv::ErrorContainer); // only refer time of SyncMasterTimer - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Gets information about the movie - * \param stmprm Movie information structure - * \param err Optional error code - * \return TRUE if movie information was successfully retrieved - * \return FALSE if the header has not yet been decoded, or if an error occurred - * - * Populates the passed \a CriMvStreamingParameters structure with information about the current movie, - * including the bitrate, resolution, audio track information, subtitle availability, and more. - * - * This function is available once the handle status has changed to MVEASY_STATUS_WAIT_PREP. If an application - * needs this information before starting playback (for instance, to set up for playing subtitles, or to - * allocate a display surface based on the size of the movie), call CriMvEasyPlayer::DecodeHeader(), then - * call GetMovieInfo(). - * - * \remarks - * When doing concatenated playback (via CriMvEasyPlayer::SetFileRequestCallback()), GetMovieInfo() will - * return information about the currently playing movie. - * - * \sa CriMvEasyPlayer::DecodeHeader(), CriMvEasyPlayer::SetFileRequestCallback() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief ムービ情報の取得 - * \param stmprm ムービ情報 - * \param err エラー情報(省略可) - * - * ムービ情報 CriMvStreamingParameters を取得します。
- * ムービ情報からは主にビットレートや解像度、オーディオ数などがわかります。
- * ムービ情報はEasyPlayerハンドルの状態が MVEASY_STATUS_WAIT_PREP 以降になったあと取得できます。
- * 再生開始前にムービ情報を知りたい場合は、 CriMvEasyPlayer::DecodeHeader()を呼び出してヘッダ解析を行ってください。 - * - * 連結再生を行った場合、最後に取得したフレームを含むムービファイルについての情報を返します。 - * - * \sa CriMvEasyPlayer::DecodeHeader() - */ - CriBool GetMovieInfo(CriMvStreamingParameters &stmprm, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Changes the parameters for the movie - * \param stmprm Movie information structure - * \param err Optional error code - * - * This is a DEBUG function and should not normally be used by applications. - * - * This function allows an application to change the streaming parameters for the movie as a whole. - * It is available once the handle status has changed to MVEASY_STATUS_WAIT_PREP. - * - * To use this function, first call CriMvEasyPlayer::DecodeHeader(), then call CriMvEasyPlayer::GetMovieInfo() - * to retrieve the current movie parameters. Change the fields of the CriMvStreamingParameters structure - * as appropriate, then call SetStreamingParameters(). - * - * \sa CriMvEasyPlayer::GetMovieInfo(), CriMvEasyPlayer::DecodeHeader() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief ストリーミングパラメータの変更 - * \param stmprm ストリーミングパラメータ - * \param err エラー情報(省略可) - * - * 本関数は通常、アプリケーションからは使用しません。デバッグ用の関数です。 - * - * ムービ再生のためのストリーミングパラメータをEasyPlayerハンドルに設定します。
- * ストリーミングパラメータが指定できるのは、EasyPlayerハンドル状態がMVEASY_STATUS_WAIT_PREPの時だけです。
- * この関数は、読み込みバッファサイズなど細かなパラメータを全てアプリケーションで調整したい場合に使います。
- * CriMvEasyPlayer::DecodeHeader()でヘッダ解析を行ったあと、 CriMvEasyPlayer::GetMovieInfo()で取得できる - * ムービ情報がそのままストリーミングパラメータとなりますので、調整したい値を変更して、本関数で設定しなお - * してください。 - * - * \sa CriMvEasyPlayer::GetMovieInfo(), CriMvEasyPlayer::DecodeHeader() - */ - void SetStreamingParameters(CriMvStreamingParameters *stmprm, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_VIDEO_FRAME - * - * \brief Determine if a new video frame can be displayed - * - * \param err Optional error code - * - * \return TRUE if a frame is ready to be displayed - * \return FALSE if the movie is paused or not playing, or if a new frame is - * not yet decoded or ready to be displayed - * - * Each frame in a movie corresponds to an absolute time, with the first frame being time 0. - * The playback time is controlled by the master timer for this handle. - * If the time of the next frame is less than or equal to the current playback time, as determined - * by CriMvEasyPlayer::GetTime(), it is ready to be displayed, and this function will return TRUE. - * - * If an application needs to do some complex or lengthy processing before displaying a frame (such - * as locking a texture), it should call this function first. - * - * \remarks - * If the next frame has not yet been decoded, this function will return FALSE regardless of the playback time. - * - * \sa CriMvEasyPlayer::GetTime() - */ - /*JP - * \ingroup MODULE_VIDEO_FRAME - * \brief 次フレームの表示時刻判定 - * \param err エラー情報(省略可) - * \return 次のビデオフレームがすでに表示時刻になっている場合はTRUE(1)を返します。
- * 次のビデオフレームがまだデコードできない場合はFALSE(0)を返します。 - * - * 次のビデオフレームがすでに表示時刻になっているかどうかを問い合わせます。
- * もしもデコードが遅れていて次のビデオフレームがまだデコードできていない場合は、再生時刻に関係 - * なくFALSEを返します。
- * つまりこの関数は「次のフレームが GetFrameOnTime関数で取得できるかどうか」を調べます。
- * ビデオフレームが実際に取得するよりも先にやらなければいけない処理(例えばテクスチャロックなど) - * がある場合は、この関数でフレーム取得の成否を判定してから処理してください。 - * - * \sa CriMvEasyPlayer::GetTime() - */ - CriBool IsNextFrameOnTime(CriError &err=CriMv::ErrorContainer); - -#if !defined(XPT_TGT_EE) - /*EN - * \ingroup MODULE_VIDEO_FRAME - * - * \brief Loads video frame data into a buffer, in 32 bit ARGB format - * \param imagebuf Pointer to output buffer - * \param pitch Pitch of output buffer, in bytes - * \param bufsize Size of output buffer, in bytes - * \param frameinfo Video frame information structure - * \param err Optional error code - * \return TRUE if a frame was retrieved - * \return FALSE otherwise - * - * Copies the next decoded frame into the 32 bit ARGB image buffer pointed to by \a imagebuf. - * If the display time is less than the frame time, or if the frame has not yet been decoded, the - * \a frameinfo parameter will be cleared and this function will return FALSE. - * - * The \a pitch parameter is the width, in bytes, of each row of the frame image, including any padding. - * - * To determine if the next frame is ready to be displayed, call CriMvEasyPlayer::IsNextFrameOnTime(). - * - * CRI Movie decodes video frames into YUV420 format internally, and stores them in frame pools (see - * CriMvEasyPlayer::SetNumberOfFramePools()) for later display. When this function is called, - * the frame must first converted to ARGB format. This can be a very CPU-intensive operation, - * especially on the PS3 and Xbox360. For 1280 x 720 video resolution, this can use almost an - * entire vsync interval. On these platforms, we recommend implementing a pixel shader and calling - * CriMvEasyPlayer::GetFrameOnTimeAsYUVBuffers() instead. - * - * \remarks
- * If an application uses this function, an application need to call CriMv::InitializeFrame32bitARGB() - * after CriMv::Initialize(). If an application calls this function without CriMv::InitializeFrame32bitARGB() - * calling, this function failed and an error callback occurs. - * - * \remarks - * This function is not available on the PS2. - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime(), CriMvEasyPlayer::GetFrameOnTimeAsYUVBuffers(), - * CriMvEasyPlayer::SetNumberOfFramePools() - */ - /*JP - * \ingroup MODULE_VIDEO_FRAME - * \brief 32bit ARGBフォーマットでのデコード結果の取得 - * \param imagebuf 出力バッファポインタ - * \param pitch 出力バッファのピッチ [byte] - * \param bufsize 出力バッファのサイズ [byte] - * \param frameinfo 取得したビデオフレームの情報構造体 - * \param err エラー情報(省略可) - * \return フレームが取得できた場合はTRUE(1)、できなかった場合はFALSE(0)を返します。 - * - * 32bit ARGBフォーマットで、表示時刻になっているビデオフレームを取得します。
- * この関数を呼び出す場合は、ARGBバッファの実体を確保したうえで呼び出す必要があります。
- * ビデオフレームは引数imagebufで指定したARGBバッファに書き出されます。
- * もしも次のビデオフレームの表示時刻になっていなかったり、デコードが終わっていなかった場合は - * フレーム取得できず、frameinfoの中身はクリアされます。
- * 事前にビデオフレームが取得できるかどうかを知りたい場合は CriMvEasyPlayer::IsNextFrameOnTime() - * を使用してください。 - * - * 32bit ARGB の実際のピクセルデータの並びについては、そのプラットフォームで最も標準的な - * フォーマットになります。 - * - * 注意:
- * 本関数を使用する場合はフレーム変換の初期化 CriMv::InitializeFrame32bitARGB()の呼び出しが - * 事前に必要です。フレーム変換の初期化を行わずに本関数を呼び出した場合はフレーム取得に失敗し、 - * エラーコールバックが発生します。 - * - * 注意:
- * PS3, Xbox360 でも本関数は使用できますが、とてもCPU負荷の高い関数となります。
- * 解像度が 1280x720 のムービを本関数をフレーム取得すると1vsync近い時間がかかります。
- * PS3, Xbox360 ではCriMvEasyPlayer::GetFrameOnTimeAsYUVBuffers() 関数と ピクセルシェーダー - * の組み合わせによるフレーム変換をおすすめします。
- * - * 備考:
- * PS2版CRI Movie は本関数に対応していません。 - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime() - */ - CriBool GetFrameOnTimeAs32bitARGB(CriUint8 *imagebuf, CriUint32 pitch, CriUint32 bufsize, CriMvFrameInfo &frameinfo, - CriError &err=CriMv::ErrorContainer); -#endif - -#if !defined(XPT_TGT_EE) - /*EN - * \ingroup MODULE_VIDEO_FRAME - * - * \brief Loads video frame data into a set of Y,U,V separate buffers - * \param yuvbuffers Pointer to Y,U,V buffer data structure - * \param frameinfo Video frame information structure - * \param err Optional error code - * \return TRUE if a frame was retrieved - * \return FALSE otherwise - * - * Copies the next decoded frame into the Y,U,V image buffers pointed to by \a yuvbuffers, for use - * with a pixel shader. CRI Movie decodes video frames into YUV420 format internally, so this is - * a very efficient function. - * - * If the display time is less than the frame time, or if the frame has not yet been decoded, the - * \a frameinfo parameter will be cleared and this function will return FALSE. - * - * To determine if the next frame is ready to be displayed, call CriMvEasyPlayer::IsNextFrameOnTime(). - * - * \remarks - * If the movie does not have an alpha channel, the alpha buffer fields of the \a CriMvYuvBuffers - * structure are not used. - * - * \remarks - * This function is not available on the PS2. - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime() - */ - /*JP - * \ingroup MODULE_VIDEO_FRAME - * \brief YUV個別バッファへのデコード結果の取得 - * \param yuvbuffers YUV個別バッファのパラメータ構造体 - * \param frameinfo 取得したビデオフレームの情報構造体 - * \param err エラー情報(省略可) - * \return フレームが取得できた場合はTRUE(1)、できなかった場合はFALSE(0)を返します。 - * - * YUV個別バッファ形式で表示時刻になっているビデオフレームを取得します。
- * YUV個別バッファ形式はピクセルシェーダーでフレームを描画するための出力フォーマットです。
- * この関数を呼び出す場合は、YUV個別バッファの実体を確保したうえで呼び出す必要があります。
- * ビデオフレームは引数yuvbuffersで指定したYUV個別バッファに書き出されます。
- * もしも次のビデオフレームの表示時刻になっていなかったり、デコードが終わっていなかった場合は - * フレーム取得できず、frameinfoの中身はクリアされます。
- * 事前にビデオフレームが取得できるかどうかを知りたい場合は CriMvEasyPlayer::IsNextFrameOnTime() - * を使用してください。
- *
- * アルファムービ再生を行わない場合は、引数 yuvbuffers のAlphaテクスチャ関連のパラメータは使用しません。
- * - * 備考:
- * PS2版CRI Movie は本関数に対応していません。 - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime() - */ - CriBool GetFrameOnTimeAsYUVBuffers(CriMvYuvBuffers *yuvbuffers, CriMvFrameInfo &frameinfo, - CriError &err=CriMv::ErrorContainer); -#endif - -#if defined(XPT_TGT_PC) || defined(XPT_TGT_SH7269) || defined(XPT_TGT_TRGP6K) - /*EN - * \ingroup MODULE_VIDEO_FRAME - * - * \brief Loads video frame data into a buffer, in YUV422 format - * \param imagebuf Pointer to output buffer - * \param pitch Pitch of output buffer, in bytes - * \param bufsize Size of output buffer, in bytes - * \param frameinfo Video frame information structure - * \param err Optional error code - * \return TRUE if a frame was retrieved - * \return FALSE otherwise - * - * Copies the next decoded frame into the YUV422 texture buffer pointed to by \a imagebuf. - * CRI Movie decodes video frames into YUV420 format internally, so there is some internal conversion - * required when using this function. - * - * If the display time is less than the frame time, or if the frame has not yet been decoded, the - * \a frameinfo parameter will be cleared and this function will return FALSE. - * - * The \a pitch parameter is the width, in bytes, of each row of the frame image, including any padding. - * - * To determine if the next frame is ready to be displayed, call CriMvEasyPlayer::IsNextFrameOnTime(). - * - * \remarks - * This function is currently only available in the PC version of CRI Movie. - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime() - */ - /*JP - * \ingroup MODULE_VIDEO_FRAME - * \brief YUV422フォーマットでのデコード結果の取得 - * \param imagebuf 出力バッファのポインタ - * \param pitch 出力バッファのピッチ [byte] - * \param bufsize 出力バッファサイズ [byte] - * \param frameinfo 取得したビデオフレームの情報構造体 - * \param err エラー情報(省略可) - * \return フレームが取得できた場合はTRUE(1)、できなかった場合はFALSE(0)を返します。 - * - * YUV422テクスチャフォーマットで、表示時刻になっているビデオフレームを取得します。
- * この関数を呼び出す場合は、YUVバッファの実体を確保したうえで呼び出す必要があります。
- * ビデオフレームは引数imagebufで指定したYUVバッファに書き出されます。
- * もしも次のビデオフレームの表示時刻になっていなかったり、デコードが終わっていなかった場合は - * フレーム取得できず、frameinfoの中身はクリアされます。
- * 事前にビデオフレームが取得できるかどうかを知りたい場合は CriMvEasyPlayer::IsNextFrameOnTime() - * を使用してください。 - * - * 【備考】
- * 現在は、PC版CRI Movie のみ本関数に対応しています。 - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime() - */ - CriBool GetFrameOnTimeAsYUV422(CriUint8 *imagebuf, CriUint32 pitch, CriUint32 bufsize, CriMvFrameInfo &frameinfo, - CriError &err=CriMv::ErrorContainer); -#endif - -#if defined(XPT_TGT_IPHONE) || defined(XPT_TGT_WINMO) || defined(XPT_TGT_ANDROID) || defined(XPT_TGT_CQSH2A) || defined(XPT_TGT_ACRODEA) || defined(XPT_TGT_NACL) || defined(XPT_TGT_SH7269) || defined(XPT_TGT_PC)|| defined(XPT_TGT_TRGP6K) - /*EN - * \ingroup MODULE_VIDEO_FRAME - * \brief Get video frame data to 16bit RGB565 format buffer - * - * This function is added for a prototype library for iPhone - * Please add comments when releasing the SDK. - * - */ - /*JP - * \ingroup MODULE_VIDEO_FRAME - * \brief 16bit RGB565フォーマットでのデコード結果の取得 - * - * この関数はiPhone版CRI Movieのプロトタイプ用の関数宣言です。 - * SDKとしてリリースする際は、コメントを追加して下さい。 - * - */ - CriBool GetFrameOnTimeAsRGB565(CriUint8 *imagebuf, CriUint32 pitch, CriUint32 bufsize, CriMvFrameInfo &frameinfo, - CriError &err=CriMv::ErrorContainer); -#endif - -#if defined(XPT_TGT_EE) - /*EN - * \ingroup MODULE_VIDEO_FRAME - * - * \brief Gets a reference to EasyPlayer's internal video frame buffer, in 32 bit ARGB format - * \param frameinfo Video frame information structure - * \param err Optional error code - * \return TRUE if a frame was retrieved - * \return FALSE otherwise - * - * Locks the internal buffer for the current video frame in memory, and retrieves a pointer to it. This is - * different behavior than the GetFrameXXX()functions, which copy the frame data into a caller-supplied location. - * - * On successful return from this function, the fields of \a frameinfo will be populated with information - * about the frame. In particular, the \a imageptr field will be set to the image buffer, in 32 bit ARGB format. - * After calling this function, an application must copy the video frame into its own buffer or transfer it to - * GS local memory via DMA. - * - * To determine if the next frame is ready to be displayed, call CriMvEasyPlayer::IsNextFrameOnTime(). - * - * \remarks - * After the application has copied the frame data, it must call CriMvEasyPlayer::UnlockFrame(). - * - * \remarks - * This function is only available on the PS2. - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime(), CriMvEasyPlayer::UnlockFrame() - */ - /*JP - * \ingroup MODULE_VIDEO_FRAME - * \brief デコード結果領域(ARGB32bit)のロック。PS2専用。 - * \param frameinfo ロックしたビデオフレームの情報構造体 - * \param err エラー情報(省略可) - * - * 本関数はPS2専用のフレーム取得関数で、他機種の GetFrame 関数に相当します。
- * PS2では GetFrame 関数の代わりに本関数と UnlockFrame 関数を使用してフレーム取得を行います。
- * GetFrame 関数は出力バッファを指定してそこへデコード結果を取得するのに対し、LockFrame 関数はバッファを指定せず - * CriMvEasyPlayerハンドル内部にあるデコード結果バッファのポインタを取得するところが違います。
- * - * 本関数はデコード結果のメモリ領域を参照開始するためにロックします。
- * この関数でフレームをロックできるのは、そのフレームが表示可能時間になっている場合のみです。
- * アプリケーションはフレームをロックしたあと、デコード結果をDMAでテクスチャ領域へ転送するか、 - * 別バッファへコピーするなどの処理を行います。
- * デコード結果の参照が終わった後には、必ず CriMvEasyPlayer::UnlockFrame() 関数を呼び出して参照終了を通知してください。
- * - * 備考:
- * 本関数はPS2版CRI Movie のみ対応しています。 - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime(), CriMvEasyPlayer::UnlockFrame() - */ - CriBool LockFrameOnTimeAs32bitARGB_PS2(CriMvFrameInfo &frameinfo, CriError &err=CriMv::ErrorContainer); -#endif - - /*EN - * \ingroup MODULE_VIDEO_FRAME - * - * \brief Unlocks the video frame - * \param frameinfo Pointer to locked video frame information - * \param err Optional error code - * - * Unlocks the video frame that was locked in memory by a call to one of the LockFrameXXX() functions. - * - * The \a frameinfo parameter must be the same one that was passed to LockFrameXXX(). - * - * If the frame has been locked, EasyPlayer will not be able to retrieve the next frame until the frame is - * unlocked. An attempt to lock the same frame more than once will fail. - * - * The LockFrameXXX() functions are CriMvEasyPlayer::LockFrameOnTimeAs32bitARGB_PS2() and - * CriMvEasyPlayer::LockFrameOnTimeAsYUVBuffers(). Depending on the platform, only one or the other of - * these functions will be available. - * - * \sa CriMvEasyPlayer::LockFrameOnTimeAs32bitARGB_PS2(), CriMvEasyPlayer::LockFrameOnTimeAsYUVBuffers() - */ - /*JP - * \ingroup MODULE_VIDEO_FRAME - * \brief ロックフレームで取得したデコード結果をアンロックする - * \param frameinfo ロックしたビデオフレームの情報構造体 - * \param err エラー情報(省略可) - * - * 本関数はロックフレーム関数を使ってロックしていたフレームをアンロックし、メモリ参照の終了を通知します。
- * ロックフレーム関数には CriMvEasyPlayer::LockFrameOnTimeAs32bitARGB_PS2() と CriMvEasyPlayer::LockFrameOnTimeAsYUVBuffers() - * がありますが、どちらの関数を使ってロックした場合も、本関数を使ってアンロックします。
- * 本関数の引数には、どのフレームをアンロックするかを指示するために、ロックフレーム関数で取得したフレーム情報構造体を指定します。
- * - * 本関数でアンロックしたフレームは、以後、次にビデオフレームのデコード出力バッファとして使用されます。
- * 1度アンロックしたフレームをもう一度ロックすることは出来ません。
- * - * \sa CriMvEasyPlayer::LockFrameOnTimeAs32bitARGB_PS2(), CriMvEasyPlayer::LockFrameOnTimeAsYUVBuffers() - */ - CriBool UnlockFrame(CriMvFrameInfo *frameinfo, CriError &err=CriMv::ErrorContainer); - -#if !defined(XPT_TGT_EE) - /*EN - * - * \brief Gets a reference to EasyPlayer's internal video frame buffer - * \param yuvbuffers Y,U,V buffer data structure - * \param frameinfo Video frame information structure - * \param err Optional error code - * \return TRUE if a frame was retrieved - * \return FALSE otherwise - * - * Locks the internal buffer for the current video frame in memory, and retrieves a pointer to it. This is - * different behavior than the GetFrameXXX() functions, which copy the frame data into a caller-supplied location. - * - * On successful return from this function, the fields of \a yuvbuffers will be set to the Y,U,V fields of the - * video frame, and the fields of \a frameinfo will be populated with information about the frame. - * - * After calling this function, an application must copy the video frame into its own buffer or transfer it to - * texture memory. - * - * To determine if the next frame is ready to be displayed, call CriMvEasyPlayer::IsNextFrameOnTime(). - * - * \remarks - * After the application has copied the frame data, it must call CriMvEasyPlayer::UnlockFrame(). - * - * \remarks - * This function is not available on the PS2. - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime(), CriMvEasyPlayer::UnlockFrame() - */ - /*JP - * \ingroup MODULE_VIDEO_FRAME - * \brief デコード結果領域のロック - * \param yuvbuffers YUV個別バッファのパラメータ構造体 - * \param frameinfo ロックしたビデオフレームの情報構造体 - * \param err エラー情報(省略可) - * - * GetFrame とは別の仕様のフレーム取得関数です。
- * 本関数は UnlockFrame 関数とセットで使用します。
- * GetFrame 関数は出力バッファを指定してそこへデコード結果を取得するのに対し、LockFrame 関数はバッファを指定せず - * CriMvEasyPlayerハンドル内部にあるデコード結果バッファのポインタを取得するところが違います。
- * - * 本関数はデコード結果のメモリ領域を参照開始するためにロックし、 - * デコード結果のYUV3種類のバッファについての情報を引数 yuvbuffers に格納します。
- * この関数でフレームをロックできるのは、そのフレームが表示可能時間になっている場合のみです。
- * アプリケーションはフレームをロックしたあと、デコード結果をテクスチャ領域へコピーするか、 - * 別バッファへコピーするなどの処理を行います。
- * デコード結果の参照が終わった後には、必ず CriMvEasyPlayer::UnlockFrame() 関数を呼び出して参照終了を通知してください。
- * - * 備考:
- * PS2版CRI Movie は本関数に対応していません。 - * - * \sa CriMvEasyPlayer::UnlockFrame() - */ - CriBool LockFrameOnTimeAsYUVBuffers(CriMvYuvBuffers &yuvbuffers, CriMvFrameInfo &frameinfo, - CriError &err=CriMv::ErrorContainer); -#endif - - /*EN - * \ingroup MODULE_VIDEO_FRAME - * - * \brief Discards the next video frame - * \param frameinfo Discarded frame information structure - * \param err Optional error code - * \return TRUE if a frame was available to discard - * \return FALSE otherwise - * - * Discards the next video frame, if it is available, and populates \a frameinfo with information about - * the frame. Note that the \a imageptr field of that structure will not be available and should not - * be referenced. - * - * To determine if the next frame is ready to be displayed, call CriMvEasyPlayer::IsNextFrameOnTime(). - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime() - */ - /*JP - * \ingroup MODULE_VIDEO_FRAME - * \brief 次フレームを取得せずに捨てる - * \param frameinfo 破棄したビデオフレームの情報構造体 - * \param err エラー情報(省略可) - * - * デコード済みのビデオフレームを捨てたい場合に使用する関数です。
- * フレーム取得関数と比べると、出力用バッファを準備する必要が無い部分が特徴です。
- * CriMvEasyPlayer::IsNextFrameOnTime()で次フレームが取得できることを確認した後、本関数を呼び出してください。
- * 引数frameinfoには参考のために破棄したビデオフレームの情報が格納されますが、デコード結果自体にはアクセスできません。 - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime() - */ - CriBool DiscardNextFrame(CriMvFrameInfo &frameinfo, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Sets the current channel for displaying subtitles - * - * \param channel Subtitle channel number - * \param err Optional error code - * - * A movie can contain up to 16 distinct sets of subtitles, each on its own display channel. This can - * be used, for instance, to provide multilanguage support. - * - * Subtitle channels are numbered sequentially, starting from 0, but do not need to be contiguous. - * For example, a movie can have 3 sets of subtitles, on channels 1, 5, and 7. The number of channels - * can be determined once CriMvEasyPlayer::GetMovieInfo() has completed successfully by looking at the - * \a num_subtitle field of the \a CriMvStreamingParameters structure passed to that function. - * - * By default, subtitle playback is off. To turn off subtitles once they have been turned on, pass - * CRIMV_SUBTITLE_CHANNEL_OFF as the value of \a channel. - * - * If the selected subtitle channel does not exist, subtitles will not be displayed. - * - * \remarks - * If an application turns on subtitle display with this function, it must periodically call - * CriMvEasyPlayer::GetSubtitleOnTime(), or else movie playback will stall. - * - * \sa CriMvEasyPlayer::GetMovieInfo(), CriMvEasyPlayer::DecodeHeader(), CriMvEasyPlayer::GetSubtitleOnTime() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief 取得する字幕チャネルの設定 - * \param channel 字幕チャネル - * \param err エラー情報(省略可) - * - * 取得する字幕チャネルを設定します。デフォルトは字幕取得無しです。 - * - * CriMvEasyPlayer::DecodeHeader()と CriMvEasyPlayer::GetMovieInfo()を使うことで、再生するムービが - * いくつの字幕を含んでいるかを再生開始前に知ることができます。 - * - * データが存在しないチャネル番号を指定した場合は、字幕は取得できません。
- * デフォルト設定(字幕取得無し)にしたい場合は、チャネルとしてCRIMV_SUBTITLE_CHANNEL_OFFを指定してください。 - * - * この関数で字幕チャネルを指定した場合は、メインループから定期的に CriMvEasyPlayer::GetSubtitleOnTime() を - * 実行してください。字幕取得を定期的に行わない場合は、ムービ再生が途中で止まります。 - * - * \sa CriMvEasyPlayer::GetMovieInfo(), CriMvEasyPlayer::DecodeHeader(), CriMvEasyPlayer::GetSubtitleOnTime - */ - void SetSubtitleChannel(CriSint32 channel, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_VIDEO_FRAME - * - * \brief Retrieves subtitle data for the current frame, if available - * - * \param bufptr Buffer to receive subtitle data - * \param bufsize Size of buffer, in bytes - * \param err Optional error code - * - * \return The number of bytes copied into \a bufptr - * - * If the movie contains subtitle data, and there is a subtitle for the current frame, up to \a bufsize - * bytes of the subtitle data for the active subtitle channel will be copied into \a bufptr. Otherwise, - * the entire buffer will be filled with zeroes. - * - * \remarks - * If an application turns on subtitle display with CriMvEasyPlayer::SetSubtitleChannel(), it must - * periodically call this function, or else movie playback will stall. - * - * \remarks - * An application should not make assumptions as to whether the returned data is NUL-terminated. - * - * \sa CriMvEasyPlayer::SetSubtitleChannel() - */ - /*JP - * \ingroup MODULE_VIDEO_FRAME - * \brief 字幕データの取得 - * \param bufptr 出力バッファポインタ - * \param bufsize 出力バッファサイズ [byte] - * \param err エラー情報(省略可) - * \return 取得した字幕データのサイズ[byte]を返します。 - * - * 表示時刻になっている字幕データを取得します。 - * この関数を呼び出す場合は、字幕用バッファの実体を確保したうえで呼び出してください。
- * 字幕データは引数 bufptr で指定したバッファに書き出されます。
- * もし字幕データが bufsize よりも大きい場合は、bufsize に収まる量だけ書き出し、残りは破棄されます。 - * - * もしも表示時刻の字幕が無い場合は、バッファの中身はクリアされます。 - * - * CriMvEasyPlayer::SetSubtitleChannel()で存在する字幕チャネルを指定している場合は、 - * メインループから定期的に本関数を実行してください。
- * 実行しない場合は、ムービ再生が途中で止まります。 - * - * \sa CriMvEasyPlayer::SetSubtitleChannel() - */ - CriUint32 GetSubtitleOnTime(CriUint8 *bufptr, CriUint32 bufsize, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Sets a secondary sound interface - * - * \param sound Secondary sound interface to attach to this handle - * \param err Optional error code - * - * A subaudio interface allows an application to play two audio tracks at the same time. This is - * typically used to play a dialog track or sound effects along with background music. After calling - * this function, an application needs to call CriMvEasyPlayer::SetSubAudioTrack() to choose the secondary - * audio track to play. - * - * Note that you must create a separate sound interface to pass to this function. The interface used - * in the CriMvEasyPlayer::Create() call can not be used. - * - * If a subaudio interface is used, the application must call CriMvEasyPlayer::DetachSubAudioInterface() - * when the EasyPlayer handle reaches the MVEASY_STATUS_STOP or MVEASY_STATUS_PLAYEND state before calling - * CriMvEasyPlayer::Destroy(). - * - * Calling CriMvEasyPlayer::ResetAllParameters() will not affect the value set by this function. - * - * \remarks - * If this function is called, it must be called before starting playback (with either CriMvEasyPlayer::Prepare() - * or CriMvEasyPlayer::Start()). - * - * \remarks - * An EasyPlayer handle can not use a subaudio interface and center channel replacement (see - * CriMvEasyPlayer::ReplaceCenterVoice()) at the same time. - * - * \sa CriMvEasyPlayer::DetachSubAudioInterface(), CriMvEasyPlayer::SetSubAudioTrack(), - * CriMvEasyPlayer::ReplaceCenterVoice() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief サブオーディオ用サウンドインタフェースの設定 - * \param sound サブオーディオ用サウンドインタフェース - * \param err エラー情報(省略可) - * - * サブオーディオ(メインオーディオと同時に別のオーディオを再生する機能)のための - * サウンドインタフェースを設定します。
- * 設定するサウンドインタフェースは、 CriMvEasyPlayer::Create() 時に指定したサウンドインタフェース - * とは「別の」インスタンスでなければいけません。
- * - * 本関数は、EasyPlayerハンドル作成後、 CriMvEasyPlayer::Start() または CriMvEasyPlayer::Prepare() の - * 呼び出しより前に実行しなければいけません。
- * - * サブオーディオを再生するには、本関数でサウンドインタフェースを設定したあと、 - * CriMvEasyPlayer::SetSubAudioTrack() でサブオーディオのトラックを指定してください。
- * - * サブオーディオ用サウンドインタフェースを設定したハンドル破棄を破棄する前に、 - * MVEASY_STATUS_STOP または MVEASY_STATUS_PLAYEND の状態で CriMvEasyPlayer::DetachSubAudioInterface() を呼んでください。 - * なお、サブオーディオ用サウンドインタフェースは CriMvEasyPlayer::ResetAllParameters() を呼び出してもリセットされません。 - * - * 注意:
- * サブオーディオ機能は、 CriMvEasyPlayer::ReplaceCenterVoice() によるセンターチャネル置き換え機能とは - * 同時に使用できません。
- * - * \sa CriMvEasyPlayer::DetachSubAudioInterface(), CriMvEasyPlayer::SetSubAudioTrack(), - * CriMvEasyPlayer::ReplaceCenterVoice() - */ - void AttachSubAudioInterface(CriMvSoundInterface *sound, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Removes a secondary audio interface - * - * \param err Optional error code - * - * Removes the secondary sound interface that was set by a call to CriMvEasyPlayer::AttachSubAudioInterface(). - * - * This function should be called when the EasyPlayer handle's state is either MVEASY_STATUS_STOP or - * MVEASY_STATUS_PLAYEND. - * - * \sa CriMvEasyPlayer::AttachSubAudioInterface() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief サブオーディオ用サウンドインタフェースの解除 - * \param err エラー情報(省略可) - * - * 現在設定されているサブオーディオ用サウンドインタフェースを解除します。
- * - * 本関数は、EasyPlayerハンドルの状態が CriMvEasyPlayer::MVEASY_STATUS_STOP または - * CriMvEasyPlayer::MVEASY_STATUS_PLAYEND の時に呼び出してください。
- * - * \sa CriMvEasyPlayer::AttachSubAudioInterface() - */ - void DetachSubAudioInterface(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Sets the secondary audio track - * - * \param track Track number - * \param err Optional error code - * - * A secondary, or subaudio, track is typically used to play a dialog track or sound effects along - * with a movie. An application can support several different languages by setting the desired language - * track with this function. By default, the subaudio track is disabled, even if the interface has been set. - * - * Subaudio is enabled with CriMvEasyPlayer::AttachSubAudioInterface(). If the interface has not been set, - * this function will have no effect. - * - * The main audio track for the movie is set with CriMvEasyPlayer::SetAudioTrack(). If the same track - * number is used for the main and subaudio, the subaudio will not play. - * - * To turn off the subaudio track, pass CRIMV_CENTER_VOICE_OFF as the track number. - * - * \remarks - * If this function is called, it must be called before starting playback (with either CriMvEasyPlayer::Prepare() - * or CriMvEasyPlayer::Start()). - * - * \remarks - * An EasyPlayer handle can not use a subaudio interface and center channel replacement (see - * CriMvEasyPlayer::ReplaceCenterVoice()) at the same time. - * - * \sa CriMvEasyPlayer::AttachSubAudioInterface(), CriMvEasyPlayer::ReplaceCenterVoice() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief サブオーディオトラックの設定 - * \param track サブオーディオ再生するトラック番号 - * \param err エラー情報(省略可) - * - * サブオーディオトラックを設定します。デフォルト値は CRIMV_CENTER_VOICE_OFF です。
- * - * サブオーディオを再生するには、 CriMvEasyPlayer::AttachSubAudioInterface() でサウンドインタフェースを設定したあと、 - * 本関数でサブオーディオのトラックを指定してください。
- * 本関数の呼び出しは、 CriMvEasyPlayer::Start() または CriMvEasyPlayer::Prepare() の呼び出しより前でなければいけません。
- * - * メインオーディオのトラックは CriMvEasyPlayer::SetAudioTrack() で指定します。 - * サブオーディオトラックとしてメインオーディオと同じトラックを指定した場合は、サブオーディオからは何も再生されません。
- * - * サブオーディオトラックには、センターチャネル置き換え機能とは異なりチャネル数の制限はありません。 - * モノラル、ステレオ、5.1ch のいずれのトラックもサブオーディオとして使用することができます。
- * - * 注意:
- * サブオーディオ機能は、 CriMvEasyPlayer::ReplaceCenterVoice() によるセンターチャネル置き換え機能とは - * 同時に使用できません。
- * - * \sa CriMvEasyPlayer::AttachSubAudioInterface() - */ - // default value is -1. - void SetSubAudioTrack(CriSint32 track, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Retrieves the secondary audio track - * - * \param err Optional error code - * \return track number Current subaudio track number - * - * When you successfully set the subaudio track, this function return the track number - * that you specified by CriMvEasyPlayer::SetSubAudioTrack(). Otherwise, it retuns CRIMV_CENTER_VOICE_OFF. - * - * \sa CriMvEasyPlayer::SetSubAudioTrack() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief サブオーディオトラックの取得 - * \param err エラー情報(省略可) - * \return トラック番号 現在設定されているトラック番号 - * - * サブオーディオ再生が有効になっていれば、ユーザがCriMvEasyPlayer::SetSubAudioTrack()で設定した - * サブオーディオトラック番号を返します。 - * - * サブオーディオ再生が有効でない場合や、サブオーディオトラックを指定していなかった場合は、 - * CRIMV_CENTER_VOICE_OFFを返します。 - * - * \sa CriMvEasyPlayer::SetSubAudioTrack() - */ - CriSint32 GetSubAudioTrack(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Replaces the center channel of a 5.1ch audio track - * - * \param track Track number to use - * \param err Optional error code - * - * If the current audio track for a movie (set with CriMvEasyPlayer::SetAudioTrack()) is in 5.1ch - * surround sound, the center channel can be replaced with a different, mono, track. This does not - * affect any of the other channels in the 5.1ch track. - * - * If the current audio track is not 5.1ch, or the replacement track is not monaural, this call will - * have no effect. - * - * Passing CRIMV_CENTER_VOICE_OFF as the value of \a track will undo the replacement and revert to - * playing the original center channel of th 5.1ch track. - * - * \remarks - * An EasyPlayer handle can not use center channel replacement and a subaudio interface (see - * CriMvEasyPlayer::AttachSubAudioInterface() and CriMvEasyPlayer::SetSubAudioTrack()) at the same time. - * - * \sa CriMvEasyPlayer::SetAudioTrack(), CriMvEasyPlayer::AttachSubAudioInterface(), - * CriMvEasyPlayer::SetSubAudioTrack() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief センターボイスの設定 - * \param track ボイストラック番号 - * \param err エラー情報(省略可) - * - * 5.1ch オーディオ再生時に、センターチャネルだけを別のモノラルトラックと置き換えることができます。
- * 本関数は、置き換え用のモノラルデータが入ったオーディオトラックを設定します。
- * 5.1ch BGM に対して、ボイスだけを複数種類から差し替えたい場合に使用してください。 - * - * デフォルトはセンターボイス指定無しです。 - * - * この関数を使用した場合、メインのオーディオトラックとして再生している5.1chデータのセンターチャネル - * は破棄され、代わりにセンターボイスとして指定したデータが入ります。 - * - * (a) センターボイスとして使用できるのはモノラルのオーディオだけです。
- * (b) センター置き換えが有効なのはメインのオーディオが5.1chの場合だけです。 - * - * この二つの条件を満たしていない場合は、本関数で設定した値は無視されます。 - * - * デフォルト値に戻したい場合は、チャネルとしてCRIMV_CENTER_VOICE_OFFを指定してください。 - * - * \sa CriMvEasyPlayer::SetAudioTrack(), CriMvEasyPlayer::AttachSubAudioInterface(), - * CriMvEasyPlayer::SetSubAudioTrack() - */ - void ReplaceCenterVoice(CriSint32 track, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Sets a callback function that will set the movie file - * - * \param func Callback function - * \param usrobj Pointer to user-provided data - * \param err Optional error code - * - * Normally, the movie file is provided directly, via CriMvEasyPlayer::SetFile() or - * CriMvEasyPlayer::SetData(), before playback is started. Setting a file request callback - * allows an application to do \a concatenated \a playback, playing multiple movies, one - * after the other. - * - * If the callback function is set, it will be called when - * - * - The last data chunk of the current movie has been read by EasyPlayer. - * - Any of the playback functions (CriMvEasyPlayer::Start(), CriMvEasyPlayer::Prepare(), - * or CriMvEasyPlayer::DecodeHeader()) are called and the movie file has not been set. - * - * The callback should call CriMvEasyPlayer::SetFile() or CriMvEasyPlayer::SetData() if the - * application wants to continue playback. Otherwise, playback will end once the callback returns. - * - * The \a usrobj parameter specifies a pointer to arbitrary data, that will be passed as the - * second parameter to the callback. - * - * The prototype of the callback function is - * - * void callback(CriMvEasyPlayer *mveasy, void *usrobj) - * - * where - * - * mveasy is the EasyPlayer object - * usrobj is the pointer to user data that was passed to SetFileRequestCallback(). - * - * \remarks - * In order to do concatenated playback, all movies must have the same - * - * \remarks - * - video resolution - * - framerate - * - video codec - * - audio track structure - * - subtitle structure - * - * \remarks - * The same audio track structure means that all movies must have the same number of tracks, and the - * same track number must be of the same audio type for each movie. For instance, if the first movie has - * 2 audio tracks, with track 1 being stereo and track 2 being mono, then \a all other movies would have - * to have 2 tracks, track 1 stereo and track 2 mono. - * - * \remarks - * Subtitles have to match in the number of channels. For instance, if the first movie had 3 subtitle - * channels, then all other movies would need 3 channels. It is also important to keep the languages on - * the same tracks for each movie, since otherwise the application would get confused. CRI Movie makes - * no assumptions about languages or the interpretation of subtitles; subtitles are simply treated as - * binary data. - * - * \remarks - * Currently, cuepoints are not supported with concatenated playback. - * - * \sa CriMvEasyPlayer::SetFile(), CriMvEasyPlayer::SetData() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief ファイル要求コールバック関数の登録 - * \param func ファイル要求コールバック関数 - * \param usrobj ユーザオブジェクト - * \param err エラー情報(省略可) - * - * ムービの連結再生を行うために、ムービファイルを要求するコールバック関数を登録します。 - * このコールバック関数は以下のタイミングで発生します。 - * - * ・ムービファイルを読み込み終了した時。
- * ・ファイルの指定無しで再生を開始した時。 - * - * ファイル要求コールバック関数内で CriMvEasyPlayer::SetFile() または CriMvEasyPlayer::SetData() - * を呼び出すことで、連続して次のムービファイルを指定することができます。
- * SetFile() も SetData() も呼び出さなかった場合は、読み込み済みのムービが終わると - * 再生終了になります。 - * - * ファイル要求コールバック発生時、コールバック関数の第二引数usrobjには、登録時に指定 - * したユーザオブジェクトが渡されます。登録ファイルリストなどの管理に利用してください。 - * - * 連結再生できるムービファイルには以下の条件があります。
- * - ビデオ解像度が同じ - * - ビデオのフレームレートが同じ - * - ビデオのコーデックが同じ - * - オーディオおよび字幕のトラック構成が同じ - * - * \sa CriMvEasyPlayer::SetFile(), CriMvEasyPlayer::SetData() - */ - void SetFileRequestCallback(void (*func)(CriMvEasyPlayer *mveasy, void *usrobj), - void *usrobj, CriError &err=CriMv::ErrorContainer); - -#if defined(XPT_TGT_PC) - /*EN - * \ingroup MODULE_OPTION - * \brief Set processor parameters for decoding on PC - * - * \param num_threads Number of additional threads for load distribution in decoding (Maximum 3 threads) - * \param affinity_mask Pointer to an array of thread affinity masks for each thread specified with num_threads. - * \param priority Thread priority of the decoding threads for load balancing - * \param err Optional error code - * - * This function sets the processor parameters for decoding. Use it when you want to change - * processors or thread priority for decoding load distribution. - * - * If this function is called, it must be called before calling any of the playback functions - * (CriMvEasyPlayer::Start(), CriMvEasyPlayer::Prepare(), or CriMvEasyPlayer::DecodeHeader()). - * - * On initialization, CRI Movie prepares three worker threads for distributed decoding.
- * - * \a num_threads specifies how many worker threads CRI Movie should use.
- * \a affinity_mask is an array of affinity masks for the worker threads. This array must have - * \a num_threads many elements. The format of \a affinity_mask is same as for the value passed to the - * Win32 SetThreadAffinityMask() API function.
- * \a priority is used as the thread priority for all of the threads specified by \a num_threads. - * - * If this function is called, three distributed decoding threads will run in parallel by default. - * Also, processor assignment of the decoding threads is handled by the operating system, and their - * priority will be normal. - * - * To reset the parameters, call this function again, passing CRIMV_DEFAULT_AFFNITY_MASK_PC and - * CRIMV_DEFAULT_THREAD_PRIORITY_PC as the affinity masks and thread priority. - * - * \sa CRIMV_DEFAULT_AFFNITY_MASK_PC, CRIMV_DEFAULT_THREAD_PRIORITY_PC - */ - /*JP - * \ingroup MODULE_OPTION - * \brief PCでデコード処理に使う追加プロセッサ設定 - * \param num_threads 負荷分散デコード用に使用する追加スレッドの数 (最大3つ) - * \param affinity_masks スレッドアフィニティマスクの配列へのポインタ。num_threadsで指定したスレッドごとのマスク値。 - * \param priority 負荷分散デコードスレッドの優先度 - * \param err エラー情報(省略可) - * - * デコード処理を分散して処理するためのプロセッサを指定できます。 - * デコード処理に行うプロセッサやスレッド優先度を変更したい場合に使用してください。 - * 本関数は再生開始(Start, Prepare, DecodeHader)前に呼び出す必要があります。 - * - * CRI Movieは初期化の際に3つの分散デコード用のワーカースレッドを用意します。 - * num_threads引数で、そのうちのいくつのスレッドを実際に使用するかを指定できます。 - * アプリケーションから明示的にプロセッサ割り当てを行いたい場合、個々のスレッドに対して - * アフィニティマスクを設定してください。 - * アフィニティマスクの値は、Win32 APIのSetThreadAffinityMaskの引数と同じ書式です。 - * スレッド優先度は、num_threadsで指定したデコードに使用するスレッドに対して適用されます。 - * - * この関数を呼ばなかった場合、3つのスレッドで並列デコードを行います。 - * デコードスレッドのプロセッサは割り当ては全てOS任せで、優先度はスレッド標準になります。 - * - * 一度本関数で設定を変更した後、状態を戻したい場合は、CRIMV_DEFAULT_AFFNITY_MASK_PC, CRIMV_DEFAULT_THREAD_PRIORITY_PCを - * 引数として指定し、再度呼び出してください。 - * - * \sa CRIMV_DEFAULT_AFFNITY_MASK_PC, CRIMV_DEFAULT_THREAD_PRIORITY_PC - */ - void SetUsableProcessors_PC(CriSint32 num_threads, const CriUint32 *affinity_mask, CriSint32 priority, - CriError &err=CriMv::ErrorContainer); - -#endif - -#if defined(XPT_TGT_XBOX360) - /*EN - * \ingroup MODULE_OPTION - * \brief Set processor parameters for decoding - * \param processors_param Processor Parameters - * \param err Optional error code - * - * \brief Set processor parameters for decoding - * \param processors_param Processor Parameters - * \param err Optional error code - * - * This function sets the processor parameters for decoding, along the priority of the - * decoding threads. - * - * If this function is called, it must be called before calling any of the playback functions - * (CriMvEasyPlayer::Start(), CriMvEasyPlayer::Prepare(), or CriMvEasyPlayer::DecodeHeader()). - * - * If you don't call this function, the EasyPlayer handle uses Processor 3 (Core 0, Thread 0) - * and Processor 5 (Core 0, Thread 0). - * - * \sa CriMvProcessorParameters_XBOX360 - */ - /*JP - * \ingroup MODULE_OPTION - * \brief Xbox360でデコードに使うプロセッサ設定 - * \param processors_param 使用プロセッサパラメータ - * \param err エラー情報(省略可) - * - * デコードに使用するプロセッサを指定します。
- * 本関数は再生開始(Start, Prepare, DecodeHader)前に呼び出す必要があります。 - * - * また、デコードに使用する内部スレッドの優先度の設定が出来ます。 - * - * デフォルトのプロセッサ設定では、プロセッサ3(コア1スレッド1)とプロセッサ5 - * (コア2スレッド1)を使用します。 - * - * \sa CriMvProcessorParameters_XBOX360 - */ - void SetUsableProcessors_XBOX360(const CriMvProcessorParameters_XBOX360 *processors_param, - CriError &err=CriMv::ErrorContainer); -#endif - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Sets the frame where playback will start - * - * \param seek_frame_id Frame (0-based) to start playing from - * \param err Optional error code - * - * To play a movie from other than the first frame, call this function before starting playback. - * To seek to a new frame when the movie is already playing, call CriMvEasyPlayer::Stop() and wait - * for the handle to change to the MVEASY_STATUS_STOP state, call this function with the desired - * frame number, then call CriMvEasyPlayer::Start() again. - * - * Valid values for seek_frame_id are from 0 to \a num_frames - 1, where \a num_frames can be found by - * - *
-	 *
-	 *   CriMvStreamingParameters streaming_params;
-	 *   CriSint32                num_frames;
-	 *
-	 *   GetMovieInfo(streaming_params);
-	 *   num_frames = streaming_params.video_prm[0].total_frames;
-	 *
-	 * 
- * - * Refer to \ref usr_mech7 for more information. - * - * \remarks - * If the value of \a seek_frame_id is out of range, playback will start from frame 0. - * - * \sa CriMvStreamingParameters - */ - /*JP - * \ingroup MODULE_OPTION - * \brief シーク再生開始位置の設定 - * \param seek_frame_id シーク再生開始するフレーム番号(0~) - * \param err エラー情報(省略可) - * - * シーク再生を開始するフレーム番号を指定します。 - * - * 再生開始前( CriMvEasyPlayer::Prepare()または CriMvEasyPlayer::Start()呼び出し前)に本関数を実行してください。 - * また、この関数はムービの再生中に呼び出すことは出来ません。再生中にシークをする場合は、一度再生を停止してから - * 本関数を呼び出してください。 - * - * 本関数を実行しなかった場合、またはフレーム番号0を指定した場合はムービの先頭から再生を開始します。 - * 指定したフレーム番号が、ムービデータの総フレーム数より大きかったり負の値だった場合もムービの先頭から再生します。 - * - * \ref usr_mech7 もあわせて参照してください。 - * - */ - void SetSeekPosition(CriSint32 seek_frame_id, CriError &err=CriMv::ErrorContainer); - - /*EN - * - * \brief Calculates a frame ID from a frame time - * - * \param count Timer counter - * \param unit Counter increment per second - * \param err Optional error code - * - * \return Frame ID corresponding to given time - * - * Each frame of a movie corresponds to a particular display time, based on the framerate. Given a - * time from the start of playback, this function will return the ID of the specific frame that should - * be displayed, barring any delays or skipped frames, at that time. - * - * The time, in seconds, is specified by \a count / \a unit.
- * - * This function can be used for, among other things, jumping to a particular frame when a cuepoint is reached. - * - * \remarks - * This function can be called once the EasyPlayer handle status has reached MVEASY_STATUS_WAIT_PREP. - * - * \sa CriMvEasyPlayer::CalcTimeFromFrameId(); - */ - /*JP - * \ingroup MODULE_OPTION - * \brief 再生時刻からフレーム番号の計算 - * \param count タイマカウント - * \param unit 1秒あたりのタイマカウント値。count ÷ unit で秒単位の時刻となります。 - * \param err エラー情報(省略可) - * \return frame ID - * - * 再生時刻からフレーム番号を計算します。 - * この関数は、EasyPlayerハンドルの状態が MVEASY_STATUS_WAIT_PREP 以降になったあとに使用できます。 - * - * シーク再生開始位置を、時刻から計算したいときに使用してください。 - * (例えばキューポイント情報からシーク位置を決定する場合など。) - * - * \sa CriMvEasyPlayer::CalcTimeFromFrameId(); - */ - CriSint32 CalcFrameIdFromTime(CriUint64 count, CriUint64 unit, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Calculates a frame time from a frame ID - * - * \param frame_id Frame ID - * \param unit Counter increment per second - * \param err Optional error code - * - * \return Timer counter corresponding to given frame ID - * - * Each frame of a movie corresponds to a particular display time, based on the framerate. Given a - * frame ID and the number of timer intervals per second, this function will return the timer count - * of the display time for that frame. - * - * The display time, in seconds, for this frame is calculated by dividing the timer count by the timer - * interval. - * - * If you have the movie frame, you do not have to calculate the time. The \a time and \a tunit fields - * of the CriMvFrameInfo structure that is passed the GetFrameOnTimeXXX() and DiscardNextFrame() - * functions will contain this information. - * - * \remarks - * This function can be called once the EasyPlayer handle status has reached MVEASY_STATUS_WAIT_PREP. - * - * \sa CriMvEasyPlayer::CalcFrameIdFromTime(), CriMvFrameInfo - */ - /*JP - * \ingroup MODULE_OPTION - * \brief フレーム番号から再生時刻の計算 - * \param frame_id frame ID - * \param unit 1秒あたりのタイマカウント値。count ÷ unit で秒単位の時刻となります。 - * \param err エラー情報(省略可) - * \return タイマカウント - * - * フレーム番号から再生時刻を計算します。 - * この関数は、EasyPlayerハンドルの状態が MVEASY_STATUS_WAIT_PREP 以降になったあとに使用できます。 - * - * 実際にフレーム取得した場合は、計算の必要はありません。フレーム情報構造体の時刻を参照してください。 - * - * \sa CriMvEasyPlayer::CalcFrameIdFromTime(), CriMvFrameInfo - */ - CriUint64 CalcTimeFromFrameId(CriSint32 frame_id, CriUint64 unit, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Find the next event point, if any, after the given time counter - * - * \param count Timer counter - * \param unit Counter increment per second - * \param type Type of event point to look for - * \param eventinfo Returned event point information structure - * \param err Optional error code - * - * \return Frame ID corresponding to given time - * - * Event points allow an application to associate arbitrary actions with specific points in a movie. - * This function will search forward in the movie for the next event point after the given time - * (specifed as \a count / \a unit). If an event point is found, \a eventinfo will be populated with - * the information about the event point, and the function will return the corresponding frame ID. - * - * \a type is an application-defined value that can be used to categorize event points, and is specified - * when the movie is encoded (see link to event-point-specification-section for more information - * about creating event points.). If -1 is passed as the value of \a type, all event points will be - * searched. Otherwise, only matching event point types will be searched. - * - * If no event point of the requested type is found, this function will return -1. - * - * \remarks - * This function can be called once the EasyPlayer handle status has reached MVEASY_STATUS_WAIT_PREP. - * - * \sa CriMvEasyPlayer::SearchPrevEventPointByTime(); - */ - /*JP - * \ingroup MODULE_OPTION - * \brief 指定時刻直後のイベントポイントの検索 - * \param count タイマカウント - * \param unit 1秒あたりのタイマカウント値。count ÷ unit で秒単位の時刻となります。 - * \param type 検索対象とするイベントポイントのtype値 - * \param eventinfo 発見したイベントポイントの情報 - * \param err エラー情報(省略可) - * \return frame ID - * - * 指定時刻の次にあるイベントポイントを検索し、イベントポイント情報とフレーム番号を取得します。 - * この関数は、EasyPlayerハンドルの状態が MVEASY_STATUS_WAIT_PREP 以降になったあとに使用できます。 - * - * 検索の対象となるのは type で指定した値が一致するイベントポイントです。 - * type に -1を指定した場合は、全てのイベントポイントが検索対象となります。 - * - * 検索対象となるイベントポイントが発見できなかった場合は、フレーム番号は-1を返します。 - * - * \sa CriMvEasyPlayer::SearchPrevEventPointByTime(); - */ - CriSint32 SearchNextEventPointByTime(CriUint64 count, CriUint64 unit, CriSint32 type, - CriMvEventPoint &eventinfo, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Find the previous event point, if any, before the given time counter - * - * \param count Timer counter - * \param unit Counter increment per second - * \param type Type of event point to look for - * \param eventinfo Returned event point information structure - * \param err Optional error code - * - * \return Frame ID corresponding to given time - * - * Event points allow an application to associate arbitrary actions with specific points in a movie. - * This function will search backward in the movie (i.e. towards the beginning) for the next event - * point before the given time (specifed as \a count / \a unit). If an event point is found, - * \a eventinfo will be populated with the information about the event point, and the function will - * return the corresponding frame ID. - * - * \a type is an application-defined value that can be used to categorize event points, and is specified - * when the movie is encoded (see link to event-point-specification-section for more information - * about creating event points.). If -1 is passed as the value of \a type, all event points will be - * searched. Otherwise, only matching event point types will be searched. - * - * If no event point of the requested type is found, this function will return -1. - * - * \remarks - * This function can be called once the EasyPlayer handle status has reached MVEASY_STATUS_WAIT_PREP. - * - * \sa CriMvEasyPlayer::SearchNextEventPointByTime(); - */ - /*JP - * \ingroup MODULE_OPTION - * \brief 指定時刻直前のイベントポイントの検索 - * \param count タイマカウント - * \param unit 1秒あたりのタイマカウント値。count ÷ unit で秒単位の時刻となります。 - * \param type 検索対象とするイベントポイントのtype値 - * \param eventinfo 発見したイベントポイントの情報 - * \param err エラー情報(省略可) - * \return frame ID - * - * 指定時刻の手前にあるイベントポイントを検索し、イベントポイント情報とフレーム番号を取得します。 - * この関数は、EasyPlayerハンドルの状態が MVEASY_STATUS_WAIT_PREP 以降になったあとに使用できます。 - * - * 検索の対象となるのは type で指定した値が一致するイベントポイントです。 - * type に -1を指定した場合は、全てのイベントポイントが検索対象となります。 - * - * 検索対象となるイベントポイントが発見できなかった場合は、フレーム番号は-1を返します。 - * - * \sa CriMvEasyPlayer::SearchNextEventPointByTime(); - */ - CriSint32 SearchPrevEventPointByTime(CriUint64 count, CriUint64 unit, CriSint32 type, - CriMvEventPoint &eventinfo, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Gets the list of all event points in the movie - * - * \param err Optional error code - * - * \return Pointer to the list of event points, or NULL if there are no event points - * - * CRI Movie considers a cue point list to be the number of event points in a movie, and a pointer to - * an array of event point structures. Event points allow an application to associate arbitrary actions - * with specific points in a movie. - * - * The returned pointer points to an area inside of the EasyPlayer's work buffer. An application should - * not attempt to write to it. - * - * \remarks - * This function can be called once the EasyPlayer handle status has reached MVEASY_STATUS_WAIT_PREP. - * The returned information is valid through the MVEASY_STATUS_STOP state. Once the EasyPlayer handle - * has been destroyed, or the movie has been restarted (by calling CriMvEasyPlayer::Start(), - * CriMvEasyPlayer::Prepare(), or CriMvEasyPlayer::DecodeHeader()), the cuepoint information will be - * invalid. - * - */ - /*JP - * \ingroup MODULE_OPTION - * \brief キューポイント情報(イベントポイント一覧)の取得 - * \param err エラー情報(省略可) - * \return Cue point info (Event point list) - * - * キューポイント情報(イベントポイント一覧)を取得します。 - * この関数は、EasyPlayerハンドルの状態が MVEASY_STATUS_WAIT_PREP 以降になったあとに使用できます。 - * - * この関数で取得するキューポイント情報は、再生ハンドルのワークバッファを直接参照しています。
- * 再生停止状態での参照は可能ですが、次の再生を開始した後は参照を禁止します。
- * このキューポイント情報を別のメモリにコピーした場合もこの条件は変わりません。 - * - */ - CriMvCuePointInfo* GetCuePointInfo(CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Sets a function that will be called when a cue point is reached - * - * \param func Callback function - * \param usrobj Pointer to user-provided data - * \param err Optional error code - * - * Beginning with version 2.0, CRI Movie allows a movie to specify arbitrary actions to - * happen at various points on the timeline. These are referred to as \a cue \a points, or, - * more generally, as \a event \a points. If a cue point callback has been installed for the - * movie, it will be called whenever a cuepoint has been reached. - * - * The \a usrobj parameter specifies a pointer to arbitrary data, that will be passed as the - * third parameter to the callback. - * - * The prototype of the callback function is - * - * void callback(CriMvEasyPlayer *mveasy, CriMvEventPoint *eventinfo, void *usrobj) - * - * where - * - * mveasy is the EasyPlayer object
- * eventinfo is the event info structure that was reached
- * usrobj is the pointer to user data that was passed to SetFileRequestCallback().
- * - * \remarks - * Do not call any movie playback functions (for example, CriMvEasyPlayer::Stop()) from the callback - * function. If you need to do this, set a flag from the callback and refer to it in your main loop. - * - * \sa CriMvEventPoint - */ - /*JP - * \ingroup MODULE_OPTION - * \brief キューポイントコールバック関数の登録 - * \param func キューポイントコールバック関数 - * \param usrobj ユーザオブジェクト - * \param err エラー情報(省略可) - * - * キューポイントのコールバック関数を登録します。 - * このコールバック関数は、ムービの再生時刻が各イベントポイントで指定された時刻を経過した時に発生します。 - * コールバック関数の呼び出し判定は CriMvEasyPlayer::Update() から行われます。 - * - * キューポイントコールバック発生時、コールバック関数の第2引数 eventinfo にはエベントポイント情報が、 - * 第3引数usrobjには、登録時に指定したユーザオブジェクトが渡されます。 - * - * キューポイントコールバック関数内では、ムービ再生をコントロールする関数(例えば CriMvEasyPlayer::Stop()) - * を呼び出してはいけません。 - * - * \sa CriMvEventPoint - */ - void SetCuePointCallback(void (*func)(CriMvEasyPlayer *mveasy, CriMvEventPoint *eventinfo, void *usrobj), - void *usrobj, CriError &err=CriMv::ErrorContainer); - - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Resets movie handle parameters to their default values - * - * \param err Optional error code - * - * This function will reset most parameters back to their default values. Call this when you are - * reusing an EasyPlayer handle and need to quickly undo changes to a number of parameters. - * - * Note that this will not remove a subaudio interface (set by CriMvEasyPlayer::AttachSubAudioInterface()). - * CriMvEasyPlayer::DetachSubAudioInterface() must be called instead. - * - * \remarks - * This function can be called once the EasyPlayer handle status is either MVEASY_STATUS_STOP or - * MVEASY_STATUS_PLAYEND. - * - * - *
Setting API Reset by ResetAllParameters() Reset by Stop() - *
SetFile YES (*1) - *
SetData YES (*1) - *
Pause YES YES - *
SetMasterTimer YES NO - *
SetNumberOfFramePools YES NO - *
SetBufferingTime YES NO - *
SetReloadThresholdTime YES NO - *
SetMaxBitrate YES NO - *
SetAudioTrack YES NO - *
SetLoopFlag YES NO - *
SetStreamingParameters YES NO - *
AttachSubAudioInterface NO NO - *
SetSubAudioTrack YES NO - *
ReplaceCenterVoice YES NO - *
SetFileRequestCallback YES NO - *
SetSeekPosition YES NO - *
SetCuePointCallback YES NO - *
- * - * (*1) Normally, values set by SetFile() or SetData() are not reset by a call to Stop(). However, - * if a file request callback has been set (via CriMvEasyPlayer::SetFileRequestCallback()), this - * setting will be reset. - * - * \sa CriMvEasyPlayer::Stop(), CriMvEasyPlayer::SetFileRequestCallback() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief パラメータのリセット - * \param err エラー情報(省略可) - * - * 再生ハンドルに設定されたパラメータ類をリセットします。
- * ただしサブオーディオ用インタフェースだけはリセットされませんので、アプリケーションで明示的に - * CriMvEasyPlayer::DetachSubAudioInterface() を呼び出してください。 - * - * 本関数はハンドル状態が MVEASY_STATUS_STOP または MVEASY_STATUS_PLAYEND の時に呼び出してください。 - * - * - *
設定関数 ResetAllParametersによる
リセット処理
Stopによる
リセット処理 - *
SetFile o (*1) - *
SetData o (*1) - *
Pause o o - *
SetMasterTimer o x - *
SetNumberOfFramePools o x - *
SetBufferingTime o x - *
SetReloadThresholdTime o x - *
SetMaxBitrate o x - *
SetAudioTrack o x - *
SetLoopFlag o x - *
SetStreamingParameters o x - *
AttachSubAudioInterface x x - *
SetSubAudioTrack o x - *
ReplaceCenterVoice o x - *
SetFileRequestCallback o x - *
SetSeekPosition o x - *
SetCuePointCallback o x - *
- * (*1) 通常はリセットされません。ただしファイル要求コールバックが登録されていた場合はリセットされます。 - * - * \sa CriMvEasyPlayer::Stop() - */ - void ResetAllParameters(CriError &err=CriMv::ErrorContainer); - - /* 再生用ワークバッファおよび下位モジュールの解放(明示的な呼び出し用) */ - void ReleasePlaybackWork(CriError &err=CriMv::ErrorContainer); - -public: /* for DEBUG */ - /*//EN - * \ingroup MODULE_OPTION - * - * \brief Sets the maximum movie data read size - * - * \param max_chunk_size The maximum read size, in bytes - * \param err Optional error code - * - * This is a DEBUG function and should not normally need to be used by applications. - * - * Sets the maximum read size. CRI Movie will attempt to read this many bytes each time it - * needs to load more movie data from disk. - * - * If this function is called, it must be called before calling any of the playback functions - * (CriMvEasyPlayer::Start(), CriMvEasyPlayer::Prepare(), or CriMvEasyPlayer::DecodeHeader()). - * - * To revert to the default behavior, pass 0 as \a max_chunk_size. - * - * \remarks - * If this function is called, the new value for \a max_chunk_size will not be reflected in the - * CriMvStreapingParameters structure. A call to CriMvEasyPlayer::GetMovieInfo() will return the - * original value that was set in the movie header. - * - * \remarks - * If you call CriMvEasyPlayer::SetStreamingParameters(), this function can not be used. - * - * \sa CriMvEasyPlayer::GetMovieInfo(), CriMvEasyPlayer::SetMinBufferSize() - */ - /*//JP - * \ingroup MODULE_OPTION - * \brief 最大チャンクサイズの指定 - * \param max_chunk_size 最大チャンクサイズ[byte] - * \param err エラー情報(省略可) - * - * ムービデータの最大チャンクサイズを指定します。
- * 現在のライブラリでは、本関数はアプリケーションから使用する必要はありません。
- * - * 本関数で設定した最大チャンクサイズは、CriMvEasyPlayer::GetMovieInfo 関数で取得するムービ情報には反映されません。 - * CriMvEasyPlayer::GetMovieInfo 関数で取得できるのはムービデータの本来の情報です。
- * - * 本関数の呼び出しは、 CriMvEasyPlayer::Prepare 関数または CriMvEasyPlayer::Start 関数の前までに実行してください。 - * - * 最大チャンクサイズに 0を指定した場合、最大チャンクサイズはムービデータの持つ値となります。
- * また、アプリケーションが CriMvEasyPlayer::SetStreamingParameters 関数を呼び出した場合は本関数で - * 設定した値よりも、 CriMvEasyPlayer::SetStreamingParameters 関数の指定が優先されます。 - * - * \sa CriMvEasyPlayer::GetMovieInfo(), CriMvEasyPlayer::SetMinBufferSize() - */ - void SetMaxChunkSize(CriUint32 max_chunk_size, CriError &err=CriMv::ErrorContainer); - - /*//EN - * \ingroup MODULE_OPTION - * - * \brief Sets the minimum movie data buffer size - * - * \param min_buffer_size The minimum buffer size, in bytes - * \param err Optional error code - * - * This is a DEBUG function and should not normally need to be used by applications. - * - * Sets the minimum buffer size used for reading movie data from disk. - * - * If this function is called, it must be called before calling any of the playback functions - * (CriMvEasyPlayer::Start(), CriMvEasyPlayer::Prepare(), or CriMvEasyPlayer::DecodeHeader()). - * - * To revert to the default behavior, pass 0 as \a max_chunk_size. - * - * \remarks - * If this function is called, the new value for \a min_buffer_size will not be reflected in the - * CriMvStreapingParameters structure. A call to CriMvEasyPlayer::GetMovieInfo() will return the - * original value that was set in the movie header. - * - * \remarks - * If you call CriMvEasyPlayer::SetStreamingParameters(), this function can not be used. - * - * \sa CriMvEasyPlayer::GetMovieInfo(), CriMvEasyPlayer::SetMaxChunkSize() - */ - /*//JP - * \ingroup MODULE_OPTION - * \brief 最小バッファサイズの指定 - * \param min_buffer_size 最小バッファサイズ[byte] - * \param err エラー情報(省略可) - * - * ムービデータの最小バッファサイズを指定します。
- * 現在のライブラリでは、本関数はアプリケーションから使用する必要はありません。
- * - * 本関数で設定した最小バッファサイズは、CriMvEasyPlayer::GetMovieInfo 関数で取得するムービ情報には反映されません。 - * CriMvEasyPlayer::GetMovieInfo 関数で取得できるのはムービデータの本来の情報です。
- * - * 本関数の呼び出しは、 CriMvEasyPlayer::Prepare 関数または CriMvEasyPlayer::Start 関数の前までに実行してください。 - * - * 最小バッファサイズに 0を指定した場合、最小バッファサイズはムービデータの持つ値となります。
- * また、アプリケーションが CriMvEasyPlayer::SetStreamingParameters 関数を呼び出した場合は本関数で - * 設定した値よりも、 CriMvEasyPlayer::SetStreamingParameters 関数の指定が優先されます。 - * - * \sa CriMvEasyPlayer::GetMovieInfo(), CriMvEasyPlayer::SetMaxChunkSize() - */ - void SetMinBufferSize(CriUint32 min_buffer_size, CriError &err=CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Retrieves various movie playback statistics - * - * \param playinfo Playback statistics structure - * \param err Optional error code - * - * This is a DEBUG function and is not normally needed by applications. - * - * Retrieves a number of performance statistics dealing with movie playback, including how often - * a frame could not be retrieved and how close the plaback framerate is to the movie's expected - * playback. - * - * This information is updated on every call to CriMvEasyPlayer::IsNextFrameOnTime(). In order for - * the values to be accurate, an application should call IsNextFrameOnTime() once each time through - * its main loop. Calling IsNextFrameOnTime() too often or not often enough will result in - * misleading statistics. - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief ムービ再生情報の取得 - * \param playinfo ムービ情報(返り値) - * \param err エラー情報(省略可) - * - * 本関数は通常、アプリケーションからは使用しません。デバッグ用の関数です。 - * - * 現在再生しているムービの再生情報 CriMvPlaybackInfo 構造体を取得できます。
- * この情報からビデオフレームの取得間隔や、ビデオフレームのデコード遅延などを知ることができます。
- * - * 再生情報はアプリが呼び出す CriMvEasyPlayer::IsNextFrameOnTime() 内で更新します。
- * アプリケーションが CriMvEasyPlayer::IsNextFrameOnTime()を呼び出さない場合や、メインループで複数回 - * 呼び出す場合は情報が正しく更新されないので注意してください。
- * - * \sa CriMvEasyPlayer::IsNextFrameOnTime() - */ - void GetPlaybackInfo(CriMvPlaybackInfo & playinfo, CriError & err = CriMv::ErrorContainer); - - /*EN - * \ingroup MODULE_OPTION - * - * \brief Gets the result of the last attempt to retrieve a video frame - * - * \param err Optional error code - * - * \return The result of the last frame retrieval - * - * Returns one of the following values: - * - * - * - * - * - * - * - *
Value Meaning
CRIMV_LASTFRAME_OK The frame was successfully retrieved.
CRIMV_LASTFRAME_TIME_EARLY It is too soon to display this frame. The frame time - * is greater than the current playback time.
CRIMV_LASTFRAME_DECODE_DELAY The frame has not been decoded yet, or CRI Movie is not - * done decoding it.
CRIMV_LASTFRAME_DISCARDED The frame was discarded, by calling - * CriMvEasyPlayer::DiscardNextFrame()
- * - * \remarks - * The result is determined by calling CriMvEasyPlayer::IsNextFrameOnTime(), not the GetFrameOnTimeXXX() - * functions. - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime(), CriMvEasyPlayer::DiscardNextFrame() - */ - /*JP - * \ingroup MODULE_OPTION - * \brief 前回のビデオフレーム取得の結果を取得する - * \param err エラー情報(省略可) - * \return フレーム取得結果の列挙値 - * - * 本関数は通常、アプリケーションからは使用しません。デバッグ用の関数です。 - * - * 前回のビデオフレーム取得の結果を返します。 - * ビデオフレームのデコードが間に合っているのかどうかをチェックすることが出来ます。 - * - * 注意:
- * ビデオフレーム取得の結果とは、基本的にアプリケーションが呼び出す CriMvEasyPlayer::IsNextFrameOnTime() の結果を元に - * 更新します。GetFrameOnTime関数の結果ではありません。 - * - * \sa CriMvEasyPlayer::IsNextFrameOnTime() - */ - CriMvLastFrameResult GetLastFrameResult(CriError & err = CriMv::ErrorContainer); - - /* [Unofficial] */ - /* Set the number of decoded frames to keep internally during the MVEASY_STATUS_PREP status. */ - /* Adjust the number if you need to reduce latesy for the first frame */ - void SetNumberOfFramesForPrep(CriUint32 num_frames, CriError & err = CriMv::ErrorContainer); - - /* [Unofficial] - * \ingroup MODULE_OPTION - * \brief 再生終了/停止通知コールバック関数の登録 - * \param func 再生終了/停止通知コールバック関数 - * \param usrobj ユーザオブジェクト - * \param err エラー情報(省略可) - * - * 再生終了および再生停止を通知するコールバック関数を登録します。 - * このコールバック関数は、ヘッダ解析/再生準備/再生状態から再生停止/再生終了状態に - * 遷移した直後に一度だけ呼び出されます。 - * コールバック関数の呼び出しは CriMvEasyPlayer::Update() から行われます。 - * - * 登録したコールバック関数内では、ムービ再生をコントロールする関数(例えば CriMvEasyPlayer::Stop()) - * を呼び出してはいけません。 - * - * 注意: MVEASY_STATUS_PLAYEND状態からMVEASY_STATUS_STOP状態への遷移時にはコールバック関数は呼び出されません。 - */ - void SetStopCompleteCallback(void (*func)(CriMvEasyPlayer *mveasy, void *usrobj), - void *usrobj, CriError &err=CriMv::ErrorContainer); - - /* For FAST_LATENCY */ - /*************************************************************************************/ - /* コンフィグ指定のハンドル作成関数 */ - static CriMvEasyPlayer* CRIAPI Create(CriHeap heap, - CriMvHandleConfig *config, - CriMvFileReaderInterface *freader, - CriMvSystemTimerInterface *stimer, - CriMvSoundInterface *sound, - CriError &err=CriMv::ErrorContainer); - - /* For Sofdec2 */ - /*************************************************************************************/ - enum MetaFlag { - MVEASY_META_FLAG_CUE = 0x0001, - MVEASY_META_FLAG_SEEK = 0x0002, - MVEASY_META_FLAG_ALL = MVEASY_META_FLAG_CUE + MVEASY_META_FLAG_SEEK, - - /* Keep enum 4bytes */ - MVEASY_META_FLAG_MAKE_ENUM_SINT32 = 0x7FFFFFFF - }; - - enum ReferFrameResult { - MVEASY_REFER_FRAME_RESULT_OK = (1), - MVEASY_REFER_FRAME_RESULT_SHORT_INPUT = (2), - MVEASY_REFER_FRAME_RESULT_SHORT_CPUTIME = (3), - MVEASY_REFER_FRAME_RESULT_DEMUX_STUCK = (4), - - /* Keep enum 4bytes */ - MVEASY_REFER_FRAME_RESULT_MAKE_ENUM_SINT32 = 0x7FFFFFFF - }; - - /* ユーザからのワーク領域渡し版、ハンドル作成関数 */ - static CriMvEasyPlayer* CRIAPI Create(void *work, CriSint32 work_size, - CriMvHandleConfig *config, - CriMvFileReaderInterface *freader, - CriMvSystemTimerInterface *stimer, - CriMvSoundInterface *sound, - CriError &err=CriMv::ErrorContainer); - - /* 再生用ワーク領域サイズの計算 */ - CriSint32 CalcPlaybackWorkSize(const CriMvStreamingParameters *stmprm, CriError & err = CriMv::ErrorContainer); - - /* 再生用ワーク領域の設定関数 */ - void SetPlaybackWork(void *work, Sint32 work_size, CriError & err = CriMv::ErrorContainer); - - /* メタデータワーク用コールバック関数 */ - void SetMetaDataWorkAllocator(CriMvMetaDataWorkMallocFunc allocfunc, CriMvMetaDataWorkFreeFunc freefunc,void *usrobj, CriMvMetaFlag meta_flag); - - /* 引数で指定したフレーム情報の表示判定 */ - CriBool IsFrameOnTime(const CriMvFrameInfo *frameinfo, CriError &err=CriMv::ErrorContainer); - - /* フレームの参照 */ - ReferFrameResult ReferFrame(CriMvFrameInfo &frameinfo, CriError &err=CriMv::ErrorContainer); - - /* YUV個別バッファフォーマットでのバッファ取得 */ - CriBool LockFrameYUVBuffersWithAlpha(CriMvYuvBuffers &yuvbuffers, CriMvFrameInfo &frameinfo, CriMvAlphaFrameInfo &alpha_frameinfo, CriError &err=CriMv::ErrorContainer); - - /* LockFrameYUVBuffersWithAlphaでロックしたフレームの解放 */ - CriBool UnlockFrameBufferWithAlpha(CriMvFrameInfo *frameinfo, CriMvAlphaFrameInfo *alpha_frameinfo, CriError &err=CriMv::ErrorContainer); - - /* 32bitARGBバッファフォーマットへのコピー関数 */ - CriBool CopyFrameToBufferARGB32(CriUint8 *dstbuf, CriUint32 dst_pitch, CriUint32 dst_bufsize, - const CriMvYuvBuffers *srcbufs, const CriMvFrameInfo *src_vinf, const CriMvAlphaFrameInfo *src_ainf, CriError &err=CriMv::ErrorContainer); - - /* 32bitARGBバッファフォーマットへαのみのコピー関数 */ - CriBool CopyAlphaToBufferARGB32( - const CriMvFrameInfo *src_vinf, - CriUint8 *dst_buf, - CriUint32 dst_pitch, - CriUint32 dst_bufsize, - CriError &err=CriMv::ErrorContainer - ); - -#if defined(XPT_TGT_IPHONE) || defined(XPT_TGT_WINMO) || defined(XPT_TGT_ANDROID) || defined(XPT_TGT_CQSH2A) || defined(XPT_TGT_ACRODEA) || defined(XPT_TGT_NACL) || defined(XPT_TGT_SH7269) || defined(XPT_TGT_PC)|| defined(XPT_TGT_TRGP6K) - CriBool CopyFrameToBufferRGB565(CriUint8 *dstbuf, CriUint32 dst_pitch, CriUint32 dst_bufsize, - const CriMvYuvBuffers *srcbufs, const CriMvFrameInfo *src_vinf, const CriMvAlphaFrameInfo *src_ainf, CriError &err=CriMv::ErrorContainer); -#endif - - /* YUV個別バッファフォーマットのコピー関数 */ - CriBool CopyFrameToBuffersYUV(CriMvYuvBuffers *dstbufs, - const CriMvFrameInfo *src_vinf, const CriMvAlphaFrameInfo *src_ainf, CriError &err=CriMv::ErrorContainer); - - /* リードバッファサイズの強制指定 */ - void SetReadBufferSize(CriUint32 buffer_size, CriError &err=CriMv::ErrorContainer); - - CriUint32 GetMinBufferSize(CriError &err=CriMv::ErrorContainer); - /**************************************************************************************/ - void SetVideoFramerate(CriUint32 framerate_n, CriUint32 framerate_d); - - void SetCompareFrameTimeCallback( - CriBool (*func)(CriMvEasyPlayer *mveasy, CriMvFrameInfo *frameinfo, CriUint64 count, CriUint64 unit, void *usrobj), - void *usrobj, CriError &err=CriMv::ErrorContainer); - void SetSeekFrameAndOffset(CriSint32 seek_frame_id, CriUint64 seek_byte, CriError &err=CriMv::ErrorContainer); - - enum InputMode { - MVEASY_INPUT_UNDEFINED, - MVEASY_INPUT_STREAMING, /* メモリストリーミング */ - MVEASY_INPUT_MEMORY, /* メモリ直接参照(ユニSJ) */ - - /* Keep enum 4bytes */ - MVEASY_INPUT_MAKE_ENUM_SINT32 = 0x7FFFFFFF - }; - /* 実験中: この関数のために InputMode 定義を暫定でpublicへ移動 */ - void SetMemoryPlaybackType(InputMode memplay_type, CriError &err=CriMv::ErrorContainer); - - /* デコードスキップの自動実行モード */ - //void SetAutoSkipDecode(CriBool sw, CriFloat32 margin_msec, CriError &err=CriMv::ErrorContainer) - - /* ファイル要求の再コールバック要求 */ - void DeferFileRequest(CriError &err=CriMv::ErrorContainer); - - /* for specific use */ - void SetHeaderAndBodyData(const CriUint64Adr header_ptr, CriSint64 header_size, - const CriUint64Adr body_ptr, CriSint64 body_size); - CriSint32 CalcFramepoolWorkSize(const CriMvStreamingParameters *stmprm, CriError & err = CriMv::ErrorContainer); - void SetFramepoolWork(void *work, CriSint32 work_size, CriError & err = CriMv::ErrorContainer); - void SetFramepoolWorkAllocator(CriMvFramepoolWorkMallocFunc allocfunc, CriMvFramepoolWorkFreeFunc freefunc, void *usrobj); - void SetCapacityOfPictureSize(CriSint32 video_picsize, CriSint32 alpha_picsize, CriError &err); - void GetUsrCapacityOfPictureSize(CriSint32 *video_picsize, CriSint32 *alpha_picsize); - void SetMaxMovieSize(CriUint32 max_width, CriUint32 max_height, CriError &err); - void GetMaxMovieSize(CriUint32 *max_width, CriUint32 *max_height); - CriBool PlaybackResourceAllocated() const; - CriBool CanReusePlaybackResource(const CriMvStreamingParameters *stmprm) const; - CriBool GetReusePlaybackResourceFlag() const; - -private: - /* CRI internal use only */ - - void initializeHandleParameters(void); - void initializeCompareFrameParameters(void); - void resetHandleParameters(void); - CriBool startInputAndDecoding(void); - CriBool isEndReadFile(void); - void reinputDataForLooping(void); - void executeFileCloseServer(void); - void supplyDataFromStreamer(void); - void executeFileReadServer(void); - void executeFileOpenServer(void); - void executeCuePointServer(void); - //void executeAutoSkipDecode(void); - void executeWaitStatusServer(CriError &err = CriMv::ErrorContainer); - void surveilTerminationInput(void); - CriBool isAvailableCenterVoice(const CriMvStreamingParameters *stmprm); - CriBool isAvailableSubAudio(const CriMvStreamingParameters *stmprm); - CriBool attachCenterVoice(void); - void detachCenterVoice(void); - - CriBool attachSubAudioHandle(CriHeap heap); - void detachSubAudioHandle(void); - - void getAudioTime(CriUint64 &out_count, CriUint64 &out_unit, CriUint64 s_count, CriUint64 s_unit); - - CriBool allocAndCreateModules(void); - void startModules(void); - void requestStopModules(void); - CriBool closeFileIfOpening(void); - CriBool isCompleteStopModules(void); - void tryCleanupModules(CriMvPlyStatus mvstat); - CriBool tryFreeAndDestroySubmodules(void); - void freeAndDestroyModules(void); - - CriUint32 adjustNumTrackAudioOut(void); - - /* ストリーミング用のパラメータ取得 */ - /* GetMovieInfo()との違いはユーザ指定値がどこまで反映されるか。 - * 例えば、最大チャンクサイズはこの関数ではユーザ指定値をとるが、GetMovieInfoだとファイルの値。 - * この関数は、内部で下位モジュール作成およびメモリ確保する時に使う。 */ - CriBool GetStreamingParameters(CriMvStreamingParameters &stmprm, CriError &err=CriMv::ErrorContainer); - - void setNormalErrorStatus(const CriChar8 *errmsg); - - CriBool compareFrameTimeSimple(CriMvEasyPlayer *mveasy, CriMvFrameInfo *frameinfo, CriUint64 count, CriUint64 unit, void *usrobj); - static CriBool compareFrameTimeFluctuation(CriMvEasyPlayer *mveasy, CriMvFrameInfo *frameinfo, CriUint64 count, CriUint64 unit, void *usrobj); - - Bool isNextFrameOnTime(CriBool update_stats, CriError &err); - Bool checkFrameTime(CriMvFrameInfo *frameinfo); - void updateGetFrameInfo(CriBool time_ready, CriBool acquired_frame, CriBool discard_frame, CriUint64 frame_count, CriUint64 frame_unit); - - /* for DEBUG */ - void crimveasy_SetSeekInfo(void); - - void executeUpdate(CriError &err); - -private: - static CriUint32 crimveasy_SupplyPcmDataByFloat32(void *obj, CriUint32 nch, CriFloat32 *pcmbuf[], CriUint32 req_nsmpl); - static CriUint32 crimveasy_SupplyPcmDataBySint16(void *obj, CriUint32 nch, CriSint16 *pcmbuf[], CriUint32 req_nsmpl); - static CriUint32 crimveasy_CalcAvailableNumSmpls(CriMvEasyPlayer *mveasy); - static CriUint32 crimveasy_GetWave16(CriMvEasyPlayer *mveasy, CriUint32 nch, CriSint16 *pcmbuf[], CriUint32 req_nsmpl); - static CriUint32 crimveasy_GetWave32(CriMvEasyPlayer *mveasy, CriUint32 nch, CriFloat32 *pcmbuf[], CriUint32 req_nsmpl); - - static CriUint32 crimveasy_SupplySubAudioDataByFloat32(void *obj, CriUint32 nch, CriFloat32 *pcmbuf[], CriUint32 req_nsmpl); - static CriUint32 crimveasy_GetSubAudioWave32(CriMvEasyPlayer *mveasy, CriUint32 nch, CriFloat32 *pcmbuf[], CriUint32 req_nsmpl); - static CriUint32 crimveasy_SupplySubAudioDataBySint16(void *obj, CriUint32 nch, CriSint16 *pcmbuf[], CriUint32 req_nsmpl); - static CriUint32 crimveasy_GetSubAudioWave16(CriMvEasyPlayer *mveasy, CriUint32 nch, CriSint16 *pcmbuf[], CriUint32 req_nsmpl); - -public: - CriMvPly mvply; /* Temporally allowed to access for debug */ - -private: - CriHeap heap; - CriBool user_stmprm_flag; - CriMvStreamingParameters stmprm; - CriBool alloced_submodules_flag; - CriMvFrameInfo frameinfo; - CriMvAlphaFrameInfo alpha_frame; - CriMvFileReaderInterface *freader; - CriMvSoundInterface *sndout; - CriMvSystemTimerInterface *stimer; - TimerType timertype; - Status pre_ezstat; - CriBool req_decode_header_flag; - CriBool req_prepare_flag; - CriBool pause_flag; - CriUint32 npools; - CriSint32 track_play_audio; - CriUint32 num_track_audio_data; - CriUint32 num_track_audio_out; - CriBool loop_flag; - CriUint64 time_count; - CriUint64 time_unit; - CriSint64 total_read; - CriSint64 fsize_byte; - CriChunk read_crick; - CriBool exe_open; - CriBool exe_close; - CriBool exe_read; - - CriUint64 time_syslog_count; /* システムタイマの記録 */ - CriUint64 time_syslog_unit; - CriUint64 time_ofs_count; /* オーディオ終了時のシステムタイマ */ - CriUint64 time_ofs_unit; - CriUint64 time_prev_audio_count; /* オーディオ時刻変化チェック用 */ - CriUint64 time_prev_audio_unit; - - CriFloat32 user_buffering_sec; /* 0.0f means AUTO */ - CriUint32 user_max_bitrate; /* 0 means AUTO */ - CriUint32 user_max_chunk_size; /* 0 means AUTO */ - CriUint32 user_min_buffer_size; /* 0 means AUTO */ - CriSint32 user_read_buffer_size; /* CRIMV_READ_BUFFER_SIZE_AUTO means AUTO */ - CriSint32 user_video_capacity_of_picsize; /* 0 means AUTO */ - CriSint32 user_alpha_capacity_of_picsize; /* 0 means AUTO */ - CriUint32 user_max_width; - CriUint32 user_max_height; - - CriSint32 usr_subtitle_channel; - CriMvSubtitleInfo sbtinfo; - CriFloat32 sbt_start_msec; - CriFloat32 sbt_end_msec; - CriUint8 *sbtbuf; - - enum InputSrc { - MVEASY_INPUT_SRC_UNDEFINED, - MVEASY_INPUT_SRC_FILE, - MVEASY_INPUT_SRC_MEMORY, - /* Keep enum 4bytes */ - MVEASY_INPUT_SRC_MAKE_ENUM_SINT32 = 0x7FFFFFFF - }; - InputSrc input_src; - CriMvFileReaderInterface *ext_reader; - CriMvFileReaderInterface *mem_reader; - - enum InputSupplyStatus { - MVEASY_SUPPLY_STOP, - MVEASY_SUPPLY_REQ_OPEN, - MVEASY_SUPPLY_OPENING, - MVEASY_SUPPLY_READING, - MVEASY_SUPPLY_REQ_CLOSE, - MVEASY_SUPPLY_CLOSING, - - /* Keep enum 4bytes */ - MVEASY_SUPPLY_MAKE_ENUM_SINT32 = 0x7FFFFFFF - }; - - InputMode memplay_type; /* メモリ再生をストリームするかユニSJするか */ - InputMode input_mode; - InputSupplyStatus supply_stat; - CriBool change_file_mode; - CriChar8 file_name[CRIMV_MAX_FILE_NAME]; - CriUint64 file_offset; - CriSint64 file_range; - CriUint8 *dataptr; - CriUint32 datasize; - CriBool terminate_flag; - CriSint32 reinput_cnt; - - enum NextEntryState { - MVEASY_NEXT_ENTRY_NONE, - MVEASY_NEXT_ENTRY_READY, - MVEASY_NEXT_ENTRY_DEFER, - /* Keep enum 4bytes */ - MVEASY_NEXT_ENTRY_MAKE_ENUM_SINT32 = 0x7FFFFFFF - }; - NextEntryState next_entry_state; - - CriUint32 center_ch; - CriSint32 usr_voice_track; // by SetCenterVoice() - CriSint32 voice_attached_track; - - // Sub Audio - CriMvSoundInterface *if_subaudio; - CriSint32 usr_subaudio_track; - CriSint32 attached_subaudio_track; - - void (*cbfunc_file_request)(CriMvEasyPlayer *mveasy, void *usrobj); - void *usrobj_file_request; - - CriBool (*cbfunc_compare_ftime)(CriMvEasyPlayer *mveasy, CriMvFrameInfo *frameinfo, CriUint64 count, CriUint64 unit, void *usrobj); - void *usrobj_compare_ftime; - - /* Seek Playback */ - CriSint32 seek_frame_id; - CriUint64 seek_byte; - - /* CuePoint */ - void (*cbfunc_cuepoint)(CriMvEasyPlayer *mveasy, CriMvEventPoint *eventinfo, void *usrobj); - void *usrobj_cuepoint; - - /* Playback Statistics */ - CriBool start_getfrm; - CriUint64 last_getfrm_count; - CriFloat32 sum_diff_time; - CriMvPlaybackInfo playinfo; - CriMvLastFrameResult last_frm_result; - - /* Block flag for simultanious calls on multi-threads */ - CriSint32 execute_decode_block_flag; - CriSint32 update_block_flag; - - /* Stop Completion Notification */ - void (*cbfunc_stopcomplete)(CriMvEasyPlayer *mveasy, void *usrobj); - void *usrobj_stopcomplete; - - /* For Sofdec2 */ - void *playback_work; - CriSint32 playback_work_size; - void *mvply_work; - CriHeap heap_mveasy; - CriHeap heap_extra_sound; - CriBool reuse_modules_flag; - - /* For Debug */ - volatile CriUint8 end_sequence_info; - - /* Handle Protection */ - void *cshn; - void *cs_work; - - /* Skip Decoding */ - //CriBool skip_auto_flag; - //CriFloat32 margin_msec; - -public: - enum FrameCompareMode { - MVEASY_COMPARE_MODE_JUST, /* 正確に時刻比較する */ - MVEASY_COMPARE_MODE_DELAY_GET, /* タイマ時刻を前倒し=フレームはなるべく渡さない */ - MVEASY_COMPARE_MODE_FAST_GET, /* タイマ時刻を水増し=フレームはなるべく渡す */ - - /* Keep enum 4bytes */ - MVEASY_COMPARE_MODE_MAKE_ENUM_SINT32 = 0x7FFFFFFF - }; - FrameCompareMode compare_mode; - CriFloat32 accuracy_system_tmr_msec; /* システム時刻精度 milli sec */ - CriFloat32 accuracy_audio_tmr_msec; /* オーディオ時刻精度 milli sec */ - CriFloat32 fluctuation_system; /* システム(SyncFrame)の揺らぎ milli sec */ - CriFloat32 fluctuation_adjust; /* 揺らぎ補正 */ -// CriFloat32 fluctuation_system_msec; /* システム時刻ゆらぎ幅 milli sec */ -// CriFloat32 fluctuation_audio_msec; /* オーディオ時刻ゆらぎ幅 milli sec */ -// CriFloat32 fluctuation_adjust; /* ゆらぎ補正倍率 */ -// CriSint32 fluctuation_system_usec; /* システム時刻ゆらぎ幅 micro sec */ -// CriSint32 fluctuation_audio_usec; /* オーディオ時刻ゆらぎ幅 micro sec */ -// CriFloat32 fluctuation_adjust_multi; /* ゆらぎ補正倍率 */ -// CriSint32 fluctuation_adjust_add; /* ゆらぎ補正オフセット */ - -private: - CriBool req_stop_modules; - CriBool error_flag; - CriBool req_start_modules; - -protected: - CriMvEasyPlayer(CriHeap heap, - CriMvFileReaderInterface *freader, - CriMvSystemTimerInterface *stimer, - CriMvSoundInterface *sound, - CriError &err=CriMv::ErrorContainer); - virtual ~CriMvEasyPlayer(); - -private: - CriMvEasyPlayer(void); //disabled -}; - - - - -#endif /* CRI_MOVIE_H_INCLUDED */ diff --git a/3rdParty/cri/pc/include/cri_movie_core.h b/3rdParty/cri/pc/include/cri_movie_core.h deleted file mode 100644 index 838788e7..00000000 --- a/3rdParty/cri/pc/include/cri_movie_core.h +++ /dev/null @@ -1,2554 +0,0 @@ -/**************************************************************************** - * - * CRI Middleware SDK - * - * Copyright (c) 2005-2013 CRI Middleware Co., Ltd. - * - * Library : CRI Movie - * Module : Library User's Header - * File : cri_movie_core.h - * Date : 2013-11-21 - * Version : (see CRIMVPLY_VER) - * - ****************************************************************************/ -/*! - * \file cri_movie_core.h - */ -#ifndef CRI_MOVIE_CORE_H_INCLUDED /* Re-definition prevention */ -#define CRI_MOVIE_CORE_H_INCLUDED - -/* Version No. */ -#define CRIMVPLY_VER "3.50" -#define CRIMVPLY_NAME "criMvPly" - -/*************************************************************************** - * Include file - ***************************************************************************/ -#include -#include -#include - -/*************************************************************************** - * MACRO CONSTANT - ***************************************************************************/ - -/*EN - * \brief Audio OFF setting of Audio Track - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetAudioTrack() - */ -/*JP - * \brief オーディオ再生OFFの指定値 - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetAudioTrack() - */ -#define CRIMV_AUDIO_TRACK_OFF (-1) - -/*EN - * \brief Default setting of Audio Track - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetAudioTrack() - */ -/*JP - * \brief オーディオチャネルのデフォルト値 - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetAudioTrack() - */ -#define CRIMV_AUDIO_TRACK_AUTO (100) - -/*EN - * \brief Maximum number of PCM tracks in one audio stream - * \ingroup MDL_MV_OPTION - */ -/*JP - * \brief オーディオデータ内の最大PCMトラック数 - * \ingroup MDL_MV_OPTION - */ -#define CRIMV_PCM_BUFFER_MAX (8) - -/*EN - * \brief Subtitle OFF setting - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetSubtitleChannel() - */ -/*JP - * \brief 字幕再生OFFの指定値 - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetSubtitleChannel() - */ -#define CRIMV_SUBTITLE_CHANNEL_OFF (-1) - -/*EN - * \brief Maximum number of video tracks in a movie file - * \ingroup MDL_MV_OPTION - */ -/*JP - * \brief ムービファイル内の最大ビデオストリーム数 - * \ingroup MDL_MV_OPTION - */ -#define CRIMV_MAX_VIDEO_NUM (1) - -/*EN - * \brief Maximum number of audio tracks in a movie file - * \ingroup MDL_MV_OPTION - */ -/*JP - * \brief ムービファイル内の最大オーディオストリーム数 - * \ingroup MDL_MV_OPTION - */ -#define CRIMV_MAX_AUDIO_NUM (32) - -/*EN - * \brief Maximum number of alpha tracks in a movie file - * \ingroup MDL_MV_OPTION - */ -/*JP - * \brief ムービファイル内の最大アルファストリーム数 - * \ingroup MDL_MV_OPTION - */ -#define CRIMV_MAX_ALPHA_NUM (1) - -#if defined(XPT_TGT_PC) -/*EN - * \brief Number of extra threads for multicore decoding - * \ingroup MDL_MV_OPTION - * The number of additional decoding threads that CRI Movie library internally creates. - * The threads are intended to run on multiple processors in parallel. - * \sa CriMvEasyPlayer::SetUsableProcessors_PC() - */ -/*JP - * \brief マルチコアデコード用の追加のデコードスレッド数 - * \ingroup MDL_MV_OPTION - * CRI Movieライブラリが内部で作成する追加のデコードの数です。これらのスレッドは、マルチコアPC上で - * デコード処理を並列分散させるために作られます。 - * \sa CriMvEasyPlayer::SetUsableProcessors_PC() - */ -#define CRIMV_NUM_EXT_DECTHREAD_PC (3) - -/*EN - * \brief Default affnity mask of a thread - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetUsableProcessors_PC() - */ -/*JP - * \brief スレッドアフィニティマスクのデフォルト設定値 - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetUsableProcessors_PC() - */ -#define CRIMV_DEFAULT_AFFNITY_MASK_PC (0xFFFFFFFF) - - -/*EN - * \brief Default priority of a thread - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetUsableProcessors_PC() - */ -/*JP - * \brief スレッドのデフォルト優先度 - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetUsableProcessors_PC() - */ -#define CRIMV_DEFAULT_THREAD_PRIORITY_PC (0x8000000) -#endif - -/*EN - * \brief Default value of the read buffer size - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetReadBufferSize() - */ -/*JP - * \brief リードバッファサイズをデフォルト値 - * \ingroup MDL_MV_OPTION - * \sa CriMvEasyPlayer::SetReadBufferSize() - */ -#define CRIMV_READ_BUFFER_SIZE_AUTO (-1) - - -/*************************************************************************** - * Library Spec Defenition - ***************************************************************************/ - -/* */ - -/* 2007-09-06:URUSHI オーディオ処理のサブモジュール化 * - * MvPlyのオーディオ処理部分をCriMvPlyAmngという新たなクラスに切り出す。* - * CriMvPlyAmngはデマルチプレクサから全トラックデータを受け取って、 * - * トラックごとに割り振られたAdecに処理を渡します。 * - * 目的は以下の二つ * - * 1) オーディオトラックの動的切替 * - * 2) ループ再生での異なるAV尺の同期 */ - -#define NUM_MAX_ADEC (2) /* Adecの最大数 */ -/* ADECのインデックス定義 */ -/* このindexを使ってCriMvPlyAmngからAdecをコントロールしてください。 */ -#define MAIN_ADEC_IDX (0) // メイントラック用 -#define SUB_ADEC_IDX (1) // ボイストラック用 - -/* オーディオの動的切替機能をサポートするか */ -//#define ENABLE_DYNAMIC_AUDIO_SWITCH - -#if defined(ENABLE_DYNAMIC_AUDIO_SWITCH) - #define CRIMVPLYAMNG_TRACK_OFF (512) // 切り替え先トラック番号のデフォルト値(切替OFF) - - /* トラックの動的切替のための状態定義 */ - typedef enum _crimvplyamng_track_state { - CRIMVPLYAMNG_TRACK_STATE_FIXED = (1), // デフォルト - CRIMVPLYAMNG_TRACK_STATE_PREP_SWITCHING, // ユーザが切替を命令し、切替の準備段階(時刻判定のための基準時間をセット) - CRIMVPLYAMNG_TRACK_STATE_SWITCHING // 切替元と先の時刻判定を行なって切替を行なう状態 - } CriMvPlyAmngTrackState; -#endif - -/* 連結再生時、2個目以降のヘッダを取得できるようにするため */ -#define CRIMVPLY_HEAD_CONTAINER_NUM (2) - -/* 再読み込み閾値のデフォルト値 */ -#define CRIMV_DEFAULT_RELOAD_THRESHOLD (0.8f) // 0.8[sec] - -/* 再生準備中の貯金フレーム数デフォルト値 */ -#define CRIMV_DEFAULT_NUM_FRAMES_FOR_PREP (-1) /* デフォルト:不使用 (フレームプール数を採用) */ - -/* 内部ワーク領域の確保にCRI Heapを使用しない */ -#define CRIMV_REMOVE_CRIHEAP - -/* 機種固有フレーム情報数 */ -#define CRIMV_FRAME_DETAILS_NUM (2) - -/* CriVavfios で指定する外部ファイルのパスの上限 */ -#if defined(XPT_TGT_IOS) - #define CRIMVPLY_VAVFIOS_MAX_FILEPATH (256) -#endif - -/*************************************************************************** - * Process MACRO - ***************************************************************************/ -#define criMv_SetDefaultHandleConfig(p_config) \ -{\ - (p_config)->readbuffer_size = 0;\ -} - -/*************************************************************************** - * Enum declaration - ***************************************************************************/ -/*EN - * \brief Speaker index of CRI Movie PCM output - * \ingroup MDL_MV_OPTION - */ -/*JP - * \brief CRI Movie のPCM出力のスピーカー配置 - * \ingroup MDL_MV_OPTION - */ -typedef enum { - CRIMV_PCM_BUFFER_L = 0, /*EN< The LEFT channel of CRI Movie output */ - /*JP< CRI Movie オーディオ出力の LEFT チャンネル */ - CRIMV_PCM_BUFFER_R = 1, /*EN< The RIGHT channel of CRI Movie output */ - /*JP< CRI Movie オーディオ出力の RIGHT チャンネル */ - CRIMV_PCM_BUFFER_LS = 2, /*EN< The Surround LEFT channel of CRI Movie output */ - /*JP< CRI Movie オーディオ出力の Surround LEFT チャンネル */ - CRIMV_PCM_BUFFER_RS = 3, /*EN< The Surround RIGHT channel of CRI Movie output */ - /*JP< CRI Movie オーディオ出力の Surround RIGHT チャンネル */ - CRIMV_PCM_BUFFER_C = 4, /*EN< The CENTER channel of CRI Movie output */ - /*JP< CRI Movie オーディオ出力の CENTER チャンネル */ - CRIMV_PCM_BUFFER_LFE = 5, /*EN< The LFE channel of CRI Movie output */ - /*JP< CRI Movie オーディオ出力の LFE チャンネル */ - CRIMV_PCM_BUFFER_EXT1 = 6, /*EN< The EXT1(Rear Left) channel of CRI Movie output */ - /*JP< CRI Movie オーディオ出力の EXT1(Rear Left) チャンネル */ - CRIMV_PCM_BUFFER_EXT2 = 7, /*EN< The EXT2(Rear Right) channel of CRI Movie output */ - /*JP< CRI Movie オーディオ出力の EXT2(Rear Right) チャンネル */ - - /* Keep enum 4bytes */ - CRIMV_PCM_BUFFER_MAKE_ENUM_SINT32 = 0x7FFFFFFF -} CriMvPcmBufferIndex; - - -/*EN - * \brief Composite mode of alpha movie - * \ingroup MDL_MV_OPTION - */ -/*JP - * \brief アルファムービの合成モード - * \ingroup MDL_MV_OPTION - */ -typedef enum { - CRIMV_COMPO_OPAQ = 0, /*EN< Opacity, no alpha value */ - /*JP< 不透明、アルファ情報なし */ - CRIMV_COMPO_ALPHFULL = 1, /*EN< Full alpha blending (8bits-alpha data) */ - /*JP< フルAlpha合成(アルファ用データが8ビット) */ - CRIMV_COMPO_ALPH3STEP = 2, /*EN< 3 Step Alpha */ - /*JP< 3値アルファ */ - CRIMV_COMPO_ALPH32BIT = 3, /*EN< Full alpha blending (32bits color + alpha data) */ - /*JP< フルAlpha、(カラーとアルファデータで32ビット) */ - CRIMV_COMPO_ALPH1BIT = 4, /*EN< Alpha blending (24bits color + 1->8bits alpha) */ - /*JP< フルAlpha、(カラーとアルファデータで32bit、値は2値) */ - CRIMV_COMPO_ALPH2BIT = 5, /*EN< Alpha blending (24bits color + 2->8bits alpha) */ - /*JP< フルAlpha、(カラーとアルファデータで32bit、値は4値) */ - CRIMV_COMPO_ALPH3BIT = 6, /*EN< Alpha blending (24bits color + 3->8bits alpha) */ - /*JP< フルAlpha、(カラーとアルファデータで32bit、値は8値) */ - CRIMV_COMPO_ALPH4BIT = 7, /*EN< Alpha blending (24bits color + 4->8bits alpha) */ - /*JP< フルAlpha、(カラーとアルファデータで32bit、値は16値)*/ - - /* Keep enum 4bytes */ - CRIMV_COMPO_MAKE_ENUM_SINT32 = 0x7FFFFFFF -} CriMvAlphaType; - - -/*EN - * \brief Result of the last video frame retrieval - * \ingroup MDL_MV_OPTION - */ -/*JP - * \brief 前回のビデオフレーム取得の結果 - * \ingroup MDL_MV_OPTION - */ -typedef enum { - CRIMV_LASTFRAME_OK = 0, /*EN< Succeeded */ - /*JP< 取得成功 */ - CRIMV_LASTFRAME_TIME_EARLY = 1, /*EN< Failed. The frame is not yet the time to draw */ - /*JP< 取得失敗。フレーム表示時刻が再生時間に達していなかった */ - CRIMV_LASTFRAME_DECODE_DELAY = 2, /*EN< Failed. The frame to draw is not decoded yet */ - /*JP< 取得失敗。ビデオフレームのデコードが間に合わなかった */ - CRIMV_LASTFRAME_DISCARDED = 3, /*EN< Failed. The video frame is discarded by app */ - /*JP< 取得失敗。アプリによって破棄された */ - //CRIMV_LASTFRAME_NO_INPUT_DATA = 4, //Not supported yet - //CRIMV_LASTFRAME_SKIPPED = 5, //Not supported yet - //CRIMV_LASTFRAME_DEMUX_STUCKED = 6, //Not supported yet - - /* Keep enum 4bytes */ - CRIMV_LASTFRAME_MAKE_ENUM_SINT32 = 0x7FFFFFFF -} CriMvLastFrameResult; - -#if defined(XPT_TGT_PS3PPU) -/*EN - * \brief Graphic Environment type for PS3 - * \ingroup MDL_MV_OPTION - */ -/*JP - * \brief PS3のグラフィック環境 - * \ingroup MDL_MV_OPTION - */ -typedef enum { - CRIMV_GRAPHIC_ENV_GCM = 0, /*EN< GCM. (or same ARGB 32bit texture format of GCM) */ - /*JP< GCM環境 (またはテクスチャフォーマットがGCMと同じ環境) */ - CRIMV_GRAPHIC_ENV_PSGL = 1, /*EN< PSGL. (or same ARGB 32bit texture format of PSGL) */ - /*JP< PSGL環境 (またはテクスチャフォーマットがPSGLと同じ環境) */ - - /* Keep enum 4bytes */ - CRIMV_GRAPHIC_ENV_MAKE_ENUM_SINT32 = 0x7FFFFFFF -} CriMvGraphicEnv; -#endif - - -/* CRI Movie Interanl handle status - * - * The possible legal states of a CriMvPly handle. Over the course of your application - * the CriMvPly handle will walk through the following states in roughly the following - * order. In states that are waiting states, you can request the - * CriMvPly handle to advance to the next state by calling the criMvPly_IncrementState() - * function. You can check the status of a valid CriMvPly handle at any time - * by calling criMvPly_GetStatus(). - * - * It is not possible to jump from a state to an arbitrary other state. Normal play - * proceeds from the CRIMVPLY_STATUS_STOP state through the CRIMV_PLY_STATUS_PLAYEND - * state in that order. Premature termination can be requested with the criMvPly_Stop() - * function. - * - * \sa criMvPly_IncrementState(), criMvPly_GetStatus(), criMvPly_Stop() - */ -typedef enum { - CRIMVPLY_STATUS_STOP = 0, /* Standstill. No processing is occurring. - * CriMvPly handles are created into this state. - */ - /* 停止中 */ - CRIMVPLY_STATUS_DECHDR = 1, /* The CriMvPly structure is now parsing the header - * of the file, including information on height and width - * of the video stream. - */ - /* ヘッダ解析中 */ - CRIMVPLY_STATUS_WAIT_PREP = 2, /* The header has been decoded and criMvPly_GetStreamingParameters() - * will now provide valid values. Typically you will call - * criMvPly_AllocateWorkBuffer() with this information at this point. - */ - /* PREP状態へのIncrementState待ち
- AllocateWorkBufferしてから次へいくこと */ - CRIMVPLY_STATUS_PREP = 3, /* Transition to this state to acknowledge to the - * CriMvPly handle that you have allocated your work buffers. */ - /* 再生準備中 */ - CRIMVPLY_STATUS_WAIT_PLAYING = 4, /* The audio and video decoders are now ready to begin playback.*/ - /* PLAYING状態へのIncrementState待ち
- この状態で既にビデオとオーディオのデコード結果は取得できる。*/ - CRIMVPLY_STATUS_PLAYING = 5, /* The decoders are currently decoding and playing output. */ - /* 再生中 */ - CRIMVPLY_STATUS_WAIT_PLAYEND = 6, /* The library is waiting for you to acknowledge the end of the movie. You - * have informed the CriMvPly structure that an end-of-file condition exists, - * but final frames of video and audio may still be pending in your application. */ - /* PLAYEND状態へのIncrementState待ち */ - CRIMVPLY_STATUS_PLAYEND = 7, /* You have acknowledged the end of the movie. Teardown can occur at this point. */ - /* 再生終了 */ - CRIMVPLY_STATUS_STOP_PROCESSING = 8, /* A request to stop has been received by the CriMvPly structure, - * that is, you have called criMvPly_Stop(), and a stop is now pending. */ - /* 停止処理中 */ - CRIMVPLY_STATUS_WAIT_STOP = 9, /* The CriMvPly handle has acknowledged the stop request and - * you may now call criMvPly_IncrementState() to transition to - * the CRIMVPLY_STATUS_STOP state. */ - /* STOP状態へのIncrementState待ち */ - CRIMVPLY_STATUS_ERROR = 10, /* An error has occurred. */ - /* エラー */ - - /* Keep enum 4bytes */ - CRIMVPLY_STATUS_MAKE_ENUM_SINT32 = 0x7FFFFFFF -} CriMvPlyStatus; - - -/* Sofdec2 */ -typedef enum { - CRIMVPLY_META_FLAG_OFF = 0x0000, - CRIMVPLY_META_FLAG_CUE = 0x0001, - CRIMVPLY_META_FLAG_SEEK = 0x0002, - CRIMVPLY_META_FLAG_ALL = CRIMVPLY_META_FLAG_CUE + CRIMVPLY_META_FLAG_SEEK, - - /* Keep enum 4bytes */ - CRIMVPLY_META_FLAG_MAKE_ENUM_SINT32 = 0x7FFFFFFF -} CriMvMetaFlag; - -/* Color Conversion*/ -typedef enum{ - CRIMV_COLORSPACE_CONVERSION_TYPE_ITU_R_BT601_LIMITED = 0, - CRIMV_COLORSPACE_CONVERSION_TYPE_ITU_R_BT601_FULLRANGE = 1, - - /* Keep enum 4bytes */ - CRIMV_COLORSPACE_CONVERSION_TYPE_ENUM_SINT32 = 0x7FFFFFFF -}CriMvColorSpaceConversionType; - -typedef void *(*CriMvMetaDataWorkMallocFunc)(void *obj, CriUint32 size); -typedef void (*CriMvMetaDataWorkFreeFunc)(void *obj, void *mem); - -/* OUTER_FRAMEPOOL_WORK */ -#define CriMvFramepoolWorkMallocFunc CriMvMetaDataWorkMallocFunc -#define CriMvFramepoolWorkFreeFunc CriMvMetaDataWorkFreeFunc - -/*************************************************************************** - * Data type declaration - ***************************************************************************/ - -/*EN - * \brief Audio parameters - * \ingroup MDL_MV_INFO - * - * \sa CriMvStreamingParameters, CriMvWaveInfo - */ -/*JP - * \brief オーディオパラメータ - * \ingroup MDL_MV_INFO - * - * オーディオストリームのパラメータ - * \sa CriMvStreamingParameters, CriMvWaveInfo - */ -typedef struct { - CriUint32 sampling_rate; /*EN< Sampling rate */ - /*JP< サンプリング周波数 */ - CriUint32 num_channel; /*EN< Number of channels. Monaural = 1, Stereo = 2 */ - /*JP< オーディオチャネル数 */ - CriUint32 total_samples; /*EN< Total number of samples */ - /*JP< 総サンプル数 */ - CriUint32 output_buffer_samples; /*EN< Output wave buffer size */ - /*JP< サウンド出力バッファのサンプル数 */ - CriUint32 codec_type; /*EN< Codec type */ - /*JP< コーデック種別 */ - -} CriMvAudioParameters; - -/*EN - * \brief Video Parameters - * \ingroup MDL_MV_INFO - * \sa CriMvStreamingParameters - */ -/*JP - * \brief ビデオパラメータ - * \ingroup MDL_MV_INFO - * ビデオストリームのパラメータ - * \sa CriMvStreamingParameters - */ -typedef struct { - CriUint32 max_width; /*EN< Maximum video width for stream. (multiple of 8) */ - /*JP< ムービ最大幅(8の倍数) */ - CriUint32 max_height; /*EN< Maximum video height for stream. (multiple of 8)*/ - /*JP< ムービ最大高さ(8の倍数) */ - CriUint32 disp_width; /*EN< Width of the image to draw. */ - /*JP< 表示したい映像の横ピクセル数(左端から) */ - CriUint32 disp_height; /*EN< Height of the image to draw. */ - /*JP< 表示したい映像の縦ピクセル数(上端から) */ - CriUint32 num_frame_pool; /*EN< Number of frame pools required for stream */ - /*JP< フレームプール数 */ - CriUint32 framerate; /*EN< Frame rate per second [x1000]. */ - /*JP< フレームレート[x1000] */ - CriUint32 framerate_n; /*EN< Frame rate (in rational as numerator). framerate_n/framerate_d = framerate */ /* UTODO: 変数名 */ - /*JP< フレームレートの分子(有理数形式)。framerate_n/framerate_d = framerate */ - CriUint32 framerate_d; /*EN< Frame rate (in rational as denominator). */ - /*JP< フレームレートの分母(有理数形式)。 */ - CriUint32 total_frames; /*EN< Total number of video frames */ - /*JP< 総フレーム数 */ - - CriUint32 material_width; /*EN< Width of the video source resolustion before encoding. */ - /*JP< エンコード前のビデオ素材の横ピクセル数 */ - CriUint32 material_height; /*EN< Height of the video source resolustion before encoding. */ - /*JP< エンコード前のビデオ素材の縦ピクセル数 */ - CriUint32 screen_width; /*EN< Screen width set by encoding and cropping. - * This parameter is only available when you encoded the movie with "Widescreen TV Support" option. - * Normally this value is 0. */ - /*JP< エンコード時に指定したスクリーン幅。 - * この値はエンコード時に「ワイドテレビ支援機能」を使用した場合のみ有効になります。 - * 通常は0です。 */ - - CriUint32 codec_type; /*EN< Video Codec Type. If you encoded the movie for PS2, this value is 2. - * Normally this value is 1 or 0(no info). - * If the codec_type is 1, the CRI Movie for ONLY PS2 can play the movie file. */ - /*JP< ビデオコーデック種別。PS2用にエンコードした場合 2になります。 - * 通常は 1または 0(情報無し)です。 - * コーデック種別が2のムービは、PS2版ライブラリで「のみ」再生可能です。 */ - CriUint32 codec_dc_option; /*EN< Video Codec DC Option. If you encoded the movie for PS2, this value is 10. - * Normally this value is 11 or 0(no info). - * If the codec_type is 11, the CRI Movie for PS2 can NOT play the movie file. */ - /*JP< ビデオコーデックのDCオプション種別。PS2用にエンコードした場合10になります。 - * 通常は11または 0(情報無し)です。 - * コーデックDCオプションが11のムービは、PS2版ライブラリ「では」再生できません。 */ - CriUint32 color_conversion_type; /*EN< Color space converion type. Fullrange or Limited.*/ - /*JP< 色変換タイプ。 */ - CriSint32 capacity_of_picsize; /*EN< Capacity size of video pictures. */ - /*JP< ピクチャサイズ上限値 */ - CriUint32 average_bitrate; /*EN< Average bitrate. */ - /*JP< 平均ビットレート */ -} CriMvVideoParameters; - -/*EN - * \brief Alpha Parameters - * \ingroup MDL_MV_INFO - * \sa CriMvStreamingParameters - */ -/*JP - * \brief アルファパラメータ - * \ingroup MDL_MV_INFO - * アルファストリームのパラメータ - * \sa CriMvStreamingParameters - */ -typedef struct { - CriUint32 max_width; /*EN< Maximum alpha width for stream */ - /*JP< アルファフレームの最大幅 */ - CriUint32 max_height; /*EN< Maximum alpha height for stream */ - /*JP< アルファフレームの最大高さ */ - CriUint32 disp_width; /*EN< valid alpha width */ - /*JP< アルファフレームの実有効幅 */ - CriUint32 disp_height; /*EN< valid alpha height */ - /*JP< アルファフレームの実有効高さ */ - CriUint32 framerate; /*EN< Frame rate per second [x1000]. */ - /*JP< アルファのフレームレート[x1000] */ - CriUint32 framerate_n; /*EN< Frame rate (in rational as numerator). framerate_n/framerate_d = framerate */ /* UTODO: 変数名 */ - /*JP< フレームレートの分子(有理数形式)。framerate_n/framerate_d = framerate */ - CriUint32 framerate_d; /*EN< Frame rate (in rational as denominator). */ - /*JP< フレームレートの分母(有理数形式)。 */ - CriUint32 total_frames; /*EN< Total number of alpha frames */ - /*JP< 総フレーム数 */ - CriMvAlphaType alpha_type; /*EN< Alpha Composite Type. */ - /*JP< アルファ合成種別。 */ - CriUint32 codec_type; /*EN< Internal use only. Do not access this */ - /*JP< ライブラリ内部使用変数 */ - CriUint32 color_conversion_type; /*EN< Color space converion type. Fullrange or Limited.*/ - /*JP< 色変換タイプ。 */ - CriSint32 capacity_of_picsize; /*EN< Capacity size of video pictures. */ - /*JP< ピクチャサイズ上限値 */ - CriUint32 average_bitrate; /*EN< Average bitrate. */ - /*JP< 平均ビットレート */ -} CriMvAlphaParameters; - - -/*EN - * \brief Streaming Parameters - * \ingroup MDL_MV_INFO - * This structure includes streaming parameters and playing parameters. - * \sa CriMvEasyPlayer::GetMovieInfo() - */ -/*JP - * \brief ストリーミング再生パラメータ - * \ingroup MDL_MV_INFO - * ストリーミング再生パラメータ。
- * ストリーム自体の情報と、再生のために必要なパラメータの両方を含んでいる。 - * \sa CriMvEasyPlayer::GetMovieInfo() - */ -typedef struct { - /* Stream */ - CriUint32 is_playable; /*EN< Flag of the movie file is playable or not. 1 is playable. 0 is not playable.*/ - /*JP< 再生可能フラグ(1: 再生可能、0: 再生不可) */ - CriFloat32 buffering_time; /*EN< Amount of time to buffer in the stream, in seconds */ - /*JP< 読み込みデータのバッファリング時間。単位[sec]。 */ - CriUint32 max_bitrate; /*EN< Maximum bits per second for stream. This value includes video and audio both. */ - /*JP< 最大ビットレート(絵と音の合計) */ - CriUint32 max_chunk_size; /*EN< Maximum chunk size of incoming stream (USF) file */ - /*JP< 最大USFチャンクサイズ */ - CriUint32 min_buffer_size; /*EN< Minimum buffer size for reading */ - /*JP< 最低限必要な読み込みバッファサイズ。
オーディオとビデオの合計 */ - CriSint32 read_buffer_size; /*EN< Input buffer size for reading data */ - /*JP< リードバッファサイズ */ - /* Video */ - CriUint32 num_video; /*EN< Number of simultaneous video streams */ - /*JP< ビデオデコーダの数。現在は1固定。*/ - CriMvVideoParameters video_prm[CRIMV_MAX_VIDEO_NUM]; /*EN< Video parameters see CriMvVideoParameters struct for details */ - /*JP< ビデオパラメータ */ - /* Audio */ - CriUint32 num_audio; /*EN< Number of simultaneous audio streams */ - /*JP< オーディオデコーダの数。現在は1固定。*/ - CriSint32 track_play_audio; /*EN< Track of audio playback. */ - /*JP< 再生するオーディオチャネル番号。-1指定で再生無し。 */ - CriMvAudioParameters audio_prm[CRIMV_MAX_AUDIO_NUM]; /*EN< Audio parameters see CriMvAudioParameters struct for details */ - /*JP< オーディオパラメータ */ - /* Subtitle */ - CriUint32 num_subtitle; /*EN< Number of subtitles */ - /*JP< 字幕チャネル数 */ - CriSint32 channel_play_subtitle; /*EN< Channel for playing subtitles */ - /*JP< 再生する字幕チャネル番号 */ - CriUint32 max_subtitle_size; /*EN< Maximum size of subtitle data */ - /*JP< 字幕データの最大サイズ*/ - - /* Composite mode */ - CriUint32 num_alpha; /*EN< Number of alpha channels (current spec allows only one) */ - /*JP< アルファデコーダの数。現在は1固定。 */ - CriMvAlphaParameters alpha_prm[CRIMV_MAX_ALPHA_NUM]; /*EN< Alpha parameters see CriMvAlphaParameters struct for details */ - /*JP< アルファパラメータ */ - - CriBool seekinfo_flag; /*EN< Flag of the movie file inclues seek info */ - /*JP< シーク情報フラグ */ - CriUint32 format_ver; /*EN< Format version */ - /*JP< フォーマットバージョン */ -} CriMvStreamingParameters; - - -/*EN - * \brief Input Buffer Information - * \ingroup MDL_MV_INFO - * \sa CriMvEasyPlayer::GetInputBufferInfo(), - * CriMvEasyPlayer::SetReloadThresholdTime(), CriMvEasyPlayer::SetBufferingTime() - */ -/*JP - * \brief 入力バッファ情報 - * \ingroup MDL_MV_INFO - * \sa CriMvEasyPlayer::GetInputBufferInfo(), - * CriMvEasyPlayer::SetReloadThresholdTime(), CriMvEasyPlayer::SetBufferingTime() - */ -typedef struct { - CriUint32 buffer_size; /*EN< Input buffer size [byte] */ - /*JP< 入力バッファサイズ[byte] */ - CriUint32 data_size; /*EN< Data size in input buffer[byte] */ - /*JP< 入力バッファにあるデータサイズ[byte] */ - CriUint32 reload_threshold; /*EN< Re-load threshold. When data size is less than re-load threshold, next read is requested. */ - /*JP< 再読み込み閾値[byte]。データサイズがこの値以下になると読み込みを行います。 */ -} CriMvInputBufferInfo; - - -// TEMP: for internal use -typedef struct { - CriUint8 *imageptr; - CriUint32 bufsize; // [Byte] - CriUint32 line_pitch; // [Byte] - CriUint32 line_size; // [Byte] - CriUint32 num_lines; -} CriMvImageBufferInfo; - -/*EN - * \brief Video Frame Information - * \ingroup MDL_MV_INFO - * \sa CriMvEasyPlayer::GetFrameOnTimeAs32bitARGB(), CriMvEasyPlayer::GetFrameOnTimeAsYUVBuffers, - * CriMvEasyPlayer::GetFrameOnTimeAsYUV422(), CriMvEasyPlayer::DiscardNextFrame() - */ -/*JP - * \brief ビデオフレーム情報 - * \ingroup MDL_MV_INFO - * ビデオフレーム情報 - * \sa CriMvEasyPlayer::GetFrameOnTimeAs32bitARGB(), CriMvEasyPlayer::GetFrameOnTimeAsYUVBuffers, - * CriMvEasyPlayer::GetFrameOnTimeAsYUV422(), CriMvEasyPlayer::DiscardNextFrame() - */ -typedef struct { - CriUint8 *imageptr; /*EN< Pointer to image data */ - /*JP< 画像データのポインタ */ - CriSint32 frame_id; /*EN< Frame ID ot the playback */ - /*JP< フレーム識別ID(ループ/連結再生時は通算) */ - CriUint32 width; /*EN< Width of movie frame [pixel] (multiple of 8) */ - /*JP< ムービの横幅[pixel] (8の倍数) */ - CriUint32 height; /*EN< Height of movie frame [pixel] (multiple of 8) */ - /*JP< ムービの高さ[pixel] (8の倍数) */ - CriUint32 pitch; /*EN< Pitch of movie frame [byte]*/ - /*JP< ムービのピッチ[byte] */ - CriUint32 disp_width; /*EN< Width of the image to draw. */ - /*JP< 表示したい映像の横ピクセル数(左端から) */ - CriUint32 disp_height; /*EN< Height of the image to draw. */ - /*JP< 表示したい映像の縦ピクセル数(上端から) */ - CriUint32 framerate; /*EN< Frames per second times 1000 */ - /*JP< フレームレートの1000倍の値 */ - CriUint32 framerate_n; /*EN< Frame rate (in rational as numerator). framerate_n/framerate_d = framerate */ /* UTODO: 変数名 */ - /*JP< フレームレートの分子(有理数形式)。framerate_n/framerate_d = framerate */ - CriUint32 framerate_d; /*EN< Frame rate (in rational as denominator). */ - /*JP< フレームレートの分母(有理数形式)。 */ - CriUint64 time; /*EN< Frame time ('time / tunit' indicates time in seconds) */ - /*JP< 時刻。time / tunit で秒を表す。 */ - CriUint64 tunit; /*EN< Unit of time measurement */ - /*JP< 時刻単位 */ - CriUint32 cnt_concatenated_movie; /*EN< Number of concatenated movie data */ - /*JP< ムービの連結回数 */ - CriSint32 frame_id_per_data; /*EN< Frame ID of the movie data */ - /*JP< ムービデータごとのフレーム番号 */ - - CriBool csc_flag; /*EN< This is temporary variable. Please don't access. */ - /*JP< テスト中の変数です。アクセスしないでください。 */ - - CriMvAlphaType alpha_type; /*EN< Composite mode */ - /*JP< アルファの合成モード*/ - - void *details_ptr[CRIMV_FRAME_DETAILS_NUM]; // for internal use - - CriSint32 num_images; // TEMP: for internal use - CriMvImageBufferInfo image_info[4]; // TEMP: for internal use - - CriUint32 color_conversion_type; /*EN< Color space converion type. Fullrange or Limited.*/ - /*JP< 色変換タイプ。 */ - CriUint32 total_frames_per_data; /*EN< Total frames of the movie data*/ - /*JP< ムービデータ単位の総フレーム数 */ - CriUint32 cnt_skipped_frames; /*EN< Number of skipped frames to decode */ - /*JP< デコードスキップされたフレーム数 */ -} CriMvFrameInfo; - -/*EN - * \brief Subtitle Information - * \ingroup MDL_MV_INFO - * \sa CriMvEasyPlayer::GetSubtitleOnTime() - */ -/*JP - * \brief 字幕情報 - * \ingroup MDL_MV_INFO - * \sa CriMvEasyPlayer::GetSubtitleOnTime() - */ -typedef struct { - CriUint8 *dataptr; /*EN< Pointer to subtitle data */ - /*JP< 字幕データのポインタ */ - CriUint32 data_size; /*EN< Size of subtitle data */ - /*JP< 字幕データサイズ */ - CriSint32 channel_no; /*EN< Channel number of subtitle data */ - /*JP< 字幕データのチャネル番号 */ - CriUint64 time_unit; /*EN< Unit of time measurement */ - /*JP< 時刻単位 */ - CriUint64 in_time; /*EN< Display start time */ - /*JP< 表示開始時刻*/ - CriUint64 duration_time; /*EN< Display duration time */ - /*JP< 表示持続時間 */ - CriUint32 cnt_concatenated_movie; /*EN< Number of concatenated movie data */ - /*JP< ムービの連結回数 */ - CriUint64 in_time_per_data; /*EN< Display start time per movie data*/ - /*JP< ムービデータごとに表示開始時刻*/ -} CriMvSubtitleInfo; - -/*EN - * \brief Event Point Info - * \ingroup MDL_MV_INFO - * Event point info is the each timing info was embeded to movie data as cue point info. - * \sa CriMvEasyPlayer::GetCuePointInfo() - */ -/*JP - * \brief イベントポイント情報 - * \ingroup MDL_MV_INFO - * キューポイント機能でムービデータに埋め込まれた個々のタイミング情報です。 - * \sa CriMvEasyPlayer::GetCuePointInfo() - */ -typedef struct { - CriChar8 *cue_name; /*EN< The name string of event point. Char code depends on cue point text. */ - /*JP< イベントポイント名。文字コードはキューポイント情報テキストに従います。 */ - CriUint32 size_name; /*EN< The data size of name string */ - /*JP< イベントポイント名のデータサイズ */ - CriUint64 time; /*EN< Timer counter */ - /*JP< タイマカウント */ - CriUint64 tunit; /*EN< Counter per 1 second. "count / unit" indicates the timer on the second time scale. */ - /*JP< 1秒あたりのタイマカウント値。count ÷ unit で秒単位の時刻となります。 */ - CriSint32 type; /*EN< Event point type */ - /*JP< イベントポイント種別 */ - CriChar8 *param_string; /*EN< The string of user parameters. Char code depends on cue point text. */ - /*JP< ユーザパラメータ文字列。文字コードはキューポイント情報テキストに従います。 */ - CriUint32 size_param; /*EN< The data size of user parameters string */ - /*JP< ユーザパラメータ文字列のデータサイズ */ - CriUint32 cnt_callback; /*EN< The counter of calling cue point callback. */ - /*JP< キューポイントコールバックの呼び出しカウンタ */ -} CriMvEventPoint; - -/*EN - * \brief Cue Point Info - * \ingroup MDL_MV_INFO - * Cue point info includes the number of event points and the list. - * \sa CriMvEasyPlayer::GetCuePointInfo() - */ -/*JP - * \brief キューポイント情報 - * \ingroup MDL_MV_INFO - * キューポイント情報は、イベントポイントの個数と一覧です。
- * \sa CriMvEasyPlayer::GetCuePointInfo() - */ -typedef struct { - CriUint32 num_eventpoint; /*EN< The number of event points */ - /*JP< イベントポイント個数 */ - CriMvEventPoint *eventtable; /*EN< The list of event points */ - /*JP< イベントポイント一覧 */ -} CriMvCuePointInfo; - -/*EN - * \brief YUV Texture Buffer Parameters - * \ingroup MDL_MV_INFO - * The output buffer parameters for CriMvEasyPlayer::GetFrameOnTimeAsYUVBuffers(). - * CriMvEasyPlayer::GetFrameOnTimeAsYUVBuffers() outputs data for pixel shader.
- * If an application doesn't play alpha movie, CRI Movie library doesn't use alpha buffer parameters.
- * \sa CriMvEasyPlayer::GetFrameOnTimeAsYUVBuffers() - */ -/*JP - * \brief YUV個別バッファ情報 - * \ingroup MDL_MV_INFO - * CriMvEasyPlayer::GetFrameOnTimeAsYUVBuffers() の出力バッファ情報です。
- * CriMvEasyPlayer::GetFrameOnTimeAsYUVBuffers() はPixel Shader 向けのデコード結果を出力します。
- * アルファムービ再生を行わない場合(不透明の通常再生)は、Alphaテクスチャ関連のパラメータは使用しません。
- * \sa CriMvEasyPlayer::GetFrameOnTimeAsYUVBuffers() - */ -typedef struct { - CriUint8 *y_imagebuf; /*EN< Pointer to the buffer of Y texture */ - /*JP< Yテクスチャのバッファポインタ */ - CriUint32 y_bufsize; /*EN< Size of the buffer of Y texture [byte] */ - /*JP< Yテクスチャのバッファサイズ[byte] */ - CriUint32 y_pitch; /*EN< Pitch of the buffer of Y texture [byte] */ - /*JP< Yテクスチャのピッチ[byte] */ - CriUint8 *u_imagebuf; /*EN< Pointer to the buffer of U texture */ - /*JP< Uテクスチャのバッファポインタ */ - CriUint32 u_bufsize; /*EN< Size of the buffer of U texture [byte] */ - /*JP< Uテクスチャのバッファサイズ[byte] */ - CriUint32 u_pitch; /*EN< Pitch of the buffer of U texture [byte] */ - /*JP< Uテクスチャのピッチ[byte] */ - CriUint8 *v_imagebuf; /*EN< Pointer to the buffer of V texture */ - /*JP< Vテクスチャのバッファポインタ */ - CriUint32 v_bufsize; /*EN< Size of the buffer of V texture [byte] */ - /*JP< Vテクスチャのバッファサイズ[byte] */ - CriUint32 v_pitch; /*EN< Pitch of the buffer of V texture [byte] */ - /*JP< Vテクスチャのピッチ[byte] */ - CriUint8 *a_imagebuf; /*EN< Pointer to the buffer of Alpha texture */ - /*JP< Alphaテクスチャのバッファポインタ */ - CriUint32 a_bufsize; /*EN< Size of the buffer of Alpha texture [byte] */ - /*JP< Alphaテクスチャのバッファサイズ[byte] */ - CriUint32 a_pitch; /*EN< Pitch of the buffer of Alpha texture [byte] */ - /*JP< Alphaテクスチャのピッチ[byte] */ -} CriMvYuvBuffers; - - -/*EN - * \brief Playback Information - * \ingroup MDL_MV_INFO - * The output playback information of CriMvEasyPlayer::GetPlaybackInfo(). - * These parameters represents current movie playback information such as decode delay of movie data and - * interval of video frames retrieval. - * \sa CriMvEasyPlayer::GetPlaybackInfo() - */ -/*JP - * \brief 再生情報 - * \ingroup MDL_MV_INFO - * CriMvEasyPlayer::GetPlaybackInfo() の出力再生情報です。
- * フレームの取得間隔やデコードの遅延などの現在再生しているムービの再生情報を表します。
- * \sa CriMvEasyPlayer::GetPlaybackInfo() - */ -typedef struct { - CriUint64 cnt_app_loop; /*EN< Loop count of application. Precisely, this is a number of calls of CriMvEasyPlayer::Update(). The count up will start after app is able to acquire the first video frame */ - /*JP< アプリケーションのループカウント。具体的には CriMvEasyPlayer::Update() の呼び出し回数になります。最初のフレームが取得可能になるとカウントが始まります。*/ - CriUint64 cnt_frame_interval[4]; /*EN< Interval of video frames retrieval. These values are count up when CriMvEasyPlayer::IsNextFrameOnTime() returns TRUE. - * - * The interval of video frames retrieval indicates a number of the loop count when your application calls CriMvEasyPlayer::IsNextFrameOnTime() in the main loop. - * In case that the application waits for vertical retrace, 1 interval equals about 16.7 msec. - * The index of array represents the count of intervals as follows: - * - *
Index Interval of video frames retrieval - *
0 Every main loop - *
1 2 main loops - *
2 3 main loops - *
3 4 or more main loops - *
- * With these values, you can check if the application gets video frames with appropriate intervals. Please use the values as measuring playback smoothness - * - * In order to use these values, the application must meet the following conditions: - * - The main loop should work periodically and stably (Ideally sync with vertical retrace) - * - The application should call CriMvEasyPlayer::IsNextFrameOnTime() once in everly main loop - * - * For example, if the application runs at 59.94fps by waiting for vertical retrace and a framerate of playing movie file is 29.97fps, - * only cnt_frame_interval[1] should be increased. - */ - /*JP< フレームの取得間隔。これらの値は、 CriMvEasyPlayer::IsNextFrameOnTime() がTRUEを返した時にカウントアップされます。
- * - * フレームの取得間隔とは、アプリケーションがメインループ内でフレーム取得関数を読んだ時のループの回数を意味します。 - * メインループがVSyncと同期している場合は、1 Interval = 約16.7msecということになります。 - * 配列のインデックスは、以下のように取得間隔を表します。
- * - *
インデックス フレームの取得間隔 - *
0 毎メインループ - *
1 2 メインループ - *
2 3 メインループ - *
3 4 メインループ以上 - *
- * これらの値を見ることで、アプリが正しい間隔でフレームを取得できたのかどうかをチェックすることができます。ムービが滑らかに再生できているかの目安にしてください。
- * - * ただし前提として、以下の条件をアプリが満たしている必要があります。 - * - アプリがVSyncなど、一定の周期で安定して動作している - * - メインループ内で毎回 CriMvEasyPlayer::IsNextFrameOnTime() を呼び出す - * - * 上記の条件下において、例えばアプリが59.94fpsで動作している状態で、フレームレートが29.97fpsのムービを再生した場合、cnt_frame_interval[1]のみが増え続けれれば - * 正しい間隔でフレームの取得が出来たことになります。 - */ - CriUint64 cnt_time_early; /*EN< A count of how many times CriMvEasyPlayer::IsNextFrameOnTime() returns FALSE due to the determination if it is the time to provide the next video frame */ - /*JP< CriMvEasyPlayer::IsNextFrameOnTime() が、フレーム表示時刻判定によりFALSEを返した回数。*/ - CriUint64 cnt_decode_delay; /*EN< A count of how many times CriMvEasyPlayer::IsNextFrameOnTime() returns FALSE due to the delay of decoding movie data */ - /*JP< CriMvEasyPlayer::IsNextFrameOnTime()が、ビデオフレームのデコード遅延によりFALSEを返した回数 */ - CriFloat32 time_max_delay; /*EN< Maximum delay time [msec] of the actual time a video frame retrieved against the original time should be retrieved */ - /*JP< ビデオフレームを取得した実際の時刻と、本来表示すべき時刻との最大遅延時間 [msec]。 */ - CriFloat32 time_average_delay; /*EN< Average delay time [msec] of the actual time a video frame retrieved against the original time should be retrieved */ - /*JP< ビデオフレームを取得した実際の時刻と、本来表示すべき時刻との平均遅延時間 [msec]。 */ -} CriMvPlaybackInfo; - -#if defined(XPT_TGT_PS3PPU) -/*EN - * \brief Parameters of SPURS and PPU for decoding - * \ingroup MDL_MV_BASIC - * - * \sa CriMv::SetupSpursParameters_PS3(), CriMv::CalcSpursWorkSize_PS3() - */ -/*JP - * \brief デコードに使うSPURSおよびPPUのパラメータ - * \ingroup MDL_MV_BASIC - * - * \sa CriMv::SetupSpursParameters_PS3(), CriMv::CalcSpursWorkSize_PS3() - */ -typedef struct { - void *spurs_handler; /*EN< SPURS handler */ - /*JP< SPURSハンドル */ - void *spurs_work; /*EN< SPURS work area. The size is spurs_worksize. The alignment is 128 byte. */ - /*JP< SPURS用ワークバッファ。バッファサイズは spurs_worksize で128バイト境界。 */ - CriSint32 spurs_worksize; /*EN< SPURS work size. This size is calculated by CriMv::CalcSpursWorkSize_PS3 function. */ - /*JP< SPURS用ワークサイズ。CriMv::CalcSpursWorkSize_PS3 関数で取得した値。 */ - CriSint32 spurs_max_contention; /*EN< SPURS max contention */ - /*JP< SPURS でムービデコード用に使うSPUの最大数 */ - CriUint8 *spurs_task_priority; /*EN< SPURS task priority x 8 */ - /*JP< SPURS のタスクプライオリティ配列。配列要素は8個。 */ - - CriUint32 ppu_num; /*EN< The number of PPU for decoding (0-2) */ - /*JP< The number of PPU for decoding (0-2) */ - CriSint32 ppu_thread_prio; /*EN< PPU Thread Priority. This priority is used for decoding thread in the case of ppu_num equal 2. */ - /*JP< PPU Thread Priority. この値は ppu_num に2を指定した場合に作成するスレッドに使われる。 */ -} CriMvProcessorParameters_PS3; - -// [NOT SUPPORT on normal library] -// for SPU Thread -typedef struct { - CriUint32 ppu_num; /* The number of PPU for decoding (0-2) */ - CriSint32 ppu_prio; /* PPU Thread Priority */ - CriUint32 spu_num; /* The number of SPU for decoding (0-6) */ - CriSint32 spu_grp_prio; /* SPU Thread Group Priority */ -} CriMvSpuThreadParameters_PS3; - -#endif - -#if defined(XPT_TGT_XBOX360) -/*EN - * \brief Parameters of Xbox360 processors for decoding - * \ingroup MDL_MV_BASIC - * - * \sa CriMvEasyPlayer::SetUsableProcessors_XBOX360() - */ -/*JP - * \brief デコードに使うXbox360プロセッサのパラメータ - * \ingroup MDL_MV_BASIC - * - * \sa CriMvEasyPlayer::SetUsableProcessors_XBOX360() - */ -typedef struct { - CriBool processor0_flag; /*EN< Processor 0 (Core 0, Thread 0) usable flag */ - /*JP< プロセッサ0 (コア0スレッド0) 使用可能フラグ */ - CriBool processor1_flag; /*EN< Processor 1 (Core 0, Thread 1) usable flag */ - /*JP< プロセッサ1 (コア0スレッド1) 使用可能フラグ */ - CriBool processor2_flag; /*EN< Processor 2 (Core 1, Thread 0) usable flag */ - /*JP< プロセッサ2 (コア1スレッド0) 使用可能フラグ */ - CriBool processor3_flag; /*EN< Processor 3 (Core 1, Thread 1) usable flag */ - /*JP< プロセッサ3 (コア1スレッド1) 使用可能フラグ */ - CriBool processor4_flag; /*EN< Processor 4 (Core 2, Thread 0) usable flag */ - /*JP< プロセッサ4 (コア2スレッド0) 使用可能フラグ */ - CriBool processor5_flag; /*EN< Processor 5 (Core 2, Thread 1) usable flag */ - /*JP< プロセッサ5 (コア2スレッド1) 使用可能フラグ */ - CriSint32 thread_priority; /*EN< Priority of decoding threads on the active processors */ - /*JP< 各プロセッサ上でデコード処理を行うスレッドの優先度 */ -} CriMvProcessorParameters_XBOX360; -#endif - -#if defined(XPT_TGT_VITA) -/*EN - * \brief AVC Decoder Parameters - * \ingroup MDL_MV_BASIC - * - * \sa CriMv::SetupAvcDecoderParameters_VITA() - */ -/*JP - * \brief AVCデコーダパラメータ - * \ingroup MDL_MV_BASIC - * - * \sa CriMv::SetupAvcDecoderParameters_VITA() - */ -typedef struct { - CriUint32 horizontal; /*EN< Maximum width for decoding (in pixel) */ - /*JP< 最大デコード画像の横幅 (単位:ピクセル) */ - CriUint32 vertical; /*EN< Maximum height for decoding (in pixel) */ - /*JP< 最大デコード画像の高さ (単位:ピクセル) */ - CriUint32 n_ref_frames; /*EN< Maximum reference frames on decoding (default:3) */ - /*JP< デコード時の最大参照画像の枚数 */ - CriUint32 n_decoders; /*EN< Maximum number of avc decoders (max:1) */ - /*JP< 同時に使用するAVCでコーダの最大数 (1固定) */ - -} CriMvAvcDecoderParameters_VITA; -#endif - -/*--------------------------------------------------------------------------*/ -/* */ -/*--------------------------------------------------------------------------*/ -typedef enum { - CRIMV_PCM_FORMAT_SINT16 = 0, - CRIMV_PCM_FORMAT_FLOAT32 = 1, - - /* Keep enum 4bytes */ - CRIMV_PCM_FORMAT__MAKE_ENUM_SINT32 = 0x7FFFFFFF -} CriMvPcmFormat; -/* - * \brief 16bit wave data information - * \ingroup MDL_MV_INFO - * Information about a 16-bit waveform. - */ -/* 16bit Waveform 情報 */ -typedef struct { - CriUint32 num_channel; /* Number of Channels. monaural = 1, stereo = 2 */ - /* Number of Channels. monaural = 1, stereo = 2 */ - CriUint32 num_samples; /* Number of sample */ - /* サンプル数 */ - CriUint32 sampling_rate; /* Sampling rate */ - /* サンプリング周波数 */ -} CriMvWaveInfo; - -/* オーディオヘッダ */ -typedef struct { - /* ストリーミングパラメータと共通 */ - CriUint32 sampling_rate; - CriUint32 num_channel; - CriUint32 total_samples; - CriUint32 codec_type; - - CriUint32 metadata_count; - CriUint32 metadata_size; - - /* ヘッダ固有 */ - CriUint32 a_input_xsize; -} CriMvPlyAudioHeader; - -/* ビデオヘッダ */ -typedef struct { - /* ヘッダ固有 */ - CriUint32 width; - CriUint32 height; - CriUint32 disp_width; - CriUint32 disp_height; - CriUint32 framerate_n; - CriUint32 framerate_d; - CriUint32 total_frames; - - CriUint32 material_width; /* width of video original source. 0 means no info. */ - CriUint32 material_height; /* height of video original source. 0 means no info. */ - CriUint32 screen_width; /* screen width for Wii */ - - CriUint32 codec_type; - CriUint32 codec_dc_option; /* 11 or 10 */ - - CriUint32 metadata_count; - CriUint32 metadata_size; - - CriUint32 pre_padding; - CriUint32 color_conversion_type; - CriSint32 max_picture_size; - CriSint32 average_bitrate; -} CriMvPlyVideoHeader; - -/* サブタイトルヘッダ */ -typedef struct { - CriBool is_subtitle_data; - CriUint32 num_channel; - CriUint64 time_unit; - CriUint32 max_subtitle_size; -} CriMvPlySubtitleHeader; - -/* キューポイントヘッダ */ -typedef struct { - CriBool is_cuepoint_data; - CriUint32 metadata_count; - CriUint32 metadata_size; - CriUint32 num_eventpoint; - CriUint64 time_unit; -} CriMvPlyCuePointHeader; - -/* アルファヘッダ */ -typedef struct { - /* ヘッダ固有 */ - CriUint32 width; - CriUint32 height; - CriUint32 disp_width; - CriUint32 disp_height; - CriUint32 framerate_n; - CriUint32 framerate_d; - CriUint32 total_frames; - - CriMvAlphaType alpha_type; - CriUint32 codec_type; - - CriUint32 metadata_count; - CriUint32 metadata_size; - - CriUint32 pre_padding; - CriUint32 color_conversion_type; - CriSint32 max_picture_size; - CriSint32 average_bitrate; -} CriMvPlyAlphaHeader; - -/* アルファのみのフレーム情報 */ -typedef struct { - CriUint8 *imageptr; /*EN< Pointer to image data */ - /*JP< 画像データのポインタ */ - CriSint32 frame_id; /*EN< Frame ID */ - /*JP< フレーム識別ID */ - CriUint32 width; /*EN< Width of movie frame [pixel] */ - /*JP< ムービの横幅[pixel] */ - CriUint32 height; /*EN< Height of movie frame [pixel] */ - /*JP< ムービの高さ[pixel] */ - CriUint32 disp_width; /*EN< Width of image [pixel] */ - /*JP< 有効な映像の横幅[pixel] */ - CriUint32 disp_height; /*EN< Height of image [pixel] */ - /*JP< 有効な映像の高さ[pixel] */ - CriUint32 pitch; /*EN< Pitch of movie frame [byte]*/ - /*JP< ムービのピッチ[byte] */ - CriUint64 time; /*EN< Frame time ('time / tunit' indicates time in seconds) */ - /*JP< 時刻。time / tunit で秒を表す。 */ - CriUint64 tunit; /*EN< Unit of time measurement */ - /*JP< 時刻単位 */ - CriSint32 frame_id_per_data; /*EN< Frame ID of the movie data */ - /*JP< ムービデータごとのフレーム番号 */ - CriMvAlphaType alpha_type; /*EN< Composite mode */ - /*JP< アルファの合成モード*/ - void *detail_ptr; /* TEMP: for internal use */ - CriUint32 color_conversion_type; /*EN< Color space converion type. Fullrange or Limited.*/ - /*JP< 色変換タイプ。 */ -} CriMvAlphaFrameInfo; - -// 内部管理用。ムービ情報をユーザに渡す時はこれとほぼ同じだろうか。 -/* Information of USF File */ -typedef struct { - CriBool is_usf_file; - CriUint32 max_chunk_size; - CriUint32 min_buffer_size; - CriUint32 bitrate; - CriUint32 format_version; - /* Video */ - CriUint32 num_video; - CriMvPlyVideoHeader videohead[CRIMV_MAX_VIDEO_NUM]; - /* Audio */ - CriUint32 num_audio; - CriMvPlyAudioHeader audiohead[CRIMV_MAX_AUDIO_NUM]; - /* Subtitle */ - CriUint32 num_subtitle; - CriMvPlySubtitleHeader subtitlehead; - /* Alpha */ - CriUint32 num_alpha; - CriMvPlyAlphaHeader alphahead[CRIMV_MAX_ALPHA_NUM]; - /* CuePoint */ - CriUint32 num_cuepoint; - CriMvPlyCuePointHeader cuepointhead; -} CriMvPlyHeaderInfo; - -/* Video Elementary Stream */ -typedef struct { - CriUint32 fcid; - CriSint32 track_no; // チャンクのチャネル番号 - void *vdec; -} CriMvPlyVideo; - -typedef struct { - CriUint32 fcid; - CriSint32 track_no; // チャンクのチャネル番号 - void *dec; -} CriMvPlyAlpha; - -/* ムービヘッダを管理するための構造体 */ -typedef struct { - CriMvPlyHeaderInfo info; - CriBool write_new_head_flag; // CRIDが見つかって次のヘッダを書き込む準備ができたか? - CriUint32 num_remaining_adec_head; // 必要な残りのオーディオヘッダの数 - CriUint32 num_remaining_vdec_head; // 必要な残りのビデオのヘッダの数 - CriUint32 num_remaining_subtitle_head; // 必要な残りの字幕のヘッダの数 - CriUint32 num_remaining_alpha_head; // 必要な残りのアルファのヘッダ数 - CriUint32 num_remaining_cuepoint_head; // 必要な残りのキューポイントのヘッダ数 - /* 2010-08-19: TEMP: CONCAT_KAI: Don't refer this member. */ - CriUint64 accumulated_tcount; -} CriMvHeaderInfoContainer; - -typedef struct { - CriBool is_play_audio; - CriUint32 fcid; - CriUint32 track_no; // チャンクのチャネル番号 - void *adec; // 実際のオーディオコーデック - CriUint32 num_channel; // データのチャネル数 - CriUint32 sampling_rate; // サンプリング周波数 - CriUint32 output_buffer_samples; - CriSj sji; // UNI - CriSj sjo[CRIMV_PCM_BUFFER_MAX]; // RBF - CriUint32 sjo_bufsize[CRIMV_PCM_BUFFER_MAX]; - CriBool term_supply; // データ供給終了通知フラグ - CriBool is_working; // コンテンツチャンク処理中 - -#if defined(ENABLE_DYNAMIC_AUDIO_SWITCH) - CriUint32 next_track_no; // ユーザが指定した切替先のトラック番号 - CriUint32 last_track_switch_time; // 切替元のトラックの最後にチャンクをとった時刻 - CriUint32 last_track_switch_tunit; // 上記時刻の単位 (in Hz?) - CriMvPlyAmngTrackState switch_state; // トラック切替による状態 -#endif -} *CriMvPlyAdec, CriMvPlyAdecObj; - -typedef struct { - - CriMvPlyAdec mvply_adecs[NUM_MAX_ADEC]; - CriSint32 num_adecs; - CriUint32 size_smpl; - CriSj sji; - CriUint32 chunk_num_per_server; - - CriBool (*cbfunc_nofify_found_header)(void *usrobj, CriChunk *ckc, CriUint8 chno); - void *usrobj_nofify_found_header; - -} *CriMvPlyAmng, CriMvPlyAmngObj; - - -/* シークブロック情報 */ -typedef struct { - CriSint32 top_frame_id; -} CriMvSeekBlockInfo; - -/* ストリーマ用情報 */ -typedef struct { - CriUint32 max_chunk_size; - CriUint32 average_bitrate; -} CriMvStreamerInfo; - - -/* ハンドル作成用コンフィグ構造体 */ -typedef struct { - CriUint32 readbuffer_size; -} CriMvHandleConfig; - - -/*JP CRI Movie ハンドル */ -/*EN - * A handle for a single movie. If multiple movies are to be played simultaneously, - * create a CriMvPly handle for each movie. - * - * \sa criMvPly_Create(), criMvPly_Destroy() */ -typedef struct { - /*** Member variable is ***/ - CriBool used; - CriMvPlyStatus stat; - CriBool request_stop; - CriBool restrain_supply; - CriBool term_supply; - void *cs_work; - void *cshn; - /* USF Header */ - - CriMvHeaderInfoContainer headinfo_container[CRIMVPLY_HEAD_CONTAINER_NUM]; - Uint16 cur_dechead_idx; - CriUint32 cnt_dechead; /* ヘッダ解析ごとに更新 */ - CriUint32 cnt_concat; /* GetFrameで更新 */ - - CriMvPlyHeaderInfo headinfo; - CriUint32 num_headck; /* ヘッダ解析処理したチャンク数 */ - CriFloat32 def_buffering_time; - CriUint32 def_max_stream; - CriUint32 def_sound_output_buffer_samples; - CriSint32 def_track_play_audio; /* -1 でオーディオ再生無し */ - - /* デリゲートパラメータ構造体 */ - CriSint32 size_dlgparams; - CriUint8 *ptr_dlgparams; - - CriBool is_prepare_work; - CriMvStreamingParameters stmprm; /* ストリーミングパラメータの記録 */ - /* Demultiplexer */ - CriSint32 inputtype; /* ストリーミングかメモリか?メモリ=ユニSJ再生 */ - CriBool is_usf_data; /* 入力ファイルはUSFファイルか? */ - void *demux; /* USFデマルチプレクサハンドル */ - CriUint32 max_demuxout; /* デマルチプレクサ出力の最大種別数 */ - CriUint32 num_demuxout; /* デマルチプレクサ出力に設定済みの種別数 */ - CriSj headanaly_in_sj; // RBF - CriSj headanaly_out_sj; // UNI - CriSj read_sj; // RBF - CriChunk readck; - - CriSj memplay_sj; // UNI (for memory playback) - CriChunk movie_on_mem; /* メモリ指定のムービデータ記憶用(1個) */ - CriUint32 offset_content; /* メモリ指定先頭データのコンテンツ本体までのサイズ */ - - /* === ハンドル作成時に確保 === */ - CriHeap heap_gen; - /* ヘッダ解析用の読み込み領域 */ - CriUint32 headanaly_bufsize; - /* ハンドル内部メモリは最初に10kbyte確保して使いまわす。具体的にはヘッダ解析用。 */ - CriHeap local_heap; /* ハンドル内部専用Heap */ - CriSint32 local_bufsize; /* ハンドル内部専用Heap用のバッファサイズ */ - CriUint8 *local_bufptr; /* ハンドル内部専用Heap用のバッファポインタ */ - /* === メタワークバッファ (ヘッダ解析時に確保) === */ - CriHeap heap_meta; - /* === ワークバッファ作成時に確保 === */ - CriHeap heap_core; - /* 読み込みバッファ */ - CriUint32 size_readbuf_main; - CriUint32 size_readbuf_ext; - /* Video Decoder */ - CriMvPlyVideo video; - CriUint32 framerate_n; - CriUint32 framerate_d; - /* Audio Decoder */ - CriMvPlyAmng audio_mngr; - CriMvPcmFormat pcmfmt; - CriUint32 size_smpl; - CriHeap heap_audio2; - /* Subtitle */ - CriSj sjo_subtitle; - CriSint32 concat_subtitle_cnt; /* 字幕の連結処理回数 */ - CriSint32 ch_subtitle; /* 字幕の連結処理回数 */ - /* Alpha */ - CriMvPlyAlpha alpha; - - /* 折り返しチャンク対応用(使うかどうかに関係なく変数だけは定義する) */ - CriUint32 bufsize_read_main; /* 入力SJのバッファ本体サイズ */ - CriUint32 bufsize_read_ext; /* 入力SJののりしろサイズ */ - CriUint8 *read_sj_bufptr; /* 入力RBSJの先頭バッファアドレス */ - - /* ストリーミングパラメータに入れるという手段もアリかも? */ - CriSint32 seek_frame_id; /* シークしたいフレームID(GOPの途中の可能性あり) */ - CriSint32 video_gop_top_id; /* シーク後のビデオGOP先頭フレームID : 0以下でシーク無し */ - CriSint32 alpha_gop_top_id; /* シーク後のアルファGOP先頭フレームID : 0以下でシーク無し */ - CriBool seek_video_prep_flag; /* シーク再生のビデオ準備完了フラグ(GOP途中まで進んだか?) */ - CriBool seek_alpha_prep_flag; /* シーク再生のアルファ準備完了フラグ(GOP途中まで進んだか?) */ - CriBool seek_audio_prep_flag; /* シーク再生のオーディオ準備完了フラグ(シーク指定時刻まで捨てたか?) */ - - CriSint32 dechdr_stage; /* DECHDRの進み具合 */ - CriSint32 sji_meta_bufsize; /* メタデータ用入力バッファサイズ */ - CriSj sji_meta; /* メタデータ用入力SJ */ - CriUint32 cnt_meta_ck; /* メタデータ用入力SJ */ - void *video_seektbl_ptr; - CriUint32 video_seektbl_size; - CriSint32 video_gop_num; - void *alpha_seektbl_ptr; - CriUint32 alpha_seektbl_size; - CriSint32 alpha_gop_num; - - void *audio_header_ptr[CRIMV_MAX_AUDIO_NUM]; - CriUint16 audio_header_size[CRIMV_MAX_AUDIO_NUM]; - - void *cuepoint_meta_ptr; - CriUint32 cuepoint_meta_size; - CriMvCuePointInfo cuepoint_info; - - CriMvInputBufferInfo ibuf_info; - CriFloat32 reload_sec_threshold; - - CriSint32 num_frames_for_prep; - - /* For Sofdec2 */ - CriHeap heap_playback; - CriMvMetaDataWorkMallocFunc cbfunc_meta_alloc; - CriMvMetaDataWorkFreeFunc cbfunc_meta_free; - void* usrobj_meta_data; - void* meta_data_work_allocated; /* ユーザアロケータで確保されたメタデータワーク */ - void* event_table_work_allocated; /* ユーザアロケータで確保されたイベントテーブル */ - CriMvStreamerInfo streamer_info; - - /* OUTER_FRAMEPOOL_WORK */ - CriMvFramepoolWorkMallocFunc cbfunc_framepool_alloc; - CriMvFramepoolWorkFreeFunc cbfunc_framepool_free; - void* usrobj_framepool; - void* framepool_work_allocated; /* ユーザアロケータで確保されたフレームプールワーク(解放必要) */ - void* framepool_work_set; /* 直接バッファ指定されたフレームプールワーク(解放不要) */ - - /* For Debug */ - volatile CriUint8 end_sequence_info; - CriUint64Adr header_ptr; - CriSint64 header_size; - CriUint64Adr body_ptr; - CriSint64 body_size; - - CriBool sync_flag; - - CriBool error_flag; - -#if defined(XPT_TGT_IOS) - CriChar8 vavfios_filepath[CRIMVPLY_VAVFIOS_MAX_FILEPATH]; -#endif - - /* For Tools */ - void *extended_mvinfo_config; - - /* ハンドル作成コンフィグ関連 */ - CriBool use_hn_config_flag; /* ハンドル作成コンフィグ指定があったかどうか */ - CriMvHandleConfig hn_config; - -} *CriMvPly, CriMvPlyObj; - -/*************************************************************************** - * Function Declaration - ***************************************************************************/ - -#ifdef __cplusplus -extern "C" { -#endif - -/* ライブラリ初期化 */ -/* - * \brief ライブラリの初期化 - * \param なし - * \return なし - * \par 説明: - * ライブラリの初期化を行います。
- * 複数回連続で初期化した場合は、最初の1回のみ初期化処理を実行します。 - */ -/* - * \ingroup MODULE_INIT - * \brief Initialize library - * - * This function initializes the CRI Movie library, including internal audio, - * streaming and video subsystems. This function must be - * called before any other function in this library will work properly. - * This function initializes only the first time it is called; if it is - * called again, it simply increments an internal counter and returns; it - * does not re-initialize, nor does it create an error condition. - * - * Therefore, it is safe to call criMvPly_Initialize() and criMvPly_Finalize() - * at the beginning and end, respectively, within each of the independent - * modules in your program. If you match these functions call for call, - * only the first criMvPly_Initialize() function and the last criMvPly_Finalize() - * functions should have any effect. - * - * \sa criMvPly_Finalize() - */ -void CRIAPI criMvPly_Initialize(void); - -/* ライブラリ終了 */ -/* - * \brief ライブラリ終了 - * \param なし - * \return なし - * \par 説明: - * ライブラリの終了処理を行います。
- * 複数回初期化をしていた場合は、同じ回数だけ終了処理を実行してください。 - */ -/* - * \ingroup MODULE_INIT - * \brief Finalize library - * - * This function deallocates any resources in use by the library. - * It should be called the same number of times that the criMvPly_Initialize() - * function is called. If the criMvPly_Initialize() function is called n - * times, on the nth time the criMvPly_Finalize() function is called, - * criMvPly_Finalize() releases any resources allocated by CRI Movie. - * - * Therefore, it is safe to call criMvPly_Initialize() and criMvPly_Finalize() - * at the beginning and end, respectively, within each of the independent - * modules in your program. If you match these functions call for call, - * only the first criMvPly_Initialize() function and the last criMvPly_Finalize() - * functions should have any effect. - * - * \sa criMvPly_Initialize() - */ -void CRIAPI criMvPly_Finalize(void); - -/* ハンドル作成 */ -/* - * \brief ハンドル作成 - * \param heap : メモリ確保に使用するHeapハンドル - * \return CriMvPlyハンドル - * \par 説明: - * CRI Movie ハンドルを作成します。
- * 必要なハンドル管理領域はHeapハンドルを使って自動的に確保します。
- * 作成直後のハンドル状態はSTOP状態です。 - */ -/* - * \ingroup MODULE_INIT - * \brief Create a handle - * \param heap A valid CriHeap handle - * \return A valid CriMvPly handle, or NULL if the handle cannot be allocated - * - * This function creates a CriMvPly handle in the CRIMVPLY_STATUS_STOP state. - * Memory for the handle is allocated from the CriHeap structure that you provide. - * Any memory allocation failure during this function results in a text error message to output, and the program hangs. - * Make sure to initialize and create your heap with criHeap_Initialize() and - * criHeap_Create() before calling this function. - * - * \sa CriMvPly, CriMvPlyStatus, criHeap_Initialize(), criHeap_Create() - */ -CriMvPly CRIAPI criMvPly_Create(CriHeap heap); - -/* コンフィグ指定のハンドル作成 */ -/* config がNULL指定の場合はコンフィグ指定無しと同様 */ -CriMvPly CRIAPI criMvPly_CreateWithConfig(CriHeap heap, CriMvHandleConfig *config); - -/* ハンドル破棄 */ -/* - * \brief ハンドル破棄 - * \param mvply : CRI Movie ハンドル - * \return なし - * \par 説明: - * CRI Movie ハンドルの破棄を行います。
- * ハンドル作成時に引数で指定したHeapハンドルを使って、ハンドル管理領域を解放します。
- * ワークバッファを確保したままの場合は、ワークバッファ確保時に指定したHeapハンドルを使ってワークバッファも解放します。
- * ハンドルの破棄は、ハンドル状態がSTOPかPLAYENDの時にしか実行できません。 - */ -/* - * \ingroup MODULE_INIT - * \brief Destroy a handle - * \param mvply A valid CriMvPly handle to be destroyed - * - * This function destroys the CriMvPly handle previously created - * with criMvPly_Create(). - * - * You can only destroy the handle if it is in either the CRIMVPLY_STATUS_STOP or the - * the CRIMVPLY_STATUS_PLAYEND states. Attempting to destroy the handle in - * any other state will produce an error message. You can check the status of - * the handle at any time with criMvPly_GetStatus(). - * - * Any work buffers allocated via criMvPly_AllocateWorkBuffer(), if they are - * still associated with the handle, are freed when criMvPly_Destroy() is called. - * - * \sa CriMvPly, CriMvPlyStatus, criMvPly_GetStatus(), criMvPly_AllocateWorkBuffer() - */ -void CRIAPI criMvPly_Destroy(CriMvPly mvply); - -/* ストリーミングパラメータの取得 */ -/* - * \brief ストリーミングパラメータの取得 - * \param mvply : CRI Movie ハンドル - * \param stmprm : ストリーミングパラメータ - * \return なし - * \par 説明: - * ヘッダ解析の結果をもとに、ムービ再生に必要なストリーミングパラメータを取得します。
- * ハンドル状態がWAIT_PREPになると取得できるようになります。
- * このパラメータをもとにcriMvPly_AllocateWorkBuffer関数を呼び出すことができます。
- * 必要ならばこのパラメータの値を変更して、例えば音ありムービで音を再生しない、といったことも可能です。
- */ -/* - * \ingroup MODULE_BUFFER - * \brief Get streaming parameters - * \param mvply A valid CriMvPly handle - * \param stmprm An empty CriMvStreamingParameters structure to be filled with data - * - * This function permits you to get detailed information about the stream and - * dynamically allocate resources just before the video and audio sequence - * begins playback. - * - * This function does nothing if the current state of the CriMvPly handle is - * CRIMVPLY_STATUS_DECHDR or CRIMVPLY_STATUS_STOP. The only useful state in - * which to call criMvPly_GetStreamingParameters() is the CRIMVPLY_WAIT_PREP - * status. When the CriMvPly handle is in the CRIMVPLY_WAIT_PREP status, - * calling this function will cause the CriMvStreamingParameters field to be - * filled with data. - * - * Some of the CriMvStreamingParameters, such as buffering time and the - * maximum number of files to read, are copied from the CriMvPly structure. - * However, maximum bitrate, video size, audio stream rate and channel - * info are calculated from the incoming stream. - * - * After calling criMvPly_GetStreamingParameters(), you can programmatically - * override any of the fields in the CriMvStreamingParameters struct yourself - * before calling criMvPly_AllocateWorkBuffer() with it. For example, you might - * need to read a stream containing both audio and video, but only output the - * video from the stream. In this case you could allocate trivial audio buffers - * for output by modifying the CriMvStreamingParameters struct accordingly after - * calling this function. - * - * \sa criMvPly_AllocateWorkBuffer(), CriMvPly, CriMvStreamingParameters - */ - void CRIAPI criMvPly_GetStreamingParameters(CriMvPly mvply, CriMvStreamingParameters *stmprm); - -/* ワークバッファの確保 */ -/* - * \brief ワークバッファの確保 - * \param mvply : CRI Movie ハンドル - * \param heap : - * \param stmprm : ストリーミングパラメータ - * \return なし - * \par 説明: - * 引数のHeapハンドルを使って、読み込みバッファやビデオ/オーディオのワークバッファを確保します。
- * この関数を呼び出し可能なのは、STOP状態かWAIT_PREP状態の時のみです。
- * 同じハンドルに対して2度呼び出すと、1度目のワークバッファを全て解放してから、改めてワークバッファを確保します。
- * criMvPly_Start関数よりも先にワークバッファを確保しておくこともできます。 - */ -/* - * \ingroup MODULE_BUFFER - * \brief Allocate internal streaming work buffers - * \param mvply A CriMvPly handle - * \param heap A CriHeap handle - * \param stmprm An initialized CriMvStreamingParameters structure - * - * This function allocates internal streaming buffers for the CriMvPly movie - * player from the CriHeap. The amount of memory required is based - * on the maximum bitrate of the stream, the requested buffering time, the - * maximum chunk size, and the height and width of the incoming video frame. - * However, a small amount of memory is allocated for the - * video and audio decoders from the CriHeap as well. - * - * The CriHeap handle passed as a parameter to this function need not - * be the same CriHeap handle you passed to the criMvPly_Create() function. - * You may prefer to use either one or two heaps. - * - * This function can be called only if the CriMvPly handle is in the - * CRIMVPLY_STATUS_STOP or the CRIMVPLY_STATUS_WAIT_PREP status. Calling - * this function any other time will produce an error message. - * - * If this function is called twice without calling criMvPly_FreeWorkBuffer(), - * it releases the previously allocated buffers before allocating them again. - * - * This function must be called sometime before criMvPly_Start(). - * - * \if ps2 - * \par PS2 only: - * The PS2 implementation of this function additionally allocates buffers for - * internal DMA tags. If these allocations fail due to lack of memory, the - * library will hang. - * \endif - * - * \sa CriMvPly, CriHeap, CriMvPlyStatus, CriMvStreamingParameters, criMvPly_FreeWorkBuffer(), - * criMvPly_Start() - */ -CriBool CRIAPI criMvPly_AllocateWorkBuffer(CriMvPly mvply, CriHeap heap, CriMvStreamingParameters *stmprm); - -/* ワークバッファの解放 */ -/* - * \brief ワークバッファの解放 - * \param mvply : CRI Movie ハンドル - * \return なし - * \par 説明: - * criMvPly_AllocateWorkBuffer関数で確保したワークバッファを全て解放します。
- * この関数を呼び出し可能なのは、STOP/WAIT_PREP/PLAYEND状態の時のみです。
- * CRI Movie Ver.0.60 では未実装です。 - */ -/* - * \ingroup MODULE_BUFFER - * \brief Release streaming work buffer - * \param mvply A valid CriMvPly handle - * - * This function releases streaming work buffers allocated from the CriHeap - * previously associated with criMvPly_AllocateWorkBuffer(). - * This function should only be called at CRIMVPLY_STATUS_STOP, - * CRIMVPLY_STATUS_WAIT_PREP or CRIMVPLY_STATUS_PLAYEND states. However, this - * function does not verify the current stream status before releasing - * all the buffers; it merely deallocates them. Expect interesting crashes - * if you call this function while playing a movie. - * - * You can verify the current CriMvPly handle status with criMvPly_GetStatus() if - * necessary. - * - */ -void CRIAPI criMvPly_FreeWorkBuffer(CriMvPly mvply); - -/* 再生するオーディオチャネルの設定 */ -/* - * \brief 再生するオーディオチャネルの設定 - * \param mvply : CRI Movie ハンドル - * \param ch : オーディオチャネル番号 - * \return なし - * \par 説明: - * CriMvStreamingParameters構造体のメンバ track_play_audioのデフォルト値を設定します。
- * criMvPly_GetStreamingParameters関数でCriMvStreamingParameters構造体を取得したときにこの値が格納されます。
- * 何も設定していない場合、buffering_timeには0が入います。 - * -1を指定するとオーディオを再生しない設定になります。 - */ -void CRIAPI criMvPly_SetAudioTrack(CriMvPly mvply, CriSint32 track); - -/* バッファリング時間(単位[sec])の設定 */ -/* - * \brief バッファリング時間(単位[sec])の設定 - * \param mvply : CRI Movie ハンドル - * \param time : バッファリング時間 - * \return なし - * \par 説明: - * CriMvStreamingParameters構造体のメンバbuffering_timeのデフォルト値を設定します。
- * criMvPly_GetStreamingParameters関数で CriMvStreamingParameters構造体を取得したときにこの値が格納されます。
- * 何も設定していない場合、buffering_timeには1.0秒が入っています。 - */ -/* - * \ingroup MODULE_BUFFER - * \brief Set default buffering time (unit[sec]) - * \param mvply A valid CriMvPly handle - * \param time Buffering time in seconds - * - * This function tells the CriMvPly handle how much time of the stream to buffer in - * memory. Buffering is necessary to cover seeks, error retries, latency and - * other various hiccups in most data sources. - * - * This value is stored in the buffering_time field of the CriMvStreamingParameters - * struct. It is set to a default of 1.0 seconds when the CriMvPly handle is created. - * This is typically safe for most DVD type file systems. - * - * \sa CriMvPly, CriMvStreamingParameters - */ -//void CRIAPI criMvPly_SetBufferingTime(CriMvPly mvply, CriFloat32 time); - -/* 同時読み込みファイル数の設定 */ -/* - * \brief 同時読み込みファイル数の設定 - * \param mvply : CRI Movie ハンドル - * \param max_stm : 同時読み込みファイル数 - * \return なし - * \par 説明: - * CriMvStreamingParameters構造体のメンバmax_simultaneous_read_filesのデフォルト値を設定します。
- * criMvPly_GetStreamingParameters関数で CriMvStreamingParameters構造体を取得したときにこの値が格納されます。
- * 何も設定していない場合、max_simultaneous_read_filesには1が入っています。 - */ -/* - * \ingroup MODULE_BUFFER - * \brief Set maximum number of simultaneous streams - * \param mvply A valid CriMvPly handle - * \param max_stm The maximum number of simultaneous streams - * - * This function sets the default value of the "max_simultaneous_read_files" field of - * the CriMvStreamingParameters struct. Currently, setting this value has no effect. - */ -//void CRIAPI criMvPly_SetMaxSimultaneousStreams(CriMvPly mvply, CriUint32 max_stm); - -/* サウンド出力バッファサンプル数の設定 */ -/* - * \brief GetWave16で要求する最大サンプル数の設定 - * \param mvply : CRI Movie ハンドル - * \param max_smpl : 最大サンプル数 - * \return なし - * \par 説明: - * CriMvAudioParameters構造体のメンバoutput_buffer_samplesのデフォルト値を設定します。
- * criMvPly_GetStreamingParameters関数で CriMvStreamingParameters構造体を取得したときにこの値が格納されます。
- * 何も設定していない場合、output_buffer_samplesには16*1024が入っています。 - */ -/* - * \ingroup MODULE_AUDIO - * \brief Set default sound output buffer samples - * \param mvply A valid CriMvPly handle - * \param smpls : sound output buffer samples - * - * This function sets the default value of the "output_buffer_samples" field in the - * CriMvAudioParameters struct. The default value is 16384, which is set when - * criMvPly_Create() is called. - * - * This function only has an effect if it is called before the - * criMvPly_AllocateWorkBuffer() function is called, since this is when the audio - * output buffer is allocated. - * - * \sa CriMvAudioParameters, criMvPly_Create(), criMvPly_AllocateWorkBuffer(), - * criMvPly_GetWave16() - */ -//void criMvPly_SetMaxSamplesOfGetWave16(CriMvPly mvply, CriUint32 max_smpl); -void CRIAPI criMvPly_SetSoundOutputBufferSamples(CriMvPly mvply, CriUint32 smpls); - -/* ハンドル状態の取得 */ -/* - * \brief ハンドル状態の取得 - * \param mvply : CRI Movie ハンドル - * \return ハンドル状態 - * \par 説明: - * ハンドル状態を取得します。 - */ -/* - * \ingroup MODULE_STATE - * \brief Get the handle status - * \param mvply A valid CriMvPly handle - * \return One of the CriMvPlyStatus enum values - * - * This function gets the current status of the CRI Movie handle. Check the - * following link for possible return values. - * - * \sa CriMvPlyStatus - */ -CriMvPlyStatus CRIAPI criMvPly_GetStatus(CriMvPly mvply); - -/* WAIT状態から次の状態への遷移通知 */ -/* - * \brief WAIT状態から次の状態への遷移通知 - * \param mvply : CRI Movie ハンドル - * \return なし - * \par 説明: - * ハンドル状態をWAIT_**** 状態から次の状態に遷移させます。状態に応じて次のように使用します。
- * ・WAIT_PREP 状態 : criMvPly_AllocateWorkBuffer関数でワークを確保しおわったら呼び出してください。
- * ・WAIT_PLAYING 状態 : ビデオフレーム、オーディオデータを取得して表示・出力の準備ができたら、 - * 出力を開始して、本関数を呼び出してください。
- * ・WAIT_PLAYEND 状態 : 最後のビデオフレームの表示、最後のオーディオデータの出力が終了したら呼び出してください。
- * ・WAIT_STOP 状態 : ビデオやオーディオの出力が停止してもいい状態になったら、呼び出してください。
- * 本関数を呼び出すと各状態は即座に次の状態に遷移します。
- * 本関数を WAIT_**** 以外の状態で呼び出しても、状態は何も変わりません。 - */ -/* - * \ingroup MODULE_STATE - * \brief Notify transition from WAIT status - * \param mvply A valid CriMvPly handle - * - * This function notifies the CriMvPly handle that your application is ready to - * go from the current WAIT state to the next state. There are exactly four states - * in which it is appropriate to call this function: - * - * - CRIMVPLY_STATUS_WAIT_PREP After your application has allocated buffers with - * criMvPly_AllocateWorkBuffer() - * - CRIMVPLY_STATUS_WAIT_PLAYING After your application has prerolled stream data (if - * necessary) - * - CRIMVPLY_STATUS_WAIT_PLAYEND After your application has displayed the last frames of audio and - * video from the stream - * - CRIMVPLY_STATUS_WAIT_STOP After your application suspends playback from the stream - * - * You can check the current status of the CriMvPly handle by calling the criMvPly_GetStatus() - * function. This function has no effect if called in states other than those listed above. - * - * \sa CriMvPly, CriMvPlyStatus - */ -void CRIAPI criMvPly_IncrementState(CriMvPly mvply); - -/* 状態の更新 */ -/* - * \brief CriMvPlyモジュールのサーバ関数 - * \param mvply : CRI Movie ハンドル - * \return なし - * \par 説明: - * 主にデマルチプレクサ内部のデータの更新を行います。
- * 本関数はアプリケーションのメインスレッド側でで毎回呼び出すようにしてください。
- */ -void CRIAPI criMvPly_Update(CriMvPly mvply); - -/* 再生開始 */ -/* - * \brief 再生開始 - * \param mvply : CRI Movie ハンドル - * \return 再生開始できた場合はCRI_TRUE, 失敗した場合はCRI_FALSE - * \par 説明: - * 再生のための処理を開始します。
- * 本関数呼出し後、ハンドル状態はDECHDRに遷移します。
- */ -/* - * \ingroup MODULE_STATE - * \brief Start of playback processing - * \param mvply A valid CriMvPly handle - * - * This function initiates playback processing. This function should be called - * after the CriMvPly handle is created and the data source has been opened, - * but before the work buffers are allocated with criMvPly_AllocateWorkBuffer(). - * This function sets the current status of the CriMvPly handle to - * CRIMVPLY_STATUS_DECHDR, which prepares it to decode the header information - * from the data source. - * - * \sa CriMvPly, CriMvPlyStatus, criMvPly_AllocateWorkBuffer() - */ -CriBool CRIAPI criMvPly_Start(CriMvPly mvply); - -/* 再生停止リクエスト(即時復帰) */ -/* - * \brief 再生停止リクエスト(即時復帰) - * \param mvply : CRI Movie ハンドル - * \return なし - * \par 説明: - * 再生停止のリクエストを発行して即時復帰します。
- * 本関数呼出し後、ハンドル状態はSTOP_PROCESSING状態に遷移します。
- * 停止のための処理が終わると、ハンドル状態がWAIT_STOPに遷移します。
- * WAIT_STOP状態になったら、criMvPly_IncrementState関数でSTOP状態に遷移させて、 - * アプリケーションの停止処理を行ってください。 - */ -/* - * \ingroup MODULE_STATE - * \brief Non-blocking request to stop playback - * \param mvply A currently playing CriMvPly handle - * - * This function records a request to terminate playback. Termination of - * playback is not synchronous to this function; this function sets the current - * state of the CriMvPly handle to CRIMVPLY_STATUS_STOP_PROCESSING. After - * movie processing is halted, the state of the handle transitions to - * CRIMWPLY_STATUS_WAIT_STOP. - * - * This function is useful for prematurely terminating a movie, e.g. "press - * X to skip this movie". - * - * Video frames will keep being delivered until you detect a CRIMVPLY_STATUS_WAIT_STOP - * state in the CriMvPly handle, and then call criMvPly_IncrementState to transition - * back to the CRIMVPLY_STATUS_STOP state. - * - * \note Pausing is not accomplished through this function. The system clock, including - * whether or not to pause or advance frames, is controlled entirely through user - * code. So the effect of "pausing" a CriMvPly handle can be accomplished by simply - * not updating your system clock as long as your pause is in effect. - * - * \sa CriMvPly, CriMvPlyStatus - */ -void CRIAPI criMvPly_Stop(CriMvPly mvply); - -/* サーバ処理(ハンドル指定) */ -/* - * \brief サーバ処理(ハンドル指定) - * \param mvply : CRI Movie ハンドル - * \return なし - * \par 説明: - * CRI Movie ハンドルを指定してサーバ処理を実行します。
- * 各WAIT_**** 状態への状態遷移はサーバ関数内で実行されます。 - */ -/* - * \ingroup MODULE_VIDEO - * \brief Execute heartbeat functions for a handle - * \param mvply A valid CriMvPly handle - * - * This function executes heartbeat functions for the specified CriMvPly handle only, - * including handoff and parsing of input buffers and audio decoding. Additionally, - * it checks for buffer situations in which the CriMvPly handle should transition to - * one of the four WAIT states of CriMvPlyStatus, and it makes these transitions if - * necessary. - * - * However, video decoding does NOT occur in criMvPly_Execute(). - * - * Expect that criMvPly_Execute() will take a relatively low CPU load. Typically, - * this function should be called on every vertical blank. However, it may be called - * more frequently in a CriMvPly wait state, in conjunction with criMvPly_IncrementState(), - * in order to "force" a transition into the next state without waiting for - * another vertical blank. This type of transition is not generically - * necessary. - * - * \sa CriMvPly, CriMvPlyStatus, criMvPly_ExecuteAll() - */ -void CRIAPI criMvPly_Execute(CriMvPly mvply); - -/* ファイル読み込みバッファの空きチャンク取得 */ -/* - * \brief ファイル読み込みバッファの空きチャンク取得 - * \param mvply : CRI Movie ハンドル - * \param ck : チャンク - * \return なし - * \par 説明: - * ファイル読み込みバッファの空き領域を取得します。
- * 取得した空き領域(チャンクと呼びます)は、データ書き込みを通知するさいに - * そのまま使用しますので、アプリケーションで記憶してください。
- * 1度に取得できるチャンクは1つのみです。
- * チャンクが取得できたか否かは、チャンクのサイズで判定できます。
- * データの書き込みが終わったら、criMvPly_PutInputChunk関数で書き込みサイズを通知してください。
- */ -/* - * \ingroup MODULE_SUPPLY - * \brief Get a free chunk from file reading buffer - * \param mvply A valid CriMvPly handle - * \param ck A CriChunk structure to be filled with data by this function - * - * This function selects an empty internal buffer for your data source to read its data into. - * An area of this type is referred to as a "chunk." - * After calling this function, the ck->data and ck->size - * fields will provide a valid pointer and size, respectively, that your data - * source should copy its data into. - * If no buffers can internally be allocated, this function will return 0 as the - * ck->size field. If this occurs, your program should choke input until a free - * buffer can be allocated. - * Typical data sources are native file reading, sequential memory access, or - * playback from a network source. - * The ck->size field is dynamically calculated when criMvPly_AllocateWorkBuffer() - * is called; it is calculated based on expected data rate and video resolutions - * embedded in the stream file. - * - * After you receive a valid chunk from criMvPly_GetInputChunk(), - * you can fill the provided chunk up to the ck->size limit. After you - * fill the chunk with valid data, call the criMvPly_PutInputChunk() function - * to queue the data for processing. The functions criMvPly_GetInputChunk() and - * criMvPly_PutInputChunk() should be called in equal pairs; calling these - * functions out of order will produce odd results. No dynamic chunk reordering - * is permitted; serial calls with out-of-order chunks will be - * flagged at run-time as an error. - * - * This function will only return a valid chunk if the CriMvPly handle is in - * one of two playback states: CRIMVPLY_STATUS_PLAY or CRIMVPLY_STATUS_DECHDR. - * You can verify the current playback state with criMvPly_GetStatus(). - * - * \sa criMvPly_GetStatus(), criMvPly_PutInputChunk(), criMvPly_AllocateWorkBuffer(), - * CriChunk, CriMvPlyStatus - */ -void CRIAPI criMvPly_GetInputChunk(CriMvPly mvply, CriChunk *ck); - -/* ファイル読み込みバッファへのデータ書き込み通知 */ -/* - * \brief ファイル読み込みバッファへのデータ書き込み通知 - * \param mvply : CRI Movie ハンドル - * \param ck : - * \param inputsize : - * \return なし - * \par 説明: - * criMvPly_GetInputChunk関数で取得した空き領域(チャンクと呼びます)に - * データを書き込み終わったら、引数inputsizeにデータサイズを入れて本関数を呼び出してください。
- * その際、チャンクは criMvPly_GetInputChunk関数で取得したものと同じチャンクを必ず指定してください。 - */ -/* - * \ingroup MODULE_SUPPLY - * \brief Put a data chunk into file read buffer - * \param mvply A valid CriMvPly handle - * \param ck A CriChunk structure containing source data - * \param inputsize The number of bytes actually supplied - * - * This function informs the CriMvPly handle that the CriChunk structure - * now contains valid data from the data source. Typically, you would call - * this function after your asynchronous file read reports that the buffer is - * full of data. - * - * The inputsize field should contain the number of bytes actually provided. - * This value can be less than or equal to ck->size. In an end-of-file condition, - * be sure to supply the actual number of bytes remaining in the file, and not - * merely the size of the input buffer, to criMvPly_PutInputChunk(). - * Do not modify the contents of the CriChunk after calling this function; - * instead, call criMvPly_GetInputChunk() to get a new chunk for further input. - * - * This function invalidates the CriChunk provided if the function is called - * while the CriMvPly handle is in the CRIMVPLY_STATUS_STOP, the - * CRIMVPLY_STATUS_WAIT_PREP, or the CRIMVPLY_STATUS_STOP_PROCESSING state. - * You can verify the current playback state with criMvPly_GetStatus(). - * - * After you receive a valid chunk from criMvPly_GetInputChunk(), - * you can fill the provided chunk up to the ck->size limit. After you call - * fill the chunk with valid data, call the criMvPly_PutInputChunk() function - * to queue the data for processing. The function criMvPly_GetInputChunk() and - * criMvPly_PutInputChunk() should be called in equal pairs; calling these - * functions out of order will produce odd results. No dynamic chunk reordering - * is permitted; serial calls with out-of-order chunks will be - * flagged at run-time as an error. - * - * After putting the final chunk of data in the stream, call - * criMvPly_TerminateSupply() to indicate that an end-of-file condition exists. - * - * \sa criMvPly_GetStatus(), criMvPly_GetInputChunk(), criMvPly_AllocateWorkBuffer(), - * criMvPly_TerminateSupply(), CriChunk, CriMvPlyStatus - */ -void CRIAPI criMvPly_PutInputChunk(CriMvPly mvply, CriChunk *ck, CriUint32 inputsize); - -/* ファイル読み込み終了の通知 */ -/* - * \brief ファイル読み込み終了の通知 - * \param mvply : CRI Movie ハンドル - * \return なし - * \par 説明: - * 再生したい全てのデータを読み込んで、 criMvPly_PutInputChunk関数で通知し終わったら、 - * 本関数でファイル読み込み終了の通知を必ず行ってください。
- * 終了を通知された時点で読み込みバッファに書き込まれた全てのデータをデコードし終わると、 - * ハンドル状態はWAIT_PLAYENDに遷移します。
- * 本関数を呼び出さない限り、WAIT_PLAYEND状態になることはありません。 - */ -/* - * \ingroup MODULE_SUPPLY - * \brief Notify end of reading data - * \param mvply A valid CriMvPly structure - * - * After you put all the source data into the CriMvPly handle with - * criMvPly_PutInputChunk(), indicate the end of the movie file by calling - * criMvPly_TerminateSupply(). After calling this function, the CriMvPly - * handle's status is changed by the library to CRIMVPLY_STATUS_WAIT_PLAYEND - * and the library completes processing of whatever frames it has internally - * buffered. - * - * If you do not call this function, the CriMvPly handle will never transition - * to the CRIMVPLY_STATUS_WAIT_PLAYEND state, making teardown impossible. - * - * \sa criMvPly_PutInputChunk(), CriMvPly, CriMvPlyStatus - */ -void CRIAPI criMvPly_TerminateSupply(CriMvPly mvply); - -#if 0//defined(XPT_TGT_EE) -/* RGB32フォーマットのビデオフレームの取得 */ -/* - * \if ps2 - * \brief RGB32フォーマットのビデオフレームの取得 - * \param mvply : CRI Movie ハンドル - * \param imagebuf : ビデオフレームバッファ - * \param bufsize : バッファサイズ - * \param frameinfo : フレーム情報 - * \return 取得できた場合はTRUE, できなかった場合はFALSE - * \par 説明: - * 引数で指定したバッファに、PS2のマクロブロック並びRGBA32フォーマットでフレームを取得します。
- * 引数CriMvFrameInfo構造体には、取得したフレームについての情報が格納されます。
- * フレームが取得できるのは、ハンドル状態がWAIT_PLAYING/PLAYINGの時のみです。
- * それ以外の状態で呼び出す、または入力データ不足の場合には、本関数はフレームの取得に失敗し、即座に復帰します。
- * フレームが取得できなかった場合は、関数値でFALSEが返ります。
- * 実際のビデオデコード処理も本関数内で動くため、フレーム取得できる場合には、処理の重い関数となります。 - * \endif - */ -/* - * \if ps2 - * \ingroup MODULE_VIDEO - * \brief Get a video frame in PS2 macroblock RGB32 format - * \param mvply A valid CriMvPly handle - * \param imagebuf a pointer to the video buffer in memory to receive the frame - * \param bufsize video buffer size in bytes - * \param frameinfo Information about the decoded frame - * \return returns true if a frame has been copied into the buffer, false otherwise - * - * This function finds and decodes the current frame, if any, to the imagebuf buffer. - * The format of this buffer is specific to the PS2. This function will only return - * a valid frame if the CriMvPly handle is in the CRIMVPLY_STATUS_WAIT_PLAYING or the - * CRIMVPLY_STATUS_PLAYING state. - * - * This function is an EE-intensive activity, and the amount of time required - * is variable, depending on the complexity and size of the video frame being decoded. - * Therefore the preferred method of calling this function is in a low priority thread, - * separate from your I/O, buffer management, and criMvPly_Execute() routines. - * - * If this function returns true, the preferred display time of the video frame is calculated - * as: - * - * \code - * frameinfo.time / frameinfo.tunit - * \endcode - * - * Humans notice audio stuttering much more readily than a dropped video frame during - * a video decode process. If the frame reported by criMvPly_GetFrameRGBA32_PS2() - * arrives after your system clock says the frame should be displayed, you should - * simply drop the frame without bothering to DMA it to video memory. - * - * Here is an example showing how to drop frames in this case: - * - * \dontinclude crimvt01_simple_playback_ps2.c - * \skip Get video frame - * \until *tutor_update_video_frame_on_display_time* - * - * It is not preferred, but it is possible, to call this function in a single-threaded - * playback model. In this case, it is important to allocate more heap space - * and service the CriMvPly handle with criMvPly_Execute() or criMvPly_ExecuteAll() - * frequently, as well as criMvPly_GetWave16() frequently. This helps to cover - * for the case where other I/O needs to occur when a frame is currently being decoded by - * criMvPly_GetFrameRGBA32_PS2(). - * - * \image html crimvply_getframergba32_ps2.png The DMA reordering step on PS2 - * - * In order to get acceptable performance on the PS2, a macroblock reordering step - * must take place during the DMA transfer from EE RAM to video RAM. - * \endif - */ -CriBool CRIAPI criMvPly_GetFrameRGBA32_PS2(CriMvPly mvply, CriUint8 *imagebuf, CriUint32 bufsize, CriMvFrameInfo *frameinfo); - -CriBool CRIAPI criMvPly_DecodeFrameRGBA32_PS2(CriMvPly mvply, CriUint8 *imagebuf, CriUint32 bufsize, CriMvFrameInfo *frameinfo); -#endif - -#if defined(XPT_TGT_PC) || defined(XPT_TGT_XBOX360) || defined(XPT_TGT_WII) || defined(XPT_TGT_SH7269) || defined(XPT_TGT_TRGP6K) -/* - * \if pc - * \ingroup MODULE_VIDEO - * \brief Get a video frame in YUV422 format - * \param mvply A valid CriMvPly handle - * \param imagebuf A pointer to the video buffer in memory to receive the frame - * \param pitch Number of bytes in one row of the video buffer - * \param bufsize Video buffer size in bytes - * \param frameinfo Information about the decoded frame - * \return returns true if a frame has been copied into the buffer, false otherwise - * - * This function finds and decodes the current frame, if any, to the imagebuf buffer. - * This function will only return a valid frame if the CriMvPly handle is in the - * CRIMVPLY_STATUS_WAIT_PLAYING or the CRIMVPLY_STATUS_PLAYING state. - * - * This function is a CPU-intensive activity, and the amount of time required - * is variable, depending on the complexity and size of the video frame being decoded. - * Therefore the preferred method of calling this function is in a low priority thread, - * separate from your I/O, buffer management, and criMvPly_Execute() routines. - * - * If this function returns true, the preferred display time of the video frame is calculated - * as: - * - * \code - * frameinfo.time / frameinfo.tunit - * \endcode - * - * It is not preferred, but it is possible, to call this function in a single-threaded - * playback model. In this case, it is important to allocate more heap space - * and service the CriMvPly handle with criMvPly_Execute() or criMvPly_ExecuteAll() - * frequently, as well as criMvPly_GetWave16() frequently. - * - * \endif - */ -CriBool CRIAPI criMvPly_GetFrameYUV422(CriMvPly mvply, CriUint8 *imagebuf, CriUint32 pitch, CriUint32 bufsize, CriMvFrameInfo *frameinfo); -#endif - -/* 16bit WAVEフォーマットのオーディオデータ取得 */ -/* - * \brief 16bit WAVEフォーマットのオーディオデータ取得 - * \param mvply : CRI Movie ハンドル - * \param nch : チャネル数 - * \param waveptr : オーディオデータバッファ - * \param wavesmpl : 要求サンプル数(<バッファサイズ) - * \param waveinfo : 16bit Waveform 情報 - * \return 取得できたサンプル数 - * \par 説明: - * 16bitのWAVEフォーマットでオーディオデータを取得します。引数waveptrには、nch分のバッファポインタを格納した - * 配列を指定してください。
- * 引数CriMvWaveInfo構造体には、取得したオーディオデータについての情報が格納されます。
- * 入力データ不足などで要求されたサンプル数のデコードができない場合もあります。
- * (未実装機能) 本関数の処理が重くなってでも、なるべく要求された多くのオーディオデータを取得するモード。 - */ -/* - * \ingroup MODULE_AUDIO - * \brief Get 16bit wave audio data - * \param mvply A currently playing CriMvPly handle - * \param nch The number of audio channels to get in this call - * \param waveptr An array of audio data buffers to copy audio data into - * \param wavesmpl The number of requested wave data samples (must be less than buffer size) - * \param waveinfo A structure filled by this function with info about this wave - * \return The number of wave data samples actually copied into the buffer - * - * This function copies currently decoding audio data into your output buffer - * for you to send to the audio output. The output format is a sixteen-bit PCM - * format. The data provided is "current", e.g. you should try to minimize latency. - * while delivering the audio data to the output device. - * - * This function will return an empty audio buffer if the input to the CriMvPly - * handle is starving for data, or if criMvPly_Execute() or criMvPly_ExecuteAll() - * has not been called recently. - * - * Note that this function actually copies data. However, the expected bandwidth - * for moving audio data in memory is minimal -- about 176400 bytes per second for - * a stereo stream, which is typically a fraction of 1% of the bandwidth available - * on modern game systems. - * - * For debugging tips on stuttering, see \ref crim_section_stuttering . - */ -CriUint32 CRIAPI criMvPly_GetWave16(CriMvPly mvply, CriUint32 nch, CriSint16 *waveptr[], - CriUint32 wavesmpl, CriMvWaveInfo *waveinfo); -CriUint32 CRIAPI criMvPly_GetWave32(CriMvPly mvply, CriUint32 nch, CriFloat32 *waveptr[], - CriUint32 wavesmpl, CriMvWaveInfo *waveinfo); - - -#if defined(XPT_TGT_EE) -/* スクラッチパッドRAM使用設定 */ -/* スクラッチパッドRAMの使用設定(ハンドル作成前に呼び出すこと) */ -/* - * \brief スクラッチパッドRAM使用設定 - * \param sw : - * \return なし - * \par 説明: - * スクラッチパッドRAMの使用設定を行います。
- * デフォルトはOFFです。 - */ -/* - * \if ps2 - * \ingroup MODULE_INIT - * \brief Enable or disable PS2 scratch pad (SPRAM) usage - * \param sw : ON to enable scratch pad use, OFF to disable - * - * This function determines whether the video decode step uses the PS2 - * SPRAM memory area for its work. The performance of this library is - * increased by around 30% when using SPRAM; however, this use might - * conflict with graphics engines that depend on exclusive access to SPRAM. - * However, on the PS2, the video decode step occurs synchronously to the - * criMvPly_GetFrameRGBA32_PS2() function, so you can take appropriate external - * locking measures to intelligently synchronize SPRAM utilization. - * The value set by criMvPly_SetUseScratchPadRAM_PS2() is internally checked - * exactly once, during the criMvPly_Create() step; calling this function - * after criMvPly_Create() has no effect. The default setting for this - * function is OFF. - * \endif - */ -void CRIAPI criMvPly_SetUseScratchPadRAM_PS2(CriBool sw); -#endif - - -/* メモリからの再生開始 */ -/* - * \brief メモリからの再生開始 - * \param mvply : CRI Movie ハンドル - * \param memptr : メモリ上のムービデータの先頭アドレス - * \param memsize : メモリ上のムービデータのサイズ - * \return なし - * \par 説明: - * メモリからのムービ再生を開始します。
- * 本関数の呼び出し前に、あらかじめムービデータの全てをメモリ上に読み込んでおいてください。 - */ -/* - * \ingroup MODULE_STATE - * \brief Start playback from movie file on memory - * \param mvply A currently playing CriMvPly handle - * \param memptr A address of movie file - * \param memsize The size of movie file - * - * Start playback from memory.
- * Please read movie file to memory before playback. - */ -void CRIAPI criMvPly_StartMemory(CriMvPly mvply, CriUint8* memptr, CriUint32 memsize); - - -/* - * YUV個別バッファへのフレーム取得 - */ -/* - * \if xbox360 - * \ingroup MODULE_VIDEO - * \brief Get a video frame to Y,U,V independently texture buffers - * \param mvply A valid CriMvPly handle - * \param yuvbuffers Information about Y,U,V independently texture buffers - * \param frameinfo Information about the decoded frame - * \return returns true if a frame has been copied into the buffer, false otherwise - * - * This function finds and decodes the current frame, if any, to the Y,U,V texture buffers. - * This function will only return a valid frame if the CriMvPly handle is in the - * CRIMVPLY_STATUS_WAIT_PLAYING or the CRIMVPLY_STATUS_PLAYING state. - * \endif - */ -CriBool CRIAPI criMvPly_GetFrameYUVBuffers(CriMvPly mvply, CriMvYuvBuffers *yuvbuffers, CriMvFrameInfo *frameinfo); - - -/* - * ビデオのデコード - */ -/* - * \ingroup MODULE_VIDEO - * \param mvply The movie player handle - * \return returns the number of decoded frames - * - */ -CriUint32 CRIAPI criMvPly_DecodeVideo(CriMvPly mvply); - -/* - * ヘッダのデコード - */ -/* - * - * \ingroup MODULE_VIDEO - * \param mvply The movie player handle - * - */ -void CRIAPI criMvPly_DecodeHeader(CriMvPly mvply); - -/* - * デコードスキップ指示 - * \par 説明: - * この関数を実行した回数だけ、その後のデコード時に自動的に1枚Bピクチャをスキップする。
- * スキップ指示を出した次のフレームからは、実際のスキップが実行されていなくても - * 表示時刻はスキップしたものとして補正される。 - */ -/* - * \ingroup MODULE_VIDEO - * \param mvply The movie player handle - * \return returns the number of decoded frames - * - * After calling SkipFrame function, Decoding function skip B-picture. - * To avoid that application judge continuous wrong skip, After calling - * SkipFrame function, next frame time will be adjusted. - */ -void CRIAPI criMvPly_SkipFrame(CriMvPly mvply); - - -#if 0 -/* - * YUVA8フォーマットのフレーム取得 - */ -/* - * \if ps3 - * \ingroup MODULE_VIDEO - * \brief Get a video frame in YUVA8 format. - * \param mvply A valid CriMvPly handle - * \param imagebuf A pointer to the video buffer in memory to receive the frame - * \param pitch Number of bytes in one row of the video buffer - * \param bufsize Video buffer size in bytes - * \param frameinfo Information about the decoded frame - * \return returns true if a frame has been copied into the buffer, false otherwise - * - * This function finds and decodes the current frame, if any, to the imagebuf buffer. - * This function will only return a valid frame if the CriMvPly handle is in the - * CRIMVPLY_STATUS_WAIT_PLAYING or the CRIMVPLY_STATUS_PLAYING state. - * \endif - */ -CriBool CRIAPI criMvPly_GetFrameYUVA8_PS3(CriMvPly mvply, CriUint8 *imagebuf, CriUint32 pitch, CriUint32 bufsize, CriMvFrameInfo *frameinfo); -#endif - -/* - * ARGB8888フォーマットでフレーム取得 - */ -/* - * \if ps3 - * \ingroup MODULE_VIDEO - * \brief Get a video frame in ARGB8888 format. - * \param mvply A valid CriMvPly handle - * \param imagebuf A pointer to the video buffer in memory to receive the frame - * \param pitch Number of bytes in one row of the video buffer - * \param bufsize Video buffer size in bytes - * \param frameinfo Information about the decoded frame - * \return returns true if a frame has been copied into the buffer, false otherwise - * - * This function finds and decodes the current frame, if any, to the imagebuf buffer. - * This function will only return a valid frame if the CriMvPly handle is in the - * CRIMVPLY_STATUS_WAIT_PLAYING or the CRIMVPLY_STATUS_PLAYING state. - * \endif - */ -CriBool CRIAPI criMvPly_GetFrameARGB8888(CriMvPly mvply, CriUint8 *imagebuf, CriUint32 pitch, CriUint32 bufsize, CriMvFrameInfo *frameinfo); -void CRIAPI criMvPly_InitializeFrameARGB8888(void); - - -#if defined(XPT_TGT_IPHONE) || defined(XPT_TGT_WINMO) || defined(XPT_TGT_ANDROID) || defined(XPT_TGT_CQSH2A) || defined(XPT_TGT_ACRODEA) || defined(XPT_TGT_NACL) || defined(XPT_TGT_SH7269) || defined(XPT_TGT_TRGP6K) -/* - * RGB565フォーマットでフレーム取得 - */ -/* - * \ingroup MODULE_VIDEO - * \brief Get a video frame in RGB565 format - */ -CriBool CRIAPI criMvPly_GetFrameRGB565(CriMvPly mvply, CriUint8 *imagebuf, CriUint32 pitch, CriUint32 bufsize, CriMvFrameInfo *frameinfo); -void CRIAPI criMvPly_InitializeFrameRGB565(void); -#endif - -/* - * 次のフレームの情報だけ取得する - */ -/* - * \ingroup MODULE_VIDEO - * \brief Get a information of next video frame (without actual video frame). - */ -CriUint8* CRIAPI criMvPly_GetNextFrameInfo(CriMvPly mvply, CriMvFrameInfo *frameinfo); - -/* - * 次のフレームを捨てる - */ -CriBool CRIAPI criMvPly_DiscardNextFrame(CriMvPly mvply, CriMvFrameInfo *frameinfo); - -/* - * 再生準備完了状態(PREPからWAIT_PLAYING)になるまでに貯金するフレーム数の指定 - * この関数を呼び出さなければ、貯金フレーム数 = フレームプール数 - */ -void CRIAPI criMvPly_SetNumberOfFramesForPrep(CriMvPly mvply, CriSint32 nframes); - -/* - * For Debug use. - */ -void CRIAPI criMvPly_SetSeekPosition(CriMvPly mvply, CriSint32 seek_frame_id, CriSint32 video_gop_top_id); -void CRIAPI criMvPly_SetSeekAlphaPosition(CriMvPly mvply, CriSint32 alpha_gop_top_id); -void CRIAPI criMvPly_CalcSeekPosition(CriMvPly mvply, void *seektbl_ptr, CriUint32 seektbl_size, Sint32 frame_id, Uint64 *offset, Sint32 *gop_top_id); - -/* for specific use */ -/* ボディアドレスの設定 */ -void CRIAPI criMvPly_SetBodyData(CriMvPly mvply, const CriUint64Adr body_ptr, CriSint64 body_size); - -/* 入力SJおよびバッファサイズの取得(バッファサイズ、リロードサイズはNULL指定で省略) */ -CriSj CRIAPI criMvPly_GetInputSj(CriMvPly mvply, CriUint32 *buffer_size, CriUint32 *reload_threshold); - -/* 名前&タイプ指定によるイベントポイント情報の取得 */ -//Bool criMvPly_SearchEventPointByName(CriMvPly mvply, Char8 *cue_name, Sint32 type, CriMvEventPoint *eventinfo); -/* イベントポイント情報からフレームIDへの変換 */ -//Sint32 criMvPly_CalcFrameIdFromCuePoint(CriMvPly mvply, CriMvEventPoint *eventinfo); - -CriBool CRIAPI criMvPly_AttachSubAudio(CriMvPly mvply, CriHeap heap, CriUint32 track); -CriUint32 CRIAPI criMvPly_GetSubAudioWave16(CriMvPly mvply, CriUint32 nch, CriSint16 *waveptr[], CriUint32 wavesmpl, CriMvWaveInfo *waveinfo); -CriUint32 CRIAPI criMvPly_GetSubAudioWave32(CriMvPly mvply, CriUint32 nch, CriFloat32 *waveptr[], CriUint32 wavesmpl, CriMvWaveInfo *waveinfo); -void CRIAPI criMvPly_DetachSubAudio(CriMvPly mvply); - -void CRIAPI criMvPly_GetSubtitle(CriMvPly mvply, CriUint8 *bufptr, CriUint32 bufsize, CriMvSubtitleInfo *info); -void CRIAPI criMvPly_GetNextSubtitleInfo(CriMvPly mvply, CriMvSubtitleInfo *info); - -/* 入力バッファのデータ量を見る[byte] */ -CriUint32 CRIAPI criMvPly_PeekInputBufferData(CriMvPly mvply); -/* メモリ上のムービを入力SJに追加する */ -void CRIAPI criMvPly_AddInputMemory(CriMvPly mvply, CriUint8* memptr, CriUint32 memsize); - - -/* 取得できるオーディオデータのサンプル数を調べる */ -CriUint32 CRIAPI criMvPly_GetDataSizeMainAudio(CriMvPly mvply, CriUint32 nch); -/* 取得できるオーディオデータのサンプル数を調べる */ -CriUint32 CRIAPI criMvPly_GetDataSizeSubAudio(CriMvPly mvply, CriUint32 nch); - -/* メインのオーディオの再生が終了しているかどうかを調べる */ -CriBool CRIAPI criMvPly_IsEndMainAudioPlayback(CriMvPly mvply); -/* サブのオーディオの再生が終了しているかどうかを調べる */ -CriBool CRIAPI criMvPly_IsEndSubAudioPlayback(CriMvPly mvply); - -/* メインオーディオが活動中かどうかを調べる (デコード中かつ出力バッファがある状態) */ -CriBool CRIAPI criMvPly_IsActiveMainAudioPlayback(CriMvPly mvply); - -/* ワーク確保前に設定変更すること */ -void CRIAPI criMvPly_SetPcmFormat(CriMvPly mvply, CriMvPcmFormat pcmfmt); - -#if defined(XPT_TGT_PC) -/* [PC] マルチプロセッサの指定 */ -//void CRIAPI criMvPly_SetProcessorParameters_PC(CriMvPly mvply, Sint32 thread_num, Uint32 *affinity_masks, Sint32 *priorities); -#endif - -#if defined(XPT_TGT_XBOX360) -/* [Xbox360] マルチプロセッサの指定 */ -void CRIAPI criMvPly_SetProcessorParameters_XBOX360(CriMvPly mvply, Sint32 thread_num, CriUint32 processor_mask, CriSint32 *priorities); -#endif - -#if defined(XPT_TGT_PS3PPU) -/* [PS3] SPURSの指定 */ -void CRIAPI criMvPly_SetupSpursParameters_PS3(const CriMvProcessorParameters_PS3 *processor_param); - /* [PS3] SPUスレッドによるマルチプロセッサの指定 */ -void CRIAPI criMvPly_SetupSpuThreadParameters_PS3(const CriMvSpuThreadParameters_PS3 *spu_thread_param); -void CRIAPI criMvPly_SetGraphicEnv(CriMvGraphicEnv env); -CriMvGraphicEnv CRIAPI criMvPly_GetGraphicEnv(void); -#endif - -/* フレームプール情報の取得 */ -void CRIAPI criMvPly_GetFramePoolInfo(CriMvPly mvply, CriSint32 *num_input, CriUint32* num_data, CriUint32* num_ref, CriUint32* num_hold, CriUint32* num_free); - -/* 再生中でも字幕チャネルを切り替える */ -void CRIAPI criMvPly_SetSubtitleChannel(CriMvPly mvply, CriSint32 chno); - -/* ポインタだけ取得してフレームプール内のバッファをロックする */ -CriBool CRIAPI criMvPly_LockFrameBuffer(CriMvPly mvply, CriMvYuvBuffers *yuvbuffers, CriMvFrameInfo *frameinfo); -/* ロックしていたフレームプールを解放する */ -CriBool CRIAPI criMvPly_UnlockFrameBuffer(CriMvPly mvply, CriMvFrameInfo *frameinfo); - -/* - * For Sofdec2 - */ -CriMvPly CRIAPI criMvPly_CreateWithWork(void *work, CriSint32 size, CriMvHandleConfig *config); -CriSint32 CRIAPI criMvPly_CalcHandleWorkSize(CriMvHandleConfig *config); -CriSint32 CRIAPI criMvPly_CalcPlaybackWorkSize(CriMvPly mvply, CriMvStreamingParameters *stmprm); -CriBool CRIAPI criMvPly_AllocateWorkBufferWithWork(CriMvPly mvply, void *work ,Sint32 work_size, CriMvStreamingParameters *stmprm); -void CRIAPI criMvPly_SetMetaDataWorkAllocator(CriMvPly mvply, CriMvMetaDataWorkMallocFunc allocfunc, CriMvMetaDataWorkFreeFunc freefunc, void *usrobj, CriMvMetaFlag meta_flag); -CriSint32 criMvPly_CalcSubAudioWorkSize(CriMvPly mvply, const CriMvAudioParameters *aprm); -CriBool criMvPly_CopyFrameYUVBuffers(CriMvPly mvply, CriMvYuvBuffers *yuvbuffers, - const CriMvFrameInfo *frameinfo,const CriMvAlphaFrameInfo *alpha_frameinfo); -CriBool criMvPly_CopyFrameARGB8888Buffer(CriMvPly mvply, CriUint8 *dst_buf, CriUint32 dst_pitch, CriUint32 dst_bufsize, - const CriMvYuvBuffers *src_bufs, const CriMvFrameInfo *src_vinf, const CriMvAlphaFrameInfo *src_ainf); -#if defined(XPT_TGT_IPHONE) || defined(XPT_TGT_WINMO) || defined(XPT_TGT_ANDROID) || defined(XPT_TGT_CQSH2A) || defined(XPT_TGT_ACRODEA) || defined(XPT_TGT_NACL) || defined(XPT_TGT_SH7269) || defined(XPT_TGT_TRGP6K) || defined(XPT_TGT_TRGP6K) -CriBool criMvPly_CopyFrameRGB565Buffer(CriMvPly mvply, CriUint8 *dst_buf, CriUint32 dst_pitch, CriUint32 dst_bufsize, - const CriMvYuvBuffers *src_bufs, const CriMvFrameInfo *src_vinf, const CriMvAlphaFrameInfo *src_ainf); -#endif -CriBool criMvPly_LockAlphaFrameBuffer(CriMvPly mvply, CriMvYuvBuffers *yuvbuffers, CriMvAlphaFrameInfo *alpha_frameinfo); -CriBool criMvPly_UnlockAlphaFrameBuffer(CriMvPly mvply, CriMvAlphaFrameInfo *alpha_frameinfo); -CriSint32 criMvPly_GetNumPictureData(CriMvPly mvply); -const CriMvPlyHeaderInfo* criMvPly_GetCurrentStreamInfo(CriMvPly mvply); -/* for debug */ -CriBool CRIAPI criMvPly_GetAlphaFrame(CriMvPly mvply, CriUint8 *imagebuf, CriUint32 pitch, CriMvAlphaFrameInfo *alpha_frameinfo); - -/* OUTER_FRAMEPOOL_WORK */ -/* フレームプール用ワーク計算。ハンドルはNULL指定OK。 */ -CriSint32 criMvPly_CalcFramepoolWorkSize(CriMvPly mvply, const CriMvStreamingParameters *stmprm); -/* フレームプール用ワーク設定 */ -void criMvPly_SetFramepoolWork(CriMvPly mvply, void *work, CriSint32 work_size); -/* フレームプール用ワークアロケータ設定 */ -void criMvPly_SetFramepoolWorkAllocator(CriMvPly mvply, CriMvFramepoolWorkMallocFunc allocfunc, CriMvFramepoolWorkFreeFunc freefunc, void *usrobj); - -/* シークブロック情報の取得 */ -/* <入力> - * - seektbl_ptr : UTFアドレス - * - seektbl_size : UTFサイズ - * - num_seekblock : 出力配列の要素数 - * <出力> - * - blockinfo : シークブロック情報配列へのポインタ(num_seekblock分の領域を確保して渡すこと) - */ -void criMvPly_GetSeekBlockInfo(CriMvPly mvply, void *seektbl_ptr, CriUint32 seektbl_size, CriSint32 num_seekblock, CriMvSeekBlockInfo *blockinfo); - -/* フレームレートの強制指定 */ -void criMvPly_SetVideoFramerate(CriMvPly mvply, CriUint32 framerate_n, CriUint32 framerate_d); - -/* 同期有無の設定 */ -void criMvPly_SetSyncFlag(CriMvPly mvply, CriBool sync_flag); - -/* 再生可能かの問い合わせ */ -CriBool criMvPly_IsPlayable(CriMvPly mvply, const CriMvStreamingParameters *stmprm); - - - -#ifdef __cplusplus -} -#endif - -#endif /* CRI_MOVIE_CORE_H_INCLUDED */ diff --git a/3rdParty/cri/pc/include/cri_movie_pc.h b/3rdParty/cri/pc/include/cri_movie_pc.h deleted file mode 100644 index 4b2443d0..00000000 --- a/3rdParty/cri/pc/include/cri_movie_pc.h +++ /dev/null @@ -1,96 +0,0 @@ -/**************************************************************************** - * - * CRI Middleware SDK - * - * Copyright (c) 2013 CRI Middleware Co., Ltd. - * - * Library : CRI Movie - * Module : Library User's Header - * File : cri_movie_pc.h - * Date : 2013-11-26 - * - ****************************************************************************/ -/*! - * \file cri_movie_pc.h - */ -#ifndef CRI_MOVIE_PC_H_INCLUDED /* Re-definition prevention */ -#define CRI_MOVIE_PC_H_INCLUDED - -/*************************************************************************** - * Include file - ***************************************************************************/ -#include - -#include -#include - -/*************************************************************************** - * Variable Declaration - ***************************************************************************/ -namespace CriMv { - extern CriError ErrorContainer; -} - -/*************************************************************************** - * Prototype Functions - ***************************************************************************/ -namespace CriMv { - /*EN - * \ingroup MODULE_OPTION - * \brief Set processor parameters for decoding on PC (Library Global) - * - * \param num_threads Number of additional threads for load distribution in decoding (Maximum 7 threads) - * \param affinity_masks Pointer to an array of thread affinity masks for each thread specified with num_threads. - * \param priorities Pointer to an array of thread priority for each thread specified with num_threads. - * \param err Optional error code - * - * This function sets the processor parameters for decoding as default setting of library global. - * Use it when you want to change processors or thread priority for decoding load distribution. - * - * If this function is called, it must be called before library initialization. - * - * On initialization, CRI Movie prepares 7 worker threads for distributed decoding.
- * - * \a num_threads specifies how many worker threads CRI Movie should use.
- * \a affinity_mask is an array of affinity masks for the worker threads. This array must have - * \a num_threads many elements. The format of \a affinity_mask is same as for the value passed to the - * Win32 SetThreadAffinityMask() API function.
- * \a priorities is an array of thread priority for the worker threads. This array must have - * \a num_threads many elements. The format of \a priorities is same as for the value passed to the - * Win32 SetThreadPriority() API function.
- * - * If this function is not called, 7 distributed decoding threads will run in parallel by default. - * Also, processor assignment of the decoding threads is handled by the operating system, and their - * priority will be normal. - */ - /*JP - * \ingroup MODULE_OPTION - * \brief PCでデコード処理に使う追加プロセッサ設定(ライブラリ全体) - * \param num_threads 負荷分散デコード用に使用する追加スレッドの数 (最大7つ) - * \param affinity_masks スレッドアフィニティマスクの配列へのポインタ。num_threadsで指定したスレッドごとのマスク値。 - * \param priorities 追加スレッドの優先度配列へのポインタ。 - * \param err エラー情報(省略可) - * - * デコード処理を分散して処理するためのプロセッサをライブラリ全体に指定します。 - * デコード処理に行うプロセッサやスレッド優先度を変更したい場合に使用してください。 - * 本関数はライブラリ初期化前に呼び出す必要があります。 - * - * CRI Movieは初期化の際に7つの分散デコード用のワーカースレッドを用意します。 - * num_threads引数で、そのうちのいくつのスレッドを実際に使用するかを指定できます。 - * アプリケーションから明示的にプロセッサ割り当てを行いたい場合、個々のスレッドに対して - * アフィニティマスクとスレッド優先度を設定してください。 - * アフィニティマスクの値は、Win32 APIのSetThreadAffinityMaskの引数と同じ書式です。 - * スレッド優先度は、Win32 APIのSetThreadPriorityの引数と同じ書式です。 - * - * この関数を呼ばなかった場合、7つのスレッドで並列デコードを行います。 - * デコードスレッドのプロセッサは割り当ては全てOS任せで、優先度はスレッド標準になります。 - */ - void SetUsableProcessors_PC( - CriSint32 num_threads, - const DWORD_PTR *affinity_masks, - const int *priorities, - CriError &err = CriMv::ErrorContainer); -} - - -#endif /* CRI_MOVIE_PC_H_INCLUDED */ diff --git a/3rdParty/cri/pc/include/cri_sj.h b/3rdParty/cri/pc/include/cri_sj.h deleted file mode 100644 index 045a121c..00000000 --- a/3rdParty/cri/pc/include/cri_sj.h +++ /dev/null @@ -1,189 +0,0 @@ -/**************************************************************************** - * - * CRI Middleware SDK - * - * Copyright (c) 2006-2010 CRI Middleware Co., Ltd. - * - ****************************************************************************/ - -#ifndef _CRI_SJ_H_INCLUDED -#define _CRI_SJ_H_INCLUDED -/**************************************************************************** - * * - * CRI Stream Joint "CriSj" Library * - * * - * 2005-06-21 written by M.Oshimi * - * * - ****************************************************************************/ - -/**************************************************************************** - * Include file * - ****************************************************************************/ -#include "cri_xpt.h" -#include "cri_heap.h" - -/**************************************************************************** - * MACRO CONSTANT * - ****************************************************************************/ - -/* Version number of CriSj */ -#define CRISJ_NAME_STRINGS "CRI Stream Joint" -#define CRISJ_VERSION_STRINGS "1.01.00" - -#define CRISJUNI_MAX_LINE (4) -#define CRICHUNK_MAX_SIZE (0xffffffff) - -/*********************************************************************** - * Process MACRO - ***********************************************************************/ - -/**************************************************************************** - * Data type declaration * - ****************************************************************************/ - -/* ストリームライン */ -typedef enum { - CRISJ_LINE_FREE = (0), - CRISJ_LINE_DATA = (1), - CRISJ_LINE_HOLD = (2), - CRISJ_LINE_EXTRA = (3), - /* enum be 4bytes */ - CRISJ_LINE_ENUM_BE_SINT32 = 0x7FFFFFFF -} CriSjLine; - -/* チャンク */ -#ifndef TYPEDEF_CRICHUNK -#define TYPEDEF_CRICHUNK -typedef struct { - CriUint8 *data; /* データ */ - CriUint32 size; /* バイト数 */ -} CriChunk; -#endif - -/* CriSjハンドル */ -/* CriSj handle */ -typedef struct { - struct _crisj_function_table *vtbl; - const CriChar8 *name; -} CriSjObj, *CriSj; - -typedef struct _crisj_function_table { - /* ハンドルの消去 */ - void (*Destroy)(CriSj sj); - /* リセット */ - void (*Reset)(CriSj sj); - /* チャンクの取得 (FIFOの先頭から取得) */ - void (*GetChunk)(CriSj sj, CriSjLine id, CriUint32 nbyte, CriChunk *ck); - /* チャンクを戻す (FIFOの先頭に挿入) */ - void (*UngetChunk)(CriSj sj, CriSjLine id, CriChunk *ck); - /* チャンクを挿入 (FIFOの最後に挿入) */ - void (*PutChunk)(CriSj sj, CriSjLine id, CriChunk *ck); - /* ラインから取得できる総バイト数の取得 */ - CriUint32 (*GetTotalSize)(CriSj sj, CriSjLine id); -} CriSjVirtualFunctionTable; - -typedef enum { - CRISJ_UNIMODE_SEPARATE = (0), - CRISJ_UNIMODE_JOIN = (1), - /* enum be 4bytes */ - CRISJ_UNIMODE_ENUM_BE_SINT32 = 0x7FFFFFFF -} CriSjUniversalMode; - - -typedef struct CriSjRbfConfig { - CriBool use_cs; - CriUint32 buffer_size; - CriUint32 extra_size; - CriUint32 alignment; - const CriChar8 *buffer_name; -} CriSjRbfConfig; - -typedef struct CriSjMemConfig { - CriBool use_cs; - CriUint8 *data; - CriUint32 data_size; -} CriSjMemConfig; - -typedef struct CriSjUniConfig { - CriBool use_cs; - CriSjUniversalMode mode; - CriUint32 num_chunks; -} CriSjUniConfig; - -/**************************************************************************** - * Function Declaration * - ****************************************************************************/ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* リングバッファ型SJの作成 */ -CriSint32 CRIAPI criSjRbf_CalculateWorkSize(const CriSjRbfConfig* config); -CriSj CRIAPI criSjRbf_Create(const CriSjRbfConfig *config, void *work, CriSint32 work_size); -CriSj CRIAPI criSjRbf_CreateByHeap(const CriSjRbfConfig *config, CriHeap heap, CriHeapType heap_type); - -/* 常駐メモリ型SJの作成 */ -CriSint32 CRIAPI criSjMem_CalculateWorkSize(const CriSjMemConfig* config); -CriSj CRIAPI criSjMem_Create(const CriSjMemConfig *config, void *work, CriSint32 work_size); -CriSj CRIAPI criSjMem_CreateByHeap(const CriSjMemConfig *config, CriHeap heap, CriHeapType heap_type); - -/* ユニバーサルSJの作成 */ -CriSint32 CRIAPI criSjUni_CalculateWorkSize(const CriSjUniConfig* config); -CriSj CRIAPI criSjUni_Create(const CriSjUniConfig *config, void *work, CriSint32 work_size); -CriSj CRIAPI criSjUni_CreateByHeap(const CriSjUniConfig *config, CriHeap heap, CriHeapType heap_type); -/* チェインプール数の取得 */ -CriSint32 CRIAPI criSjUni_GetNumChainPool(CriSj sj); - -void CRIAPI criSj_Destroy(CriSj sj); -void CRIAPI criSj_Reset(CriSj sj); -void CRIAPI criSj_GetChunk(CriSj sj, CriSjLine line, CriUint32 nbyte, CriChunk *ck); -void CRIAPI criSj_UngetChunk(CriSj sj, CriSjLine line, CriChunk *ck); -void CRIAPI criSj_PutChunk(CriSj sj, CriSjLine line, CriChunk *ck); -CriUint32 CRIAPI criSj_GetTotalSize(CriSj sj, CriSjLine line); -void CRIAPI criSj_SplitChunk(CriChunk *ck, CriUint32 nbyte, CriChunk *ck1, CriChunk *ck2); - -/*** -* New APIs -***/ - -CriUint32 CRIAPI criSj_GetInputFreeSize(CriSj sj); -void CRIAPI criSj_GetInputChunk(CriSj sj, CriChunk *ck); -void CRIAPI criSj_PutInputChunk(CriSj sj, CriChunk *ck, CriUint32 input_size); -CriUint32 CRIAPI criSj_GetOutputDataSize(CriSj sj); -void CRIAPI criSj_GetOutputChunk(CriSj sj, CriChunk *ck); -void CRIAPI criSj_PutOutputChunk(CriSj sj, CriChunk *ck, CriUint32 output_size); - -CriUint32 CRIAPI criSj_PutOutputChunk2(CriSj sj, CriChunk *ck1, CriChunk *ck2, CriUint32 output_size); - - -/*** -* Old Interface (for compatibility) -***/ -typedef struct _CriSjConfig { - CriBool use_cs; - CriHeapType heap_type; -} CriSjConfig; - -CriSj CRIAPI criSj_CreateRingBuffer(CriHeap heap, CriUint32 bsize, CriUint32 xsize, CriUint32 align); -CriSj CRIAPI criSj_CreateNamedRingBuffer(CriHeap heap, CriUint32 bsize, CriUint32 xsize, CriUint32 align, const CriChar8 *bname); -CriSj CRIAPI criSj_CreateRingBufferWithConfig(CriHeap heap, CriUint32 bsize, CriUint32 xsize, CriUint32 align, const CriSjConfig *config); -CriSj CRIAPI criSj_CreateNamedRingBufferWithConfig(CriHeap heap, CriUint32 bsize, CriUint32 xsize, CriUint32 align, const CriChar8 *bname, const CriSjConfig *config); -CriSint32 CRIAPI criSjRbf_GetRequiredMemorySizeWithConfig(CriUint32 bsize, CriUint32 xsize, CriUint32 align, const CriSjConfig *config); - -CriSj CRIAPI criSj_CreateMemory(CriHeap heap, CriUint8 *data, CriUint32 dtsize, CriUint32 align); -CriSj CRIAPI criSj_CreateMemoryWithConfig(CriHeap heap, CriUint8 *data, CriUint32 dtsize, CriUint32 align, const CriSjConfig *config); -CriSint32 CRIAPI criSjMem_GetRequiredMemorySizeWithConfig(CriUint32 align, const CriSjConfig *config); - -CriSj CRIAPI criSj_CreateUniversal(CriHeap heap, CriSjUniversalMode mode, CriUint32 nchunk); -CriSj CRIAPI criSj_CreateUniversalWithConfig(CriHeap heap, CriSjUniversalMode mode, CriUint32 nchunk, const CriSjConfig *config); -CriSint32 CRIAPI criSjUni_GetRequiredMemorySizeWithConfig(CriSjUniversalMode mode, CriUint32 nchunk, const CriSjConfig *config); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#endif - -/* end of file */ diff --git a/3rdParty/cri/pc/include/cri_xpt_post.h b/3rdParty/cri/pc/include/cri_xpt_post.h deleted file mode 100644 index 89413936..00000000 --- a/3rdParty/cri/pc/include/cri_xpt_post.h +++ /dev/null @@ -1,256 +0,0 @@ -/***************************************************************************** - * - * CRI Middleware SDK - * - * Copyright (c) 1998-2012 CRI Middleware Co., Ltd. - * - * Library : CRI Middleware Library - * Module : CRI Common Header / Post-Process - * File : cri_xpt_post.h - * Date : 2012-05-15 - * Version : 2.07 - * - *****************************************************************************/ -#ifndef CRI_INCL_CRI_XPT_POST_H -#define CRI_INCL_CRI_XPT_POST_H - - -/***************************************************************************** - * マクロ定義 - * Macro definition - *****************************************************************************/ - -/* コンパイル時の静的アサート - * C++ BoostのSTATIC_ASSERTと同等の機能をC言語で実装する。 - * 条件が真であることを検証する。偽の場合はコンパイルエラーを起こして、コン - * パイルを停止させる。 - * Static Asart when compiling - * This function is equal to STATIC_ASSERT of C++ Boost, and is imprementated - * by C language. If the condition is false, a compiler error is caused and - * it stop compiling. - */ -#define XPT_STATIC_ASSERT(cond) extern int xpt_static_assert_array[(cond)?1:-1] - - -/***************************************************************************** - * コンパイルオプションの検証 - * Compiler option test - *****************************************************************************/ - -/* enum型の検証 - *  enum型がint型に整合することを検証する。 - *  適切なエラーメッセージを表示したいので、可能ならコンパイルオプションによる - *  チェックを行う。不可能な場合、汎用的な静的アサートによるチェックが働く。 - * Enum type test - * It is verified that the enum type adjusts to the int type. - * To display an appropriate error message, it checks the compiler option - * if possible. General static asart test works if it is impossible. - */ -#if defined(__MWERKS__) /* CodeWarrior */ - //#if !__option(enumsalwaysint) - // #error ERROR cri_xpt_post.h : Compiler option 'Enums Always Int' should be ON. - //#endif -#elif defined(__GNUC__) - //#if Compiler option -fshort-enums is used - // #error ERROR cri_xpt_post.h : Compiler option '-fshort-enums' should not be used. - //#endif -#endif -//typedef enum {XPT_TEST_ENUM_0, XPT_TEST_ENUM_1, XPT_TEST_ENUM_2} XptTestEnum; -//XPT_STATIC_ASSERT(sizeof(XptTestEnum) == sizeof(Uint32)); /* enum should be 4byte. */ - -/***************************************************************************** - * 定数マクロ - * Macros of constant value - *****************************************************************************/ - -/* NULL ポインタ型 */ -#if !defined(CRI_NULL) -#ifdef __cplusplus -#define CRI_NULL (0) -#else -#define CRI_NULL ((void *)0) -#endif -#endif - -/* 論理定数1(偽、真) */ -#if !defined(CRI_FALSE) -#define CRI_FALSE (0) -#endif -#if !defined(CRI_TRUE) -#define CRI_TRUE (1) -#endif - -/* 論理定数2(スイッチ) */ -#if !defined(CRI_OFF) -#define CRI_OFF (0) -#endif -#if !defined(CRI_ON) -#define CRI_ON (1) -#endif - -/* 結果判定の定数(成功、失敗) */ -#if !defined(CRI_OK) -#define CRI_OK (0) /* 成功 */ -#endif -#if !defined(CRI_NG) -#define CRI_NG (-1) /* 失敗 */ -#endif - -/***************************************************************************** - * ポインタまたは64ビットアドレスを格納できる整数型 - * 備考: ポインタ32bitかつROMアドレス空間64bitの環境で、両者を透過的に扱える。 - * The integer type which can hold an pointer or an address up to 64 bits. - * NOTE: In the environment of pointer 32bit and ROM address space 64bit, - * this type can treat both transparently. - *****************************************************************************/ - -#if !defined(_TYPEDEF_CriUint64Adr) -#define _TYPEDEF_CriUint64Adr -typedef CriUint64 CriUint64Adr; /* ポインタまたは64ビットアドレスを格納できる整数型 */ -#endif - -#if !defined(CRI_PTR_TO_UINT64ADR) -#define CRI_PTR_TO_UINT64ADR(ptr) ((CriUint64Adr)(ptr)) /* Convert pointer to CriUint64Adr */ -#endif - -#if !defined(CRI_UINT64ADR_TO_PTR) -#define CRI_UINT64ADR_TO_PTR(uint64adr) ((void *)(CriUintPtr)(uint64adr)) /* Convert CriUint64Adr to pointer */ -#endif - -#if !defined(CRI_XPT_DISABLE_UNPREFIXED_TYPE) - -/***************************************************************************** - * 互換性維持のための定数マクロ - * Macros for compatibility with old version - *****************************************************************************/ - -/* NULL ポインタ型 */ -#if !defined(NULL) -#define NULL (CRI_NULL) -#endif - -/* 論理定数1(偽、真) */ -#if !defined(FALSE) -#define FALSE (CRI_FALSE) -#endif -#if !defined(TRUE) -#define TRUE (CRI_TRUE) -#endif - -/* 論理定数2(スイッチ) */ -#if !defined(OFF) -#define OFF (CRI_OFF) -#endif -#if !defined(ON) -#define ON (CRI_ON) -#endif - -/* 結果判定の定数(成功、失敗) */ -#if !defined(OK) -#define OK (CRI_OK) -#endif -#if !defined(NG) -#define NG (CRI_NG) -#endif - -/***************************************************************************** - * 互換性維持のためのデータ型宣言 - * Types for compatibility with old version - *****************************************************************************/ - -#if !defined(_TYPEDEF_Uint8) -#define _TYPEDEF_Uint8 -typedef CriUint8 Uint8; /* 符号なし1バイト整数 */ -#endif - -#if !defined(_TYPEDEF_Sint8) -#define _TYPEDEF_Sint8 -typedef CriSint8 Sint8; /* 符号つき1バイト整数 */ -#endif - -#if !defined(_TYPEDEF_Uint16) -#define _TYPEDEF_Uint16 -typedef CriUint16 Uint16; /* 符号なし2バイト整数 */ -#endif - -#if !defined(_TYPEDEF_Sint16) -#define _TYPEDEF_Sint16 -typedef CriSint16 Sint16; /* 符号つき2バイト整数 */ -#endif - -#if !defined(_TYPEDEF_Uint32) -#define _TYPEDEF_Uint32 -typedef CriUint32 Uint32; /* 符号なし4バイト整数 */ -#endif - -#if !defined(_TYPEDEF_Sint32) -#define _TYPEDEF_Sint32 -typedef CriSint32 Sint32; /* 符号つき4バイト整数 */ -#endif - -#if !defined(_TYPEDEF_Uint64) -#define _TYPEDEF_Uint64 -typedef CriUint64 Uint64; /* 符号なし8バイト整数 */ -#endif - -#if !defined(_TYPEDEF_Sint64) -#define _TYPEDEF_Sint64 -typedef CriSint64 Sint64; /* 符号つき8バイト整数 */ -#endif - -#if !defined(_TYPEDEF_Uint128) -#define _TYPEDEF_Uint128 -typedef CriUint128 Uint128; /* 符号なし16バイト整数 */ -#endif - -#if !defined(_TYPEDEF_Sint128) -#define _TYPEDEF_Sint128 -typedef CriSint128 Sint128; /* 符号つき16バイト整数 */ -#endif - -#if !defined(_TYPEDEF_Float16) -#define _TYPEDEF_Float16 -typedef CriFloat16 Float16; /* 2バイト実数 */ -#endif - -#if !defined(_TYPEDEF_Float32) -#define _TYPEDEF_Float32 -typedef CriFloat32 Float32; /* 4バイト実数 */ -#endif - -#if !defined(_TYPEDEF_Float64) -#define _TYPEDEF_Float64 -typedef CriFloat64 Float64; /* 8バイト実数 */ -#endif - -#if !defined(_TYPEDEF_Fixed32) -#define _TYPEDEF_Fixed32 -typedef CriFixed32 Fixed32; /* 固定小数点32ビット */ -#endif - -/* X11 API(xtrapproto.h)との競合回避用 */ -#if !defined(_TYPEDEF_Bool) && !defined(Bool) -#define _TYPEDEF_Bool -typedef CriBool Bool; /* 論理型(論理定数を値にとる) */ -#endif - -#if !defined(_TYPEDEF_Char8) -#define _TYPEDEF_Char8 -typedef CriChar8 Char8; /* 文字型 */ -#endif - -#if !defined(_TYPEDEF_SintPtr) -#define _TYPEDEF_SintPtr -typedef CriSintPtr SintPtr; -#endif - -#if !defined(_TYPEDEF_UintPtr) -#define _TYPEDEF_UintPtr -typedef CriUintPtr UintPtr; -#endif - -#endif /* CRI_XPT_DISABLE_UNPREFIXED_TYPE */ - -#endif /* CRI_INCL_CRI_XPT_POST_H */ - -/* end of file */ diff --git a/3rdParty/cri/pc/libs/Win32/cri_base_pcx86.lib b/3rdParty/cri/pc/libs/Win32/cri_base_pcx86.lib deleted file mode 100644 index dc0d4bc7..00000000 Binary files a/3rdParty/cri/pc/libs/Win32/cri_base_pcx86.lib and /dev/null differ diff --git a/3rdParty/cri/pc/libs/Win32/cri_movie_pcx86.lib b/3rdParty/cri/pc/libs/Win32/cri_movie_pcx86.lib deleted file mode 100644 index f2fa9e33..00000000 Binary files a/3rdParty/cri/pc/libs/Win32/cri_movie_pcx86.lib and /dev/null differ diff --git a/3rdParty/cri/pc/libs/x64/cri_base_pcx64.lib b/3rdParty/cri/pc/libs/x64/cri_base_pcx64.lib deleted file mode 100644 index c8c02f11..00000000 Binary files a/3rdParty/cri/pc/libs/x64/cri_base_pcx64.lib and /dev/null differ diff --git a/3rdParty/cri/pc/libs/x64/cri_movie_pcx64.lib b/3rdParty/cri/pc/libs/x64/cri_movie_pcx64.lib deleted file mode 100644 index 40705a17..00000000 Binary files a/3rdParty/cri/pc/libs/x64/cri_movie_pcx64.lib and /dev/null differ diff --git a/3rdParty/cri2019/SDK_Read_Me.pdf b/3rdParty/cri2019/SDK_Read_Me.pdf new file mode 100644 index 00000000..40bc1e6c Binary files /dev/null and b/3rdParty/cri2019/SDK_Read_Me.pdf differ diff --git a/3rdParty/cri2019/common/smpdata/criatomex/AdditionalData.acb b/3rdParty/cri2019/common/smpdata/criatomex/AdditionalData.acb new file mode 100644 index 00000000..a8c89f65 Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/criatomex/AdditionalData.acb differ diff --git a/3rdParty/cri2019/common/smpdata/criatomex/AdditionalData.awb b/3rdParty/cri2019/common/smpdata/criatomex/AdditionalData.awb new file mode 100644 index 00000000..7b3ad661 Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/criatomex/AdditionalData.awb differ diff --git a/3rdParty/cri2019/common/smpdata/criatomex/AdditionalData.h b/3rdParty/cri2019/common/smpdata/criatomex/AdditionalData.h new file mode 100644 index 00000000..b9d9c1fa --- /dev/null +++ b/3rdParty/cri2019/common/smpdata/criatomex/AdditionalData.h @@ -0,0 +1,34 @@ +/*===========================================================================* + * Header file for Atom CueSheet Binary + * Project : SampleProject + * Tool Ver. : CRI Atom Craft Ver.2.35.09 + * File Path : E:/ws/adx2-smpdata/p4ws/CriMovieDepot/_cri_rake_temp/smpdata_build/PC/AdditionalData.acb + * File Name : AdditionalData.acb + * File Size : 8,928 bytes + * Date Time : 2018/08/03 18:21 + * Target : PC + * Cues : 8 + * CueSheet Comment : + * Stream Awb Path : AdditionalData.awb ,AdditionalData_01.awb + *===========================================================================*/ + +#define CRI_ADDITIONALDATA_CUENUM (8) + +/* AISAC Control List (AISAC Control ID) */ +// No AISAC Control + + +/* Cue List (Cue ID) */ +#define CRI_ADDITIONALDATA_FUNSUI ( 0) /* */ +#define CRI_ADDITIONALDATA_KISHA ( 1) /* */ +#define CRI_ADDITIONALDATA_NEENEE ( 2) /* */ +#define CRI_ADDITIONALDATA_OHAYOU ( 3) /* */ +#define CRI_ADDITIONALDATA_SHATEKI ( 4) /* */ +#define CRI_ADDITIONALDATA_KINOU ( 5) /* */ +#define CRI_ADDITIONALDATA_SUBERIDAI ( 6) /* */ +#define CRI_ADDITIONALDATA_TAIHOU ( 7) /* */ + +/* Block List (Block Index) */ + +/* end of file */ + diff --git a/3rdParty/cri2019/common/smpdata/criatomex/AdditionalData_01.awb b/3rdParty/cri2019/common/smpdata/criatomex/AdditionalData_01.awb new file mode 100644 index 00000000..2c6e6790 Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/criatomex/AdditionalData_01.awb differ diff --git a/3rdParty/cri2019/common/smpdata/criatomex/AtomCueSheet.acb b/3rdParty/cri2019/common/smpdata/criatomex/AtomCueSheet.acb new file mode 100644 index 00000000..40b2c609 Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/criatomex/AtomCueSheet.acb differ diff --git a/3rdParty/cri2019/common/smpdata/criatomex/AtomCueSheet.awb b/3rdParty/cri2019/common/smpdata/criatomex/AtomCueSheet.awb new file mode 100644 index 00000000..605c0f45 Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/criatomex/AtomCueSheet.awb differ diff --git a/3rdParty/cri2019/common/smpdata/criatomex/AtomCueSheet.h b/3rdParty/cri2019/common/smpdata/criatomex/AtomCueSheet.h new file mode 100644 index 00000000..fe919965 --- /dev/null +++ b/3rdParty/cri2019/common/smpdata/criatomex/AtomCueSheet.h @@ -0,0 +1,71 @@ +/*===========================================================================* + * Header file for Atom CueSheet Binary + * Project : SampleProject + * Tool Ver. : Ver.1.03.00 + * File Path : E:/ws/adx2-smpdata/p4ws/CriMovieDepot/_cri_rake_temp/smpdata_build/PC + * File Name : AtomCueSheet.h + * File Size : 4579424 bytes + * Date Time : 2019/02/15 17:56:39 + * Target : PC + * Cues : 39 + * CueSheet Comment : + * Stream Awb Path : E:/ws/adx2-smpdata/p4ws/CriMovieDepot/_cri_rake_temp/smpdata_build/PC/AtomCueSheet.awb + *===========================================================================*/ + +#define CRI_ATOMCUESHEET_CUENUM (39) + +/* AISAC Control List (AISAC Control ID) */ +#define CRI_ATOMCUESHEET_AISACCONTROL_ANY ( 0) /* */ +#define CRI_ATOMCUESHEET_AISACCONTROL_DISTANCE ( 1) /* */ +#define CRI_ATOMCUESHEET_AISACCONTROL_AISACCONTROL02 ( 2) /* */ +#define CRI_ATOMCUESHEET_AISACCONTROL_AISACCONTROL03 ( 3) /* */ + +/* Cue List (Cue ID) */ +#define CRI_ATOMCUESHEET_HELI_LOOP ( 0) /* */ +#define CRI_ATOMCUESHEET_MUSICXFADE ( 1) /* */ +#define CRI_ATOMCUESHEET_GUN1_HIGH ( 2) /* */ +#define CRI_ATOMCUESHEET_BOMB2 ( 3) /* */ +#define CRI_ATOMCUESHEET_THUNDER1 ( 4) /* */ +#define CRI_ATOMCUESHEET_THUNDER2 ( 5) /* */ +#define CRI_ATOMCUESHEET_THUNDER3 ( 6) /* */ +#define CRI_ATOMCUESHEET_RAIN ( 7) /* */ +#define CRI_ATOMCUESHEET_LEVELA ( 8) /* */ +#define CRI_ATOMCUESHEET_LEVELD ( 9) /* */ +#define CRI_ATOMCUESHEET_KALIMBA_G (10) /* */ +#define CRI_ATOMCUESHEET_FOOTSTEP1SHOTL (11) /* */ +#define CRI_ATOMCUESHEET_TTRAILER_SHORTLOOP (12) /* */ +#define CRI_ATOMCUESHEET_SEQGUNBOMB (13) /* */ +#define CRI_ATOMCUESHEET_SEQKALIMBA (14) /* */ +#define CRI_ATOMCUESHEET__6CH (15) /* */ +#define CRI_ATOMCUESHEET__6CHSHAKER (16) /* */ +#define CRI_ATOMCUESHEET_MUSIC (17) /* */ +#define CRI_ATOMCUESHEET_MUSIC_LOOP (18) /* */ +#define CRI_ATOMCUESHEET_MUSIC_TR (19) /* */ +#define CRI_ATOMCUESHEET_AUTOMODULATION (23) /* 4sec - Pan 3sec - Pitch 250msec - HiPassCof */ +#define CRI_ATOMCUESHEET_RANDOMIZEGUNSHOT (24) /* Randomize -volume -pitch -pan -biquadfilter */ +#define CRI_ATOMCUESHEET_MALE (25) /* */ +#define CRI_ATOMCUESHEET_AISACRANDOMIZEDKALIMBA (26) /* probability controled random pitch */ +#define CRI_ATOMCUESHEET_ENVELOPEHELI (27) /* */ +#define CRI_ATOMCUESHEET_BGM_01 (20) /* */ +#define CRI_ATOMCUESHEET_BGM_02 (21) /* */ +#define CRI_ATOMCUESHEET_BGM_03 (22) /* */ +#define CRI_ATOMCUESHEET_BGM_04 (28) /* */ +#define CRI_ATOMCUESHEET_BGM_05 (29) /* */ +#define CRI_ATOMCUESHEET_VOICE_A (30) /* */ +#define CRI_ATOMCUESHEET_VOICE_B (31) /* */ +#define CRI_ATOMCUESHEET_VOICE_C (32) /* */ +#define CRI_ATOMCUESHEET_HELI_LOOP_3D (33) /* */ +#define CRI_ATOMCUESHEET_SEAMLESS_A (34) /* */ +#define CRI_ATOMCUESHEET_SEAMLESS_B (35) /* */ +#define CRI_ATOMCUESHEET_BLOCK (36) /* */ +#define CRI_ATOMCUESHEET_VOICE_A_REACT (37) /* */ +#define CRI_ATOMCUESHEET_MUSIC_LOOP_REACT (38) /* */ + +/* Block List (Block Index) */ +#define CRI_ATOMCUESHEET_BLOCK_BLOCK_BLOCK_BLOCK ( 0) /* */ +#define CRI_ATOMCUESHEET_BLOCK_BLOCK_BLOCK_KALIMBATRILL ( 1) /* */ +#define CRI_ATOMCUESHEET_BLOCK_BLOCK_BLOCK_KALIMBADOWN ( 2) /* */ +#define CRI_ATOMCUESHEET_BLOCK_BLOCK_BLOCK_KALIMBABANG ( 3) /* */ + +/* end of file */ + diff --git a/3rdParty/cri2019/common/smpdata/criatomex/AtomCueSheet2.acb b/3rdParty/cri2019/common/smpdata/criatomex/AtomCueSheet2.acb new file mode 100644 index 00000000..3b420753 Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/criatomex/AtomCueSheet2.acb differ diff --git a/3rdParty/cri2019/common/smpdata/criatomex/AtomCueSheet2.h b/3rdParty/cri2019/common/smpdata/criatomex/AtomCueSheet2.h new file mode 100644 index 00000000..037e2817 --- /dev/null +++ b/3rdParty/cri2019/common/smpdata/criatomex/AtomCueSheet2.h @@ -0,0 +1,27 @@ +/*===========================================================================* + * Header file for Atom CueSheet Binary + * Project : SampleProject + * Tool Ver. : Ver.1.03.00 + * File Path : E:/ws/adx2-smpdata/p4ws/CriMovieDepot/_cri_rake_temp/smpdata_build/PC + * File Name : AtomCueSheet2.h + * File Size : 22176 bytes + * Date Time : 2019/02/15 17:56:39 + * Target : PC + * Cues : 3 + * CueSheet Comment : + * Stream Awb Path : E:/ws/adx2-smpdata/p4ws/CriMovieDepot/_cri_rake_temp/smpdata_build/PC/AtomCueSheet2.awb + *===========================================================================*/ + +#define CRI_ATOMCUESHEET2_CUENUM (3) + +/* AISAC Control List (AISAC Control ID) */ + +/* Cue List (Cue ID) */ +#define CRI_ATOMCUESHEET2_SIN32K1SHOT (20) /* */ +#define CRI_ATOMCUESHEET2_SIN32K1SHOT_0 (21) /* */ +#define CRI_ATOMCUESHEET2_SIN32K1SHOT_1 (22) /* */ + +/* Block List (Block Index) */ + +/* end of file */ + diff --git a/3rdParty/cri2019/common/smpdata/criatomex/FMPRO_Intro_e.txt b/3rdParty/cri2019/common/smpdata/criatomex/FMPRO_Intro_e.txt new file mode 100644 index 00000000..4b56f841 --- /dev/null +++ b/3rdParty/cri2019/common/smpdata/criatomex/FMPRO_Intro_e.txt @@ -0,0 +1,9 @@ +"Loading time" of the game is decided by "Reading time" and "Seek time". + +"Lead (read) time" is time to read the file as its name suggests. Naturally, "Reading time" becomes long in proportion to the read size of the file. Because the size of the file can be reduced by compressing the file, "Reading time" can be shortened. Of course, the compressed data should progress. The loading time might rather become long depending on the method of development. +The development time can be adjusted to almost 0 by executing reading and processing and the development processing in parallel. +"Seek (seek) time" is time to move the head (pick up) physically to read the file from a specific position in the disk media. Suppressing the generation greatly contributes to shortening the loading time because it takes time to the seek of the head very much. +Useless seek is generated if those files are disjointedly arranged though the read amount of the file is the same, the reading efficiency decreases, and it takes the loading time extra. +The generation of seek is controlled when the file is continuously arranged (Seek is not generated at all when arranged completely continuously), and because it is possible to read in bulk, the loading time can be shortened greatly. +The above-mentioned technique is effective for not only the disk media but also ROM media. The performance gain by the reading processing of the batch can expect the file in "Best arrangement" though seek is ROM media without relation. +'File felt-tipped marker RPRO' reduces reading time and the seek time by "Compression", "Development", and "Best arrangement", and makes the loading time a half. diff --git a/3rdParty/cri2019/common/smpdata/criatomex/ForUserEffectPlugin.acb b/3rdParty/cri2019/common/smpdata/criatomex/ForUserEffectPlugin.acb new file mode 100644 index 00000000..861e4df5 Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/criatomex/ForUserEffectPlugin.acb differ diff --git a/3rdParty/cri2019/common/smpdata/criatomex/ForUserEffectPlugin.acf b/3rdParty/cri2019/common/smpdata/criatomex/ForUserEffectPlugin.acf new file mode 100644 index 00000000..c776c1d9 Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/criatomex/ForUserEffectPlugin.acf differ diff --git a/3rdParty/cri2019/common/smpdata/criatomex/ForUserEffectPlugin.h b/3rdParty/cri2019/common/smpdata/criatomex/ForUserEffectPlugin.h new file mode 100644 index 00000000..eaac9f12 --- /dev/null +++ b/3rdParty/cri2019/common/smpdata/criatomex/ForUserEffectPlugin.h @@ -0,0 +1,41 @@ +/*===========================================================================* + * Header file for Atom CueSheet Binary + * Project : ForUserEffectPlugin + * Tool Ver. : Ver.2.31.00 + * File Path : /Users/tmineojack/Documents/CRIWARE/CriAtomCraft/ForUserEffectPlugin/PC/WorkUnit_0 + * File Name : ForUserEffectPlugin.h + * File Size : 256320 bytes + * Date Time : 2017/09/15 20:28:57 + * Target : PC + * Cues : 1 + * CueSheet Comment : + * Stream Awb Path : /Users/tmineojack/Documents/CRIWARE/CriAtomCraft/ForUserEffectPlugin/PC/WorkUnit_0/ForUserEffectPlugin.awb + *===========================================================================*/ + +#define CRI_FORUSEREFFECTPLUGIN_CUENUM (1) + +/* AISAC Control List (AISAC Control ID) */ +#define CRI_FORUSEREFFECTPLUGIN_AISACCONTROL_AISACCONTROL_00 ( 0) /* */ +#define CRI_FORUSEREFFECTPLUGIN_AISACCONTROL_AISACCONTROL_01 ( 1) /* */ +#define CRI_FORUSEREFFECTPLUGIN_AISACCONTROL_AISACCONTROL_02 ( 2) /* */ +#define CRI_FORUSEREFFECTPLUGIN_AISACCONTROL_AISACCONTROL_03 ( 3) /* */ +#define CRI_FORUSEREFFECTPLUGIN_AISACCONTROL_AISACCONTROL_04 ( 4) /* */ +#define CRI_FORUSEREFFECTPLUGIN_AISACCONTROL_AISACCONTROL_05 ( 5) /* */ +#define CRI_FORUSEREFFECTPLUGIN_AISACCONTROL_AISACCONTROL_06 ( 6) /* */ +#define CRI_FORUSEREFFECTPLUGIN_AISACCONTROL_AISACCONTROL_07 ( 7) /* */ +#define CRI_FORUSEREFFECTPLUGIN_AISACCONTROL_AISACCONTROL_08 ( 8) /* */ +#define CRI_FORUSEREFFECTPLUGIN_AISACCONTROL_AISACCONTROL_09 ( 9) /* */ +#define CRI_FORUSEREFFECTPLUGIN_AISACCONTROL_AISACCONTROL_10 (10) /* */ +#define CRI_FORUSEREFFECTPLUGIN_AISACCONTROL_AISACCONTROL_11 (11) /* */ +#define CRI_FORUSEREFFECTPLUGIN_AISACCONTROL_AISACCONTROL_12 (12) /* */ +#define CRI_FORUSEREFFECTPLUGIN_AISACCONTROL_AISACCONTROL_13 (13) /* */ +#define CRI_FORUSEREFFECTPLUGIN_AISACCONTROL_AISACCONTROL_14 (14) /* */ +#define CRI_FORUSEREFFECTPLUGIN_AISACCONTROL_AISACCONTROL_15 (15) /* */ + +/* Cue List (Cue ID) */ +#define CRI_FORUSEREFFECTPLUGIN_VOICE48A ( 0) /* */ + +/* Block List (Block Index) */ + +/* end of file */ + diff --git a/3rdParty/cri2019/common/smpdata/criatomex/ForUserEffectPlugin_acf.h b/3rdParty/cri2019/common/smpdata/criatomex/ForUserEffectPlugin_acf.h new file mode 100644 index 00000000..7b7ff12e --- /dev/null +++ b/3rdParty/cri2019/common/smpdata/criatomex/ForUserEffectPlugin_acf.h @@ -0,0 +1,67 @@ +/*===========================================================================* + * Header file for Atom Config File + * Project : ForUserEffectPlugin + * Tool Ver. : Ver.2.31.00 + * File Path : /Users/tmineojack/Documents/CRIWARE/CriAtomCraft/ForUserEffectPlugin/PC + * File Name : ForUserEffectPlugin_acf.h + * File Size : 4896 bytes + * Date Time : 2017/09/15 20:28:56 + * Target : PC + * Categories : 1 + * AISAC Controls : 16 + * Global AISACs : 0 + * Voice Limit Groups : 1 + * DSP BUS Settings : 2 + * DSP BUS Settings Snapshot : 0 + * DSP BUS Name : 2 + * Game Variables : 1 + * Selectors : 0 + * Project Comment : + *===========================================================================*/ + +#define CRI_FORUSEREFFECTPLUGIN_ACF_NUM_CATEGORIES_PER_PLAYBACK (4) +#define CRI_FORUSEREFFECTPLUGIN_ACF_CATEGORYNUM (1) +#define CRI_FORUSEREFFECTPLUGIN_ACF_AISACCONTROLNUM (16) +#define CRI_FORUSEREFFECTPLUGIN_ACF_GLOBALAISACNUM (0) +#define CRI_FORUSEREFFECTPLUGIN_ACF_VOICELIMITGROUPNUM (1) +#define CRI_FORUSEREFFECTPLUGIN_ACF_DSPSETTINGNUM (2) +#define CRI_FORUSEREFFECTPLUGIN_ACF_DSPSETTINGSNAPSHOTNUM (0) +#define CRI_FORUSEREFFECTPLUGIN_ACF_DSPBUSNAMENUM (2) +#define CRI_FORUSEREFFECTPLUGIN_ACF_GAMEVARIABLENUM (1) +#define CRI_FORUSEREFFECTPLUGIN_ACF_SELECTORNUM (0) + +/* Category List (Category ID) */ +#define CRI_FORUSEREFFECTPLUGIN_CATEGORY_CATEGORY_0 ( 0) /* */ + +/* AISAC Control List (AISAC Control ID) */ +#define CRI_FORUSEREFFECTPLUGIN_AISACCONTROL_AISACCONTROL_00 ( 0) /* */ +#define CRI_FORUSEREFFECTPLUGIN_AISACCONTROL_AISACCONTROL_01 ( 1) /* */ +#define CRI_FORUSEREFFECTPLUGIN_AISACCONTROL_AISACCONTROL_02 ( 2) /* */ +#define CRI_FORUSEREFFECTPLUGIN_AISACCONTROL_AISACCONTROL_03 ( 3) /* */ +#define CRI_FORUSEREFFECTPLUGIN_AISACCONTROL_AISACCONTROL_04 ( 4) /* */ +#define CRI_FORUSEREFFECTPLUGIN_AISACCONTROL_AISACCONTROL_05 ( 5) /* */ +#define CRI_FORUSEREFFECTPLUGIN_AISACCONTROL_AISACCONTROL_06 ( 6) /* */ +#define CRI_FORUSEREFFECTPLUGIN_AISACCONTROL_AISACCONTROL_07 ( 7) /* */ +#define CRI_FORUSEREFFECTPLUGIN_AISACCONTROL_AISACCONTROL_08 ( 8) /* */ +#define CRI_FORUSEREFFECTPLUGIN_AISACCONTROL_AISACCONTROL_09 ( 9) /* */ +#define CRI_FORUSEREFFECTPLUGIN_AISACCONTROL_AISACCONTROL_10 (10) /* */ +#define CRI_FORUSEREFFECTPLUGIN_AISACCONTROL_AISACCONTROL_11 (11) /* */ +#define CRI_FORUSEREFFECTPLUGIN_AISACCONTROL_AISACCONTROL_12 (12) /* */ +#define CRI_FORUSEREFFECTPLUGIN_AISACCONTROL_AISACCONTROL_13 (13) /* */ +#define CRI_FORUSEREFFECTPLUGIN_AISACCONTROL_AISACCONTROL_14 (14) /* */ +#define CRI_FORUSEREFFECTPLUGIN_AISACCONTROL_AISACCONTROL_15 (15) /* */ + +/* Voice Limit Group (Voice Limit Group Index) */ +#define CRI_FORUSEREFFECTPLUGIN_VOICELIMITGROUP_VOICELIMITGROUP_0 ( 0) /* */ + +/* DspSetting List (DspSetting Name) */ +#define CRI_FORUSEREFFECTPLUGIN_DSPSETTING_DSPBUSSETTING_0 "DspBusSetting_0" /* */ +#define CRI_FORUSEREFFECTPLUGIN_DSPSETTING_DSPBUSSETTINGWIIUAXFX_0 "DspBusSettingWiiUAxFx_0" /* */ + +/* DspBusName List (DspBus Name) */ +#define CRI_FORUSEREFFECTPLUGIN_DSPBUSNAME_BUS1 "BUS1" /* */ +#define CRI_FORUSEREFFECTPLUGIN_DSPBUSNAME_MASTEROUT "MasterOut" /* */ + +/* Game Variable (Game Variable Index) */ +#define CRI_FORUSEREFFECTPLUGIN_GAMEVARIABLE_DEFAULT ( 0) /* */ + diff --git a/3rdParty/cri2019/common/smpdata/criatomex/ForVoiceEvent.acb b/3rdParty/cri2019/common/smpdata/criatomex/ForVoiceEvent.acb new file mode 100644 index 00000000..960db479 Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/criatomex/ForVoiceEvent.acb differ diff --git a/3rdParty/cri2019/common/smpdata/criatomex/ForVoiceEvent.acf b/3rdParty/cri2019/common/smpdata/criatomex/ForVoiceEvent.acf new file mode 100644 index 00000000..ad53bce5 Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/criatomex/ForVoiceEvent.acf differ diff --git a/3rdParty/cri2019/common/smpdata/criatomex/ForVoiceEvent.awb b/3rdParty/cri2019/common/smpdata/criatomex/ForVoiceEvent.awb new file mode 100644 index 00000000..44e2a65b Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/criatomex/ForVoiceEvent.awb differ diff --git a/3rdParty/cri2019/common/smpdata/criatomex/ForVoiceEvent.h b/3rdParty/cri2019/common/smpdata/criatomex/ForVoiceEvent.h new file mode 100644 index 00000000..4933b858 --- /dev/null +++ b/3rdParty/cri2019/common/smpdata/criatomex/ForVoiceEvent.h @@ -0,0 +1,28 @@ +/*===========================================================================* + * Header file for Atom CueSheet Binary + * Project : ForVoiceEvent + * Tool Ver. : Ver.1.03.00 + * File Path : E:/ws/adx2-smpdata/p4ws/CriMovieDepot/_cri_rake_temp/smpdata_build/PC + * File Name : ForVoiceEvent.h + * File Size : 64032 bytes + * Date Time : 2019/02/15 17:56:42 + * Target : PC + * Cues : 4 + * CueSheet Comment : + * Stream Awb Path : E:/ws/adx2-smpdata/p4ws/CriMovieDepot/_cri_rake_temp/smpdata_build/PC/ForVoiceEvent.awb + *===========================================================================*/ + +#define CRI_FORVOICEEVENT_CUENUM (4) + +/* AISAC Control List (AISAC Control ID) */ + +/* Cue List (Cue ID) */ +#define CRI_FORVOICEEVENT_SE ( 0) /* */ +#define CRI_FORVOICEEVENT_SE_SEQUENCE ( 8) /* */ +#define CRI_FORVOICEEVENT_VOICE ( 9) /* */ +#define CRI_FORVOICEEVENT_BGM (13) /* */ + +/* Block List (Block Index) */ + +/* end of file */ + diff --git a/3rdParty/cri2019/common/smpdata/criatomex/ForVoiceEvent_acf.h b/3rdParty/cri2019/common/smpdata/criatomex/ForVoiceEvent_acf.h new file mode 100644 index 00000000..49f8e914 --- /dev/null +++ b/3rdParty/cri2019/common/smpdata/criatomex/ForVoiceEvent_acf.h @@ -0,0 +1,78 @@ +/*===========================================================================* + * Header file for Atom Config File + * Project : ForVoiceEvent + * Tool Ver. : Ver.1.03.00 + * File Path : E:/ws/adx2-smpdata/p4ws/CriMovieDepot/_cri_rake_temp/smpdata_build/PC + * File Name : ForVoiceEvent_acf.h + * File Size : 5440 bytes + * Date Time : 2019/02/15 17:56:41 + * Target : PC + * Categories : 3 + * AISAC Controls : 16 + * Global AISACs : 0 + * Voice Limit Groups : 3 + * DSP BUS Settings : 1 + * DSP BUS Settings Snapshot : 0 + * DSP BUS Name : 8 + * Game Variables : 1 + * Selectors : 0 + * REACTs : 1 + * Project Comment : + *===========================================================================*/ + +#define CRI_FORVOICEEVENT_ACF_NUM_CATEGORIES_PER_PLAYBACK (4) +#define CRI_FORVOICEEVENT_ACF_CATEGORYNUM (3) +#define CRI_FORVOICEEVENT_ACF_AISACCONTROLNUM (16) +#define CRI_FORVOICEEVENT_ACF_GLOBALAISACNUM (0) +#define CRI_FORVOICEEVENT_ACF_VOICELIMITGROUPNUM (3) +#define CRI_FORVOICEEVENT_ACF_DSPSETTINGNUM (1) +#define CRI_FORVOICEEVENT_ACF_DSPSETTINGSNAPSHOTNUM (0) +#define CRI_FORVOICEEVENT_ACF_DSPBUSNAMENUM (8) +#define CRI_FORVOICEEVENT_ACF_GAMEVARIABLENUM (1) +#define CRI_FORVOICEEVENT_ACF_SELECTORNUM (0) +#define CRI_FORVOICEEVENTACF_REACTNUM (1) + +/* Category List (Category ID) */ +#define CRI_FORVOICEEVENT_CATEGORY_SE ( 0) /* */ +#define CRI_FORVOICEEVENT_CATEGORY_VOICE ( 1) /* */ +#define CRI_FORVOICEEVENT_CATEGORY_BGM ( 2) /* */ + +/* AISAC Control List (AISAC Control ID) */ +#define CRI_FORVOICEEVENT_AISACCONTROL_ANY ( 0) /* */ +#define CRI_FORVOICEEVENT_AISACCONTROL_DISTANCE ( 1) /* */ +#define CRI_FORVOICEEVENT_AISACCONTROL_AISACCONTROL02 ( 2) /* */ +#define CRI_FORVOICEEVENT_AISACCONTROL_AISACCONTROL03 ( 3) /* */ +#define CRI_FORVOICEEVENT_AISACCONTROL_AISACCONTROL04 ( 4) /* */ +#define CRI_FORVOICEEVENT_AISACCONTROL_AISACCONTROL05 ( 5) /* */ +#define CRI_FORVOICEEVENT_AISACCONTROL_AISACCONTROL06 ( 6) /* */ +#define CRI_FORVOICEEVENT_AISACCONTROL_AISACCONTROL07 ( 7) /* */ +#define CRI_FORVOICEEVENT_AISACCONTROL_AISACCONTROL08 ( 8) /* */ +#define CRI_FORVOICEEVENT_AISACCONTROL_AISACCONTROL09 ( 9) /* */ +#define CRI_FORVOICEEVENT_AISACCONTROL_AISACCONTROL10 (10) /* */ +#define CRI_FORVOICEEVENT_AISACCONTROL_AISACCONTROL11 (11) /* */ +#define CRI_FORVOICEEVENT_AISACCONTROL_AISACCONTROL12 (12) /* */ +#define CRI_FORVOICEEVENT_AISACCONTROL_AISACCONTROL13 (13) /* */ +#define CRI_FORVOICEEVENT_AISACCONTROL_AISACCONTROL14 (14) /* */ +#define CRI_FORVOICEEVENT_AISACCONTROL_AISACCONTROL15 (15) /* */ + +/* Voice Limit Group (Voice Limit Group Index) */ +#define CRI_FORVOICEEVENT_VOICELIMITGROUP_SE ( 0) /* */ +#define CRI_FORVOICEEVENT_VOICELIMITGROUP_VOICE ( 1) /* */ +#define CRI_FORVOICEEVENT_VOICELIMITGROUP_BGM ( 2) /* */ + +/* DspSetting List (DspSetting Name) */ +#define CRI_FORVOICEEVENT_DSPSETTING_DSPBUSSETTING_0 "DspBusSetting_0" /* */ + +/* DspBusName List (DspBus Name) */ +#define CRI_FORVOICEEVENT_DSPBUSNAME_BUS1 "BUS1" /* */ +#define CRI_FORVOICEEVENT_DSPBUSNAME_BUS2 "BUS2" /* */ +#define CRI_FORVOICEEVENT_DSPBUSNAME_BUS3 "BUS3" /* */ +#define CRI_FORVOICEEVENT_DSPBUSNAME_BUS4 "BUS4" /* */ +#define CRI_FORVOICEEVENT_DSPBUSNAME_BUS5 "BUS5" /* */ +#define CRI_FORVOICEEVENT_DSPBUSNAME_BUS6 "BUS6" /* */ +#define CRI_FORVOICEEVENT_DSPBUSNAME_BUS7 "BUS7" /* */ +#define CRI_FORVOICEEVENT_DSPBUSNAME_MASTEROUT "MasterOut" /* */ + +/* Game Variable (Game Variable Index) */ +#define CRI_FORVOICEEVENT_GAMEVARIABLE_DEFAULT ( 0) /* */ + diff --git a/3rdParty/cri2019/common/smpdata/criatomex/HCA_MX_SE.awb b/3rdParty/cri2019/common/smpdata/criatomex/HCA_MX_SE.awb new file mode 100644 index 00000000..402c64b3 Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/criatomex/HCA_MX_SE.awb differ diff --git a/3rdParty/cri2019/common/smpdata/criatomex/InterleavedMultiTrack.hca b/3rdParty/cri2019/common/smpdata/criatomex/InterleavedMultiTrack.hca new file mode 100644 index 00000000..288331aa Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/criatomex/InterleavedMultiTrack.hca differ diff --git a/3rdParty/cri2019/common/smpdata/criatomex/SampleAdxPack.awb b/3rdParty/cri2019/common/smpdata/criatomex/SampleAdxPack.awb new file mode 100644 index 00000000..b744bd81 Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/criatomex/SampleAdxPack.awb differ diff --git a/3rdParty/cri2019/common/smpdata/criatomex/SampleAdxPack_awb.h b/3rdParty/cri2019/common/smpdata/criatomex/SampleAdxPack_awb.h new file mode 100644 index 00000000..03bb1292 --- /dev/null +++ b/3rdParty/cri2019/common/smpdata/criatomex/SampleAdxPack_awb.h @@ -0,0 +1,75 @@ +/*===========================================================================* + * Contents file Information header + * AWB Filename : B:\cri\common\smpdata\criatomex\pc\SampleAdxPack.awb + * File Size : 1,417,440 bytes + * Date Time : 2013/07/17 16:25 + * File Mode : ID Only + *===========================================================================*/ + +#ifndef AWB_DISABLE_COMMON_DEFINITION ///////////////////////////////////////// + +/* Information size of the AWB file */ +#ifndef AWB_ITOC_INFO_SIZE +#define AWB_ITOC_INFO_SIZE (0) +#endif +#ifndef AWB_TOTAL_INFO_SIZE +#define AWB_TOTAL_INFO_SIZE (0) +#endif +#ifndef AWB_TOTAL_INFO_SIZE_ALIGNED +#define AWB_TOTAL_INFO_SIZE_ALIGNED (127) +#endif + +/* Information size of the AWB file (Unique) */ +#define SAMPLEADXPACK_AWB_ITOC_INFO_SIZE (0) +#define SAMPLEADXPACK_AWB_TOTAL_INFO_SIZE (0) +#define SAMPLEADXPACK_AWB_TOTAL_INFO_SIZE_ALIGNED (127) + +/* AWB file information */ +#ifndef AWB_FILENAME +#define AWB_FILENAME "SampleAdxPack.awb" +#endif + +/* Number of contents */ +#ifndef NUM_CONTENS +#define NUM_CONTENS (5) +#endif + +/* AWB file information (Unique) */ +#define SAMPLEADXPACK_AWB_FILENAME "SampleAdxPack.awb" + +/* Number of contents (Unique) */ +#define SAMPLEADXPACK_AWB_NUM_CONTENS (5) + +/* Content ID definitions */ +#define VOICE_A_ADX (0) // voice_a.adx +#define VOICE_B_ADX (1) // voice_b.adx +#define VOICE_C_ADX (2) // voice_c.adx +#define MUSIC_LOOP_ADX (3) // music_loop.adx +#define TTRAILER_SHORTLOOP_ADX (4) // Ttrailer_ShortLoop.adx + +#endif // end of AWB_DISABLE_COMMON_DEFINITION + + +#ifndef AWB_DISABLE_UNIQUE_DEFINITION ///////////////////////////////////////// + +/* AWB file information */ +#ifndef SAMPLEADXPACK_AWB_FILENAME +#define SAMPLEADXPACK_AWB_FILENAME "SampleAdxPack.awb" +#endif + +/* Number of contents */ +#ifndef SAMPLEADXPACK_AWB_NUM_CONTENS +#define SAMPLEADXPACK_AWB_NUM_CONTENS (5) +#endif + +/* Content ID definitions */ +#define SAMPLEADXPACK_AWB_VOICE_A_ADX (0) // voice_a.adx +#define SAMPLEADXPACK_AWB_VOICE_B_ADX (1) // voice_b.adx +#define SAMPLEADXPACK_AWB_VOICE_C_ADX (2) // voice_c.adx +#define SAMPLEADXPACK_AWB_MUSIC_LOOP_ADX (3) // music_loop.adx +#define SAMPLEADXPACK_AWB_TTRAILER_SHORTLOOP_ADX (4) // Ttrailer_ShortLoop.adx + +#endif // end of AWB_DISABLPAE_UNIQUE_DEFINITION + + +/* end of file */ diff --git a/3rdParty/cri2019/common/smpdata/criatomex/SampleProject.acf b/3rdParty/cri2019/common/smpdata/criatomex/SampleProject.acf new file mode 100644 index 00000000..b3c7b5fc Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/criatomex/SampleProject.acf differ diff --git a/3rdParty/cri2019/common/smpdata/criatomex/SampleProject_acf.h b/3rdParty/cri2019/common/smpdata/criatomex/SampleProject_acf.h new file mode 100644 index 00000000..9bdd41a2 --- /dev/null +++ b/3rdParty/cri2019/common/smpdata/criatomex/SampleProject_acf.h @@ -0,0 +1,101 @@ +/*===========================================================================* + * Header file for Atom Config File + * Project : SampleProject + * Tool Ver. : CRI Atom Craft Ver.2.35.09 + * File Path : E:/ws/adx2-smpdata/p4ws/CriMovieDepot/_cri_rake_temp/smpdata_build/PC/SampleProject.acf + * File Name : SampleProject.acf + * File Size : 6,880 bytes + * Date Time : 2018/08/03 18:20 + * Target : PC + * Categories : 5 + * AISAC Controls : 16 + * Global AISACs : 0 + * Voice Limit Groups : 0 + * DSP BUS Settings : 1 + * DSP BUS Settings Snapshot : 2 + * DSP BUS Name : 8 + * Game Variables : 1 + * Selectors : 2 + * REACTs : 1 + * Project Comment : + *===========================================================================*/ + +#define CRI_SAMPLEPROJECT_ACF_NUM_CATEGORIES_PER_PLAYBACK (4) +#define CRI_SAMPLEPROJECT_ACF_CATEGORYNUM (5) +#define CRI_SAMPLEPROJECT_ACF_AISACCONTROLNUM (16) +#define CRI_SAMPLEPROJECT_ACF_GLOBALAISACNUM (0) +#define CRI_SAMPLEPROJECT_ACF_VOICELIMITGROUPNUM (0) +#define CRI_SAMPLEPROJECT_ACF_DSPSETTINGNUM (1) +#define CRI_SAMPLEPROJECT_ACF_DSPSETTINGSNAPSHOTNUM (2) +#define CRI_SAMPLEPROJECT_ACF_DSPBUSNAMENUM (8) +#define CRI_SAMPLEPROJECT_ACF_GAMEVARIABLENUM (1) +#define CRI_SAMPLEPROJECT_ACF_SELECTORNUM (2) +#define CRI_SAMPLEPROJECT_ACF_REACTNUM (1) + +/* Category List (Category ID) */ +#define CRI_SAMPLEPROJECT_ACF_CATEGORY_MUSIC ( 0) /* Category/Music */ +#define CRI_SAMPLEPROJECT_ACF_CATEGORY_SE ( 1) /* Category/SE */ +#define CRI_SAMPLEPROJECT_ACF_CATEGORY_VOICE ( 2) /* Category/Voice */ +#define CRI_SAMPLEPROJECT_ACF_CATEGORY_BGM_REACT ( 3) /* Ducking/BGM_REACT */ +#define CRI_SAMPLEPROJECT_ACF_CATEGORY_VOICE_REACT ( 4) /* Ducking/Voice_REACT */ + +/* AISAC Control List (AISAC Control ID) */ +#define CRI_SAMPLEPROJECT_ACF_AISACCONTROL_ANY ( 0) /* Any */ +#define CRI_SAMPLEPROJECT_ACF_AISACCONTROL_DISTANCE ( 1) /* Distance */ +#define CRI_SAMPLEPROJECT_ACF_AISACCONTROL_AISACCONTROL02 ( 2) /* AisacControl02 */ +#define CRI_SAMPLEPROJECT_ACF_AISACCONTROL_AISACCONTROL03 ( 3) /* AisacControl03 */ +#define CRI_SAMPLEPROJECT_ACF_AISACCONTROL_AISACCONTROL04 ( 4) /* AisacControl04 */ +#define CRI_SAMPLEPROJECT_ACF_AISACCONTROL_AISACCONTROL05 ( 5) /* AisacControl05 */ +#define CRI_SAMPLEPROJECT_ACF_AISACCONTROL_AISACCONTROL06 ( 6) /* AisacControl06 */ +#define CRI_SAMPLEPROJECT_ACF_AISACCONTROL_AISACCONTROL07 ( 7) /* AisacControl07 */ +#define CRI_SAMPLEPROJECT_ACF_AISACCONTROL_AISACCONTROL08 ( 8) /* AisacControl08 */ +#define CRI_SAMPLEPROJECT_ACF_AISACCONTROL_AISACCONTROL09 ( 9) /* AisacControl09 */ +#define CRI_SAMPLEPROJECT_ACF_AISACCONTROL_AISACCONTROL10 (10) /* AisacControl10 */ +#define CRI_SAMPLEPROJECT_ACF_AISACCONTROL_AISACCONTROL11 (11) /* AisacControl11 */ +#define CRI_SAMPLEPROJECT_ACF_AISACCONTROL_AISACCONTROL12 (12) /* AisacControl12 */ +#define CRI_SAMPLEPROJECT_ACF_AISACCONTROL_AISACCONTROL13 (13) /* AisacControl13 */ +#define CRI_SAMPLEPROJECT_ACF_AISACCONTROL_AISACCONTROL14 (14) /* AisacControl14 */ +#define CRI_SAMPLEPROJECT_ACF_AISACCONTROL_AISACCONTROL15 (15) /* AisacControl15 */ + +/* Global AISAC List (Global AISAC Name) */ +// No Global AISAC + + +/* DspSetting List (DspSetting Name) */ +#define CRI_SAMPLEPROJECT_ACF_DSPSETTING_DSPBUSSETTING_0 "DspBusSetting_0" /* */ + +/* DspSettingSnapshot List (DspSettingSnapshot Name) */ +#define CRI_SAMPLEPROJECT_ACF_DSPSETTINGSNAPSHOT_DSPBUSSETTING_0_SNAPSHOT1 "Snapshot1" /* */ +#define CRI_SAMPLEPROJECT_ACF_DSPSETTINGSNAPSHOT_DSPBUSSETTING_0_SNAPSHOT2 "Snapshot2" /* */ + +/* DspBusName List (DspBus Name) */ +#define CRI_SAMPLEPROJECT_ACF_DSPBUSNAME_MASTEROUT "MasterOut" +#define CRI_SAMPLEPROJECT_ACF_DSPBUSNAME_BUS1 "BUS1" +#define CRI_SAMPLEPROJECT_ACF_DSPBUSNAME_BUS2 "BUS2" +#define CRI_SAMPLEPROJECT_ACF_DSPBUSNAME_BUS3 "BUS3" +#define CRI_SAMPLEPROJECT_ACF_DSPBUSNAME_BUS4 "BUS4" +#define CRI_SAMPLEPROJECT_ACF_DSPBUSNAME_BUS5 "BUS5" +#define CRI_SAMPLEPROJECT_ACF_DSPBUSNAME_BUS6 "BUS6" +#define CRI_SAMPLEPROJECT_ACF_DSPBUSNAME_BUS7 "BUS7" + +/* Game Variable (Game Variable Index) */ +#define CRI_SAMPLEPROJECT_ACF_GAMEVARIABLE_DEFAULT "Default" /* */ + +/* Selector/Selector Label List (Selector/Selector Label Name) */ +#define CRI_SAMPLEPROJECT_ACF_SELECTOR_TEMPOCHANGE "TempoChange" /* */ +#define CRI_SAMPLEPROJECT_ACF_SELECTORLABEL_TEMPOCHANGE_TEMPO40 "Tempo40" /* */ +#define CRI_SAMPLEPROJECT_ACF_SELECTORLABEL_TEMPOCHANGE_TEMPO100 "Tempo100" /* */ +#define CRI_SAMPLEPROJECT_ACF_SELECTORLABEL_TEMPOCHANGE_TEMPO120 "Tempo120" /* */ +#define CRI_SAMPLEPROJECT_ACF_SELECTORLABEL_TEMPOCHANGE_TEMPO140 "Tempo140" /* */ +#define CRI_SAMPLEPROJECT_ACF_SELECTORLABEL_TEMPOCHANGE_TEMPO160 "Tempo160" /* */ +#define CRI_SAMPLEPROJECT_ACF_SELECTORLABEL_TEMPOCHANGE_TEMPO200 "Tempo200" /* */ + +#define CRI_SAMPLEPROJECT_ACF_SELECTOR_TRACKTRANSITION "TrackTransition" /* */ +#define CRI_SAMPLEPROJECT_ACF_SELECTORLABEL_TRACKTRANSITION_ARP "Arp" /* */ +#define CRI_SAMPLEPROJECT_ACF_SELECTORLABEL_TRACKTRANSITION_BRASS "Brass" /* */ +#define CRI_SAMPLEPROJECT_ACF_SELECTORLABEL_TRACKTRANSITION_DRUM "Drum" /* */ +#define CRI_SAMPLEPROJECT_ACF_SELECTORLABEL_TRACKTRANSITION_EP "EP" /* */ + + +/* end of file */ + diff --git a/3rdParty/cri2019/common/smpdata/criatomex/SampleProject_decryption.acf b/3rdParty/cri2019/common/smpdata/criatomex/SampleProject_decryption.acf new file mode 100644 index 00000000..2658cf9a Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/criatomex/SampleProject_decryption.acf differ diff --git a/3rdParty/cri2019/common/smpdata/criatomex/SampleProject_decryption_acf.h b/3rdParty/cri2019/common/smpdata/criatomex/SampleProject_decryption_acf.h new file mode 100644 index 00000000..a17f90ae --- /dev/null +++ b/3rdParty/cri2019/common/smpdata/criatomex/SampleProject_decryption_acf.h @@ -0,0 +1,74 @@ +/*===========================================================================* + * Header file for Atom Config File + * Project : SampleProject_decryption + * Tool Ver. : Ver.1.03.00 + * File Path : E:/ws/adx2-smpdata/p4ws/CriMovieDepot/_cri_rake_temp/smpdata_build/PC + * File Name : SampleProject_decryption_acf.h + * File Size : 5088 bytes + * Date Time : 2019/02/15 17:56:41 + * Target : PC + * Categories : 1 + * AISAC Controls : 16 + * Global AISACs : 0 + * Voice Limit Groups : 1 + * DSP BUS Settings : 1 + * DSP BUS Settings Snapshot : 0 + * DSP BUS Name : 8 + * Game Variables : 1 + * Selectors : 0 + * REACTs : 0 + * Project Comment : + *===========================================================================*/ + +#define CRI_SAMPLEPROJECT_DECRYPTION_ACF_NUM_CATEGORIES_PER_PLAYBACK (4) +#define CRI_SAMPLEPROJECT_DECRYPTION_ACF_CATEGORYNUM (1) +#define CRI_SAMPLEPROJECT_DECRYPTION_ACF_AISACCONTROLNUM (16) +#define CRI_SAMPLEPROJECT_DECRYPTION_ACF_GLOBALAISACNUM (0) +#define CRI_SAMPLEPROJECT_DECRYPTION_ACF_VOICELIMITGROUPNUM (1) +#define CRI_SAMPLEPROJECT_DECRYPTION_ACF_DSPSETTINGNUM (1) +#define CRI_SAMPLEPROJECT_DECRYPTION_ACF_DSPSETTINGSNAPSHOTNUM (0) +#define CRI_SAMPLEPROJECT_DECRYPTION_ACF_DSPBUSNAMENUM (8) +#define CRI_SAMPLEPROJECT_DECRYPTION_ACF_GAMEVARIABLENUM (1) +#define CRI_SAMPLEPROJECT_DECRYPTION_ACF_SELECTORNUM (0) +#define CRI_SAMPLEPROJECT_DECRYPTIONACF_REACTNUM (0) + +/* Category List (Category ID) */ +#define CRI_SAMPLEPROJECT_DECRYPTION_CATEGORY_CATEGORY_0 ( 0) /* */ + +/* AISAC Control List (AISAC Control ID) */ +#define CRI_SAMPLEPROJECT_DECRYPTION_AISACCONTROL_ANY ( 0) /* */ +#define CRI_SAMPLEPROJECT_DECRYPTION_AISACCONTROL_DISTANCE ( 1) /* */ +#define CRI_SAMPLEPROJECT_DECRYPTION_AISACCONTROL_AISACCONTROL02 ( 2) /* */ +#define CRI_SAMPLEPROJECT_DECRYPTION_AISACCONTROL_AISACCONTROL03 ( 3) /* */ +#define CRI_SAMPLEPROJECT_DECRYPTION_AISACCONTROL_AISACCONTROL04 ( 4) /* */ +#define CRI_SAMPLEPROJECT_DECRYPTION_AISACCONTROL_AISACCONTROL05 ( 5) /* */ +#define CRI_SAMPLEPROJECT_DECRYPTION_AISACCONTROL_AISACCONTROL06 ( 6) /* */ +#define CRI_SAMPLEPROJECT_DECRYPTION_AISACCONTROL_AISACCONTROL07 ( 7) /* */ +#define CRI_SAMPLEPROJECT_DECRYPTION_AISACCONTROL_AISACCONTROL08 ( 8) /* */ +#define CRI_SAMPLEPROJECT_DECRYPTION_AISACCONTROL_AISACCONTROL09 ( 9) /* */ +#define CRI_SAMPLEPROJECT_DECRYPTION_AISACCONTROL_AISACCONTROL10 (10) /* */ +#define CRI_SAMPLEPROJECT_DECRYPTION_AISACCONTROL_AISACCONTROL11 (11) /* */ +#define CRI_SAMPLEPROJECT_DECRYPTION_AISACCONTROL_AISACCONTROL12 (12) /* */ +#define CRI_SAMPLEPROJECT_DECRYPTION_AISACCONTROL_AISACCONTROL13 (13) /* */ +#define CRI_SAMPLEPROJECT_DECRYPTION_AISACCONTROL_AISACCONTROL14 (14) /* */ +#define CRI_SAMPLEPROJECT_DECRYPTION_AISACCONTROL_AISACCONTROL15 (15) /* */ + +/* Voice Limit Group (Voice Limit Group Index) */ +#define CRI_SAMPLEPROJECT_DECRYPTION_VOICELIMITGROUP_VOICELIMITGROUP_0 ( 0) /* */ + +/* DspSetting List (DspSetting Name) */ +#define CRI_SAMPLEPROJECT_DECRYPTION_DSPSETTING_DSPBUSSETTING_0 "DspBusSetting_0" /* */ + +/* DspBusName List (DspBus Name) */ +#define CRI_SAMPLEPROJECT_DECRYPTION_DSPBUSNAME_BUS1 "BUS1" /* */ +#define CRI_SAMPLEPROJECT_DECRYPTION_DSPBUSNAME_BUS2 "BUS2" /* */ +#define CRI_SAMPLEPROJECT_DECRYPTION_DSPBUSNAME_BUS3 "BUS3" /* */ +#define CRI_SAMPLEPROJECT_DECRYPTION_DSPBUSNAME_BUS4 "BUS4" /* */ +#define CRI_SAMPLEPROJECT_DECRYPTION_DSPBUSNAME_BUS5 "BUS5" /* */ +#define CRI_SAMPLEPROJECT_DECRYPTION_DSPBUSNAME_BUS6 "BUS6" /* */ +#define CRI_SAMPLEPROJECT_DECRYPTION_DSPBUSNAME_BUS7 "BUS7" /* */ +#define CRI_SAMPLEPROJECT_DECRYPTION_DSPBUSNAME_MASTEROUT "MasterOut" /* */ + +/* Game Variable (Game Variable Index) */ +#define CRI_SAMPLEPROJECT_DECRYPTION_GAMEVARIABLE_DEFAULT ( 0) /* */ + diff --git a/3rdParty/cri2019/common/smpdata/criatomex/TrackTransition.acb b/3rdParty/cri2019/common/smpdata/criatomex/TrackTransition.acb new file mode 100644 index 00000000..6f205970 Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/criatomex/TrackTransition.acb differ diff --git a/3rdParty/cri2019/common/smpdata/criatomex/TrackTransition.awb b/3rdParty/cri2019/common/smpdata/criatomex/TrackTransition.awb new file mode 100644 index 00000000..283b3026 Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/criatomex/TrackTransition.awb differ diff --git a/3rdParty/cri2019/common/smpdata/criatomex/TrackTransition.h b/3rdParty/cri2019/common/smpdata/criatomex/TrackTransition.h new file mode 100644 index 00000000..7bb4620b --- /dev/null +++ b/3rdParty/cri2019/common/smpdata/criatomex/TrackTransition.h @@ -0,0 +1,26 @@ +/*===========================================================================* + * Header file for Atom CueSheet Binary + * Project : SampleProject + * Tool Ver. : Ver.1.03.00 + * File Path : E:/ws/adx2-smpdata/p4ws/CriMovieDepot/_cri_rake_temp/smpdata_build/PC + * File Name : TrackTransition.h + * File Size : 8032 bytes + * Date Time : 2019/02/15 17:56:40 + * Target : PC + * Cues : 2 + * CueSheet Comment : + * Stream Awb Path : E:/ws/adx2-smpdata/p4ws/CriMovieDepot/_cri_rake_temp/smpdata_build/PC/TrackTransition.awb + *===========================================================================*/ + +#define CRI_TRACKTRANSITION_CUENUM (2) + +/* AISAC Control List (AISAC Control ID) */ + +/* Cue List (Cue ID) */ +#define CRI_TRACKTRANSITION_SAMETEMPO ( 0) /* */ +#define CRI_TRACKTRANSITION_DIFFERENTTEMPO ( 1) /* */ + +/* Block List (Block Index) */ + +/* end of file */ + diff --git a/3rdParty/cri2019/common/smpdata/criatomex/TutorialProject.acf b/3rdParty/cri2019/common/smpdata/criatomex/TutorialProject.acf new file mode 100644 index 00000000..9d8ad74d Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/criatomex/TutorialProject.acf differ diff --git a/3rdParty/cri2019/common/smpdata/criatomex/TutorialProject_acf.h b/3rdParty/cri2019/common/smpdata/criatomex/TutorialProject_acf.h new file mode 100644 index 00000000..89a0e152 --- /dev/null +++ b/3rdParty/cri2019/common/smpdata/criatomex/TutorialProject_acf.h @@ -0,0 +1,74 @@ +/*===========================================================================* + * Header file for Atom Config File + * Project : TutorialProject + * Tool Ver. : Ver.1.03.00 + * File Path : E:/ws/adx2-smpdata/p4ws/CriMovieDepot/_cri_rake_temp/smpdata_build/PC + * File Name : TutorialProject_acf.h + * File Size : 5088 bytes + * Date Time : 2019/02/15 17:56:41 + * Target : PC + * Categories : 1 + * AISAC Controls : 16 + * Global AISACs : 0 + * Voice Limit Groups : 1 + * DSP BUS Settings : 1 + * DSP BUS Settings Snapshot : 0 + * DSP BUS Name : 8 + * Game Variables : 1 + * Selectors : 0 + * REACTs : 0 + * Project Comment : + *===========================================================================*/ + +#define CRI_TUTORIALPROJECT_ACF_NUM_CATEGORIES_PER_PLAYBACK (4) +#define CRI_TUTORIALPROJECT_ACF_CATEGORYNUM (1) +#define CRI_TUTORIALPROJECT_ACF_AISACCONTROLNUM (16) +#define CRI_TUTORIALPROJECT_ACF_GLOBALAISACNUM (0) +#define CRI_TUTORIALPROJECT_ACF_VOICELIMITGROUPNUM (1) +#define CRI_TUTORIALPROJECT_ACF_DSPSETTINGNUM (1) +#define CRI_TUTORIALPROJECT_ACF_DSPSETTINGSNAPSHOTNUM (0) +#define CRI_TUTORIALPROJECT_ACF_DSPBUSNAMENUM (8) +#define CRI_TUTORIALPROJECT_ACF_GAMEVARIABLENUM (1) +#define CRI_TUTORIALPROJECT_ACF_SELECTORNUM (0) +#define CRI_TUTORIALPROJECTACF_REACTNUM (0) + +/* Category List (Category ID) */ +#define CRI_TUTORIALPROJECT_CATEGORY_CATEGORY_0 ( 0) /* */ + +/* AISAC Control List (AISAC Control ID) */ +#define CRI_TUTORIALPROJECT_AISACCONTROL_ANY ( 0) /* */ +#define CRI_TUTORIALPROJECT_AISACCONTROL_DISTANCE ( 1) /* */ +#define CRI_TUTORIALPROJECT_AISACCONTROL_AISACCONTROL02 ( 2) /* */ +#define CRI_TUTORIALPROJECT_AISACCONTROL_AISACCONTROL03 ( 3) /* */ +#define CRI_TUTORIALPROJECT_AISACCONTROL_AISACCONTROL04 ( 4) /* */ +#define CRI_TUTORIALPROJECT_AISACCONTROL_AISACCONTROL05 ( 5) /* */ +#define CRI_TUTORIALPROJECT_AISACCONTROL_AISACCONTROL06 ( 6) /* */ +#define CRI_TUTORIALPROJECT_AISACCONTROL_AISACCONTROL07 ( 7) /* */ +#define CRI_TUTORIALPROJECT_AISACCONTROL_AISACCONTROL08 ( 8) /* */ +#define CRI_TUTORIALPROJECT_AISACCONTROL_AISACCONTROL09 ( 9) /* */ +#define CRI_TUTORIALPROJECT_AISACCONTROL_AISACCONTROL10 (10) /* */ +#define CRI_TUTORIALPROJECT_AISACCONTROL_AISACCONTROL11 (11) /* */ +#define CRI_TUTORIALPROJECT_AISACCONTROL_AISACCONTROL12 (12) /* */ +#define CRI_TUTORIALPROJECT_AISACCONTROL_AISACCONTROL13 (13) /* */ +#define CRI_TUTORIALPROJECT_AISACCONTROL_AISACCONTROL14 (14) /* */ +#define CRI_TUTORIALPROJECT_AISACCONTROL_AISACCONTROL15 (15) /* */ + +/* Voice Limit Group (Voice Limit Group Index) */ +#define CRI_TUTORIALPROJECT_VOICELIMITGROUP_VOICELIMITGROUP_0 ( 0) /* */ + +/* DspSetting List (DspSetting Name) */ +#define CRI_TUTORIALPROJECT_DSPSETTING_DSPBUSSETTING_0 "DspBusSetting_0" /* */ + +/* DspBusName List (DspBus Name) */ +#define CRI_TUTORIALPROJECT_DSPBUSNAME_BUS1 "BUS1" /* */ +#define CRI_TUTORIALPROJECT_DSPBUSNAME_BUS2 "BUS2" /* */ +#define CRI_TUTORIALPROJECT_DSPBUSNAME_BUS3 "BUS3" /* */ +#define CRI_TUTORIALPROJECT_DSPBUSNAME_BUS4 "BUS4" /* */ +#define CRI_TUTORIALPROJECT_DSPBUSNAME_BUS5 "BUS5" /* */ +#define CRI_TUTORIALPROJECT_DSPBUSNAME_BUS6 "BUS6" /* */ +#define CRI_TUTORIALPROJECT_DSPBUSNAME_BUS7 "BUS7" /* */ +#define CRI_TUTORIALPROJECT_DSPBUSNAME_MASTEROUT "MasterOut" /* */ + +/* Game Variable (Game Variable Index) */ +#define CRI_TUTORIALPROJECT_GAMEVARIABLE_DEFAULT ( 0) /* */ + diff --git a/3rdParty/cri2019/common/smpdata/criatomex/decryption.acb b/3rdParty/cri2019/common/smpdata/criatomex/decryption.acb new file mode 100644 index 00000000..9cdc8cb0 Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/criatomex/decryption.acb differ diff --git a/3rdParty/cri2019/common/smpdata/criatomex/decryption.h b/3rdParty/cri2019/common/smpdata/criatomex/decryption.h new file mode 100644 index 00000000..3cc9c3aa --- /dev/null +++ b/3rdParty/cri2019/common/smpdata/criatomex/decryption.h @@ -0,0 +1,27 @@ +/*===========================================================================* + * Header file for Atom CueSheet Binary + * Project : SampleProject_decryption + * Tool Ver. : Ver.1.03.00 + * File Path : E:/ws/adx2-smpdata/p4ws/CriMovieDepot/_cri_rake_temp/smpdata_build/PC + * File Name : decryption.h + * File Size : 693760 bytes + * Date Time : 2019/02/15 17:56:41 + * Target : PC + * Cues : 2 + * CueSheet Comment : + * Stream Awb Path : E:/ws/adx2-smpdata/p4ws/CriMovieDepot/_cri_rake_temp/smpdata_build/PC/decryption.awb + * Encryption Key : 123456789 + *===========================================================================*/ + +#define CRI_DECRYPTION_CUENUM (2) + +/* AISAC Control List (AISAC Control ID) */ + +/* Cue List (Cue ID) */ +#define CRI_DECRYPTION_VOICE_ADX ( 0) /* */ +#define CRI_DECRYPTION_VOICE_HCA ( 1) /* */ + +/* Block List (Block Index) */ + +/* end of file */ + diff --git a/3rdParty/cri2019/common/smpdata/criatomex/forProfiler/cue_sheet_cue_detail.acb b/3rdParty/cri2019/common/smpdata/criatomex/forProfiler/cue_sheet_cue_detail.acb new file mode 100644 index 00000000..47d57c86 Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/criatomex/forProfiler/cue_sheet_cue_detail.acb differ diff --git a/3rdParty/cri2019/common/smpdata/criatomex/forProfiler/cue_sheet_cue_detail.awb b/3rdParty/cri2019/common/smpdata/criatomex/forProfiler/cue_sheet_cue_detail.awb new file mode 100644 index 00000000..83284c71 Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/criatomex/forProfiler/cue_sheet_cue_detail.awb differ diff --git a/3rdParty/cri2019/common/smpdata/criatomex/forProfiler/cue_sheet_cue_detail.h b/3rdParty/cri2019/common/smpdata/criatomex/forProfiler/cue_sheet_cue_detail.h new file mode 100644 index 00000000..d2a9c91a --- /dev/null +++ b/3rdParty/cri2019/common/smpdata/criatomex/forProfiler/cue_sheet_cue_detail.h @@ -0,0 +1,27 @@ +/*===========================================================================* + * Header file for Atom CueSheet Binary + * Project : project_for_profiler + * Tool Ver. : Ver.1.03.00 + * File Path : E:/ws/adx2-smpdata/p4ws/CriMovieDepot/_cri_rake_temp/smpdata_build/PC/inGamePreview + * File Name : cue_sheet_cue_detail.h + * File Size : 61600 bytes + * Date Time : 2019/02/15 17:56:43 + * Target : PC + * Cues : 3 + * CueSheet Comment : + * Stream Awb Path : E:/ws/adx2-smpdata/p4ws/CriMovieDepot/_cri_rake_temp/smpdata_build/PC/inGamePreview/cue_sheet_cue_detail.awb + *===========================================================================*/ + +#define CRI_CUE_SHEET_CUE_DETAIL_CUENUM (3) + +/* AISAC Control List (AISAC Control ID) */ + +/* Cue List (Cue ID) */ +#define CRI_CUE_SHEET_CUE_DETAIL_BGM_LIMIT1 ( 0) /* */ +#define CRI_CUE_SHEET_CUE_DETAIL_BOMB ( 1) /* */ +#define CRI_CUE_SHEET_CUE_DETAIL_GUN ( 2) /* */ + +/* Block List (Block Index) */ + +/* end of file */ + diff --git a/3rdParty/cri2019/common/smpdata/criatomex/forProfiler/cue_sheet_simple.acb b/3rdParty/cri2019/common/smpdata/criatomex/forProfiler/cue_sheet_simple.acb new file mode 100644 index 00000000..1ba25267 Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/criatomex/forProfiler/cue_sheet_simple.acb differ diff --git a/3rdParty/cri2019/common/smpdata/criatomex/forProfiler/cue_sheet_simple.awb b/3rdParty/cri2019/common/smpdata/criatomex/forProfiler/cue_sheet_simple.awb new file mode 100644 index 00000000..83284c71 Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/criatomex/forProfiler/cue_sheet_simple.awb differ diff --git a/3rdParty/cri2019/common/smpdata/criatomex/forProfiler/cue_sheet_simple.h b/3rdParty/cri2019/common/smpdata/criatomex/forProfiler/cue_sheet_simple.h new file mode 100644 index 00000000..7953f3c2 --- /dev/null +++ b/3rdParty/cri2019/common/smpdata/criatomex/forProfiler/cue_sheet_simple.h @@ -0,0 +1,26 @@ +/*===========================================================================* + * Header file for Atom CueSheet Binary + * Project : project_for_profiler + * Tool Ver. : Ver.1.03.00 + * File Path : E:/ws/adx2-smpdata/p4ws/CriMovieDepot/_cri_rake_temp/smpdata_build/PC/inGamePreview + * File Name : cue_sheet_simple.h + * File Size : 15776 bytes + * Date Time : 2019/02/15 17:56:43 + * Target : PC + * Cues : 2 + * CueSheet Comment : + * Stream Awb Path : E:/ws/adx2-smpdata/p4ws/CriMovieDepot/_cri_rake_temp/smpdata_build/PC/inGamePreview/cue_sheet_simple.awb + *===========================================================================*/ + +#define CRI_CUE_SHEET_SIMPLE_CUENUM (2) + +/* AISAC Control List (AISAC Control ID) */ + +/* Cue List (Cue ID) */ +#define CRI_CUE_SHEET_SIMPLE_STREAMBGM ( 0) /* */ +#define CRI_CUE_SHEET_SIMPLE_ONESHOTSE ( 1) /* */ + +/* Block List (Block Index) */ + +/* end of file */ + diff --git a/3rdParty/cri2019/common/smpdata/criatomex/forProfiler/cue_sheet_three_d.acb b/3rdParty/cri2019/common/smpdata/criatomex/forProfiler/cue_sheet_three_d.acb new file mode 100644 index 00000000..37bdf7ff Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/criatomex/forProfiler/cue_sheet_three_d.acb differ diff --git a/3rdParty/cri2019/common/smpdata/criatomex/forProfiler/cue_sheet_three_d.h b/3rdParty/cri2019/common/smpdata/criatomex/forProfiler/cue_sheet_three_d.h new file mode 100644 index 00000000..d88ecda0 --- /dev/null +++ b/3rdParty/cri2019/common/smpdata/criatomex/forProfiler/cue_sheet_three_d.h @@ -0,0 +1,26 @@ +/*===========================================================================* + * Header file for Atom CueSheet Binary + * Project : project_for_profiler + * Tool Ver. : Ver.1.03.00 + * File Path : E:/ws/adx2-smpdata/p4ws/CriMovieDepot/_cri_rake_temp/smpdata_build/PC/inGamePreview + * File Name : cue_sheet_three_d.h + * File Size : 54976 bytes + * Date Time : 2019/02/15 17:56:43 + * Target : PC + * Cues : 2 + * CueSheet Comment : + * Stream Awb Path : E:/ws/adx2-smpdata/p4ws/CriMovieDepot/_cri_rake_temp/smpdata_build/PC/inGamePreview/cue_sheet_three_d.awb + *===========================================================================*/ + +#define CRI_CUE_SHEET_THREE_D_CUENUM (2) + +/* AISAC Control List (AISAC Control ID) */ + +/* Cue List (Cue ID) */ +#define CRI_CUE_SHEET_THREE_D_MALE_3D ( 0) /* */ +#define CRI_CUE_SHEET_THREE_D_HELI_LOOP_3D ( 1) /* */ + +/* Block List (Block Index) */ + +/* end of file */ + diff --git a/3rdParty/cri2019/common/smpdata/criatomex/forProfiler/cue_sheet_voice_detail.acb b/3rdParty/cri2019/common/smpdata/criatomex/forProfiler/cue_sheet_voice_detail.acb new file mode 100644 index 00000000..4b35e91f Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/criatomex/forProfiler/cue_sheet_voice_detail.acb differ diff --git a/3rdParty/cri2019/common/smpdata/criatomex/forProfiler/cue_sheet_voice_detail.h b/3rdParty/cri2019/common/smpdata/criatomex/forProfiler/cue_sheet_voice_detail.h new file mode 100644 index 00000000..0af38f9c --- /dev/null +++ b/3rdParty/cri2019/common/smpdata/criatomex/forProfiler/cue_sheet_voice_detail.h @@ -0,0 +1,26 @@ +/*===========================================================================* + * Header file for Atom CueSheet Binary + * Project : project_for_profiler + * Tool Ver. : Ver.1.03.00 + * File Path : E:/ws/adx2-smpdata/p4ws/CriMovieDepot/_cri_rake_temp/smpdata_build/PC/inGamePreview + * File Name : cue_sheet_voice_detail.h + * File Size : 355072 bytes + * Date Time : 2019/02/15 17:56:44 + * Target : PC + * Cues : 2 + * CueSheet Comment : + * Stream Awb Path : E:/ws/adx2-smpdata/p4ws/CriMovieDepot/_cri_rake_temp/smpdata_build/PC/inGamePreview/cue_sheet_voice_detail.awb + *===========================================================================*/ + +#define CRI_CUE_SHEET_VOICE_DETAIL_CUENUM (2) + +/* AISAC Control List (AISAC Control ID) */ + +/* Cue List (Cue ID) */ +#define CRI_CUE_SHEET_VOICE_DETAIL_CRI_VOICE ( 0) /* */ +#define CRI_CUE_SHEET_VOICE_DETAIL_ADX_VOICE ( 1) /* */ + +/* Block List (Block Index) */ + +/* end of file */ + diff --git a/3rdParty/cri2019/common/smpdata/criatomex/forProfiler/project_for_profiler.acf b/3rdParty/cri2019/common/smpdata/criatomex/forProfiler/project_for_profiler.acf new file mode 100644 index 00000000..09608e2c Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/criatomex/forProfiler/project_for_profiler.acf differ diff --git a/3rdParty/cri2019/common/smpdata/criatomex/forProfiler/project_for_profiler_acf.h b/3rdParty/cri2019/common/smpdata/criatomex/forProfiler/project_for_profiler_acf.h new file mode 100644 index 00000000..00c58dfa --- /dev/null +++ b/3rdParty/cri2019/common/smpdata/criatomex/forProfiler/project_for_profiler_acf.h @@ -0,0 +1,75 @@ +/*===========================================================================* + * Header file for Atom Config File + * Project : project_for_profiler + * Tool Ver. : Ver.1.03.00 + * File Path : E:/ws/adx2-smpdata/p4ws/CriMovieDepot/_cri_rake_temp/smpdata_build/PC/inGamePreview + * File Name : project_for_profiler_acf.h + * File Size : 65536 bytes + * Date Time : 2019/02/15 17:56:43 + * Target : PC + * Categories : 2 + * AISAC Controls : 16 + * Global AISACs : 0 + * Voice Limit Groups : 1 + * DSP BUS Settings : 1 + * DSP BUS Settings Snapshot : 0 + * DSP BUS Name : 8 + * Game Variables : 1 + * Selectors : 0 + * REACTs : 0 + * Project Comment : + *===========================================================================*/ + +#define CRI_PROJECT_FOR_PROFILER_ACF_NUM_CATEGORIES_PER_PLAYBACK (4) +#define CRI_PROJECT_FOR_PROFILER_ACF_CATEGORYNUM (2) +#define CRI_PROJECT_FOR_PROFILER_ACF_AISACCONTROLNUM (16) +#define CRI_PROJECT_FOR_PROFILER_ACF_GLOBALAISACNUM (0) +#define CRI_PROJECT_FOR_PROFILER_ACF_VOICELIMITGROUPNUM (1) +#define CRI_PROJECT_FOR_PROFILER_ACF_DSPSETTINGNUM (1) +#define CRI_PROJECT_FOR_PROFILER_ACF_DSPSETTINGSNAPSHOTNUM (0) +#define CRI_PROJECT_FOR_PROFILER_ACF_DSPBUSNAMENUM (8) +#define CRI_PROJECT_FOR_PROFILER_ACF_GAMEVARIABLENUM (1) +#define CRI_PROJECT_FOR_PROFILER_ACF_SELECTORNUM (0) +#define CRI_PROJECT_FOR_PROFILERACF_REACTNUM (0) + +/* Category List (Category ID) */ +#define CRI_PROJECT_FOR_PROFILER_CATEGORY_BGM ( 0) /* */ +#define CRI_PROJECT_FOR_PROFILER_CATEGORY_SE ( 1) /* */ + +/* AISAC Control List (AISAC Control ID) */ +#define CRI_PROJECT_FOR_PROFILER_AISACCONTROL_ANY ( 0) /* */ +#define CRI_PROJECT_FOR_PROFILER_AISACCONTROL_DISTANCE ( 1) /* */ +#define CRI_PROJECT_FOR_PROFILER_AISACCONTROL_AISACCONTROL02 ( 2) /* */ +#define CRI_PROJECT_FOR_PROFILER_AISACCONTROL_AISACCONTROL03 ( 3) /* */ +#define CRI_PROJECT_FOR_PROFILER_AISACCONTROL_AISACCONTROL04 ( 4) /* */ +#define CRI_PROJECT_FOR_PROFILER_AISACCONTROL_AISACCONTROL05 ( 5) /* */ +#define CRI_PROJECT_FOR_PROFILER_AISACCONTROL_AISACCONTROL06 ( 6) /* */ +#define CRI_PROJECT_FOR_PROFILER_AISACCONTROL_AISACCONTROL07 ( 7) /* */ +#define CRI_PROJECT_FOR_PROFILER_AISACCONTROL_AISACCONTROL08 ( 8) /* */ +#define CRI_PROJECT_FOR_PROFILER_AISACCONTROL_AISACCONTROL09 ( 9) /* */ +#define CRI_PROJECT_FOR_PROFILER_AISACCONTROL_AISACCONTROL10 (10) /* */ +#define CRI_PROJECT_FOR_PROFILER_AISACCONTROL_AISACCONTROL11 (11) /* */ +#define CRI_PROJECT_FOR_PROFILER_AISACCONTROL_AISACCONTROL12 (12) /* */ +#define CRI_PROJECT_FOR_PROFILER_AISACCONTROL_AISACCONTROL13 (13) /* */ +#define CRI_PROJECT_FOR_PROFILER_AISACCONTROL_AISACCONTROL14 (14) /* */ +#define CRI_PROJECT_FOR_PROFILER_AISACCONTROL_AISACCONTROL15 (15) /* */ + +/* Voice Limit Group (Voice Limit Group Index) */ +#define CRI_PROJECT_FOR_PROFILER_VOICELIMITGROUP_VOICELIMIT ( 0) /* */ + +/* DspSetting List (DspSetting Name) */ +#define CRI_PROJECT_FOR_PROFILER_DSPSETTING_DSPBUSSETTING_0 "DspBusSetting_0" /* */ + +/* DspBusName List (DspBus Name) */ +#define CRI_PROJECT_FOR_PROFILER_DSPBUSNAME_BUS1 "BUS1" /* */ +#define CRI_PROJECT_FOR_PROFILER_DSPBUSNAME_BUS2 "BUS2" /* */ +#define CRI_PROJECT_FOR_PROFILER_DSPBUSNAME_BUS3 "BUS3" /* */ +#define CRI_PROJECT_FOR_PROFILER_DSPBUSNAME_BUS4 "BUS4" /* */ +#define CRI_PROJECT_FOR_PROFILER_DSPBUSNAME_BUS5 "BUS5" /* */ +#define CRI_PROJECT_FOR_PROFILER_DSPBUSNAME_BUS6 "BUS6" /* */ +#define CRI_PROJECT_FOR_PROFILER_DSPBUSNAME_BUS7 "BUS7" /* */ +#define CRI_PROJECT_FOR_PROFILER_DSPBUSNAME_MASTEROUT "MasterOut" /* */ + +/* Game Variable (Game Variable Index) */ +#define CRI_PROJECT_FOR_PROFILER_GAMEVARIABLE_DEFAULT ( 0) /* */ + diff --git a/3rdParty/cri2019/common/smpdata/criatomex/inGamePreview/InGame.acb b/3rdParty/cri2019/common/smpdata/criatomex/inGamePreview/InGame.acb new file mode 100644 index 00000000..2d01ce57 Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/criatomex/inGamePreview/InGame.acb differ diff --git a/3rdParty/cri2019/common/smpdata/criatomex/inGamePreview/InGame.acf b/3rdParty/cri2019/common/smpdata/criatomex/inGamePreview/InGame.acf new file mode 100644 index 00000000..9d4010e8 Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/criatomex/inGamePreview/InGame.acf differ diff --git a/3rdParty/cri2019/common/smpdata/criatomex/inGamePreview/InGame.h b/3rdParty/cri2019/common/smpdata/criatomex/inGamePreview/InGame.h new file mode 100644 index 00000000..72e7635b --- /dev/null +++ b/3rdParty/cri2019/common/smpdata/criatomex/inGamePreview/InGame.h @@ -0,0 +1,27 @@ +/*===========================================================================* + * Header file for Atom CueSheet Binary + * Project : InGame + * Tool Ver. : Ver.1.03.00 + * File Path : E:/ws/adx2-smpdata/p4ws/CriMovieDepot/_cri_rake_temp/smpdata_build/PC/inGamePreview + * File Name : InGame.h + * File Size : 159744 bytes + * Date Time : 2019/02/15 17:56:45 + * Target : PC + * Cues : 3 + * CueSheet Comment : + * Stream Awb Path : E:/ws/adx2-smpdata/p4ws/CriMovieDepot/_cri_rake_temp/smpdata_build/PC/inGamePreview/InGame.awb + *===========================================================================*/ + +#define CRI_INGAME_CUENUM (3) + +/* AISAC Control List (AISAC Control ID) */ + +/* Cue List (Cue ID) */ +#define CRI_INGAME_HELI_LOOP ( 0) /* */ +#define CRI_INGAME_GUN1_HIGH ( 1) /* */ +#define CRI_INGAME_BOMB2 ( 2) /* */ + +/* Block List (Block Index) */ + +/* end of file */ + diff --git a/3rdParty/cri2019/common/smpdata/criatomex/inGamePreview/InGame_acf.h b/3rdParty/cri2019/common/smpdata/criatomex/inGamePreview/InGame_acf.h new file mode 100644 index 00000000..d6f2d56a --- /dev/null +++ b/3rdParty/cri2019/common/smpdata/criatomex/inGamePreview/InGame_acf.h @@ -0,0 +1,74 @@ +/*===========================================================================* + * Header file for Atom Config File + * Project : InGame + * Tool Ver. : Ver.1.03.00 + * File Path : E:/ws/adx2-smpdata/p4ws/CriMovieDepot/_cri_rake_temp/smpdata_build/PC/inGamePreview + * File Name : InGame_acf.h + * File Size : 65536 bytes + * Date Time : 2019/02/15 17:56:45 + * Target : PC + * Categories : 1 + * AISAC Controls : 16 + * Global AISACs : 0 + * Voice Limit Groups : 1 + * DSP BUS Settings : 1 + * DSP BUS Settings Snapshot : 0 + * DSP BUS Name : 8 + * Game Variables : 1 + * Selectors : 0 + * REACTs : 0 + * Project Comment : + *===========================================================================*/ + +#define CRI_INGAME_ACF_NUM_CATEGORIES_PER_PLAYBACK (4) +#define CRI_INGAME_ACF_CATEGORYNUM (1) +#define CRI_INGAME_ACF_AISACCONTROLNUM (16) +#define CRI_INGAME_ACF_GLOBALAISACNUM (0) +#define CRI_INGAME_ACF_VOICELIMITGROUPNUM (1) +#define CRI_INGAME_ACF_DSPSETTINGNUM (1) +#define CRI_INGAME_ACF_DSPSETTINGSNAPSHOTNUM (0) +#define CRI_INGAME_ACF_DSPBUSNAMENUM (8) +#define CRI_INGAME_ACF_GAMEVARIABLENUM (1) +#define CRI_INGAME_ACF_SELECTORNUM (0) +#define CRI_INGAMEACF_REACTNUM (0) + +/* Category List (Category ID) */ +#define CRI_INGAME_CATEGORY_CATEGORY_0 ( 0) /* */ + +/* AISAC Control List (AISAC Control ID) */ +#define CRI_INGAME_AISACCONTROL_ANY ( 0) /* */ +#define CRI_INGAME_AISACCONTROL_DISTANCE ( 1) /* */ +#define CRI_INGAME_AISACCONTROL_AISACCONTROL02 ( 2) /* */ +#define CRI_INGAME_AISACCONTROL_AISACCONTROL03 ( 3) /* */ +#define CRI_INGAME_AISACCONTROL_AISACCONTROL04 ( 4) /* */ +#define CRI_INGAME_AISACCONTROL_AISACCONTROL05 ( 5) /* */ +#define CRI_INGAME_AISACCONTROL_AISACCONTROL06 ( 6) /* */ +#define CRI_INGAME_AISACCONTROL_AISACCONTROL07 ( 7) /* */ +#define CRI_INGAME_AISACCONTROL_AISACCONTROL08 ( 8) /* */ +#define CRI_INGAME_AISACCONTROL_AISACCONTROL09 ( 9) /* */ +#define CRI_INGAME_AISACCONTROL_AISACCONTROL10 (10) /* */ +#define CRI_INGAME_AISACCONTROL_AISACCONTROL11 (11) /* */ +#define CRI_INGAME_AISACCONTROL_AISACCONTROL12 (12) /* */ +#define CRI_INGAME_AISACCONTROL_AISACCONTROL13 (13) /* */ +#define CRI_INGAME_AISACCONTROL_AISACCONTROL14 (14) /* */ +#define CRI_INGAME_AISACCONTROL_AISACCONTROL15 (15) /* */ + +/* Voice Limit Group (Voice Limit Group Index) */ +#define CRI_INGAME_VOICELIMITGROUP_VOICELIMITGROUP_0 ( 0) /* */ + +/* DspSetting List (DspSetting Name) */ +#define CRI_INGAME_DSPSETTING_DSPBUSSETTING_0 "DspBusSetting_0" /* */ + +/* DspBusName List (DspBus Name) */ +#define CRI_INGAME_DSPBUSNAME_BUS1 "BUS1" /* */ +#define CRI_INGAME_DSPBUSNAME_BUS2 "BUS2" /* */ +#define CRI_INGAME_DSPBUSNAME_BUS3 "BUS3" /* */ +#define CRI_INGAME_DSPBUSNAME_BUS4 "BUS4" /* */ +#define CRI_INGAME_DSPBUSNAME_BUS5 "BUS5" /* */ +#define CRI_INGAME_DSPBUSNAME_BUS6 "BUS6" /* */ +#define CRI_INGAME_DSPBUSNAME_BUS7 "BUS7" /* */ +#define CRI_INGAME_DSPBUSNAME_MASTEROUT "MasterOut" /* */ + +/* Game Variable (Game Variable Index) */ +#define CRI_INGAME_GAMEVARIABLE_DEFAULT ( 0) /* */ + diff --git a/3rdParty/cri2019/common/smpdata/criatomex/music.hca b/3rdParty/cri2019/common/smpdata/criatomex/music.hca new file mode 100644 index 00000000..d720d749 Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/criatomex/music.hca differ diff --git a/3rdParty/cri2019/common/smpdata/criatomex/music_loop.adx b/3rdParty/cri2019/common/smpdata/criatomex/music_loop.adx new file mode 100644 index 00000000..ab19bf60 Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/criatomex/music_loop.adx differ diff --git a/3rdParty/cri2019/common/smpdata/criatomex/music_tr.adx b/3rdParty/cri2019/common/smpdata/criatomex/music_tr.adx new file mode 100644 index 00000000..68c7e828 Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/criatomex/music_tr.adx differ diff --git a/3rdParty/cri2019/common/smpdata/criatomex/tutorial.acb b/3rdParty/cri2019/common/smpdata/criatomex/tutorial.acb new file mode 100644 index 00000000..ddcd0cf2 Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/criatomex/tutorial.acb differ diff --git a/3rdParty/cri2019/common/smpdata/criatomex/tutorial.h b/3rdParty/cri2019/common/smpdata/criatomex/tutorial.h new file mode 100644 index 00000000..b0f0c7b7 --- /dev/null +++ b/3rdParty/cri2019/common/smpdata/criatomex/tutorial.h @@ -0,0 +1,25 @@ +/*===========================================================================* + * Header file for Atom CueSheet Binary + * Project : TutorialProject + * Tool Ver. : Ver.1.03.00 + * File Path : E:/ws/adx2-smpdata/p4ws/CriMovieDepot/_cri_rake_temp/smpdata_build/PC + * File Name : tutorial.h + * File Size : 125824 bytes + * Date Time : 2019/02/15 17:56:41 + * Target : PC + * Cues : 1 + * CueSheet Comment : + * Stream Awb Path : E:/ws/adx2-smpdata/p4ws/CriMovieDepot/_cri_rake_temp/smpdata_build/PC/tutorial.awb + *===========================================================================*/ + +#define CRI_TUTORIAL_CUENUM (1) + +/* AISAC Control List (AISAC Control ID) */ + +/* Cue List (Cue ID) */ +#define CRI_TUTORIAL_BOMB2 ( 0) /* */ + +/* Block List (Block Index) */ + +/* end of file */ + diff --git a/3rdParty/cri2019/common/smpdata/criatomex/tutorial_streaming.acb b/3rdParty/cri2019/common/smpdata/criatomex/tutorial_streaming.acb new file mode 100644 index 00000000..1fc8a69d Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/criatomex/tutorial_streaming.acb differ diff --git a/3rdParty/cri2019/common/smpdata/criatomex/tutorial_streaming.awb b/3rdParty/cri2019/common/smpdata/criatomex/tutorial_streaming.awb new file mode 100644 index 00000000..52077679 Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/criatomex/tutorial_streaming.awb differ diff --git a/3rdParty/cri2019/common/smpdata/criatomex/tutorial_streaming.h b/3rdParty/cri2019/common/smpdata/criatomex/tutorial_streaming.h new file mode 100644 index 00000000..8c56ebad --- /dev/null +++ b/3rdParty/cri2019/common/smpdata/criatomex/tutorial_streaming.h @@ -0,0 +1,25 @@ +/*===========================================================================* + * Header file for Atom CueSheet Binary + * Project : TutorialProject + * Tool Ver. : Ver.1.03.00 + * File Path : E:/ws/adx2-smpdata/p4ws/CriMovieDepot/_cri_rake_temp/smpdata_build/PC + * File Name : tutorial_streaming.h + * File Size : 6656 bytes + * Date Time : 2019/02/15 17:56:41 + * Target : PC + * Cues : 1 + * CueSheet Comment : + * Stream Awb Path : E:/ws/adx2-smpdata/p4ws/CriMovieDepot/_cri_rake_temp/smpdata_build/PC/tutorial_streaming.awb + *===========================================================================*/ + +#define CRI_TUTORIAL_STREAMING_CUENUM (1) + +/* AISAC Control List (AISAC Control ID) */ + +/* Cue List (Cue ID) */ +#define CRI_TUTORIAL_STREAMING_MUSIC_TR ( 0) /* */ + +/* Block List (Block Index) */ + +/* end of file */ + diff --git a/3rdParty/cri2019/common/smpdata/crifilesystem/FMPRO_Intro_e.txt b/3rdParty/cri2019/common/smpdata/crifilesystem/FMPRO_Intro_e.txt new file mode 100644 index 00000000..4b56f841 --- /dev/null +++ b/3rdParty/cri2019/common/smpdata/crifilesystem/FMPRO_Intro_e.txt @@ -0,0 +1,9 @@ +"Loading time" of the game is decided by "Reading time" and "Seek time". + +"Lead (read) time" is time to read the file as its name suggests. Naturally, "Reading time" becomes long in proportion to the read size of the file. Because the size of the file can be reduced by compressing the file, "Reading time" can be shortened. Of course, the compressed data should progress. The loading time might rather become long depending on the method of development. +The development time can be adjusted to almost 0 by executing reading and processing and the development processing in parallel. +"Seek (seek) time" is time to move the head (pick up) physically to read the file from a specific position in the disk media. Suppressing the generation greatly contributes to shortening the loading time because it takes time to the seek of the head very much. +Useless seek is generated if those files are disjointedly arranged though the read amount of the file is the same, the reading efficiency decreases, and it takes the loading time extra. +The generation of seek is controlled when the file is continuously arranged (Seek is not generated at all when arranged completely continuously), and because it is possible to read in bulk, the loading time can be shortened greatly. +The above-mentioned technique is effective for not only the disk media but also ROM media. The performance gain by the reading processing of the batch can expect the file in "Best arrangement" though seek is ROM media without relation. +'File felt-tipped marker RPRO' reduces reading time and the seek time by "Compression", "Development", and "Best arrangement", and makes the loading time a half. diff --git a/3rdParty/cri2019/common/smpdata/crifilesystem/FMPRO_Intro_e_uncmp.txt b/3rdParty/cri2019/common/smpdata/crifilesystem/FMPRO_Intro_e_uncmp.txt new file mode 100644 index 00000000..4b56f841 --- /dev/null +++ b/3rdParty/cri2019/common/smpdata/crifilesystem/FMPRO_Intro_e_uncmp.txt @@ -0,0 +1,9 @@ +"Loading time" of the game is decided by "Reading time" and "Seek time". + +"Lead (read) time" is time to read the file as its name suggests. Naturally, "Reading time" becomes long in proportion to the read size of the file. Because the size of the file can be reduced by compressing the file, "Reading time" can be shortened. Of course, the compressed data should progress. The loading time might rather become long depending on the method of development. +The development time can be adjusted to almost 0 by executing reading and processing and the development processing in parallel. +"Seek (seek) time" is time to move the head (pick up) physically to read the file from a specific position in the disk media. Suppressing the generation greatly contributes to shortening the loading time because it takes time to the seek of the head very much. +Useless seek is generated if those files are disjointedly arranged though the read amount of the file is the same, the reading efficiency decreases, and it takes the loading time extra. +The generation of seek is controlled when the file is continuously arranged (Seek is not generated at all when arranged completely continuously), and because it is possible to read in bulk, the loading time can be shortened greatly. +The above-mentioned technique is effective for not only the disk media but also ROM media. The performance gain by the reading processing of the batch can expect the file in "Best arrangement" though seek is ROM media without relation. +'File felt-tipped marker RPRO' reduces reading time and the seek time by "Compression", "Development", and "Best arrangement", and makes the loading time a half. diff --git a/3rdParty/cri2019/common/smpdata/crifilesystem/WhatsMiddleware_e.txt b/3rdParty/cri2019/common/smpdata/crifilesystem/WhatsMiddleware_e.txt new file mode 100644 index 00000000..821a9766 --- /dev/null +++ b/3rdParty/cri2019/common/smpdata/crifilesystem/WhatsMiddleware_e.txt @@ -0,0 +1,4 @@ +Middleware is software that takes care of audio and video playback for your application. +Middleware bridges the gap between your application software and the target hardware platform. It solves sticky audio and video problems on your behalf, allowing you to concentrate on game application development. +Middleware is a relatively new concept that has been generated by increasingly large-scale, highly developed, and complicated recent software. +Compare middleware against the term "OS", or "Operating System." Although there is no explicit boundary between those two terms, an Operating System is lowest and closest to hardware, but middleware has a much broader range of applications. diff --git a/3rdParty/cri2019/common/smpdata/crifilesystem/crifs_tutorial.cpk b/3rdParty/cri2019/common/smpdata/crifilesystem/crifs_tutorial.cpk new file mode 100644 index 00000000..2720c133 Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/crifilesystem/crifs_tutorial.cpk differ diff --git a/3rdParty/cri2019/common/smpdata/crifilesystem/crifs_tutorial_group.cpk b/3rdParty/cri2019/common/smpdata/crifilesystem/crifs_tutorial_group.cpk new file mode 100644 index 00000000..014aebc0 Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/crifilesystem/crifs_tutorial_group.cpk differ diff --git a/3rdParty/cri2019/common/smpdata/crifilesystem/crifs_tutorial_id.cpk b/3rdParty/cri2019/common/smpdata/crifilesystem/crifs_tutorial_id.cpk new file mode 100644 index 00000000..0f486bfe Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/crifilesystem/crifs_tutorial_id.cpk differ diff --git a/3rdParty/cri2019/common/smpdata/crifilesystem/encrypted.cpk b/3rdParty/cri2019/common/smpdata/crifilesystem/encrypted.cpk new file mode 100644 index 00000000..c516e827 Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/crifilesystem/encrypted.cpk differ diff --git a/3rdParty/cri2019/common/smpdata/crimana/alpha_full_fish.usm b/3rdParty/cri2019/common/smpdata/crimana/alpha_full_fish.usm new file mode 100644 index 00000000..019a2711 Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/crimana/alpha_full_fish.usm differ diff --git a/3rdParty/cri2019/common/smpdata/crimana/pc/0640x480_2997_C01.usm b/3rdParty/cri2019/common/smpdata/crimana/pc/0640x480_2997_C01.usm new file mode 100644 index 00000000..2eda997e Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/crimana/pc/0640x480_2997_C01.usm differ diff --git a/3rdParty/cri2019/common/smpdata/crimana/pc/0640x480_2997_C02.usm b/3rdParty/cri2019/common/smpdata/crimana/pc/0640x480_2997_C02.usm new file mode 100644 index 00000000..81938959 Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/crimana/pc/0640x480_2997_C02.usm differ diff --git a/3rdParty/cri2019/common/smpdata/crimana/pc/0640x480_2997_C03.usm b/3rdParty/cri2019/common/smpdata/crimana/pc/0640x480_2997_C03.usm new file mode 100644 index 00000000..94ca113c Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/crimana/pc/0640x480_2997_C03.usm differ diff --git a/3rdParty/cri2019/common/smpdata/crimana/pc/0640x480_2997_C04.usm b/3rdParty/cri2019/common/smpdata/crimana/pc/0640x480_2997_C04.usm new file mode 100644 index 00000000..33674cc3 Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/crimana/pc/0640x480_2997_C04.usm differ diff --git a/3rdParty/cri2019/common/smpdata/crimana/pc/0640x480_2997_C05.usm b/3rdParty/cri2019/common/smpdata/crimana/pc/0640x480_2997_C05.usm new file mode 100644 index 00000000..a619b586 Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/crimana/pc/0640x480_2997_C05.usm differ diff --git a/3rdParty/cri2019/common/smpdata/crimana/pc/0640x480_2997_C06.usm b/3rdParty/cri2019/common/smpdata/crimana/pc/0640x480_2997_C06.usm new file mode 100644 index 00000000..604a45d8 Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/crimana/pc/0640x480_2997_C06.usm differ diff --git a/3rdParty/cri2019/common/smpdata/crimana/sample.usm b/3rdParty/cri2019/common/smpdata/crimana/sample.usm new file mode 100644 index 00000000..d9dcb38b Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/crimana/sample.usm differ diff --git a/3rdParty/cri2019/common/smpdata/crimana/sample_vp9.usm b/3rdParty/cri2019/common/smpdata/crimana/sample_vp9.usm new file mode 100644 index 00000000..504aae4f Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/crimana/sample_vp9.usm differ diff --git a/3rdParty/cri2019/common/smpdata/crimana/surround_subaudio.usm b/3rdParty/cri2019/common/smpdata/crimana/surround_subaudio.usm new file mode 100644 index 00000000..7d810ab4 Binary files /dev/null and b/3rdParty/cri2019/common/smpdata/crimana/surround_subaudio.usm differ diff --git a/3rdParty/cri2019/documentation/document_list.css b/3rdParty/cri2019/documentation/document_list.css new file mode 100644 index 00000000..92848262 --- /dev/null +++ b/3rdParty/cri2019/documentation/document_list.css @@ -0,0 +1,106 @@ +body,h1,div,dl,dt,dd,.note +{ + margin: 0; + padding: 0; +} + +body +{ + background-color: #ccc; +} + +ul +{ + list-style-type: circle; +} + +ol +{ + list-style-type: lower-latin; +} + +h1 +{ + font-size: 20pt; +} + +a +{ + text-decoration: none; +} + +.document_list_container +{ + background-color: #fff; + color: #333; + font: 11pt/150% sans-serif; + margin: 0 auto; + padding: 40px 50px; + width: 640px; +} + +.document_list_container>.list_title +{ + text-align: center; + margin-bottom: 30px; +} + +.document_list +{ + margin: 10px 0 20px; +} + +.document_list>dt +{ + border-bottom: 1px solid #005bac; + font-weight: bold; + line-height: 140%; + padding-left: 10px; +} + +.document_list>dt.directory +{ + background-color: #005bac; + color: #fff; +} + +.document_list>dt.directory:after +{ + content: '/'; +} + +.document_list>dt+dd +{ + padding-left: 30px; + margin: 6px 0 10px; +} + +.to_note +{ + font-size: 6pt; + line-height: 100%; + vertical-align: super; +} + +.to_note:before +{ + content: '*'; +} + +.note +{ + color: #777; + font-size: 10pt; +} + +.note>li +{ + counter-increment: note; + list-style-type: none; + margin-bottom: 20px; +} + +.note>li:before +{ + content: '[Note' counter(note) '] '; +} diff --git a/3rdParty/cri2019/documentation/document_list.html b/3rdParty/cri2019/documentation/document_list.html new file mode 100644 index 00000000..464fe2d2 --- /dev/null +++ b/3rdParty/cri2019/documentation/document_list.html @@ -0,0 +1,70 @@ + + + + CRIWARE for Unity document list + + + + +
+

CRIWARE document list

+
+
error_reference
+
+
+
CRI_Error_Manual_pc_e.chm
+
These help file contains error code information that libraries returns. Choose one of above files depending on the platform that a library error occurs.
+
+
+
history
+
+
+
history_criadx2sdk_pc_e.txt
+
The SDK updates are summarized.
+
history_criatom_pc_e.txt
+
The revision history of the CRI Atom Library.
+
history_cribase_pc_e.txt
+
The revision history of the CRI Base Library.
+
history_crifilesystem_pc_e.txt
+
The revision history of the CRI File System Library.
+
history_crimana_pc_e.txt
+
The revision history of the CRI Mana Library.
+
+
+
release_note
+
+
+
release_criadx2sdk_pc_e.txt
+
The SDK content of this release, system requirements, version information, etc. are described.
+
+
+
sdk_manual
+
+
+
CRI_ADX2_Manual_pc_e.chm
+
The features and the usage of CRI Atom Library and tools are described.
+
CRI_File_System_Guideline_Floc_e.chm
+
This manual describes how FileMajik PRO optimizes file placement for less file load time by analyzing the file downloading order and access frequency.
+
CRI_File_System_Manual_pc_e.chm
+
The features and the usage of CRI File System Library and tools are described.
+
CRI_Sofdec2_Manual_pc_e.chm
+
The features and the usage of CRI Mana Library and tools are described.
+
+
+
+
    +
  1. About handling manuals +
      +
    • The html type manual needs to be unzipped before use.
    • +
    • The downloaded chm file may not be properly displayed on Windows Vista/7/8.
      Please resolve this problem using one of the following procedures. +
        +
      1. Right-click on the chm file, select the [Properties], and then select the [Unblock].
      2. +
      3. When the [Open file-security warning] dialog appears, clear the [Always ask before opening this type of file] checkbox.
      4. +
      +
    • +
    +
  2. +
+
+ + diff --git a/3rdParty/cri2019/documentation/error_reference/CRI_Error_Manual_pc_e.chm b/3rdParty/cri2019/documentation/error_reference/CRI_Error_Manual_pc_e.chm new file mode 100644 index 00000000..2a4615d7 Binary files /dev/null and b/3rdParty/cri2019/documentation/error_reference/CRI_Error_Manual_pc_e.chm differ diff --git a/3rdParty/cri2019/documentation/history/history_criatom_pc_e.txt b/3rdParty/cri2019/documentation/history/history_criatom_pc_e.txt new file mode 100644 index 00000000..68900ab3 --- /dev/null +++ b/3rdParty/cri2019/documentation/history/history_criatom_pc_e.txt @@ -0,0 +1,755 @@ +/**************************************************************************** + * + * CRI Middleware SDK + * + * Copyright (c) 2017 CRI Middleware Co., Ltd. + * + * Library : CRI Atom Library for PC + * Module : Revision history + * File : history_criatom_pc_e.txt + * Version : 2.19.03 + * + ****************************************************************************/ + +1. Library Version +(1) CRI Atom library + [cri_atom_pcx86.lib] 2,497,210 bytes + ACB High Ver.1.32.00 Build: + ACB Low Ver.0.06.00 Build: + ACF High Ver.1.21.00 Build: + ACF Low Ver.0.04.60 Build: + CRI ASR PCx86 Ver.1.06.01 Build:May 8 2019 11:07:59 MSC19.00.24210.0,MT + CRI Atom PCx86 Ver.2.19.03 Build:May 8 2019 11:07:58 MSC19.00.24210.0,MT + CRI Atom Music PCx86 Ver.0.95.03 Build:May 8 2019 11:07:59 MSC19.00.24210.0,MT + CRI Atom Sound PCx86 Ver.1.61.00 Build:May 8 2019 11:07:59 MSC19.00.24210.0,MT + CRI AtomEx PCx86 Ver.2.14.28 Build:May 8 2019 11:08:00 MSC19.00.24210.0,MT + CRI AtomEx Sequencer PCx86 Ver.1.05.10 Build:May 8 2019 11:07:59 MSC19.00.24210.0,MT + CRI Audio Effect PCx86 Ver.1.01.11 Build:May 8 2019 11:07:57 MSC19.00.24210.0,MT + CRI NcVoice PCM Mixer PCx86 Ver.1.00.00 Build:May 8 2019 11:07:58 MSC19.00.24210.0,MT + CRI NcVoice PCM Output PCx86 Ver.1.00.00 Build:May 8 2019 11:07:58 MSC19.00.24210.0,MT + CRI NcVoice Pseudo PCx86 Ver.1.02.00 Build:May 8 2019 11:07:58 MSC19.00.24210.0,MT + CRI NcVoice Raw PCM Float PCx86 Ver.1.00.00 Build:May 8 2019 11:07:58 MSC19.00.24210.0,MT + CRI NcVoice Sound Generator PCx86 Ver.1.00.00 Build:May 8 2019 11:07:58 MSC19.00.24210.0,MT + CRI NcVoice WASAPI PCx86 Ver.2.30.00 Build:May 8 2019 11:08:01 MSC19.00.24210.0,MT + CRI NcVoice Wave Out PCx86 Ver.1.00.00 Build:May 8 2019 11:07:58 MSC19.00.24210.0,MT + CRI TimeStretch PCx86 Ver.1.04.00 Build:May 8 2019 11:07:59 MSC19.00.24210.0,MT + + [cri_atom_pcx86D.lib] 16,958,724 bytes + ACB High Ver.1.32.00 Build: + ACB Low Ver.0.06.00 Build: + ACF High Ver.1.21.00 Build: + ACF Low Ver.0.04.60 Build: + CRI ASR PCx86 Ver.1.06.01 Build:May 8 2019 11:08:05 MSC19.00.24210.0,DEBUG,MT + CRI Atom PCx86 Ver.2.19.03 Build:May 8 2019 11:08:05 MSC19.00.24210.0,DEBUG,MT + CRI Atom Music PCx86 Ver.0.95.03 Build:May 8 2019 11:08:06 MSC19.00.24210.0,DEBUG,MT + CRI Atom Sound PCx86 Ver.1.61.00 Build:May 8 2019 11:08:06 MSC19.00.24210.0,DEBUG,MT + CRI AtomEx PCx86 Ver.2.14.28 Build:May 8 2019 11:08:07 MSC19.00.24210.0,DEBUG,MT + CRI AtomEx Sequencer PCx86 Ver.1.05.10 Build:May 8 2019 11:08:06 MSC19.00.24210.0,DEBUG,MT + CRI Audio Effect PCx86 Ver.1.01.11 Build:May 8 2019 11:08:03 MSC19.00.24210.0,DEBUG,MT + CRI NcVoice PCM Mixer PCx86 Ver.1.00.00 Build:May 8 2019 11:08:04 MSC19.00.24210.0,DEBUG,MT + CRI NcVoice PCM Output PCx86 Ver.1.00.00 Build:May 8 2019 11:08:04 MSC19.00.24210.0,DEBUG,MT + CRI NcVoice Pseudo PCx86 Ver.1.02.00 Build:May 8 2019 11:08:04 MSC19.00.24210.0,DEBUG,MT + CRI NcVoice Raw PCM Float PCx86 Ver.1.00.00 Build:May 8 2019 11:08:04 MSC19.00.24210.0,DEBUG,MT + CRI NcVoice Sound Generator PCx86 Ver.1.00.00 Build:May 8 2019 11:08:04 MSC19.00.24210.0,DEBUG,MT + CRI NcVoice WASAPI PCx86 Ver.2.30.00 Build:May 8 2019 11:08:08 MSC19.00.24210.0,DEBUG,MT + CRI NcVoice Wave Out PCx86 Ver.1.00.00 Build:May 8 2019 11:08:04 MSC19.00.24210.0,DEBUG,MT + CRI TimeStretch PCx86 Ver.1.04.00 Build:May 8 2019 11:08:06 MSC19.00.24210.0,DEBUG,MT + +2. Library Size + [cri_atom_pcx86.lib] + Total Code size: 482070 [BYTE] + Total Data size: 351220 [BYTE] + Total Lib size: 833290 [BYTE] + + [cri_atom_pcx86D.lib] + Total Code size: 931043 [BYTE] + Total Data size: 498080 [BYTE] + Total Lib size: 1429123 [BYTE] + +3. System requirements/Testing environment +This release has been developed and tested in the following environment: + +3.1 Hardware + CPU : Intel Core i7-3770 (3.4GHz) + Memory : 8GB + +3.2 Development environment +(1) OS + Microsoft Windows 10 Professional + +(2) Compiler / Debugger + Microsoft Visual Studio 2015 Update 3 + +4. Revision history + [2019-05-17 CRI Atom Ver.2.19.03]------------------------------------------ +(1) Bug fixes + (a) Fixed a bug where audio which was muted using the Category mute function or solo function was played back + with an amplitude of about -96 dB, which results in audio still being audible depending on the playback device. + (b) Fixed a bug where Block end transition processing was performed early if the following conditions were met: + - The number of divisions is specified for the Block. + - The Block length (in ms) cannot be divided by the number of divisions. + - The criAtomExPlayer_SetSequencePrepareTime function is used for the playback player. + (c) Fixed a bug where illegal access may have occurred when accessing Selector Label information + when using ACF data output according to CRI Atom Craft Ver.3.40.00 to Ver.3.41.03. + (d) Fixed a bug where the delay (reverberation) was interrupted when using the following effects: + - delay + - echo + - Multi-tap delay + (e) Fixed a bug where the criAtom_GetAudioClient_WASAPI function returned uninitialized AudioClient. + (f) Fixed a bug where the load increased when entering denormalized numbers for the following effects: + - Biquad filter + - Bandpass filter + - 3-Band EQ + - 32-Band EQ + (g) Fixed a bug where an invalid argument error occurred when acquiring waveform information for WebGL ACB data. + +(2) Specification changes + (a) Removed the warning (W2019021901) when calling a deprecated function (criAtomEx3dListener_SetDistanceFactor). + + [2019-02-28 CRI Atom Ver.2.19.00]------------------------------------------ +(1) Bug fixes + (a) Fixed a bug where all but the first AWB were being ignored, + when multiple AWB handles were used in stop processing and release confirmation processing + with ACB handle specification. + (b) Fixed a bug where the error E2017031600 occurred and library ending processing was not completed. + (c) Fixed a bug in which unauthorized access occurs within the cue playback processing, + when selector information necessary for cue playback does not exist in the ACF data. + (d) Fixed a bug where the subsequent action track was not played back + when a cue using multiple action tracks was playing, + if the search of the cue designated as the target of the action failed. + (e) Fixed a bug in which the sound controlled by the voice limit group did not operate + when the structure of the cue was not a sequence in playback using an ACB outputted + with CRI Atom Craft Ver.1. + (f) Fixed a bug where the bussend setting was not applied correctly + and there was a possibility of silent playback when using ACB outputted + with the CRI Atom Craft Ver.1. + (g) Fixed a bug where resume / pause actions for categories were not being applied. + (h) Fixed a bug where execution of the following functions failed for compressors + that do not use side chains: + - criAtomExAsrRack_GetCompressorRms + - criAtomExAsrRack_GetCompressorRmsByName + (i) Fixed a bug where the upper limit value of compressor attack time was different + from the upper limit value can be set by the CRI Atom Craft. + - 200[ms] -> 3000[ms] + (j) Fixed a bug where the transition (played) completed block processing was not performed properly + in block sequence playback using initial playback track during transition, + and block transition was occurring at unintended timings. + (k) Fixed a bug where the error E2018090601 occurred in the ACF registration process + and the work size calculation required for ACF registration failed + when the following conditions were satisfied: + - Not using category category cue items + (l) Fixed a bug where a cue whose playback was canceled + by the playback probability setting was counted in the played number + and the category cue limit processing was applied. + (m) Fixed a bug where the audio after a loop was not being played correctly + when seeking ADX audio data with an encrypted loop. + * Please apply the CRI Base Ver.2.45.06 or later version. + (n) Fixed a bug where reverb output differed between PCx64 environment and PCx86 environment. + +(2) Specification changes + (a) Changed the specification so that an error callback is returned when executing the following function, + if the coordinate value of the vector contains a nonnumeric (NaN): + - criAtomEx3dSource_SetPosition + - criAtomEx3dListener_SetPosition + (b) The following function has been deprecated: + - criAtomEx3dListener_SetDistanceFactor + Please consider using the following function instead: + - criAtomEx3dListener_SetDopplerMultiplier + (c) Changed the specification so that sound output by WASAPI is performed, + when library is initialized using criAtomEx_Initialize_PC function. + In previous versions, XAudio2 was used. + (d) The function related to XAudio2 audio output has been deleted. + Following this specification change, the following API can not be used: + - criAtomEx_CalculateWorkSize_XAUDIO2 + - criAtomEx_Finalize_XAUDIO2 + - criAtomEx_Initialize_XAUDIO2 + - criAtom_CalculateWorkSize_XAUDIO2 + - criAtom_Finalize_XAUDIO2 + - criAtom_Initialize_XAUDIO2 + - criAtom_IsCriticalErrorOccurred_XAUDIO2 + - criAtom_SetOutputDeviceIndex_XAUDIO2 + - criAtom_SetOutputVoice_XAUDIO2 + - criAtom_SetSoundBufferSize_XAUDIO2 + - criAtom_SetXAudio2Object_XAUDIO2 + + Note: + As this specification changes, applications using the criAtomEx_Initialize_XAUDIO2 function + need to correct the following code: + (1) Include cri_atom_wasapi.h instead of cri_atom_xaudio2.h + (2) Use criAtomEx_Initialize_WASAPI function instead of criAtomEx_Initialize_XAUDIO2. + (3) Use criAtomEx_Finalize_WASAPI function instead of criAtomEx_Finalize_XAUDIO2. + (4) Modify the code so that it does not call the deleted API. + +(3) New features + (a) Added a function to use different decryption keys for each ACB handle: + - criAtomExAcb_Decrypt + After loading the ACB file with the criAtomExAcb_LoadAcbFile function etc., + it is possible to specify a different decryption key for each ACB handle + using criAtomExAcb_Decrypt function. + (b) Added an API that switches whether or not to apply the calculation results of + distance AISAC and angle AISAC when playing Pan3D type applied as pan type + by a player capable of 3D positioning calculation using CriAtomEx3dSourceHn or CriAtomEx3dListenerHn. + + Note: + This function was added for compatibility with CRI Atom Ver.2.17.19 or earlier. + Behavioral differences by version are as follows: + - Ver.2.17.19 or earlier + Regardless of pan type, the calculation result of distance AISAC, angle AISAC was applied. + - Ver.2.17.20 or later + The calculation result of distance AISAC and angle AISAC is applied only + when pan type is 3D positioning. + (c) Added a function to register the playback event callback. + - criAtomExPlayer_SetPlaybackEventCallback + By registering the playback event callback, it becomes possible for applications to + grasp the timing of securing / releasing playback resources, assigning voices, and virtualization. + (d) Added a function to acquire setting of drive parameter of REACT. + - criAtomExCategory_SetReactParameter + - criAtomExCategory_GetReactParameter + (e) Added the following actions: + - Pause action with fade time + - Resume action with fade time + - Stop action with fade time + (f) Added a function to set the magnification of Doppler effect. + - criAtomEx3dListener_SetDopplerMultiplier + (g) Added functions to acquire the internal values of the compressor and the amplitude analyzer: + - criAtomExAsrRack_GetAmplitudeAnalyzerRms + - criAtomExAsrRack_GetAmplitudeAnalyzerRmsByName + - criAtomExAsrRack_GetCompressorGain + - criAtomExAsrRack_GetCompressorGainByName + - criAtomExAsrRack_GetCompressorRms + - criAtomExAsrRack_GetCompressorRmsByName + +(4) Optimisation + (a) Reduction of redundant calculation processing for unset parameters. + (b) It reduces the CPU load when producing a large number of sounds. + + [2018-12-07 CRI Atom Ver.2.17.22]------------------------------------------ +(1) Bug fixes + (a) Fixed a bug where the output destination ASR rack ID set + by the criAtomExPlayer_SetAsrRackId function etc. is not applied when the following conditions are met. + - Use cue link + - The output destination ASR rack ID is specified in the parameter link palette of the cue link source + (b) Fixed a bug where an exception might occur in the parameter application process. + (c) Fixed a bug where the playback time obtained by the criAtomExPlayer_GetTime function + does not start from the seek time, but advances from 0, when playing back seek. + (d) Fixed a bug where setting the "max_aisacs" of the CriAtomPlayerConfig to an odd number may cause an exception. + (e) Fixed a bug where caused an access violation when discarding an ASR rack during audio playback. + (f) Fixed a bug where the gain application process was not applied correctly + when the compressor or limiter's attack time or release time was set to 0. + (g) Fixed a bug where the CriAtomExPlayer did not transition to PLAYEND + when playback was performed using the insertion DSP pitch shifter. + + [2018-10-30 CRI Atom Ver.2.17.21]------------------------------------------ +(1) Bug fixes + (a) Fixed a bug where the error "E2011080599" would occur when releasing the ACB handle + and the process would terminate. + (b) Fixed a bug where a Cue with PanType set to Auto would forcibly become Pan3d at runtime. + (c) Fixed a bug where seeking was performed for one frame at the maximum rate even + when the Block's transition division was not enabled. + (d) Fixed a bug where the AtomExPlayer status might not transition to PLAYEND + when playing back audio at a rate lower than the ASR output sampling rate. + (e) Fixed a bug where the output gain would fade-in from the level before silent input + when a signal is applied again (using the compressor or limiter effect of the DSP Bus). + (f) Fixed a bug where the number of samples obtained by the functions listed below would rewind + when the following conditions were satisfied: + Conditions: + - Sequence end marker or Block is set in the Cue. + - The seek time is set by the criAtomExPlayer_SetStartTime function. + - Sequence end or Block transition occurs. + Corresponding functions: + - criAtomExPlayback_GetNumPlayedSamples() + - criAtomPlayer_GetNumPlayedSample() + + [2018-09-26 CRI Atom Ver.2.17.20]------------------------------------------ +(1) Bug fixes + (a) Fixed a bug where transition timing correction by server interval was not included + at block transition in block sequence playback. + (b) Fixed a bug where the following functions, that acquire various parameters + by designating the playback ID, would fail if the playback ID status was not set, + even during the PREP / PLAYING state. + - criAtomExPlayback_GetParameterFloat32 + - criAtomExPlayback_GetParameterUint32 + - criAtomExPlayback_GetParameterSint32 + - criAtomExPlayback_GetAisacById + - criAtomExPlayback_GetAisacByName + (c) Fixed a bug where inconsistencies in work size calculation may have occured + when AISAC count was set to a value other than 8. + (d) Fixed a bug where an infinite loop occurred in server process, + when the in-game preview was performed without attaching AWB to ACB using stream AWB. + (e) Fixed a bug where distance attenuation AISAC could not be applied by voice playback using Cue link. + (f) Fixed a bug where the padding area was used as a work area, + when initializing the Cue limit work area category in the ACF data. + (g) Fixed a bug where pre-delay and attack were started at the same time + when pre-delay and envelope attack were used at the same time. + The correct behavior is that the attack starts after the pre-delay is completed. + +(2) Specification changes + (a) The following APIs have been deprecated. Please refrain from using. + - criAtomEx_SetDefaultConfigForAcf + - CriAtomExAcfConfig + - criAtomEx_CalculateWorkSizeForRegisterAcfConfig + - criAtomEx_RegisterAcfConfig + +(3) New features + (a) Added a function to get the start / end information of ACB data and ACF data + from the authoring tool update process, when executing in-game preview using the Atom Monitor Library. + - criAtomExMonitor_SetDataUpdateNotificationCallback + (b) Added a function that can specify multiple ASR rack IDs for player. + - criAtomExPlayer_SetAsrRackIdArray + Note: + The maximum number of ASR racks that can be set for one player is defined in the following macro constant. + - CRIATOMEXPLAYER_MAX_ASR_RACKS + (c) Added functions to acquire the coordinate value from the CriAtomEx3dSourcHn or the CriAtomEx3dListenerHn. + - criAtomEx3dSource_GetPosition + - criAtomEx3dListener_GetPosition + (d) The maximum number of AISAC that can be associated with one Cue can now be changed. + (Previously it was fixed with 8 pieces.) + To change the maximum number of AISAC, change the value of "max_aisacs" + which is a member variable of the CriAtomExConfig structure. + The maximum value that can be specified is less than CRIATOMPARAMETER2_MAX_NUM_AISACS. + (e) Added functions to reset all AISAC control values of arbitrary category to default value. + - criAtomExCategory_ResetAllAisacControlById + - criAtomExCategory_ResetAllAisacControlByName + (f) Added functions to acquire the current value of arbitrary category AISAC control. + - criAtomExCategory_GetCurrentAisacControlValueById + - criAtomExCategory_GetCurrentAisacControlValueByName + (g) Added types of AISAC information that can be acquired by the following function. + - criAtomExPlayer_GetAttachedAisacInfo + - criAtomExCategory_GetAttachedAisacInfoById + - criAtomExCategory_GetAttachedAisacInfoByName + + AISAC information list + - AISAC Name + - Whether the default control value is set (new) + - Default AISAC control value (new) + - Control ID (new) + - Control Name (new) + (h) Added an API to set the player's pre-delay time. + - criAtomExPlayer_SetPreDelayTime + (i) Added an API to acquire beat synchronization information from the playing Cue. + - criAtomExPlayback_GetBeatSyncInfo + (j) The following member variables were added to the CriAtomExBeatSyncInfo structure: + - bpm + - beat_progress + (k) Added a function to maintain the split position at split transition in block playback. + (l) Added Pose and Resume actions. + (m) Added the start block number specification to the Start Action. + (n) Added the default Selector Label to Cue. + (o) Added the following API to add offset value to data set value of MixDownCenter volume and MixDownLFE volume. + - criAtomExPlayer_AddMixDownCenterVolumeOffset + - criAtomExPlayer_AddMixDownLFEVolumeOffset + (p) Added an Effect "Headphone Virtual Surround". + (q) Added a function to receive notifications by callback when the sound device is updated. + - criAtom_SetDeviceUpdateCallback_WASAPI + + [2018-07-25 CRI Atom Ver.2.16.27]------------------------------------------ +(1) Bug fixes + (a) Fixed a bug where the playback time that can be acquired + by the criAtomExPlayback_GetTimeSyncedWithAudio would advance even while paused. + (b) Fixed a bug where a memory allocator was mandatory for + the criAtomEx_CalculateWorkSizeForRegisterAcfFile work size area calculation. + (c) Fixed a bug where an unintentional error sometimes occured + when playing sound with "Ignore AtomExPlayer parameters" set to "true" by CRI Atom Craft. + (d) Fixed a bug where playback start processing was not processed correctly + when the track transition and playback start synchronization processing was registered + by the track transition type: "Cue playback by the Selector". + (e) Fixed a bug where the Selector setting switched by an Action of the track transition type: + "Cue playback by the Selector", was invalidated by applying parameter update processing to the player. + (f) Fixed a bug where ACF data is not registered when the following conditions are satisfied. + - Executing the following functions + - criAtomEx_RegisterAcfData + - criatomEx_RegisterAcfFile + - Executing the following functions after executing the above functions + - criAtomEx_CalculateWorkSizeForRegisterAcfData + - criAtomEx_CalculateWorkSizeForRegisterAcfFile + * It occurred from CRI Atom Ver.2.16.18 + (g) Fixed a bug where the result of the amplitude analyzer was no longer interlocked + if the compressor / limiter effect was driven by the side chain, and a snapshot was applied. + + [2018-06-11 CRI Atom Ver.2.16.26]------------------------------------------ +(1) Bug fixes + (a) Fixed a bug where the playback sound becomes silent if a reset of the bussend + is triggered and the Bus Send is not set for playback data. + * Notes + A bussend reset is triggered by the following function calls: + criAtomEx_AttachDspBusSetting(), criAtomExAsr_AttachDspBusSetting() + (b) Fixed a problem where silence occurs while playing under conditions + (A), (B), and (C) when using the Atom library. + (c) Fixed a problem where silence occurs while playing under conditions + "(A), (B), and (C)" or "(A), (B), and (D)" when using the Atom Monitor library. + (A) Using ACB data created by one of the following tools + - CriAtomEncoder.exe + - criatomencd.exe + (B) Executing one of the following functions to set a bussend other than "MasterOut" + - criAtomExPlayer_SetBusSendLevel + - criAtomExPlayer_SetBusSendLevelByName + (C) Executing one of the following functions during playback + - criAtomEx_AttachDspBusSetting + - criAtomEx_DetachDspBusSetting + (D) Executing one of the following functions to update the playback parameters + - criAtomExPlayer_Update + - criAtomExParameter_UpdateAll + (d) Fixed a problem where DspBusSetting may not have been automatically attached + when the Acf file was registered. + (e) Fixed a bug where the name of an AISAC control could not be acquired even when + specifying the ID of an AISAC control included in the ACF data when calling + the criAtomExAcf_GetAisacControlNameById function. + (f) Fixed a bug where the interpretation of the parameters of the surrounder was not + performed correctly for an ACF created with the following versions of CRI AtomCraft: + - AtomCraft Ver.2.32.00 - Ver.2.35.00 + - AtomCraft Ver.3.34.00 - Ver.3.35.01 + (g) Fixed a bug where errors E2017020301 and E2017041802 occurred + when calculating an AdmPlayer's work size. + (h) Fixed a bug where the bus output was silent when using a pitch shifter effect + on a bus, if the pitch was set to a value larger than half of the sampling rate. + (i) Fixed a bug where a triggered REACT object would not return when: + - Attaching a fader to a player + - and the "Including cue during pause" REACT setting was set to off + (j) Fixed a bug where a triggered REACT object would not return when: + - Executing the criAtomExPlayer_Prepare function or Pause function and + the player or playback object was in preparation state (PREP) + - and the Pause release and Stop functions were executed within the same frame + (k) Fixed a bug where a lowered voice priority returned to its original value + when the parameter update was applied to the voice during the envelope release (while processing a stop). + (l) Fixed a bug that could cause an unauthorized access + when a cue waiting to be started due to beat synchronization was canceled + by cue limiting etc. at the start of playback. + (m) Fixed a problem where cue limiting was not applied after canceling prepare. + (n) Fixed a problem where the time acquired via the audio synchronization timer + greatly shifted from the actual timing of the audio when the output was blocked for a long time + due to plugging in / out earphones during playback. + (o) Fixed a bug where if switch type cue is set to playlist mode and playback is performed, + switch processing is not performed at the second and subsequent list playback, resulting in silence. + (p) Fixed a bug where the output destination ASR rack ID specified + in the data was not applied when the criAtomExPlayer_ResetParameters function + was being executed for the player + (q) Fixed a bug where cue playback was performed as many times as the number of ASR rack IDs set + in the parameter palette using the ASR rack ID when: + - the ASR rack ID was specified for the player by the criAtomExPlayer_SetAsrRackId function + - In the parameter palette, a cue specifying many ASR rack IDs was played back by the player + * Notes + Originally, it was assumed that the cue playback was performed only for + the ASR rack ID specified by the criAtomExPlayer_SetAsrRackId function. + (r) Fixed a problem where the APIs specifying a bus name triggered an error callback + and processing was not completed under the following conditions: + - Multiple ASR racks were used + - The DSP bus setting was attached to the default ASR rack + - The DSP bus setting was not attached to any other ASR rack + (s) Fixed a bug where the output was directly sent to MasterOut, ignoring Bus Send settings, when: + - Setting the bussend for a player or data + - Specifying an ASR rack ID that does not exist for the player or data + + [2018-03-08 CRI Atom Ver.2.16.22]------------------------------------------ +(1) Bug fixes + (a) Fixed a bug where E2010110100 occurs when React number is set more than + Category number in ACF data. + (b) Fixed a bug where the memory area of ASR and HcaMX was doubly secured + when initializing using the user allocator in AtomEx library initialization processing. + (c) Fixed a bug where extra memory area was secured by the criAtomEx_RegisterAcfFile function. + (d) Fixed a bug where extra memory area was secured by + the criAtomEx_CalculateWorkSizeForRegisterAcfData function. + (e) Fixed a bug where access exception occurs when executing processing to access + ACF data after the criAtomEx_RegisterAcfConfig function execution. + Remarks: + The criAtomEx_RegisterAcfConfig function will be abolished at SDK Ver.2.18.00. + (f) Fixed a bug where the game variable information is initialized + when ACF data update processing accompanying editing of ACF data information on + the authoring tool is performed during in-game preview. + (g) Fixed a bug where ACB data created using the following tools + when using the monitor library becomes silent playback. + - CriAtomEncoder.exe + - criatomencd.exe + +(2) Specification changes + (a) When executing the following function, the behavior was changed so that + dynamic memory allocation by the new operator does not occur in the library. + - criAtomEx_CalculateWorkSize_WASAPI + - criAtomEx_Initialize_WASAPI + + [2018-01-31 CRI Atom Ver.2.16.20]------------------------------------------ +(1) Bug fixes + (a) Fixed a bug where the playback rate set + for a block sequence was cleared at when the block was looping. + (b) Fixed a bug where the first track was always played first + when playing a Cue of type Random No Repeat after loading the ACB data. + (c) Fixed a bug where the management of the bus names in the MasterOut bus failed + when the following conditions occurred: + - The ACF is registered by passing it in the work area. + - The DSP bus setting not attached. + (d) Fixed a bug where CRI Atom Craft did not update the ACF data during + the start-up of a second (and subsequent) in-game preview. + (e) Fixed a bug where sounds to be played on a rack ID other than + "0" were played without going through the intended bus when the following conditions were met: + - Multiple ASR racks are used, and the DSP bus setting is applied to each. + - The order of the bus names of the DSP bus settings set for each rack is different. + - The API is used to reference a rack ID different from "0". + - Playback on another rack ID than "0" is done on multiple buses + instead of using a direct output to the MasterOut bus. + +(2) Specification changes + (a) Changed the specifications so that it is not required anymore to release of all the ACB handles + to release the ACF data, allowing for it to be released at any time. + Consequently, the following points have been changed: + - Allocation of the work area for a category or a REACT is now done at the time + of the ACF registration not at initialization, + when initializing the library using a user allocator. + If the library is initialized with its own work area, + the ACF registration will be performed using the area specified like before. + - When the ACF registration functions (criAtomEx_RegisterAcfConfig, criAtomEx_RegisterAcfData, + criAtomEx_RegisterAcfFile, criAtomEx_RegisterAcfFileById) are executed, + all sounds being played are stopped. + - When the ACF unregistration function (criAtomEx_UnregisterAcf) is executed, + all the sounds being played are stopped and the parameters set for the players are partially reset. + Please reset the playback parameters as necessary. + - If an ACF having more than the maximum number of buses allowed is + specified at the time of the ASR initialization + while securing a fixed work area and initializing the library, the registration will fail. + (Up to now, the registration succeeded but the application of the bus settings failed.) + - In order to read the ACF file when using the criAtomEx_CalculateWorkSizeForRegisterAcfFile function, + registration of the user allocator has become mandatory. + (b) With the addition of a new function to the communication interface between the tool and the library, + backward compatibility regarding the connection has been lost. + To use the in-game preview and profiler using the CRI Atom Craft version of this SDK, + you need CRI Atom Library Ver.2.16.18 or higher. + (c) When a "pitch upper limit violation" warning occurs, + the behavior has been changed to send the address of the CriAtomPlayerHn + on which an issue occurred in the last argument of the callback. + - W2010110801 + - W2015113001 + (d) Changed the specification so that the sound being played will not stop + when the criAtomExSoundObject_AddPlayer function is executed with the following condition being satisfied: + - The specified sound object and AtomEx player are already associated. + +(3) New features + (a) Added a function to acquire which track from a Cue is being played. + - criAtomExPlayback_GetPlaybackTrackInfo + (b) Added the ability to enumerate audio endpoints. + - criAtom_EnumAudioEndpoints_WASAPI + (c) Sound devices can now be explicitly assigned to the devices from CRIATOM_SOUND_RENDERER_HW1 to CRIATOM_SOUND_RENDERER_HW4 + by ID specification. + - criAtom_SetDeviceId_WASAPI + Please obtain the ID of the sound device by calling IMMDevice::GetId. + + [2017-12-19 CRI Atom Ver.2.15.18]------------------------------------------ +(1) Bug fixes + (a) Fixed a bug where error call back occurs + when the following conditions are satisfied when using monitor library. + - Performing library initialization with the number of buses of the CriAtomExConfig (num_buses) less than 8 + (b) Fixed a bug where routing to the bus which is not set is performed when the following conditions are satisfied. + - Playback in the situation where there is no ASR rack ID set in the cue (or set in the player). + - Sending to a bus that does not exist in the DSP bus setting being applied is set with rack ID = 0. + - The name of the bus that does not exist is the 2nd to 8th in the bus name list in the ACF. + (c) Fixed a bug where the value specified by the following function is not applied to the player. + - criAtomExPlayer_SetVoicePoolIdentifier + - criAtomExPlayer_SetHcaMxMixerId + (d) Fixed a bug when executing "Start" and "Pause canceled" in the same frame, + within for REACT control became illegal, and the driven REACT did not return. + (e) Fixed a bug that silence occurs during playback when the following conditions + are satisfied when using the preview library and monitor library. + - The type of the playback source is other than cue playback + - Bus routing setting not set as source + (f) Fixed a bug where access violation occurred when data specifying + "key generated automatically for each cue sheet" and data specifying "encryption key set in project" are mixed. + (g) Fixed a bug where applies the parameters at the time of sounding rather than the parameters + that were set when executing the criAtomExPlayer_Start function when applying some parameters of the Ex player. + The target parameters are as follows: + - ASR Rack ID + - Voice pool identifier + - HCA-MX decode target mixer ID + (h) Fixed a bug in which cue playback containing categories of action tracks applied + the parameters of the Ex player at the time of sounding when cue playback by action occurred. + (i) Fixed a bug where calling a criAtomEx_CalculateWorkSizeForDspBusSettingFromAcfData function + before ASR module initialization can not calculate work size correctly. + (j) Fixed a bug where failed preview when using a bus containing effect plug-in during in-game preview. + (k) Fixed a bug that illegal output to MasterOut would occur in cue playback + that matched the following conditions in the preview library and monitor library. + - The send destination bus of the cue does not exist in the DSP bus setting being applied. + - Output setting to the MasterOut bus of the cue is other than 1.0. + - Apply update of parameters during cue playback. + + [2017-10-06 CRI Atom Ver.2.15.14]------------------------------------------ +(1) Bug fixes + (a) Fixed a bug where the synchronization position was detected even + at the position before the first beat synchronization information set in the cue. + (b) Fixed a bug where unauthorized access occurred when executing + the action if releasing the ACB handle targeted for the action track in the cue being played back. + (c) Fixed a bug where the global reference function of the selector label + was not working in cue playback of polyphonic type and track transition type. + (d) Fixed a bug where references to global labels would be made in speech control using selector labels, + despite selector settings for players being done. + (e) Fixed a bug where the global label reference function is not working against + the playback of the track transition type cue. + (f) Fixed a bug where parameters are not reflected in the effect + when detaching the DSP bus setting including the VST plugin + during preview and then attaching again. + (g) Fixed a bug where user-defined effect interface could not be acquired + when ACF including user-defined effect was registered on the actual machine. + (h) Fixed a bug where the access exception occurs when the following conditions are satisfied and using WASAPI: + - ASR is 5.1ch and the device output channel is 7.1ch + +(2) Specification changes + (a) The argument of the function to unregister the effect interface has been changed + to the pointer to the interface. + +(3) New features + (a) Added a function to register a callback function to be called + at the synchronous position detection timing when playing back a cue + for which beat synchronization information is set. + - criAtomExBeatSync_SetCallback + (b) Added a function to register a callback function to notify playback track information. + - criAtomExPlayer_SetPlaybackTrackInfoNotificationCallback + (c) Added the functions to register / unregister interface of effect implemented for CriAudioEffect module. + - criAtomExAsr_RegisterEffectInterface + - criAtomExAsr_UnregisterEffectInterface + (d) Added a constant macro that the number of effects that the user can register. + - CRIATOMEXASR_MAX_NUM_USER_EFFECT_INTERFACES + + [2017-08-02 CRI Atom Ver.2.14.35]------------------------------------------ +(1) Bug fixes + (a) Fixed an infinite loop and AtomEx not being terminated normally + when the criAtomEx_Finalize function was called without discarding CriAtomExPlayerHn + with CriAtomEx3dSourceHn set. + (b) Fixed a bug where CriAtomExPlayback_GetTimeSyncedWithAudio returned 0 + instead of a negative value when there was no playback. + (c) Fixed a bug where the fade-out was not done properly when stopping a Player attached to a Fader. + (d) Fixed a bug where no error occurred when discarding CriAtomEx3dSourceHn + before CriAtomExPlayerHn if the playback of a Cue link using 3D positioning was performed. + (e) Fixed a bug whith ASR bus effects using 7 or 8 channels for input/output, such as the I3DL2 reverb: noise + was sent to the 7th and 8th output channels. + (f) Fixed a bug where the effect parameters became undefined when applying a snapshot, if the ACF didn't have an effect name, + such as a band-pass filter, on an ASR effect bus. + +(2) New features + (a) Added a function to set a callback to be triggered each time the volume or the pitch of an Atom player is changed. + - criAtomPlayer_SetParameterChangeCallback + (b) Added a function to obtain the name of the DSP bus snapshot applied to an ASR rack. + - criAtomExAsrRack_GetAppliedDspBusSnapshotName + + [2017-06-30 CRI Atom Ver.2.14.29]------------------------------------------ +(1) Bug fixes + (a) Fixed an unauthorized access occurring while attaching the DSP bus setting + under the following conditions: + - There is only one DSP bus setting in the ACF. + - There is only one bus in the DSP bus configuration. + - There is a snapshot of the DSP bus setting. + (b) Fixed a bug where the value of CriAtomExHcaMxConfig::server_frequency was checked even + though HCA - MX was not used. + (c) Fixed a warning (W2016030701) occuring when initializing the library + under the following conditions: + - CriAtomAcfConfig is set to CriAtomExConfig. + - CriFsConfig is set to CriAtomExConfig. + - FileSystem2 is not initialized. + (d) Fixed a leak of internal resources used for action control when playing a Cue including TrackMute action. + (e) Fixed a bug that failed to generate a time stretch + when attaching it to the voice pool by passing a work area. + (f) Fixed an unauthorized access that occurred within stop processing + if the synchronization source cue was immediately stopped in + the presence of the synchronization wait cue during beat synchronization playback. + (g) Fixed a problem where a parameter change on a playing sound was being invalidated + by the source block during a block transition. + (h) Fixed a problem in which a sound was played back using the parameters set immediately after the + criAtomExPlayer_Start function was called instead of the initial parameters. + This applies to the following functions: + - ASR rack ID (criAtomExPlayer_SetAsrRackId) + - HCA decode target mixer ID (criAtomExPlayer_SetHcaMxMixerId) + - Voice pool identifier (criAtomExPlayer_SetVoicePoolIdentifier) + - Sound renderer type (criAtomExPlayer_SetSoundRendererType) + (i) Fixed an issue where the playback time obtained from criAtomExPlayback_GetTimeSyncedWithAudio + drifted away from the actual playing time when server processing was not executed for a long time. + (j) Fixed a problem where the playback frequency of the final track may be higher + for cues of type random / random no repeat. + * If this is the case, rebuild the ACB data in AtomCraft Ver.2.30.00 or later. + (k) Fixed a problem where the distance attenuation was not working + when the default control value was set for the distance attenuation AISAC. + (l) Fixed area corruption and parameters not being saved + when backing up DSP parameters acquired from an ACF using previous versions of CriUDsp. + (m) Fixed a bug where chained delay effects (delay, echo, multi tap delay) on an ASR bus. + The original sound was played back when the bus send level was changed from a non-zero value to 0. + (n) Fixed a problem where the functions to get and set the maximum bus number + of the ACF were not implemented in the ASR initialization of the ACF-based library initialization. + (o) Fixed a problem where an ACF update request was made to AtomCraft by the monitor library + even when the ACF data registered for in-game preview was not actually built for in-game preview. + +(2) Specification changes + (a) Changed the type of the third argument of the criAtomEx_GetAcfVersion function + from a void pointer to a CriBool pointer. + (b) criAtomEx3dSource_SetConeOrientation is now a deprecated function and + a new criAtomEx3dSource_SetOrientation function has been added. + (c) We have deprecated the functions declared in cri_atom_asr.h, + that take an enumeration type for the effect as an argument. + (d) cri_atom_asr.h comments were corrected. + - "DSP" -> "effect" + - "DSP bus" -> "bus" + (e) Functions that specify a bus number have been deprecated. + Please use the equivalent function that specifies the bus name (i.e. having "ByName" at the end of the function name). + - criAtomExAsr_SetBusVolume + - criAtomExAsr_GetBusVolume + - criAtomExAsr_SetBusPan3d + - criAtomExAsr_GetBusPan3d + - criAtomExAsr_SetBusMatrix + - criAtomExAsr_SetBusSendLevel + - criAtomExAsr_AttachBusAnalyzer + - criAtomExAsr_DetachBusAnalyzer + - criAtomExAsr_GetBusAnalyzerInfo + - criAtomExAsr_SetBusFilterCallback + - criAtomExAsrRack_SetBusVolume + - criAtomExAsrRack_GetBusVolume + - criAtomExAsrRack_SetBusPan3d + - criAtomExAsrRack_GetBusPan3d + - criAtomExAsrRack_SetBusMatrix + - criAtomExAsrRack_SetBusSendLevel + - criAtomExAsrRack_AttachBusAnalyzer + - criAtomExAsrRack_DetachBusAnalyzer + - criAtomExAsrRack_GetBusAnalyzerInfo + - criAtomExAsrRack_SetBusFilterCallback + (f) The following macro definition has been deprecated. Please use CRIATOMEXASR_DEFAULT_NUM_BUSES instead. + - CRIATOMEXASR_DEFAULT_NUM_BASES + (g) When using WASAPI for audio output, if the default playback device is changed during the application, + the change is now detected and the audio output destination is automatically updated. + This fix removes the need to reinitialize the library even if + the user removes or inserts the device during the startup of the application. + +(3) New features + (a) Within the 3D positioning feature, we implemented a "Multi Positioning Play" which takes multiple + 3D sound source positions and sound cones etc. into consideration. + - criAtomExPlayer_Set3dSourceListHn + - criAtomEx3dSourceList_CalculateWorkSize + - criAtomEx3dSourceList_Create + - criAtomEx3dSourceList_Destroy + - criAtomEx3dSourceList_Add + - criAtomEx3dSourceList_Remove + - criAtomEx3dSourceList_RemoveAll + (b) Added functions to stop playing cues from a given category. + - criAtomExCategory_StopById + - criAtomExCategory_StopByName + - criAtomExCategory_StopWithReleaseTimeById + - criAtomExCategory_StopWithReleaseTimeByName + (c) Added a function to get the playback time synchronized with the voice (in microseconds). + - criAtomExPlayback_GetTimeSyncedWithAudioMicro + (d) Added a function for the playback of link cue in an ACB. + (e) Supported playback with multiple RACK specified in an ACB. + (f) Added a global label setting function which is referred to when the player has no selector label set. + - criAtomExAcf_SetGlobalLabelToSelectorByIndex + - criAtomExAcf_SetGlobalLabelToSelectorByName + (g) Added an external public function to get the current DSP bus snapshot being applied. + - criAtomEx_GetAppliedDspBusSnapshotName + (h) Added a function to set the interior pan. + - criAtomEx3dSource_SetInteriorPanField + - criAtomEx3dSource_ChangeDefaultInteriorPanField + (i) Added functions to get and set effect parameters by name. + - criAtomExAsr_SetEffectParameter + - criAtomExAsrRack_SetEffectParameter + - criAtomExAsr_GetEffectParameter + - criAtomExAsrRack_GetEffectParameter + (j) Added a function to update the effect parameters. + - criAtomExAsr_UpdateEffectParameters + - criAtomExAsrRack_UpdateEffectParameters + (k) Added a function to get a DSP name from an ACF. + - criAtomExAcf_GetDspFxName + + [2017-01-10 CRI Atom Ver.2.12.01]------------------------------------------ +The first release of the CRI Atom Library for PC. + +-END- + +/*--< end of file >---------------------------------------------------------*/ diff --git a/3rdParty/cri2019/documentation/history/history_cribase_pc_e.txt b/3rdParty/cri2019/documentation/history/history_cribase_pc_e.txt new file mode 100644 index 00000000..5943187a --- /dev/null +++ b/3rdParty/cri2019/documentation/history/history_cribase_pc_e.txt @@ -0,0 +1,115 @@ +/**************************************************************************** + * + * CRI Middleware SDK + * + * Copyright (c) 2017 CRI Middleware Co., Ltd. + * + * Library : CRI Base Library for PC + * Module : Revision history + * File : history_cribase_pc_e.txt + * Version : 2.45.07 + * + ****************************************************************************/ + +1. Library Version +(1) CRI Base library + [cri_base_pcx86.lib] 631,284 bytes + CRI ADX Decoder PCx86 Ver.1.00.08 Build:May 8 2019 11:07:01 MSC19.00.24210.0,MT + CRI Ambisonics PCx86 Ver.1.00.00 Build:May 8 2019 11:06:53 MSC19.00.24210.0,MT + CRI Base PCx86 Ver.2.45.07 Build:May 8 2019 11:07:01 MSC19.00.24210.0,MT + CRI C Runtime Wrapper PCx86 Ver.1.04.00 Build:May 8 2019 11:07:01 MSC19.00.24210.0,MT + CRI Critical Section PCx86 Ver.1.00.13 Build:May 8 2019 11:07:00 MSC19.00.24210.0,MT + CRI Delegate PCx86 Ver.1.04.00 Build:May 8 2019 11:07:01 MSC19.00.24210.0,MT + CRI Error PCx86 Ver.1.04.04 Build:May 8 2019 11:07:01 MSC19.00.24210.0,MT + CRI Handle Manager PCx86 Ver.1.01.00 Build:May 8 2019 11:07:01 MSC19.00.24210.0,MT + CRI Hash Table PCx86 Ver.0.51.00 Build:May 8 2019 11:06:53 MSC19.00.24210.0,MT + CRI Heap PCx86 Ver.1.21.03 Build:May 8 2019 11:07:01 MSC19.00.24210.0,MT + CRI LLDECOMP3 PCx86 Ver.0.90.04 Build:May 8 2019 11:07:01 MSC19.00.24210.0,MT + CRI Malloc PCx86 Ver.0.50.01 Build:May 8 2019 11:07:01 MSC19.00.24210.0,MT + CRI Random Number Generator PCx86 Ver.1.00.00 Build:May 8 2019 11:07:01 MSC19.00.24210.0,MT + CRI Stream Joint PCx86 Ver.1.02.00 Build:May 8 2019 11:07:01 MSC19.00.24210.0,MT + CRI Thread PCx86 Ver.1.04.08 Build:May 8 2019 11:07:01 MSC19.00.24210.0,MT + CRI Timer PCx86 Ver.0.50.05 Build:May 8 2019 11:07:01 MSC19.00.24210.0,MT + CRI UsfDmx PCx86 Ver.1.03 Build:May 8 2019 11:07:01 MSC19.00.24210.0,MT + CRI UTF Retriever PCx86 Ver.1.00.02 Build:May 8 2019 11:07:01 MSC19.00.24210.0,MT + HCA Decoder (Float) Ver.2.06.05 Build:May 8 2019 11:07:02 + HCA Mixer Ver.2.00.02 Build:May 8 2019 11:07:02 + + [cri_base_pcx86D.lib] 2,983,386 bytes + CRI ADX Decoder PCx86 Ver.1.00.08 Build:May 8 2019 11:07:04 MSC19.00.24210.0,DEBUG,MT + CRI Ambisonics PCx86 Ver.1.00.00 Build:May 8 2019 11:07:04 MSC19.00.24210.0,DEBUG,MT + CRI Base PCx86 Ver.2.45.07 Build:May 8 2019 11:07:04 MSC19.00.24210.0,DEBUG,MT + CRI C Runtime Wrapper PCx86 Ver.1.04.00 Build:May 8 2019 11:07:04 MSC19.00.24210.0,DEBUG,MT + CRI Critical Section PCx86 Ver.1.00.13 Build:May 8 2019 11:07:04 MSC19.00.24210.0,DEBUG,MT + CRI Delegate PCx86 Ver.1.04.00 Build:May 8 2019 11:07:04 MSC19.00.24210.0,DEBUG,MT + CRI Error PCx86 Ver.1.04.04 Build:May 8 2019 11:07:04 MSC19.00.24210.0,DEBUG,MT + CRI Handle Manager PCx86 Ver.1.01.00 Build:May 8 2019 11:07:04 MSC19.00.24210.0,DEBUG,MT + CRI Hash Table PCx86 Ver.0.51.00 Build:May 8 2019 11:07:04 MSC19.00.24210.0,DEBUG,MT + CRI Heap PCx86 Ver.1.21.03 Build:May 8 2019 11:07:04 MSC19.00.24210.0,DEBUG,MT + CRI LLDECOMP3 PCx86 Ver.0.90.04 Build:May 8 2019 11:07:04 MSC19.00.24210.0,DEBUG,MT + CRI Malloc PCx86 Ver.0.50.01 Build:May 8 2019 11:07:04 MSC19.00.24210.0,DEBUG,MT + CRI Random Number Generator PCx86 Ver.1.00.00 Build:May 8 2019 11:07:04 MSC19.00.24210.0,DEBUG,MT + CRI Stream Joint PCx86 Ver.1.02.00 Build:May 8 2019 11:07:04 MSC19.00.24210.0,DEBUG,MT + CRI Thread PCx86 Ver.1.04.08 Build:May 8 2019 11:07:04 MSC19.00.24210.0,DEBUG,MT + CRI Timer PCx86 Ver.0.50.05 Build:May 8 2019 11:07:04 MSC19.00.24210.0,DEBUG,MT + CRI UsfDmx PCx86 Ver.1.03 Build:May 8 2019 11:07:04 MSC19.00.24210.0,DEBUG,MT + CRI UTF Retriever PCx86 Ver.1.00.02 Build:May 8 2019 11:07:04 MSC19.00.24210.0,DEBUG,MT + HCA Decoder (Float) Ver.2.06.05 Build:May 8 2019 11:07:05 + HCA Mixer Ver.2.00.02 Build:May 8 2019 11:07:05 + +2. Library Size +The static memory size used by the CRI Base library depends on the libraries above. +It depends on the linking size. + +3. System requirements/Testing environment +This release has been developed and tested in the following environment: + +3.1 Hardware + CPU : Intel Core i7-3770 (3.4GHz) + Memory : 8GB + +3.2 Development environment +(1) OS + Microsoft Windows 10 Professional + +(2) Compiler / Debugger + Microsoft Visual Studio 2015 Update 3 + +4. Revision history + [2019-05-17 CRI Base Ver.2.45.07]-------------------------------------- +Internal modification only. + + [2019-02-28 CRI Base Ver.2.45.06]-------------------------------------- + (1) Specification changes + (a) Changed the behavior so that they are serialized in the library + since there is a possibility of a crash when a string operation is performed from multiple threads + at the same time, even when error callbacks are invoked from multiple threads at the same time. + + [2018-09-26 CRI Base Ver.2.44.04]-------------------------------------- +Internal modification only. + + [2018-06-01 CRI Base Ver.2.43.07]-------------------------------------- +Internal modification only. + + [2018-01-31 CRI Base Ver.2.43.06]-------------------------------------- +Internal modification only. + + [2017-10-18 CRI Base Ver.2.43.01.01]---------------------------------------- +(1) Bug fixes + (a) Removed the dependency of Core Codec AAC module to C ++ standard library. + There was a possibility of causing a mismatch error with the C ++ library used by the user's project. + + [2017-10-05 CRI Base Ver.2.43.01]------------------------------------------ +Internal modification only. + + [2017-06-30 CRI Base Ver.2.42.15]------------------------------------------ +(1) Bug fixes + (a) Fixed a problem where an error occurred instead of a warning + if the error callback function was overwritten by criErr_SetCallback(). + + [2017-01-10 CRI Base Ver.2.42.07]------------------------------------------ +The first release of the CRI Base Library for PC. + +-END- + +/*--< end of file >---------------------------------------------------------*/ diff --git a/3rdParty/cri2019/documentation/history/history_crifilesystem_pc_e.txt b/3rdParty/cri2019/documentation/history/history_crifilesystem_pc_e.txt new file mode 100644 index 00000000..8fb0908c --- /dev/null +++ b/3rdParty/cri2019/documentation/history/history_crifilesystem_pc_e.txt @@ -0,0 +1,114 @@ +/**************************************************************************** + * + * CRI Middleware SDK + * + * Copyright (c) 2017 CRI Middleware Co., Ltd. + * + * Library : CRI File System Library for PC + * Module : Revision history + * File : history_crifilesystem_pc_e.txt + * Version : 2.78.07 + * + ****************************************************************************/ + +1. Library Version +(1) CRI File System library + [cri_file_system_pcx86.lib] 732,138 bytes + CRI CPK Analyzer PCx86 Ver.0.99.54 Build:May 8 2019 11:07:41 MSC19.00.24210.0,MT + CRI File System PCx86 Ver.2.78.07 Build:May 8 2019 11:07:41 MSC19.00.24210.0,MT + CriFsBinder PCx86 Ver.1.02.71 Build:May 8 2019 11:07:41 MSC19.00.24210.0,MT + CriFsGroupLoader PCx86 Ver.1.00.75 Build:May 8 2019 11:07:41 MSC19.00.24210.0,MT + CriFsWebInstaller PCx86 Ver.2.01.09 Build:May 8 2019 11:07:41 MSC19.00.24210.0,MT + + [cri_file_system_pcx86D.lib] 4,699,704 bytes + CRI CPK Analyzer PCx86 Ver.0.99.54 Build:May 8 2019 11:07:44 MSC19.00.24210.0,DEBUG,MT + CRI File System PCx86 Ver.2.78.07 Build:May 8 2019 11:07:44 MSC19.00.24210.0,DEBUG,MT + CriFsBinder PCx86 Ver.1.02.71 Build:May 8 2019 11:07:44 MSC19.00.24210.0,DEBUG,MT + CriFsGroupLoader PCx86 Ver.1.00.75 Build:May 8 2019 11:07:44 MSC19.00.24210.0,DEBUG,MT + CriFsWebInstaller PCx86 Ver.2.01.09 Build:May 8 2019 11:07:44 MSC19.00.24210.0,DEBUG,MT + +2. Library Size + [cri_file_system_pcx86.lib] + Total Code size: 79686 [BYTE] + Total Data size: 172376 [BYTE] + Total Lib size: 252062 [BYTE] + + [cri_file_system_pcx86D.lib] + Total Code size: 214458 [BYTE] + Total Data size: 219228 [BYTE] + Total Lib size: 433686 [BYTE] + +3. System requirements/Testing environment +This release has been developed and tested in the following environment: + +3.1 Hardware + CPU : Intel Core i7-3770 (3.4GHz) + Memory : 8GB + +3.2 Development environments +(1) OS + Microsoft Windows 10 Professional + +(2) Compiler / Debugger + Microsoft Visual Studio 2015 Update 3 + +4. Revision history + [2019-05-17 CRI File System Ver.2.78.07]-------------------------------------- +Internal modification only. + + [2019-02-28 CRI File System Ver.2.78.05]-------------------------------------- +(1) Specification changes + (a) Changed the specification to include the target file's path in warning messages by error callback, + when loading or writing fails. + (b) Disabled the double bind function which is not currently used. + Following this specification change, consistency between the primary CPK and the secondary CPK + can not be confirmed. + +(2) New features + (a) Added a flag to the member of the CriFsConfig to switch whether to perform CRC check of CPK. + (b) Added the CRC output function to the CriFsWebInstaller. + - criFsWebInstaller_GetCRC32 + (c) Added the HTTP request header setting function to the CriFsWebInstaller. + - criFsWebInstaller_SetRequestHeader + +(3) Bug fixes + (a) Fixed a bug in which CRC check of TOC at CPK loading was not done. + CRC check of TOC is done by calling the criCpkAnalyzer_SetCrcCheckFlag function. + (b) Fixed a bug where the CriFsWebInstaller was able to create more than the maximum number of handles. + + [2018-12-07 CRI File System Ver.2.77.03]-------------------------------------- +(1) Bug fixes + (a) Fixed a bug where downloading from HTTP server that only uses TLS1.1 or TLS1.2 fails + when CriFsWebInstaller is used. + + [2018-09-26 CRI File System Ver.2.77.01]-------------------------------------- +Internal modification only. + + [2018-06-11 CRI File System Ver.2.76.07]-------------------------------------- +Internal modification only. + + [2018-01-31 CRI File System Ver.2.76.04]-------------------------------------- +(1) Bug fixes + (a) Fixed a bug where temporary files were not closed or deleted + at the end of a file installation when using CriFsWebInstaller. + (b) Fixed a bug where a memory leak occurred when CriFsWebInstaller was called. + + [2017-12-19 CRI File System Ver.2.75.06]-------------------------------------- +Internal modification only. + + [2017-06-30 CRI File System Ver.2.75.05]-------------------------------------- +(1) Bug fixes + (a) Fixed a bug for which processing would end without transitioning to error status + even when an error occured during file installation. + +(2) New features + (a) Added a function to change the character used by the criFsBinder_BindFiles function as a separator. + - criFsBinder_SetPathSeparatorForBindFiles + (b) Added the CriFsWebInstaller module to install files with HTTP / HTTPS. + + [2017-01-10 CRI File System Ver.2.74.01]-------------------------------------- +The first release of the CRI File System Library for PC. + +-END- + +/*--< end of file >---------------------------------------------------------*/ diff --git a/3rdParty/cri2019/documentation/history/history_crimana_pc_e.txt b/3rdParty/cri2019/documentation/history/history_crimana_pc_e.txt new file mode 100644 index 00000000..95f2f6e4 --- /dev/null +++ b/3rdParty/cri2019/documentation/history/history_crimana_pc_e.txt @@ -0,0 +1,170 @@ +/**************************************************************************** + * + * CRI Middleware SDK + * + * Copyright (c) 2017 CRI Middleware Co., Ltd. + * + * Library : CRI Mana Library for PC + * Module : Revision history + * File : history_crimana_pc_e.txt + * Version : 2.18.00 + * + ****************************************************************************/ + +1. Library Version +(1) CRI Mana library + [cri_mana_pcx86.lib] 1,567,064 bytes + CRI CFT PCx86 Ver.2.31 Build:Feb 22 2019 16:14:09 MSC19.00.24215.1,MT + CRI CRS PCx86 Ver.1.06 Build:Feb 22 2019 16:14:09 MSC19.00.24215.1,MT + CRI CRW:WIN PCx86 Ver.0.84 Build:Feb 22 2019 16:14:10 MSC19.00.24215.1,MT + CRI DCT PCx86 Ver.2.045 Build:Feb 22 2019 16:14:10 MSC19.00.24215.1,MT + CRI DLG PCx86 Ver.1.22 Build:Feb 22 2019 16:14:10 MSC19.00.24215.1,MT + CRI ERR PCx86 Ver.1.01 Build:Feb 22 2019 16:14:10 MSC19.00.24215.1,MT + CRI M2V PCx86 Ver.2.079 Build:Feb 22 2019 16:14:56 MSC19.00.24215.1,MT + CRI Mana PCx86 Ver.2.18.00 Build:Feb 22 2019 16:16:38 MSC19.00.24215.1,MT + CRI MEM PCx86 Ver.1.001 Build:Feb 22 2019 16:14:56 MSC19.00.24215.1,MT + CRI Movie PCx86 Ver.4.11.12 Build:Feb 22 2019 16:15:04 MSC19.00.24215.1,MT + CRI MPV PCx86 Ver.2.109 Build:Feb 22 2019 16:14:58 MSC19.00.24215.1,MT + CRI MvCore PCx86 Ver.1.26.04 Build:Feb 22 2019 16:14:10 MSC19.00.24215.1,MT + criAdec PCx86 Ver.2.02 Build:Feb 22 2019 16:14:09 MSC19.00.24215.1,MT + criMvPly PCx86 Ver.4.05.19 Build:Feb 22 2019 16:15:00 MSC19.00.24215.1,MT + criV264Mft PCx86 Ver.1.01 Build:Feb 22 2019 16:15:05 MSC19.00.24215.1,MT + criVdec PCx86 Ver.3.55 Build:Feb 22 2019 16:15:01 MSC19.00.24215.1,MT + criVmpv PCx86 Ver.3.60 Build:Feb 22 2019 16:15:02 MSC19.00.24215.1,MT + SJ PCx86 Ver.6.51 Build:Feb 22 2019 16:14:59 MSC19.00.24215.1,MT + +2. Library Size + [cri_mana_pcx86.lib] + Total Code size: 706244 [BYTE] + Total Data size: 3545412 [BYTE] + Total Lib size: 4251656 [BYTE] + +3. System requirements/Testing environment +This release has been developed and tested in the following environment: + +3.1 Hardware + CPU : Intel Core i7-3770 (3.4GHz) + Memory : 8GB + +3.2 Development environment +(1) OS + Microsoft Windows 10 Professional + +(2) Compiler / Debugger + Microsoft Visual Studio 2015 Update 3 + +4. Revision history +[2019-02-25 CRI Mana Ver.2.18.00]------------------------------------------ +(1) New features + (a) Added an API to reset all bus send level information. + If you want to specify a total of eight or more bus send levels, reset with this function. + - criManaPlayer_ResetBusSendLevelAll + * Resetting of the CriManaPlayer with the "use_atomex_player" flag enabled is not supported. + (b) Added an API to set the sync mode of movie events (cue points, subtitles). + - criManaPlayer_SetMovieEventSyncMode + +(2) Bug fixes + (a) Fixed a bug where a crash would occur when calling the criManaPlayer_SetBusSendLevelByName function + on the 9th and subsequent DSP buses. + (b) Fixed a bug where playback did not proceed in the middle of the second lap + when loop playback and seek were performed on movies containing HCA codec. + (c) Fixed a bug where might not advance from the PREP status if H.264 playback included audio tracks + with 3 or more tracks. + This correction increases the size of the player handle management memory by 4 KB. + +[2018-12-12 CRI Mana Ver.2.16.20]------------------------------------------ +(1) Bug fixes + (a) Fixed a bug where can not play 1920x1088 H.264 video in Windows 7 environment. + (b) Fixed a bug where sometimes does not transition to the error state, + even if an error occurs in internal decoding, when H.264 playback. + +[2018-10-04 CRI Mana Ver.2.16.17]------------------------------------------ +(1) Bug fixes + (a) Fixed a bug where the application would crash when playing back movies continuously + in the CriManaPlayer if the "use_atomex_player" flag was enabled. + +[2018-09-26 CRI Mana Ver.2.16.16]------------------------------------------ +(1) New features + (a) Added functions to set the category to Movie audio track. + - criManaPlayer_SetSoundCategoryByName + - criManaPlayer_UnsetSoundCategory + (b) Added control flags designation API for whether or not to use the stream manager. + - criMana_UseStreamerManager + - criMana_IsStreamerManagerUsed + (c) Added the H.264 decoding function. + Please use the criMana_SetupMediaFoundationH264Decoder_PC function to activate. + +(2) Bug fixes + (a) Fixed a bug where CriManaPlayer could not correctly acquire the parameter of + the audio track when the "use_atomex_player" flag was activated. + +[2018-06-07 CRI Mana Ver.2.15.17]------------------------------------------ +(1) New features + (a) Added a video codec VP9. + (b) Added the common APIs and the platform specific APIs corresponding to VP9. + - criMana_SetDefaultVp9DecoderConfig + - criMana_CalculateVp9DecoderWorkSize + - criMana_SetupVp9Decoder + - criMana_SetVp9DecodeThreadPriority_PC + (c) Added the member of CriManaVideoCodecType. + - CRIMANA_VIDEO_CODEC_VP9 + +(2) Bug fixes + (a) Fixed a bug where the internal frame management might be broken + when not discarding the frame in the order acquired by criManaPlayer_KeepFrame. + (b) Fixed a bug where could cause crash with illegal memory access + when concatenating and reproducing very small movie data by multithread decoding. + (c) Fixed a bug in which access violation may occur + if call criManaPlayer_Destroy after calling criManaPlayer_FreePlaybackWork. + +[2018-01-31 CRI Mana Ver.2.15.04]------------------------------------------ +(1) Bug fixes + (a) Fixed a bug where the discarding of audio tracks was not executed correctly. + (b) Fixed a bug where some audio parameters that were set before the CriManaPlayer + was activated (with the use_atomex_player flag) were reset at the start of the next playback. + +[2017-10-06 CRI Mana Ver.2.14.00]------------------------------------------ +(1) Bug fixes + (a) Fixed a bug where the decoding skip function did not work when using keep frame. + (b) Fixed a bug where the decoding skip function was skipped too much when it was enabled. + +[2017-06-30 CRI Mana Ver.2.13.04]------------------------------------------ +(1) Library operating conditions + (a) Execution (linking) of this library requires the CRI Atom Ver.2.14.00 library or a more recent version. + +(2) New features + (a) Added an API to play 3 audio tracks simultaneously in the movie. + - criManaPlayer_SetExtraAudioTrack + - criManaPlayer_SetExtraAudioVolume + - criManaPlayer_GetExtraAudioVolume + - criManaPlayer_SetExtraAudioBusSendLevelByName + (b) Added the "use_atomex_player" member to the CriManaPlayerConfig structure. + When enabled, CriManaPlayer will play the movie audio track with CriAtomExPlayer. + One CriAtomExPlayer is created for each CriManaPlayer. + (c) Added an API to get CriAtomExPlayer from CriManaPlayer. + - criManaPlayer_GetAtomExPlayer + (d) Added a function to perform the audio output of CriManaPlayer with CriAtomExPlayer. + You can create a CriAtomExPlayer by passing true to the "use_atomex_player" member of the + CriManaPlayerConfig structure and passing it to the criManaPlayer_CreateWithConfig function. + (e) Added a video playback function supporting Ambisonics audio. + It is available only on some platforms. + If you are interested in this feature, please contact support. + Specific usage methods and samples will be added in a future SDK update. + Along with this, "ambisonics" (Ambisonics flag) has been added to the audio parameters + that can be acquired by criManaPlayer_GetMovieInfo. + +(3) Specification changes + (a) Added the "extra_audio_params" member to the CriManaPlaybackExWorkConfig structure. + If you are directly manipulating the members of the CriManaPlaybackExWorkConfig structure, + please set the additional members. + (b) In order to reduce the size of the library, the information about the following submodules was deleted from + the version information of the library file. (The submodule itself persists) + - "CRI Mana Sound" + - "CRI Mana Streamer" + + [2017-01-10 CRI Mana Ver.2.10.00]------------------------------------------ +The first release of the CRI Mana Library for PC. + +-END- + +/*--< end of file >---------------------------------------------------------*/ diff --git a/3rdParty/cri2019/documentation/history/history_criwaresdk_pc_e.txt b/3rdParty/cri2019/documentation/history/history_criwaresdk_pc_e.txt new file mode 100644 index 00000000..ebe02328 --- /dev/null +++ b/3rdParty/cri2019/documentation/history/history_criwaresdk_pc_e.txt @@ -0,0 +1,203 @@ +/**************************************************************************** + * + * CRI Middleware SDK + * + * Copyright (c) 2017 CRI Middleware Co., Ltd. + * + * Title : CRIWARE SDK for PC + * Module : Revision history + * File : history_criwaresdk_pc_e.txt + * Date : 2019-06-07 + * Version : 2.19.03 + * + ****************************************************************************/ + +1. Revision History +[2019-06-07 CRI ADX2 SDK Ver.2.19.03]------------------------------------------ +(1) Libraries + (a) CRI Atom : Ver.2.19.03 + (b) CRI File System : Ver.2.78.07 + (c) CRI Base : Ver.2.45.07 + +(2) Tools + (a) CRI Atom Tools Ver.3 : Ver.3.41.10 + (b) CRI Sofdec2 Tools : Ver.2.22.01 + +(3) Samples + (a) Fixed a bug where did not correspond to the change of voice data header + in the "playback_multi_ch" sample. + +[2019-04-05 CRI ADX2 SDK Ver.2.19.01]------------------------------------------ +(1) General + (a) Changed the library development environment and sample project environment from VS2012 to VS2015. + +(2) Libraries + (a) CRI Atom : Ver.2.19.00 + (b) CRI File System : Ver.2.78.05 + (c) CRI Mana : Ver.2.18.00 + (d) CRI Base : Ver.2.45.06 + +(3) Tools + (a) CRI Atom Tools Ver.2 : Ver.2.35.19 + (b) CRI Atom Tools Ver.3 : Ver.3.41.01 + (c) CRI Sofdec2 Tools : Ver.2.22.00 + * Added batch file to convert Sofdec.Prime or H.264 usm to VP9 usm. + +(4) Expansion Plugin + (a) CRI ADX2 Audio Effect McDSP Expansion Ver.1.00.02 + (b) CRI Sofdec2 Codec VP9 Expansion Ver.1.01.00 + +(5) Samples + (a) Corrected an error in the operation instruction displayed on the "seek_playback" sample. + (b) Corrected an error in the operation instruction displayed on the "multi_device" sample. + +[2018-11-09 CRIWARE SDK Ver.2.18.01]------------------------------------------ +(1) Libraries + (a) CRI Atom : Ver.2.17.21 + (b) CRI Mana : Ver.2.16.17 + +(2) Tools + (a) CRI Atom Tools Ver.2 : Ver.2.35.12 + (b) CRI Atom Tools Ver.3 : Ver.3.40.04 + (c) CRI Sofdec2 Tools : Ver.2.20.05 + +[2018-10-09 CRIWARE SDK Ver.2.18.00]------------------------------------------ +(1) Libraries + (a) CRI Atom : Ver.2.17.20 + (b) CRI File System : Ver.2.77.01 + (c) CRI Mana : Ver.2.16.16 + (d) CRI Base : Ver.2.44.04 + +(2) Tools + (a) CRI Atom Tools Ver.2 : Ver.2.35.10 + (b) CRI Atom Tools Ver.3 : Ver.3.40.02 + CRI Atom Tools Ver.3 became official release from this version. + For details, please refer to the manual. + (c) CRI Sofdec2 Tools : Ver.2.20.04 + +[2018-06-20 CRIWARE SDK Ver.2.17.02]------------------------------------------ +(1) Libraries + (a) CRI Atom : Ver.2.16.26 + (b) CRI File System : Ver.2.76.07 + (c) CRI Mana : Ver.2.15.17 + (d) CRI Base : Ver.2.43.07 + +(2) Tools + (a) CRI Atom Tools Ver.2 : Ver.2.35.02 + (b) CRI Atom Tools Ver.3 : Ver.3.35.10 + (c) CRI Sofdec2 Tools : Ver.2.20.01 + (d) Version Checker Wizz : Ver.1.47 + +(3) Expansion Plugin + (a) CRI Sofdec2 Codec VP9 Expansion Ver.1.00.00 + +[2018-03-14 CRIWARE SDK Ver.2.17.01]------------------------------------------ +(1) Libraries + (a) CRI Atom : Ver.2.16.22 + +(2) Tools + (a) CRI Atom Tools Ver.2 : Ver.2.35.01 + (b) CRI Atom Tools Ver.3 : Ver.3.35.01 + +[2018-02-28 CRIWARE SDK Ver.2.17.00]------------------------------------------ +(1) Libraries + (a) CRI Atom : Ver.2.16.20 + (b) CRI File System : Ver.2.76.04 + (c) CRI Mana : Ver.2.15.04 + (d) CRI Base : Ver.2.43.06 + +(2) Tools + (a) CRI Atom Tools Ver.2 : Ver.2.35.00 + (b) CRI Atom Tools Ver.3 : Ver.3.35.00 + (c) CRI Sofdec2 Tools : Ver.2.17.00 + +(3) Expansion Plugin + (a) CRI ADX2 Audio Effect McDSP Expansion Ver.1.00.01 + +(4) Samples + (a) Changed the "criatom/memory_management" sample code, due to specification changes in the CRI Atom library. + - When calling criAtomEx_RegisterAcfFile(), it is essential to register a memory allocator. + (b) Added samples "criatom/multi_device", "criatom/select_device". + (c) Deleted samples "criatom/xaudio2_initialization", "criatom/xaudio2_output". + (d) Fixed an issue where warnings occurred in sample "crimana/playback_with_adx2". + +[2018-01-22 CRIWARE SDK Ver.2.16.02]------------------------------------------ +(1) Libraries + (a) CRI Atom : Ver.2.15.18 + (b) CRI File System : Ver.2.75.06 + (c) CRI Base : Ver.2.43.01.01 + +(2) Tools + (a) CRI Atom Tools Ver.2 : Ver.2.34.03 + (b) CRI Atom Tools Ver.3 : Ver.3.34.04 + (c) CRI Sofdec2 Tools : Ver.2.16.00 + +(3) Expansion Plugin + (a) CRI ADX2 Audio Effect McDSP Expansion Ver.1.00.00 + +[2017-10-23 CRIWARE SDK Ver.2.16]--------------------------------------------- +(1) Libraries + (a) CRI Atom Ver.2.15.14 + (b) CRI Mana Ver.2.14.00 + (c) CRI Base Ver.2.43.01 + +(2) Tools + (a) CRI Atom Tools Ver.2 : Ver.2.34.00 + (b) CRI Atom Tools Ver.3 : Ver.3.34.01 + (c) CRI Sofdec2 Tools : Ver.2.15.00 + +(3) Samples + (a) Added the following sample program: + - user_effect_plugin + (b) Following addition of "user_effect_plugin" sample, + the following header files and libraries have been added. + The following files are used in the sample program. + - CRIWARE/SDK/pc/include/expansion/audio_effect/simple_delay_for_adx2_sample.h + - CRIWARE/SDK/pc/libs/x64/expansion/audio_effect/criafx_simple_delay_pcx64.lib + - CRIWARE/SDK/pc/libs/x64/expansion/audio_effect/criafx_simple_delay_pcx64D.lib + - CRIWARE/SDK/pc/libs/x86/expansion/audio_effect/criafx_simple_delay_pcx86.lib + - CRIWARE/SDK/pc/libs/x86/expansion/audio_effect/criafx_simple_delay_pcx86D.lib + (c) Fixed a bug where the "crimana/multilingual" sample and "crimana/seek_playback" sample + hung up at the end of the application. + +(4) SDK structure +Fixed a problem where The folder name under the "\SDK\documentation" folder was inappropriate. + +[2017-08-10 CRIWARE SDK Ver.2.15 ] ------------------------------------------- +(1) Libraries + (a) CRI Atom Ver.2.14.35 + +(2) Tools + (a) CRI Atom Tools Ver.2.30.01 + +[2017-07-21 CRIWARE SDK Ver.2.14 ] ------------------------------------------- +(1) Libraries + (a) CRI Atom Ver.2.14.29 + (b) CRI File System Ver.2.75.05 + (c) CRI Mana Ver.2.13.04 + (d) CRI Base Ver.2.42.15 + +(2) Tools + (a) CRI Atom Tools Ver.2.30.00 + (b) CRI File System Tools Ver.2.50.04 + (c) CRI Sofdec2 Tools Ver.2.14.00 + (d) Version Checker Wizz Ver.1.46 + +[2017-03-28 CRIWARE SDK Ver.2.11 ] ------------------------------------------- +The first release of the CRIWARE SDK. + +(1) Libraries + (a) CRI Atom Ver.2.12.01 + (b) CRI File System Ver.2.74.01 + (c) CRI Mana Ver.2.10.00 + (d) CRI Base Ver.2.42.07 + +(2) Tools + (a) CRI Atom Tools Ver.2.27.05 + (b) CRI File System Tools Ver.2.50.03 + (c) CRI Sofdec2 Tools Ver.2.12.01 + (d) Version Checker Wizz Ver.1.45 + +-END- + +/*--< end of file >---------------------------------------------------------*/ diff --git a/3rdParty/cri2019/documentation/release_notes/release_criwaresdk_pc_e.txt b/3rdParty/cri2019/documentation/release_notes/release_criwaresdk_pc_e.txt new file mode 100644 index 00000000..45098caf --- /dev/null +++ b/3rdParty/cri2019/documentation/release_notes/release_criwaresdk_pc_e.txt @@ -0,0 +1,254 @@ +/**************************************************************************** + * + * CRI Middleware SDK + * + * Copyright (c) 2017 CRI Middleware Co., Ltd. + * + * Title : CRIWARE SDK for PC + * Module : Release notes + * File : release_criwaresdk_pc_e.txt + * Date : 2019-06-07 + * Version : 2.19.03 + * + ****************************************************************************/ + +/*--------------------------------------------------------------------------* + * + * [Table of Contents] + * 1. About the CRIWARE SDK + * 2. Version information + * 2.1 Version information for this release + * 2.2 Revision history + * 3. How to use the SDK + * 3.1 Folder structure + * 3.2 Installation + * 4. System requirements / Testing environment + * 4.1 Libraries + * 4.2 CRI Tools + * 5. Notes + * 5.1 Known problems + * 5.2 Limitations + * 5.3 About CRI Atom tools Ver.3 transition + * + * Notes on using SDK + * + *--------------------------------------------------------------------------*/ + +1. About the CRIWARE SDK +CRI ADX2 is a multi-platform, highly-functional and compact audio middleware. +CRI Sofdec2 is a multi-platform, high-performance movie playback middleware. +Both are part of the "CRIWARE SDK", the software development kit for "CRIWARE", which is provided for +developers of PC applications. +CRIWARE SDK comes with the following items: + + - CRI Atom runtime library + - CRI File System runtime library + - CRI Mana runtime library + - CRI Base runtime library + - CRI Atom tools (Ver.2 / Ver.3) + - CRI File System tools + - CRI Sofdec2 tools + - CRI ADX2 Expansion Plugins + - Tutorial / sample programs + - CRI ADX2 manual + - CRI File System manual + - CRI Sofdec2 manual + +2. Version Information +2.1 Version Information of This Release +(1) SDK + CRIWARE SDK : Ver.2.19.03 + +(2) Libraries + CRI Atom library : Ver.2.19.03 + CRI File System library : Ver.2.78.07 + CRI Mana library : Ver.2.18.00 + CRI Base library : Ver.2.45.07 + +(3) Tools + CRI Atom tools Ver.2 : Ver.2.35.19 + CRI Atom tools Ver.3 : Ver.3.41.10 + CRI File System tools : Ver.2.50.04 + CRI Sofdec2 tools : Ver.2.22.01 + Version Information Viewer : Ver.1.49 + +(4) Expansion Plugins + CRI ADX2 Audio Effect McDSP Expansion : Ver.1.00.02 + CRI Sofdec2 Codec VP9 Expansion : Ver.1.01.00 + +2.2 Revision History +(1) SDK +The revision history of the SDK is stored in the following folder: + - /CRIWARE/SDK/documentation/history/ + +(2) Tools +The release notes and the revision history for the tools are stored in the following folders: + - /CRIWARE/Tools/ADX2/ver.2/docs/eng/ + - /CRIWARE/Tools/ADX2/ver.3/docs/eng/ + - /CRIWARE/Tools/Sofdec2/docs/eng/ + - /CRIWARE/Tools/Others/crifilesystem/docs/eng/ + - /CRIWARE/Tools/Others/version_checker/docs/eng/ + +(3) Expansion Plugins +The release notes and the revision history for the Expansion Plugins are stored in the following folders: + - /CRIWARE/Expansion/cri_audio_effect/McDSP/documentation/ + - /CRIWARE/Expansion/sofdec2_codecs/vp9/documentation/ + +3. How to use the SDK +3.1 Folder structure +The CRIWARE SDK has the following folder structure: + +CRIWARE + + FirstSteps : Quick start manuals + | + + SDK + | + common [Platform independent folder] + | | + smpdata : Data for sample program + | + documentation [Documentation] + | | + error_reference : Error manuals + | | + history : Revision history + | | + release_notes : Release notes + | | + sdk_manual : SDK manual + | + pc [PC specific folder] + | + include : Header files + | + libs : Library files + | + samples : Sample programs + | + source : Common sample source + | + tutorials : Tutorial programs + | + + Tools [Data creation tools] + | + ADX2 : CRI Atom tools ("CRI ADX2") + | + LicenseFiles : License files needed to run the tools + | + Others + | | +- crifilesystem : CRI File System tools ("FileMajik PRO") + | | +- crypt : Data encryption tools for Sofdec2 + | | +- version_checker : Version checker + | +- Sofdec2 : Sofdec2 tools ("CRI Sofdec2") + +- Expansion [Expansion Plugin] + +- cri_audio_effect + +- McDSP : McDSP Effect Plugin + +- sofdec2_codecs : + +- vp9 : VP9 Expansion Plugin + +3.2 Installation +Install the SDK with the following procedure: + - Execute "CRIWARE SDK Installer.exe" + +4. System Requirements +This release has been checked on the following environment: + +4.1 Libraries +4.1.1 Hardware + CPU : Intel Core2 Duo i7-3770 (3.4GHz) (*1) + Memory : 8GB + +(*1) Because XAudio2 is used for the sound output, support for SSE2 instructions is required to use the ADX2 runtime library. + +4.1.2 Development Environment +(1) OS + Microsoft Windows 10 Professional + +(2) Complier/Debugger + Microsoft Visual Studio 2015 Update 3 + +(3) DirectX SDK + DirectX SDK (June 2010) + +4.2 CRI Tools +The CRI Atom and CRI File system tools run in the following environment: + +4.2.1 Hardware + CPU : Pentium4 2GHz or higher + Memory : 2GB or more + +4.2.2 Development Environment +(1) OS + Windows 7 / Windows 8.1 / Windows 10 + +(2) .NET Framework + Microsoft .NET Framework 3.5 SP1 or later + Microsoft .NET Framework 4.0 or later + +[Note] +Please note the following when using CRI Atom tools: + - Starting from the Network + The CRI Atom tools cannot be started from the network. + To run the program, copy the executable files onto your PC before use. + +5. Notes +5.1 Known problems +5.1.1 Library +The library has the following known problems: + + - An audio file may not be released immediately after the playback + is stopped by the criAtomExPlayer_Stop function or the player + handle is destroyed by the criAtomExPlayer_Destroy function. + (There is a possibility that the audio file is still referenced within the library + after the player is stopped.) + * A work around consists in destroying the player pool before releasing the data. + - Immediately after stopping the playback by calling the criAtomExPlayer_Stop function + or destroying the player handle by calling the criAtomExPlayer_Destroy function + during the playback of a single file, a sound file that is being played may not be deleted. + (The file may be referenced even after stopping the player.) + Please note that the above problem occurs only when playing a sound file + by using the criAtomExPlayer_SetFile function. + The ACB file can be deleted correctly after the execution of the criAtomExAcb_Release function. + - When ACB data is used, the seek information set by + the criAtomExPlayer_SetStartTime function is not cleared by + the criAtomExPlayer_ResetParameters function. + * If you want to reset the seek information independently of the audio data, + please execute criAtomExPlayer_SetStartTime (player, 0); + - Values that an AtomEx player has at the first server processing after + the execution of the criAtomExPlayer_Start function are used for + the following parameters to perform a playback. + (a) ASR rack ID (criAtomExPlayer_SetAsrRackId) + (b) Mixer ID of the HCA decoding destination (criAtomExPlayer_SetHcaMxMixerId) + (c) Voice pool ID (criAtomExPlayer_SetVoicePoolIdentifier) + (d) Sound renderer type (criAtomExPlayer_SetSoundRendererType) + Therefore, when executing one of these functions immediately after + the execution of the criAtomExPlayer_Start function, + a sound played by the criAtomExPlayer_Start function may be output + with the parameters specified at the start of the playback. + (Parameters may be overwritten between the execution of + the criAtomExPlayer_Start function and the starting of the server processing.) + To handle these parameters each time you start the playback, + please prepare a dedicated AtomEx player for each of them to avoid this problem. + - Executing the criAtomExAcb_AttachAwbFile function on the ACB data + loaded with the criAtomExAcb_LoadAcbData function + (or the criAtomExAcb_LoadAcbDataById function) may cause an access violation. + In order to avoid this issue, it is necessary to load the ACB data + into a memory area aligned on a 8-byte boundary. + - Seeking is not supported for looping data encoded with the ADX2 codec. A noisy output may occur. + +5.1.2 Tools +Please see the tool's release notes about non-implemented features. + +5.2 Limitations +5.2.1 Library +The library has the following limitations: + + (a) If the file path contains a comma: ",", tab: "\\t", or line break: "\\n" character, + the library will interpret them wrongly as path separators and attempt to open a file with an incorrect path. + Do not use these characters, as errors such as failing to secure memory will occur. + (b) If you want to apply a ASR DSP effect to the L, R, Ls, Rs channels of a 4-channel waveform, + please set the number of ASR output channels to 6 (5.1 ch) or 8 (7.1 ch). + +5.3 About CRI Atom tools Ver.3 transition +There are some unsupported items compared with CRI Atom Craft Ver.2. +For details, refer to "Released the new version CRI AtomCraft Ver.3" in the manual. + +/*--------------------------------------------------------------------------* + * + * Notes on using the SDK + * All the information contained in this SDK is confidential information of + * CRI Middleware Co., Ltd. + * You are required to enter into an evaluation license agreement beforehand. + * Please treat this information carefully, in accordance with the agreement + * between your company and CRI Middleware. + * + *--------------------------------------------------------------------------*/ + +-END- + + +/*--< end of file >---------------------------------------------------------*/ diff --git a/3rdParty/cri2019/documentation/sdk_manual/CRI_ADX2_Manual_pc_e.chm b/3rdParty/cri2019/documentation/sdk_manual/CRI_ADX2_Manual_pc_e.chm new file mode 100644 index 00000000..e6bb7a91 Binary files /dev/null and b/3rdParty/cri2019/documentation/sdk_manual/CRI_ADX2_Manual_pc_e.chm differ diff --git a/3rdParty/cri2019/documentation/sdk_manual/CRI_File_System_Guideline_Floc_e.chm b/3rdParty/cri2019/documentation/sdk_manual/CRI_File_System_Guideline_Floc_e.chm new file mode 100644 index 00000000..86b540b5 Binary files /dev/null and b/3rdParty/cri2019/documentation/sdk_manual/CRI_File_System_Guideline_Floc_e.chm differ diff --git a/3rdParty/cri2019/documentation/sdk_manual/CRI_File_System_Manual_pc_e.chm b/3rdParty/cri2019/documentation/sdk_manual/CRI_File_System_Manual_pc_e.chm new file mode 100644 index 00000000..e24cbcfb Binary files /dev/null and b/3rdParty/cri2019/documentation/sdk_manual/CRI_File_System_Manual_pc_e.chm differ diff --git a/3rdParty/cri2019/documentation/sdk_manual/CRI_Sofdec2_Manual_pc_e.chm b/3rdParty/cri2019/documentation/sdk_manual/CRI_Sofdec2_Manual_pc_e.chm new file mode 100644 index 00000000..573ab477 Binary files /dev/null and b/3rdParty/cri2019/documentation/sdk_manual/CRI_Sofdec2_Manual_pc_e.chm differ diff --git a/3rdParty/cri2019/pc/include/CriSmpFsCustomIo.h b/3rdParty/cri2019/pc/include/CriSmpFsCustomIo.h new file mode 100644 index 00000000..e6cf2609 --- /dev/null +++ b/3rdParty/cri2019/pc/include/CriSmpFsCustomIo.h @@ -0,0 +1,58 @@ +/**************************************************************************** + * + * CRI Middleware SDK + * + * Copyright (c) 2008 CRI Middleware Co., Ltd. + * + * Library : Sample Library + * Module : Sample I/O interface + * File : CriSmpCustomIo.h + * + ****************************************************************************/ + +/* Prevention of redefinition */ +#ifndef _CRISMPFSCUSTOMIO_H_INCLUDED +#define _CRISMPFSCUSTOMIO_H_INCLUDED + +/*************************************************************************** + * Include files + ***************************************************************************/ +#include "cri_xpt.h" +#include "cri_file_system.h" + +/*************************************************************************** + * Macro Constants + ***************************************************************************/ + +/*************************************************************************** + * Macro Functions + ***************************************************************************/ + +/*************************************************************************** + * Data Type Declarations + ***************************************************************************/ + +/*************************************************************************** + * Prototype Variables + ***************************************************************************/ + +/*************************************************************************** + * Prototype Functions + ***************************************************************************/ +/* I/O Interface selection function */ +#ifdef __cplusplus +extern "C" { +#endif +CriError CriSmpFsSelectIoFunc(const CriChar8 *path, + CriFsDeviceId *device_id, CriFsIoInterfacePtr *ioif); +#ifdef __cplusplus +} +#endif + +/*************************************************************************** + * Prototype Classes + ***************************************************************************/ + +#endif /* _CRISMPFSCUSTOMIO_H_INCLUDED */ + +/* --- end of file --- */ diff --git a/3rdParty/cri2019/pc/include/CriSmpFsUtility.h b/3rdParty/cri2019/pc/include/CriSmpFsUtility.h new file mode 100644 index 00000000..f2e115e1 --- /dev/null +++ b/3rdParty/cri2019/pc/include/CriSmpFsUtility.h @@ -0,0 +1,44 @@ +#ifndef _CRISMPFSUTILITY_H_INCLUDED +#define _CRISMPFSUTILITY_H_INCLUDED +/**************************************************************************** + * + * CRI Middleware SDK + * + * Copyright (c) 2008-2012 CRI Middleware Co., Ltd. + * + * Library : Sample Library + * Module : Utility + * File : CriSmpFsUtility.h + * Date : 2012-03-28 + * Version : 0.92 + * + ****************************************************************************/ + +#include "cri_xpt.h" + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +CriBool CRIAPI criSmpFsUtl_Initialize(void); +void CRIAPI criSmpFsUtl_Finalize(void); + +void CRIAPI criSmpFsUtl_Sleep(CriUint32 msec); + +void CRIAPI criSmpFsUtl_Printf(const CriChar8* format, ...); + +void * CRIAPI criSmpFsUtl_Alloc(CriUint32 size); +void CRIAPI criSmpFsUtl_Free(void *ptr); + +CriSint64 criSmpFsUtl_GetTimeMs(void); + +int criSample_Main(int argc, char *argv[]); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif // _CRISMPFSUTILITY_H_INCLUDED + +/* --- end of file --- */ + diff --git a/3rdParty/cri2019/pc/include/cri_atom.h b/3rdParty/cri2019/pc/include/cri_atom.h new file mode 100644 index 00000000..39e843c4 --- /dev/null +++ b/3rdParty/cri2019/pc/include/cri_atom.h @@ -0,0 +1,7440 @@ +/**************************************************************************** + * + * CRI Middleware SDK + * + * Copyright (c) 2009-2018 CRI Middleware Co., Ltd. + * + * Library : CRI Atom + * Module : Library User's Header + * File : cri_atom.h + * + ****************************************************************************/ +/*! + * \file cri_atom.h + */ + +/* Prevention of redefinition */ +#ifndef CRI_INCL_CRI_ATOM_H +#define CRI_INCL_CRI_ATOM_H + +/*************************************************************************** + * Include files + ***************************************************************************/ +#include "cri_xpt.h" +#include + +/*************************************************************************** + * Macro Constants + ***************************************************************************/ +/* Version Number */ +#define CRI_ATOM_VERSION (0x02190300) +#define CRI_ATOM_VER_NUM "2.19.03" +#define CRI_ATOM_VER_NAME "CRI Atom" + +/*========================================================================== + * CRI Atom API + *=========================================================================*/ +#if defined(XPT_TGT_PSP) +#define CRIATOM_DEFAULT_OUTPUT_CHANNELS (2) +#define CRIATOM_DEFAULT_OUTPUT_SAMPLING_RATE (44100) +#define CRIATOM_DEFAULT_INPUT_MAX_CHANNELS (2) +#define CRIATOM_DEFAULT_INPUT_MAX_SAMPLING_RATE (44100) +#define CRIATOM_DEFAULT_DECODE_LATENCY (1) +#define CRIATOM_DEFAULT_DBAS_MAX_STREAMS (2) +#define CRIATOM_SOUND_RENDERER_DEFAULT (CRIATOM_SOUND_RENDERER_NATIVE) +#elif defined(XPT_TGT_VITA) +#define CRIATOM_DEFAULT_OUTPUT_CHANNELS (2) +#define CRIATOM_DEFAULT_OUTPUT_SAMPLING_RATE (48000) +#define CRIATOM_DEFAULT_INPUT_MAX_CHANNELS (2) +#define CRIATOM_DEFAULT_INPUT_MAX_SAMPLING_RATE (48000) +#define CRIATOM_DEFAULT_DECODE_LATENCY (0) +#define CRIATOM_DEFAULT_DBAS_MAX_STREAMS (8) +#define CRIATOM_SOUND_RENDERER_DEFAULT (CRIATOM_SOUND_RENDERER_NATIVE) +#elif defined(XPT_TGT_3DS) +#define CRIATOM_DEFAULT_OUTPUT_CHANNELS (2) +#define CRIATOM_DEFAULT_OUTPUT_SAMPLING_RATE (32728) +#define CRIATOM_DEFAULT_INPUT_MAX_CHANNELS (2) +#define CRIATOM_DEFAULT_INPUT_MAX_SAMPLING_RATE (32728) +#define CRIATOM_DEFAULT_DECODE_LATENCY (0) +#define CRIATOM_DEFAULT_DBAS_MAX_STREAMS (2) +#define CRIATOM_SOUND_RENDERER_DEFAULT (CRIATOM_SOUND_RENDERER_NATIVE) +#elif defined(XPT_TGT_WII) +#define CRIATOM_DEFAULT_OUTPUT_CHANNELS (2) +#define CRIATOM_DEFAULT_OUTPUT_SAMPLING_RATE (32000) +#define CRIATOM_DEFAULT_INPUT_MAX_CHANNELS (2) +#define CRIATOM_DEFAULT_INPUT_MAX_SAMPLING_RATE (32000) +#define CRIATOM_DEFAULT_DECODE_LATENCY (0) +#define CRIATOM_DEFAULT_DBAS_MAX_STREAMS (4) +#define CRIATOM_SOUND_RENDERER_DEFAULT (CRIATOM_SOUND_RENDERER_NATIVE) +#elif defined(XPT_TGT_WIIU) +#define CRIATOM_DEFAULT_OUTPUT_CHANNELS (6) +#define CRIATOM_DEFAULT_OUTPUT_SAMPLING_RATE (48000) +#define CRIATOM_DEFAULT_INPUT_MAX_CHANNELS (2) +#define CRIATOM_DEFAULT_INPUT_MAX_SAMPLING_RATE (48000) +#define CRIATOM_DEFAULT_DECODE_LATENCY (0) +#define CRIATOM_DEFAULT_DBAS_MAX_STREAMS (8) +#define CRIATOM_SOUND_RENDERER_DEFAULT (CRIATOM_SOUND_RENDERER_NATIVE) +#elif defined(XPT_TGT_ANDROID) || defined(XPT_TGT_IOS) || defined(XPT_TGT_IPHONE) +#define CRIATOM_DEFAULT_OUTPUT_CHANNELS (2) +#define CRIATOM_DEFAULT_OUTPUT_SAMPLING_RATE (44100) +#define CRIATOM_DEFAULT_INPUT_MAX_CHANNELS (2) +#define CRIATOM_DEFAULT_INPUT_MAX_SAMPLING_RATE (44100) +#define CRIATOM_DEFAULT_DECODE_LATENCY (0) +#define CRIATOM_DEFAULT_DBAS_MAX_STREAMS (8) +#define CRIATOM_SOUND_RENDERER_DEFAULT (CRIATOM_SOUND_RENDERER_ASR) +#elif defined(XPT_TGT_NACL) +#define CRIATOM_DEFAULT_OUTPUT_CHANNELS (2) +#define CRIATOM_DEFAULT_OUTPUT_SAMPLING_RATE (48000) +#define CRIATOM_DEFAULT_INPUT_MAX_CHANNELS (2) +#define CRIATOM_DEFAULT_INPUT_MAX_SAMPLING_RATE (48000) +#define CRIATOM_DEFAULT_DECODE_LATENCY (0) +#define CRIATOM_DEFAULT_DBAS_MAX_STREAMS (8) +#define CRIATOM_SOUND_RENDERER_DEFAULT (CRIATOM_SOUND_RENDERER_ASR) +#elif defined(XPT_TGT_ACRODEA) +#define CRIATOM_DEFAULT_OUTPUT_CHANNELS (2) +#define CRIATOM_DEFAULT_OUTPUT_SAMPLING_RATE (22050) +#define CRIATOM_DEFAULT_INPUT_MAX_CHANNELS (2) +#define CRIATOM_DEFAULT_INPUT_MAX_SAMPLING_RATE (22050) +#define CRIATOM_DEFAULT_DECODE_LATENCY (0) +#define CRIATOM_DEFAULT_DBAS_MAX_STREAMS (2) +#define CRIATOM_SOUND_RENDERER_DEFAULT (CRIATOM_SOUND_RENDERER_ASR) +#elif defined(XPT_TGT_JS) +#define CRIATOM_DEFAULT_OUTPUT_CHANNELS (2) +#define CRIATOM_DEFAULT_OUTPUT_SAMPLING_RATE (44100) +#define CRIATOM_DEFAULT_INPUT_MAX_CHANNELS (2) +#define CRIATOM_DEFAULT_INPUT_MAX_SAMPLING_RATE (44100) +#define CRIATOM_DEFAULT_DECODE_LATENCY (0) +#define CRIATOM_DEFAULT_DBAS_MAX_STREAMS (8) +#define CRIATOM_SOUND_RENDERER_DEFAULT (CRIATOM_SOUND_RENDERER_ASR) +#elif defined(XPT_TGT_XBOXONE) || defined(XPT_TGT_PS4) +#define CRIATOM_DEFAULT_OUTPUT_CHANNELS (8) +#define CRIATOM_DEFAULT_OUTPUT_SAMPLING_RATE (48000) +#define CRIATOM_DEFAULT_INPUT_MAX_CHANNELS (2) +#define CRIATOM_DEFAULT_INPUT_MAX_SAMPLING_RATE (48000) +#define CRIATOM_DEFAULT_DECODE_LATENCY (0) +#define CRIATOM_DEFAULT_DBAS_MAX_STREAMS (8) +#define CRIATOM_SOUND_RENDERER_DEFAULT (CRIATOM_SOUND_RENDERER_ASR) +#elif defined(XPT_TGT_SWITCH) +#define CRIATOM_DEFAULT_OUTPUT_CHANNELS (6) +#define CRIATOM_DEFAULT_OUTPUT_SAMPLING_RATE (48000) +#define CRIATOM_DEFAULT_INPUT_MAX_CHANNELS (2) +#define CRIATOM_DEFAULT_INPUT_MAX_SAMPLING_RATE (48000) +#define CRIATOM_DEFAULT_DECODE_LATENCY (0) +#define CRIATOM_DEFAULT_DBAS_MAX_STREAMS (8) +#define CRIATOM_SOUND_RENDERER_DEFAULT (CRIATOM_SOUND_RENDERER_ASR) +#else +#define CRIATOM_DEFAULT_OUTPUT_CHANNELS (6) +#define CRIATOM_DEFAULT_OUTPUT_SAMPLING_RATE (48000) +#define CRIATOM_DEFAULT_INPUT_MAX_CHANNELS (2) +#define CRIATOM_DEFAULT_INPUT_MAX_SAMPLING_RATE (48000) +#define CRIATOM_DEFAULT_DECODE_LATENCY (0) +#define CRIATOM_DEFAULT_DBAS_MAX_STREAMS (8) +#define CRIATOM_SOUND_RENDERER_DEFAULT (CRIATOM_SOUND_RENDERER_ASR) +#endif + +/*========================================================================== + * CRI Atom Player API + *=========================================================================*/ +/*EN + * \brief Constant for canceling the restriction of the number of loops + * \ingroup ATOMLIB_PLAYER + * \par Description: + */ +#define CRIATOMPLAYER_NO_LOOP_LIMITATION (-1) /*EN + * \sa criAtomAwb_LoadFromMemory + */ +#define CRIATOMAWB_WORKSIZE_FOR_LOADFROMMEMORY (64) + +/*========================================================================== + * CRI Atom D-BAS API + *=========================================================================*/ +/*EN + * \brief Atom D-BAS ID + * \ingroup ATOMLIB_DBAS + * \par Description: + * Value returned when the ::criAtomDbas_Create function fails.
+ * \sa criAtomDbas_Create, criAtomDbas_Destroy + */ +#define CRIATOMDBAS_ILLEGAL_ID (-1) + +/*EN + * \brief Default initialization maximum bit rate for creating D-BAS + * \ingroup ATOMLIB_AWB + * \par Description: + * Default initialization maximum bit rate for creating D-BAS.
+ * This value is calculated for the default maximum number of streams defined on each platform, + * assuming streaming playback of stereo ADX data.
+ * \sa criAtomDbas_Create, criAtomDbas_CalculateWorkSize, criAtom_CalculateAdxBitrate + */ +#define CRIATOM_DEFAULT_DBAS_MAX_BPS \ + (criAtom_CalculateAdxBitrate(CRIATOM_DEFAULT_INPUT_MAX_CHANNELS,\ + CRIATOM_DEFAULT_INPUT_MAX_SAMPLING_RATE)\ + * CRIATOM_DEFAULT_DBAS_MAX_STREAMS) + +/*EN + * \brief Default number of guaranteed buffers for creating D-BAS + * \ingroup ATOMLIB_DBAS + * \par Description: + * Default number of guaranteed buffers for creating D-BAS. + * A safe value is set so that streaming is played without interruption + * even for sound data with extremely little data at the beginning and end of the loop. + * \sa criAtomDbas_Create, criAtomDbas_CalculateWorkSize + */ +#define CRIATOMDBAS_DEFAULT_NUM_SECUREMENT_BUFFERS (4) + + +/*EN + * \brief Minimum number of guaranteed buffers that can be specified for creating D-BAS + * \ingroup ATOMLIB_DBAS + * \par Description: + * Minimum number of guaranteed buffers that can be specified for creating D-BAS. + * For streaming playback without interruption, + * at least two buffers are required (double buffering). + * Therefore, this value cannot be smaller than 2. + * \sa criAtomDbas_Create, criAtomDbas_CalculateWorkSize + */ +#define CRIATOMDBAS_MINIMUM_NUM_SECUREMENT_BUFFERS (2) + + +/* ========================================================================*/ +/* CRI Atom Streaming Cache API */ +/* ========================================================================*/ +/*EN + * \brief Invalid streaming cache ID + * \ingroup ATOMLIB_STREAMING_CACHE + * \par Description: + * Value returned when the ::criAtomStreamingCache_Create function fails.
+ * \sa criAtomStreamingCache_Create, criAtomStreamingCache_Destroy + */ +#define CRIATOM_STREAMING_CACHE_ILLEGAL_ID (0) + +/*EN + * \brief Default number of files cached in streaming cache + * \ingroup ATOMLIB_STREAMING_CACHE + * \par Description: + * Default initialization parameter definition for creating a streaming cache.
+ * Specify the number of files that can be cached.
+ * The default is 10 files.
+ * \sa CriAtomStreamingCacheUnitConfig + */ +#define CRIATOM_STREAMING_CACHE_DEFAULT_NUM_FILES (10) + +/*EN + * \brief Default file size cached in streaming cache + * \ingroup ATOMLIB_STREAMING_CACHE + * \par Description: + * Default initialization parameter definition for creating a streaming cache.
+ * Specify the file size that can be cached in bytes.
+ The default is 1MB.
+ * \sa CriAtomStreamingCacheUnitConfig + */ +#define CRIATOM_STREAMING_CACHE_DEFAULT_CACHE_SIZE (1 * 1024 * 1024) + +/*************************************************************************** + * Macro Functions + ***************************************************************************/ +/*========================================================================== + * CRI Atom API + *=========================================================================*/ +/*EN + * \brief Set default parameters for CriAtomConfig + * \ingroup ATOMLIB_GLOBAL + * \param[out] p_config pointer to the configuration structure for initialization + * \par Description: + * Sets default values for a configuration structure ( ::CriAtomConfig ) that is set for the ::criAtom_Initialize + * function.
+ * \sa + * CriAtomConfig +*/ +#define criAtom_SetDefaultConfig(p_config) \ +{\ + (p_config)->thread_model = CRIATOM_THREAD_MODEL_MULTI;\ + (p_config)->server_frequency = 60.0f;\ + (p_config)->fs_config = NULL;\ + (p_config)->context = NULL;\ + (p_config)->version = CRI_ATOM_VERSION;\ + (p_config)->max_players = 16;\ +} + +/*EN + * \brief Register user allocator + * \ingroup ATOMLIB_GLOBAL + * \param[in] p_malloc_func memory allocation function + * \param[in] p_free_func memory deallocation function + * \param[in] p_obj user specified object + * \par Description: + * Registers a memory allocator (memory allocation/deallocation function) with the CRI Atom library.
+ * Once this macro registers an allocator, when the Atom library needs a work area, + * the user-registered memory allocation/deallocation processes are called.
+ * Thus, it is possible to omit the process for setting a work area for each function (such as the ::criAtomPlayer_CreateAdxPlayer + * function) that requires a work area.
+ * (Even if a NULL pointer is specified for the work area and 0 bytes is specified for the work area size, + * the library works without any problem due to dynamic memory allocation by the allocator.)
+ * \par Note: + * By specifying NULL for the pointer of the memory allocation/deallocation functions, + * the registration of the allocator can be canceled.
+ * Note however that if the registration is canceled while a memory area is not deallocated, + * an error callback is returned and the cancellation of the registration will fail.
+ * (The registered allocator is still called.)
+ *
+ * This macro internally calls the ::criAtom_SetUserMallocFunction function and the + * ::criAtom_SetUserFreeFunction function.
+ * Do not use this function together with these APIs.
+ * (Calling this function overwrites the contents set for the above APIs.)
+ *
+ * Also, the registered memory allocator may be called from multiple threads in multithreading mode. + * Therefore, if a memory allocation process is not thread-safe, it should implement its own exclusive access control.
+ */ +#define criAtom_SetUserAllocator(p_malloc_func, p_free_func, p_obj) \ +{\ + criAtom_SetUserMallocFunction(p_malloc_func, p_obj);\ + criAtom_SetUserFreeFunction(p_free_func, p_obj);\ +} + +/*========================================================================== + * CRI Atom HCA-MX API + *=========================================================================*/ +/*EN + * \brief Set default values for HCA-MX configuration structure + * \ingroup ATOMLIB_HCA_MX + * \par Description: + * Sets default values for the configuration structure ( ::CriAtomHcaMxConfig ) + * that is set for the ::criAtomHcaMx_Initialize function.
+ * \sa criAtomHcaMx_Initialize, CriAtomHcaMxConfig + */ +#define criAtomHcaMx_SetDefaultConfig(p_config) \ +{\ + (p_config)->server_frequency = 60.0f;\ + (p_config)->num_mixers = 1;\ + (p_config)->max_players = 16;\ + (p_config)->max_input_channels = CRIATOM_DEFAULT_INPUT_MAX_CHANNELS;\ + (p_config)->max_sampling_rate = CRIATOM_DEFAULT_OUTPUT_SAMPLING_RATE;\ + (p_config)->output_channels = CRIATOM_DEFAULT_OUTPUT_CHANNELS;\ + (p_config)->output_sampling_rate = CRIATOM_DEFAULT_OUTPUT_SAMPLING_RATE;\ + (p_config)->sound_renderer_type = CRIATOM_SOUND_RENDERER_DEFAULT;\ +} + +/*========================================================================== + * CRI Atom Player API + *=========================================================================*/ +/*EN + * \brief Set default parameters for CriAtomStandardPlayerConfig + * \ingroup ATOMLIB_PLAYER + * \param[out] p_config pointer to the configuration structure for creating a standard player + * \par Description: + * Sets default values for the configuration structure ( ::CriAtomStandardPlayerConfig ) + * that is set for the ::criAtomPlayer_CreateStandardPlayer function.
+ * \sa CriAtomStandardPlayerConfig, criAtomPlayer_CreateStandardPlayer + */ +#define criAtomPlayer_SetDefaultConfigForStandardPlayer(p_config) \ +{\ + (p_config)->max_channels = CRIATOM_DEFAULT_INPUT_MAX_CHANNELS;\ + (p_config)->max_sampling_rate = CRIATOM_DEFAULT_INPUT_MAX_SAMPLING_RATE;\ + (p_config)->streaming_flag = CRI_TRUE;\ + (p_config)->sound_renderer_type = CRIATOM_SOUND_RENDERER_DEFAULT;\ + (p_config)->decode_latency = CRIATOM_DEFAULT_DECODE_LATENCY;\ +} + +/*EN + * \brief Set default parameters for CriAtomAdxPlayerConfig + * \ingroup ATOMLIB_PLAYER + * \param[out] p_config pointer to the configuration structure for creating an ADX Player + * \par Description: + * Sets default values for the configuration structure ( ::CriAtomAdxPlayerConfig ) + * that is set for the ::criAtomPlayer_CreateAdxPlayer function.
+ * \sa CriAtomAdxPlayerConfig, criAtomPlayer_CreateAdxPlayer + */ +#define criAtomPlayer_SetDefaultConfigForAdxPlayer(p_config) \ +{\ + (p_config)->max_channels = CRIATOM_DEFAULT_INPUT_MAX_CHANNELS;\ + (p_config)->max_sampling_rate = CRIATOM_DEFAULT_INPUT_MAX_SAMPLING_RATE;\ + (p_config)->streaming_flag = CRI_TRUE;\ + (p_config)->sound_renderer_type = CRIATOM_SOUND_RENDERER_DEFAULT;\ + (p_config)->decode_latency = CRIATOM_DEFAULT_DECODE_LATENCY;\ +} + +/*EN + * \brief Set default parameters for CriAtomHcaPlayerConfig + * \ingroup ATOMLIB_PLAYER + * \param[out] p_config pointer to the configuration structure for creating an HCA Player + * \par Description: + * Sets default values for the configuration structure ( ::CriAtomHcaPlayerConfig ) + * that is set for the ::criAtomPlayer_CreateHcaPlayer function.
+ * \sa CriAtomHcaPlayerConfig, criAtomPlayer_CreateHcaPlayer + */ +#define criAtomPlayer_SetDefaultConfigForHcaPlayer(p_config) \ +{\ + (p_config)->max_channels = CRIATOM_DEFAULT_INPUT_MAX_CHANNELS;\ + (p_config)->max_sampling_rate = CRIATOM_DEFAULT_INPUT_MAX_SAMPLING_RATE;\ + (p_config)->streaming_flag = CRI_TRUE;\ + (p_config)->sound_renderer_type = CRIATOM_SOUND_RENDERER_DEFAULT;\ + (p_config)->decode_latency = CRIATOM_DEFAULT_DECODE_LATENCY;\ +} + +/*EN + * \brief Set default parameters for CriAtomHcaMxPlayerConfig + * \ingroup ATOMLIB_PLAYER + * \param[out] p_config pointer to the configuration structure for creating an HCA-MX Player + * \par Description: + * Sets default values for the configuration structure ( ::CriAtomHcaMxPlayerConfig ) that is set for the ::criAtomPlayer_CreateHcaMxPlayer function. + *
+ * \sa CriAtomHcaMxPlayerConfig, criAtomPlayer_CreateHcaMxPlayer + */ +#define criAtomPlayer_SetDefaultConfigForHcaMxPlayer(p_config) \ +{\ + (p_config)->max_channels = CRIATOM_DEFAULT_INPUT_MAX_CHANNELS;\ + (p_config)->max_sampling_rate = CRIATOM_DEFAULT_INPUT_MAX_SAMPLING_RATE;\ + (p_config)->streaming_flag = CRI_TRUE;\ +} + +/*EN + * \brief Set default parameters for CriAtomWavePlayerConfig + * \ingroup ATOMLIB_PLAYER + * \param[out] p_config pointer to WAVE player creation configuration structure + * \par Description: + * Sets default values for the configuration structure ( ::CriAtomWavePlayerConfig ) that is set for the ::criAtomPlayer_CreateWavePlayer function. + *
+ * \sa CriAtomWavePlayerConfig, criAtomPlayer_CreateWavePlayer + */ +#define criAtomPlayer_SetDefaultConfigForWavePlayer(p_config) \ +{\ + (p_config)->max_channels = CRIATOM_DEFAULT_INPUT_MAX_CHANNELS;\ + (p_config)->max_sampling_rate = CRIATOM_DEFAULT_INPUT_MAX_SAMPLING_RATE;\ + (p_config)->streaming_flag = CRI_TRUE;\ + (p_config)->sound_renderer_type = CRIATOM_SOUND_RENDERER_DEFAULT;\ + (p_config)->decode_latency = CRIATOM_DEFAULT_DECODE_LATENCY;\ +} + +/* EN + * \brief Sets default parameters for CriAtomAiffPlayerConfig + * \ingroup ATOMLIB_PLAYER + * \param[out] p_config Pointer to configuration structure for AIFF player creation + * \par Description: + * Configuration structure set for the ::criAtomPlayer_CreateAiffPlayer function. + * Sets the default values for (::CriAtomAiffPlayerConfig).
+ * \sa CriAtomAiffPlayerConfig, criAtomPlayer_CreateAiffPlayer + */ +#define criAtomPlayer_SetDefaultConfigForAiffPlayer(p_config) \ +{\ + (p_config)->max_channels = CRIATOM_DEFAULT_INPUT_MAX_CHANNELS;\ + (p_config)->max_sampling_rate = CRIATOM_DEFAULT_INPUT_MAX_SAMPLING_RATE;\ + (p_config)->streaming_flag = CRI_TRUE;\ + (p_config)->sound_renderer_type = CRIATOM_SOUND_RENDERER_DEFAULT;\ + (p_config)->decode_latency = CRIATOM_DEFAULT_DECODE_LATENCY;\ +} + + +/*EN + * \brief Set default parameters for CriAtomRawPcmPlayerConfig + * \ingroup ATOMLIB_PLAYER + * \param[out] p_config pointer to the configuration structure for creating a raw PCM Player + * \par Description: + * Sets default values for the configuration structure ( ::CriAtomRawPcmPlayerConfig ) + * that is set for the ::criAtomPlayer_CreateRawPcmPlayer function.
+ * \sa CriAtomRawPcmPlayerConfig, criAtomPlayer_CreateRawPcmPlayer + */ +#define criAtomPlayer_SetDefaultConfigForRawPcmPlayer(p_config) \ +{\ + (p_config)->pcm_format = CRIATOM_PCM_FORMAT_SINT16;\ + (p_config)->max_channels = CRIATOM_DEFAULT_INPUT_MAX_CHANNELS;\ + (p_config)->max_sampling_rate = CRIATOM_DEFAULT_INPUT_MAX_SAMPLING_RATE;\ + (p_config)->sound_renderer_type = CRIATOM_SOUND_RENDERER_DEFAULT;\ + (p_config)->decode_latency = CRIATOM_DEFAULT_DECODE_LATENCY;\ +} + +/*========================================================================== + * CRI Atom D-BAS API + *=========================================================================*/ +/*EN + * \brief Set default parameters for CriAtomDbasConfig + * \ingroup ATOMLIB_DBAS + * \param[in] p_config pointer to the configuration structure for creating D-BAS + * \par Description: + * Sets default values for the configuration structure ( ::CriAtomDbasConfig ) that is set for the ::criAtomDbas_Create function. + *
+ * \sa CriAtomDbasConfig, criAtomDbas_Create, criAtomDbas_CalculateWorkSize + */ +#define criAtomDbas_SetDefaultConfig(p_config) \ +{\ + (p_config)->identifier = 0;\ + (p_config)->max_streams = CRIATOM_DEFAULT_DBAS_MAX_STREAMS;\ + (p_config)->max_bps = CRIATOM_DEFAULT_DBAS_MAX_BPS;\ + (p_config)->max_mana_streams = 0;\ + (p_config)->max_mana_bps = 0;\ + (p_config)->num_securement_buffers = CRIATOMDBAS_DEFAULT_NUM_SECUREMENT_BUFFERS;\ +} + +/* ========================================================================*/ +/* CRI Atom Streaming Cache API */ +/* ========================================================================*/ +/*EN + * \brief Set default parameters for CriAtomStreamingCacheConfig + * \ingroup ATOMLIB_STREAMING_CACHE + * \param[in] p_config pointer to the configuration structure for creating a streaming cache + * \par Description: + * Sets default values for the configuration structure ( ::CriAtomStreamingCacheUnitConfig ) that is set for the ::criAtomStreamingCache_CalculateWorkSize function + * and ::criAtomStreamingCache_Create function. + *
+ * \sa criAtomStreamingCache_CalculateWorkSize, criAtomStreamingCache_Create + */ +#define criAtomStreamingCache_SetDefaultConfig(p_config) \ +{\ + (p_config)->max_files = CRIATOM_STREAMING_CACHE_DEFAULT_NUM_FILES;\ + (p_config)->max_path = CRIFS_CONFIG_DEFAULT_MAX_PATH;\ + (p_config)->cache_size = CRIATOM_STREAMING_CACHE_DEFAULT_CACHE_SIZE;\ +} + +/* ========================================================================*/ +/* CRI Atom Meter API */ +/* ========================================================================*/ + +/*EN + * \brief Sets default values for the level meter function configuration structure. + * \ingroup ATOMLIB_METER + * \par Description: + * Configuration structure set for the ::criAtomExAsr_AttachLevelMeter function. +* Sets the default values for (::CriAtomLevelMeterConfig).
+ * \sa criAtomExAsr_AttachLevelMeter, CriAtomLevelMeterConfig + */ +#define criAtomMeter_SetDefaultConfigForLevelMeter(p_config) \ +{\ + (p_config)->interval = 50;\ + (p_config)->hold_time = 1000;\ +} + +/*EN + * \brief Sets default values for the loudness meter function configuration structure. + * \ingroup ATOMLIB_ASR + * \par Description: + * Configuration structure set for the ::criAtomMeter_AttachLoudnessMeter function. +* Sets the default values for (::CriAtomLoudnessMeterConfig).
+ * \sa criAtomMeter_AttachLoudnessMeter, CriAtomLoudnessMeterConfig + */ +#define criAtomMeter_SetDefaultConfigForLoudnessMeter(p_config) \ +{\ + (p_config)->short_term_time = 3;\ + (p_config)->integrated_time = 600;\ +} + +/*EN + * \brief Sets default values for the true peak meter function configuration structure. + * \ingroup ATOMLIB_ASR + * \par Description: + * Configuration structure set for the ::criAtomMeter_AttachTruePeakMeter function. +* Sets the default values for (::CriAtomTruePeakMeterConfig).
+ * \sa criAtomMeter_AttachTruePeakMeter, CriAtomTruePeakMeterConfig + */ +#define criAtomMeter_SetDefaultConfigForTruePeakMeter(p_config) \ +{\ + (p_config)->sample_clipping = CRI_TRUE;\ + (p_config)->interval = 50;\ + (p_config)->hold_time = 1000; \ +} + +/*************************************************************************** + * データ型宣言 + * Data Type Declarations + ***************************************************************************/ +/*========================================================================== + * CRI Atom API + *=========================================================================*/ +/*EN + * \brief Threading models + * \ingroup ATOMLIB_GLOBAL + * \par Description: + * Represents threading models used when operating the CRI Atom library.
+ * This is specified in the ::CriAtomConfig structure when the library is initialized (by using the ::criAtom_Initialize + * function). + * \sa criAtom_Initialize, CriAtomConfig + */ +typedef enum CriAtomThreadModelTag { + /*EN + * \brief Multithreading + * \par Description: + * The library creates threads internally, and works in multithreading mode.
+ * The threads are created when the ::criAtom_Initialize function is called.
+ * Library server processing is executed at a regular interval in the created threads.
+ */ + CRIATOM_THREAD_MODEL_MULTI = 0, + + /*EN + * \brief Multithreading (user-driven) + * \par Description: + * The library creates threads internally and works in multithreading mode.
+ * The threads are created when the ::criAtom_Initialize function is called.
+ * Server processing itself is executed in the created threads, but are not executed + * automatically like with CRIATOM_THREAD_MODEL_MULTI.
+ * The user must explicitly call the ::criAtom_ExecuteMain function to execute the server processing.
+ * (When the ::criAtom_ExecuteMain function is executed, the thread starts up and server processing is executed.)
+ */ + CRIATOM_THREAD_MODEL_MULTI_USER_DRIVEN = 3, + + /*EN + * \brief User multithreading + * \par Description: + * While the library does not create threads internally, it executes internal exclusive control + * so that server processing functions can be called from within user-created threads.
+ * Server processing is executed synchronously in the ::criAtom_ExecuteMain function.
+ */ + CRIATOM_THREAD_MODEL_USER_MULTI = 1, + + /*EN + * \brief Single threading + * \par Description: + * The library does not create threads internally, and does not execute internal exclusive control.
+ * Server processing is executed synchronously in the ::criAtom_ExecuteMain function.
+ * \attention + * When using this model, call the APIs and server processing functions + * from within the same thread. + */ + CRIATOM_THREAD_MODEL_SINGLE = 2, + + /* enum size is 4bytes */ + CRIATOM_THREAD_MODEL_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomThreadModel; + +/*EN + * \brief Configuration structure for initializing library + * \ingroup ATOMLIB_GLOBAL + * \par Description: + * Structure used for specifying the behavior of the CRI Atom library.
+ * This structure is specified as an argument of the ::criAtom_Initialize function.
+ *
+ * When the CRI Atom library is initialized, as much internal resources as needed are allocated for the library + * based on the settings specified in the structure.
+ * The size of the work area needed for the library varies depending on the parameters specified + * in the structure. + * \par Remarks: + * When using default settings, after setting default parameters for the structure using the ::criAtom_SetDefaultConfig macro, + * specify the structure for the ::criAtom_Initialize function.
+ * \attention + * More members will be added in the future. + * The structure must be initialized with the ::criAtom_SetDefaultConfig macro.
+ * (Make sure that no indefinite value is set to any member of the structure.) + * \sa criAtom_Initialize, criAtom_SetDefaultConfig + */ +typedef struct CriAtomConfigTag { + /*EN + \brief Threading models + \par Description: + Specifies the threading model for the CRI Atom library.
+ \sa CriAtomThreadModel + */ + CriAtomThreadModel thread_model; + + /*EN + \brief Execution frequency of server process + \par Description: + Specifies the execution frequency of the server process.
+ Typically, this should be set to the same value as the frame rate of the application.
+
+ The CRI Atom library performs most of the work inside the library such as + managing file reading, decoding sound data, playing sound, or updating the status, + in a single function.
+ In CRI Middleware, the function which performs the work inside the library collectively like this + is called a "server process."
+
+ When the threading model is ::CRIATOM_THREAD_MODEL_MULTI , + the server process is regularly executed in threads created by the CRI Atom library.
+ When the threading model is ::CRIATOM_THREAD_MODEL_SINGLE or ::CRIATOM_THREAD_MODEL_USER_MULTI , + the server process is executed in the ::criAtom_ExecuteMain function.
+
+ Specify the execution frequency of the server process for server_frequency.
+ When the threading model is ::CRIATOM_THREAD_MODEL_MULTI , the CRI Atom library + adjusts the interval for calling the server process so that the server process can be executed at the specified frequency.
+ When the threading model is ::CRIATOM_THREAD_MODEL_SINGLE or ::CRIATOM_THREAD_MODEL_USER_MULTI , + the user must execute the ::criAtom_ExecuteMain function more frequently than + specified by server_frequency.
+
+ If the fluctuation of the frame rate of the application is very large and unevenness occurs every time the server process is executed, + specify the value of server_frequency assuming the worst frame rate + or specify ::CRIATOM_THREAD_MODEL_MULTI for the threading model. + \par Remarks: + If the frequency of executing the server process is increased, amount of the work per server process (such as the amount of decoding tasks) + will decrease. + As a result, the load per server process becomes small (the load is distributed). + However, overhead for executing the server process becomes large.
+ (If the frequency of executing the server process is increased under an environment in which the CPU resource is limited such as portable game machine, + the overhead for executing the server process may become too great to ignore.)
+
+ If the frequency of executing the server process is decreased, amount of the work per server process will increase.
+ Although the overhead for executing the server process is reduced, since the load per server process + becomes higher, problems such as dropped frames may occur.
+ \attention + When ::CRIATOM_THREAD_MODEL_SINGLE or ::CRIATOM_THREAD_MODEL_USER_MULTI is specified for the threading model + but the ::criAtom_ExecuteMain function is not executed more frequently + than the frequency specified by server_frequency, problems such as interruption of playback + may occur.
+ \sa criAtom_ExecuteMain + */ + CriFloat32 server_frequency; + + /*EN + \brief Pointer to CRI File System initialization parameters + \par Description: + Specifies the pointer to CRI File System initialization parameters. + If NULL is specified, the CRI File System is initialized using the default parameters. + \sa criAtom_Initialize + */ + const CriFsConfig *fs_config; + + /*EN + \brief Pointer to platform-specific initialization parameters + \par Description: + Specifies the pointer to platform-specific initialization parameters + required for operating the CRI Atom library. + If NULL is specified, an initialization required for each platform is performed with default parameters.
+ Parameter structures are defined in each platform-specific header. + If parameter structures are not defined for a platform, always specify NULL. + \sa criAtom_Initialize + */ + void *context; + + /*EN + \brief Library version number + \par Description: + The CRI Atom Library version number.
+ The version number defined in this header is set by the ::criAtom_SetDefaultConfig macro.
+ \attention + Do not change this value in your applications.
+ */ + CriUint32 version; + + /*EN + \brief Maximum number of players + \par Description: + Specifies the number of players (CriAtomPlayer) used in the application.
+ When using the ::criAtomPlayer_CreateStandardPlayer function to create players in an application, + the number of players used must be specified in this parameter.
+
+ For max_players, specify the maximum number of players used simultaneously.
+ For example, if the ::criAtomPlayer_CreateStandardPlayer and ::criAtomPlayer_Destroy functions are used alternately to create and destroy players, + only one player is ever in use at the same time, so max_players can be set to 1 regardless of the number of times the create function is called.
+ Conversely, if in one scene 10 players are used simultaneously but no players are used at all elsewhere, + this still requires max_players to be set to 10.
+ \sa criAtomPlayer_CreateStandardPlayer, criAtomPlayer_Destroy + */ + CriSint32 max_players; + +} CriAtomConfig; +/*EN + * \brief Memory allocation function + * \ingroup ATOMLIB_GLOBAL + * \param[in] obj user specified object + * \param[in] size requested memory size (in bytes) + * \return void* address of the allocated memory (NULL if failed) + * \par Description: + * Interface for registering a memory allocation function.
+ * This function is used to replace a memory allocation process performed + * in the CRI Atom library with a user's own memory allocation process.
+ * \par Remarks: + * When a callback function is executed, the required memory size is set + * by the argument size.
+ * The callback function must allocate a memory area with the size specified by size + * and return the address of the allocated memory.
+ * The user-specified object registered by the ::criAtom_SetUserMallocFunction function is passed + * to the argument obj.
+ * If it is necessary to refer to the memory manager and so on when a memory area is allocated, + * set the relevant object for the argument of the ::criAtom_SetUserMallocFunction function + * and refer to it through the argument of the callback function.
+ * \attention + * Note that if memory allocation fails, an error callback may be returned + * or the caller function may fail. + * \sa CriAtomFreeFunc, criAtom_SetUserMallocFunction + */ +typedef void *(CRIAPI *CriAtomMallocFunc)(void *obj, CriUint32 size); + +/*EN + * \brief Memory deallocation function + * \ingroup ATOMLIB_GLOBAL + * \param[in] obj user specified object + * \param[in] mem address of the memory to be deallocated + * \return None + * \par Description: + * Interface for registering a memory deallocation function.
+ * This function is used to replace a memory deallocation process performed + * in the CRI Atom library with a user's own memory deallocation process.
+ * \par Remarks: + * When the callback function is executed, the address of the memory area to be deallocated is set + * for mem.
+ * The callback function must deallocate the memory area specified by mem. + * The user-specified object registered by the ::criAtom_SetUserFreeFunction function is passed + * to the argument obj.
+ * If it is necessary to refer to the memory manager and so on when a memory area is allocated, + * set the relevant object for the argument of the ::criAtom_SetUserFreeFunction function + * and refer to it through the argument of the callback function.
+ * \sa CriAtomMallocFunc, criAtom_SetUserFreeFunction + */ +typedef void (CRIAPI *CriAtomFreeFunc)(void *obj, void *mem); + +/*EN + * \brief Start audio frame callback function + * \ingroup ATOMLIB_GLOBAL + * \param[in] obj user specified object + * \return None + * \par Description: + * Callback function executed when starting an audio frame.
+ * An audio frame indicates the timing to start server process within a CRI Atom library.
+ * Use the ::criAtom_SetAudioFrameStartCallback function to register the callback function.
+ * The registered callback function is executed when starting an audio frame (just before starting the server process). + * \par Remarks: + * If the threading model is set to multithreading ( ::CRIATOM_THREAD_MODEL_MULTI ) at the initialization of the library, + * this callback function is called from the thread created in the CRI Atom + * library.
+ * If the threading model is set to user multithreading ( ::CRIATOM_THREAD_MODEL_USER_MULTI ) or + * single threading ( ::CRIATOM_THREAD_MODEL_SINGLE ) at the initialization of the library, this callback function is called from the + * ::criAtom_ExecuteMain function.
+ *
+ * Note that the user specified object registered with the ::criAtom_SetAudioFrameStartCallback function is + * passed to the argument obj.
+ * \sa criAtom_SetAudioFrameStartCallback + */ +typedef void (CRIAPI *CriAtomAudioFrameStartCbFunc)(void *obj); + +/*EN + * \brief End audio frame callback function + * \ingroup ATOMLIB_GLOBAL + * \param[in] obj user specified object + * \return None + * \par Description: + * Callback function executed when ending an audio frame.
+ * An audio frame indicates the timing to start server process within a CRI Atom library.
+ * Use the ::criAtom_SetAudioFrameEndCallback function to register the callback function.
+ * The registered callback function is executed when ending an audio frame (just after ending the server process).
+ * \par Remarks: + * If the threading model is set to multithreading ( ::CRIATOM_THREAD_MODEL_MULTI ) at the initialization of the library, + * this callback function is called from the thread created in the CRI Atom + * library.
+ * If the threading model is set to user multithreading ( ::CRIATOM_THREAD_MODEL_USER_MULTI ) or + * single threading ( ::CRIATOM_THREAD_MODEL_SINGLE ) at the initialization of the library, this callback function is called from the + * ::criAtom_ExecuteMain function.
+ *
+ * Note that the user specified object registered with the ::criAtom_SetAudioFrameEndCallback function is + * passed to the argument obj.
+ * \sa criAtom_SetAudioFrameEndCallback + */ +typedef void (CRIAPI *CriAtomAudioFrameEndCbFunc)(void *obj); + +/*EN + * \brief Sound renderer type + * \ingroup ATOMLIB_GLOBAL + * \par Description: + * Specifies the type of sound renderer internally created by the Atom player.
+ * Specify as a parameter of the configuration structure when creating an Atom player. + * \attention + * ::CRIATOM_SOUND_RENDERER_ANY can only be specified for the ::criAtomExPlayer_SetSoundRendererType function.
+ * It cannot be used for voice pool creation.
+ * \sa CriAtomAdxPlayerConfig, criAtomPlayer_CreateAdxPlayer + */ +typedef enum CriAtomSoundRendererTypeTag { + CRIATOM_SOUND_RENDERER_NATIVE = 1, /*EN + * This is used in the ::criAtomPlayer_SetSendLevel function. + * \sa criAtomPlayer_SetSendLevel + */ +typedef enum CriAtomSpeakerIdTag { + CRIATOM_SPEAKER_FRONT_LEFT = 0, /*EN + * This is used in the ::criAtom_GetPerformanceInfo function. + * \sa criAtom_GetPerformanceInfo + */ +typedef struct CriAtomPerformanceInfoTag { + CriUint32 server_process_count; /*EN + * It is used when calculating the bit rate of sound data. + * \sa criAtom_CalculateHcaBitrate, criAtom_CalculateHcaMxBitrate + */ +typedef enum CriAtomEncodeQualityTag { + CRIATOM_ENCODE_QUALITY_LOWEST = 0, /*EN + * Any of the following values can be used.
+ * - ::CRIATOM_FORMAT_ADX + * - ::CRIATOM_FORMAT_HCA + * - ::CRIATOM_FORMAT_HCA_MX + * - ::CRIATOM_FORMAT_WAVE + * - ::CRIATOM_FORMAT_RAW_PCM + * - ::CRIATOM_FORMAT_AIFF + * - ::CRIATOM_FORMAT_VIBRATION + * - ::CRIATOM_FORMAT_AUDIO_BUFFER + * - ::CRIATOM_FORMAT_HW1 + * - ::CRIATOM_FORMAT_HW2 + * . + */ +typedef CriUint32 CriAtomFormat; +#define CRIATOM_FORMAT_NONE (0x00000000) /*EN< none */ +#define CRIATOM_FORMAT_ADX (0x00000001) /*EN< ADX */ +#define CRIATOM_FORMAT_HCA (0x00000003) /*EN< HCA */ +#define CRIATOM_FORMAT_HCA_MX (0x00000004) /*EN< HCA-MX */ +#define CRIATOM_FORMAT_WAVE (0x00000005) /*EN< Wave */ +#define CRIATOM_FORMAT_RAW_PCM (0x00000006) /*EN< Raw PCM */ +#define CRIATOM_FORMAT_AIFF (0x00000007) /*EN< AIFF */ +#define CRIATOM_FORMAT_VIBRATION (0x00000008) /*EN< Vibration */ +#define CRIATOM_FORMAT_AUDIO_BUFFER (0x00000009) /*EN< AudioBuffer */ +#define CRIATOM_FORMAT_HW1 (0x00010001) /*EN< hardware specific */ +#define CRIATOM_FORMAT_HW2 (0x00010002) /*EN< hardware specific */ + +/*EN + * \brief Audio data format information + * \ingroup ATOMLIB_GLOBAL + * \par Description: + * Audio data format information.
+ * This is used in the ::criAtomPlayer_GetFormatInfo function.
+ * \sa criAtomPlayer_GetFormatInfo + */ +typedef struct CriAtomFormatInfoTag { + CriAtomFormat format; /*EN< Format type */ + CriSint32 sampling_rate; /*EN< Sampling frequency */ + CriSint64 num_samples; /*EN< Total number of samples */ + CriSint64 loop_offset; /*EN< Loop start sample */ + CriSint64 loop_length; /*EN< Number of samples in the loop interval */ + CriSint32 num_channels; /*EN< Number of channels */ +} CriAtomFormatInfo; + +/*EN + * \brief PCM format + * \ingroup ATOMLIB_GLOBAL + * \par Description: + * PCM data type information. + * \sa criAtomPlayer_SetFilterCallback + */ +typedef enum CriAtomPcmFormatTag { + CRIATOM_PCM_FORMAT_SINT16 = 0, + CRIATOM_PCM_FORMAT_FLOAT32, + + /* enum size is 4bytes */ + CRIATOM_PCM_FORMAT_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomPcmFormat; + +/*EN + * \brief Streaming information + * \ingroup ATOMLIB_GLOBAL + * \par Description: + * The streaming status at the point when the information was acquired by the ::criAtom_GetStreamingInfo function.
+ * \sa criAtom_GetStreamingInfo + */ +typedef struct CriAtomStreamingInfoTag { + /*EN + \brief Current number of streaming sounds + \par Description: + The number of streaming sounds at the time when the information was acquired.
+ This value changes as the number of streaming playbacks increases or decreases.
+ */ + CriSint32 num_streaming; /*EN< */ + + /*EN + \brief Current total streaming bit rate + \par Description: + The total consumed bit rate for all streaming playback at the time when the information was acquired.
+ This value changes as the number of streaming playbacks increases or decreases.
+ The unit for this value is [bps] (bits per second).
+ */ + CriFloat32 total_bps; + + /*EN + \brief Current worst start playback latency + \par Description: + The predicted worst start playback latency for new streaming playback at the time + when the information was acquired.
+ The unit for this value is [sec] (second).
+ This value is only a prediction of the maximum delay, and does not mean that + new streaming playback will always be delayed by the time represented by this value.
+ \attention + When a new streaming playback is added,
+ an accurate delay time will be recalculated based on the bit rate of the stream data after it is loaded.
+ */ + CriFloat32 worst_latency; +} CriAtomStreamingInfo; + +/*EN + * \brief Parameters ID + * \ingroup ATOMLIB_PLAYER + * \par Description: + * ID for specifying parameters.
+ */ +typedef enum CriAtomParameterIdTag { + CRIATOM_PARAMETER_ID_VOLUME = 0, /*EN< Volume */ + CRIATOM_PARAMETER_ID_FREQUENCY_RATIO = 1, /*EN< frequency ratio */ + + /* enum size is 4bytes */ + CRIATOM_PARAMETER_ID_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomParameterId; + +/*EN + * \brief Voice stop reason + * \ingroup ATOMLIB_GLOBAL + * \par Description: + * Indicates the reason for the voice stop. + */ +typedef enum CriAtomVoiceStopReasonTag { + CRIATOM_VOICE_STOP_REASON_EXPLAYER_STOP = 0, /*EN< EX Player is stopped */ + CRIATOM_VOICE_STOP_REASON_EXPLAYER_STOPWITHOUTRELEASE, /*EN< EX player is stopped */ + CRIATOM_VOICE_STOP_REASON_PLAYBACK_STOP, /*EN< Playback is stopped by specifying an ID */ + CRIATOM_VOICE_STOP_REASON_PLAYBACK_STOPWITHOUTRELEASE, /*EN< Playback is immediately stopped by specifying a playback ID */ + CRIATOM_VOICE_STOP_REASON_SOUNDPLAYER_DESTROY, /*EN< Sound player is destroyed */ + CRIATOM_VOICE_STOP_REASON_FADER_STOP, /*EN< Fader is stopped */ + CRIATOM_VOICE_STOP_REASON_PLAYER_STOP, /*EN< Player is stopped */ + CRIATOM_VOICE_STOP_REASON_AWB_STOP, /*EN< AWB is stopped */ + CRIATOM_VOICE_STOP_REASON_STREAMING_CACHE_STOP, /*EN< Streaming cache is stopped */ + CRIATOM_VOICE_STOP_REASON_PLAYER_FORCE_STOP, /*EN< Player is stopped */ + CRIATOM_VOICE_STOP_REASON_PLAYER_DESTROY, /*EN< Player is destroyed */ + CRIATOM_VOICE_STOP_REASON_MTPLAYER_STOP, /*EN< MT player is destroyed */ + CRIATOM_VOICE_STOP_REASON_VOICE_POOL_DESTROY, /*EN< Voice pool is destroyed */ + CRIATOM_VOICE_STOP_REASON_VOICE_STEAL_CASE1, /*EN< Voice is stolen */ + CRIATOM_VOICE_STOP_REASON_VOICE_STEAL_CASE2, /*EN< Voice is stolen */ + CRIATOM_VOICE_STOP_REASON_VOICE_STEAL_CASE3, /*EN< Voice is stolen */ + CRIATOM_VOICE_STOP_REASON_VOICE_STEAL_CASE4, /*EN< Voice is stolen */ + CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_VIRTUAL_VOICE_BEYOND_LIFE_TIME, /*EN< Server processing */ + CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_CANT_CALC_3DPOS, /*EN< Server processing */ + CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_INTERNAL_PLAYBACK_CANCEL, /*EN< Server processing */ + CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_NO_PLAYER_NO_RETRY, /*EN< Server processing */ + CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_FAILED_RETRY_BEYOND_LIFE_TIME, /*EN< Server processing */ + CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_PLAYER_STATUS_PLAYEND, /*EN< Server processing */ + CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_PLAYER_STATUS_ERROR, /*EN< Server processing */ + CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_IMPOSSIBLE_RETRY, /*EN< Server processing */ + CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_PLAYER_STATUS_STOP, /*EN< Server processing */ + CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_INVALID_SERVER_REQUEST, /*EN< Server processing */ + CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_SILENT_MODE_STOP, /*EN< Server processing */ + CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_SOUNDCOMPLEX_STATUS_ERROR, /*EN< Server processing */ + CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_NO_ELEMENT_CASE1, /*EN< Server processing */ + CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_NO_ELEMENT_CASE2, /*EN< Server processing */ + CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_STOP_NOT_PLAYING_ELEMENT, /*EN< Server processing */ + CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_NOT_ACTIVE_VOICE, /*EN< Server processing */ + CRIATOM_VOICE_STOP_REASON_ELEMENT_FREE, /*EN< Element is released */ + CRIATOM_VOICE_STOP_REASON_EXPLAYER_STOP_ERROR_HN, /*EN< Player is stopped due to an error */ + CRIATOM_VOICE_STOP_REASON_ACB_RELEASE, /*EN< ACB is released */ + CRIATOM_VOICE_STOP_REASON_VOICE_ALLOCATE_FAIL, /*EN< Failed in allocating a voice */ + CRIATOM_VOICE_STOP_REASON_VOICE_RESET, /*EN< Voice is reset */ + CRIATOM_VOICE_STOP_REASON_VOICE_VIRTUALIZE, /*EN< Voice is virtualized */ + CRIATOM_VOICE_STOP_REASON_PLAYBACKSOUND_ALLOCATE_FAIL, /*EN< Failed in allocating playback sound */ + CRIATOM_VOICE_STOP_REASON_STOP_ACTION_WITH_BEATSYNC, /*EN< Beat sync stop action */ + CRIATOM_VOICE_STOP_REASON_START_CANCEL_WITH_BEATSYNC, /*EN< Beat sync playback cancel */ + CRIATOM_VOICE_STOP_REASON_STOP_ACTION, /*EN< Stop action */ + CRIATOM_VOICE_STOP_REASON_BLOCK_TRANSITION_CASE0, /*EN< Block transition */ + CRIATOM_VOICE_STOP_REASON_BLOCK_TRANSITION_CASE1, /*EN< Block transition */ + CRIATOM_VOICE_STOP_REASON_BLOCK_TRANSITION_CASE2, /*EN< Block transition */ + CRIATOM_VOICE_STOP_REASON_BLOCK_TRANSITION_CASE3, /*EN< Block transition */ + CRIATOM_VOICE_STOP_REASON_CATEGORY_CUE_LIMIT, /*EN< Category cue limit */ + CRIATOM_VOICE_STOP_REASON_UNSET_ACB, /*EN< ACB internally released */ + CRIATOM_VOICE_STOP_REASON_SEQUENCE_END, /*EN< Sequence end marker */ + CRIATOM_VOICE_STOP_REASON_BLODK_END, /*EN< Block end */ + CRIATOM_VOICE_STOP_REASON_SEQUENCE_EXECUTE, /*EN< Sequence server processing */ + CRIATOM_VOICE_STOP_REASON_TRACK_MONO, /*EN< Track mono-mode processing */ + CRIATOM_VOICE_STOP_REASON_FADER_STOP_IMMEDIATE, /*EN< Fader is immediately stopped */ + CRIATOM_VOICE_STOP_REASON_CUE_LIMIT, /*EN< Cue limit processing */ + CRIATOM_VOICE_STOP_REASON_STOP_ACB, /*EN< All ACBs are stopped */ + CRIATOM_VOICE_STOP_REASON_SOUND_OBJECT_ADD_PLAYER, /*EN< Player is added to a sound object */ + CRIATOM_VOICE_STOP_REASON_SOUND_OBJECT_DELETE_PLAYER, /*EN< Player is deleted from a sound object */ + CRIATOM_VOICE_STOP_REASON_SOUND_OBJECT_DELETE_ALL_PLAYER, /*EN< Player is deleted from a sound object */ + CRIATOM_VOICE_STOP_REASON_UNREGISTER_ACF, /*EN< ACF is unregistered */ + CRIATOM_VOICE_STOP_REASON_EXPLAYER_DESTROY, /*EN< CriAtomExPlayer handle is destroyed */ + CRIATOM_VOICE_STOP_REASON_EXPLAYER_ATTACH_FADER, /*EN< Fader is added to CriAtomExPlayer */ + CRIATOM_VOICE_STOP_REASON_EXPLAYER_DETACH_FADER, /*EN< Fader is removed from CriAtomExPlayer */ + CRIATOM_VOICE_STOP_REASON_DETACH_AWB, /*EN< AWB is released */ + CRIATOM_VOICE_STOP_MULTIPLE_PLAYBACK_PROHIBITION_TIME, /*EN< Playback during multiple playback prohibition time */ + CRIATOM_VOICE_STOP_REASON_CATEGORY_STOP, /*EN< Category stop */ + CRIATOM_VOICE_STOP_REASON_CATEGORY_STOPWITHOUTRELEASE, /*EN< Category stop without release */ + CRIATOM_VOICE_STOP_REASON_NOTE_OFF, /*EN< Stop Timeline */ + CRIATOM_VOICE_STOP_REASON_REGISTER_ACF, /*EN< Register ACF */ + CRIATOM_VOICE_STOP_REASON_STOP_ACTION_WITH_FADE, /*EN< Stop Action with Fade */ + + /* initial state */ + CRIATOM_VOICE_STOP_REASON_NONE = 0x7FFFFFFE, + /* enum size is 4bytes */ + CRIATOM_VOICE_STOP_REASON_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomVoiceStopReason; + +/*EN + * \brief Ambisonics order type + * \ingroup ATOMEXLIB_ASR + * \par Description: + * This type represents the order of Ambisonics the Atom library uses for playback.
+ * Specify it in the ::CriAtomExAsrConfig structure during ASR initialization (::criAtomExAsr_Initialize). + * \sa criAtomExAsr_Initialize, CriAtomExAsrConfig + */ +typedef enum CriAtomAmbisonicsOrderTypeTag { + CRIATOMAMBISONICS_ORDER_TYPE_NONE = 0, /*EN< None */ + CRIATOMAMBISONICS_ORDER_TYPE_FIRST, /*EN< 1st Order */ + CRIATOMAMBISONICS_ORDER_TYPE_1P = CRIATOMAMBISONICS_ORDER_TYPE_FIRST, /*EN< 1 Periphonic (synonymous with 1st Order) */ + CRIATOMAMBISONICS_ORDER_TYPE_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomAmbisonicsOrderType; + +/*========================================================================== + * CRI Atom HCA-MX API + *=========================================================================*/ +/*EN + * \brief HCA-MX initialization configuration structure + * \ingroup ATOMLIB_HCA_MX + * This structure is used for specifying the behavior of the HCA-MX.
+ * This structure is specified as an argument of the ::criAtomHcaMx_Initialize function.
+ * \par Remarks: + * When using default settings, after setting default parameters for the structure using the ::criAtomHcaMx_SetDefaultConfig macro, + * specify the structure in the ::criAtomHcaMx_Initialize + * function.
+ * \attention + * More members will be added in the future. So, when not using the ::criAtomHcaMx_SetDefaultConfig + * macro, make sure to initialize the structure to zero before using it.
+ * (Make sure that no indefinite value is set to any member of the structure.) + * \sa criAtomHcaMx_Initialize, criAtomHcaMx_SetDefaultConfig + */ +typedef struct CriAtomHcaMxConfigTag { + /*EN + \brief Execution frequency of server process + \par Description: + Specifies the execution frequency of the server process.
+ \attention + You must set the same value as the value specified during Atom library initialization (server_frequency in ::CriAtomConfig + structure).
+ \sa CriAtomConfig + */ + CriFloat32 server_frequency; + + /*EN + \brief Number of mixers + \par Description: + Specifies the number of mixers to send the HCA-MX decode result.
+ By creating multiple mixers, + different bus effect can be applied to each mixer.
+ \attention + The load of HCA-MX decode process and normal process + increase proportionally with the number of mixers.
+ */ + CriSint32 num_mixers; + + /*EN + \brief Maximum number of players that can be registered with a mixer + \par Description: + Specifies the number of HCA-MX players that can be registered with a mixer.
+ */ + CriSint32 max_players; + + /*EN + \brief Maximum number of input data channels + \par Description: + Specifies the maximum number of HCA-MX data channels played back in an application.
+ Specify 1 if the data played back is monophonic and 2 if it is sterophonic.
+ \par Remarks: + Audio data not exceeding max_input_channels specified during HCA-MX initialization + can be played back.
+ For example, if max_input_channels is 6, in addition to 5.1ch audio, + monophonic and sterophonic playback are also possible.
+ Even if 99 out of 100 data is monophonic and 1 is sterophonic, + you must specify 2 for max_input_channels.
+ */ + CriSint32 max_input_channels; + + /*EN + \brief Maximum sampling rate + \par Description: + Specifies the maximum sampling rate that can be set to HCA-MX output.
+ \par Remarks: + For example, when specifying 2.0f for the ::criAtomHcaMx_SetFrequencyRatio function, set output_sampling_rate * 2 .
+ */ + CriSint32 max_sampling_rate; + + /*EN + \brief Number of output channels + \par Description: + Specifies the number of HCA-MX data output channels.
+ Normally, specify the number of speakers (maximum number output device of channels) connected to + the target machine.
+ \par Remarks: + If playing only monophonic audio without pan control, + processing load can be reduced by specifying 1 for output_channels.
+ \attention + output_channels cannot be equal to or less than + max_input_channels.
+ */ + CriSint32 output_channels; + + /*EN + \brief Output sampling rate + \par Description: + Specifies the sampling rate of HCA-MX data to play back.
+ HCA-MX does not allow changing of sampling rate per sound unit.
+ When creating HCA-MX data, create all audio data with the same + sampling rate and specify that value for output_sampling_rate.
+ */ + CriSint32 output_sampling_rate; + + /*EN + \brief Sound renderer type + \par Description: + Specifies the type of HCA-MX output sound renderer.
+ If you specify CRIATOM_SOUND_RENDERER_DEFAULT as sound_renderer_type, + audio data is sent to the default sound renderer.
+ If you specify CRIATOM_SOUND_RENDERER_NATIVE as sound_renderer_type, + audio data is sent to sound output of each default platform.
+ If you specify CRIATOM_SOUND_RENDERER_ASR as sound_renderer_type, + audio data is sent to ASR (Atom Sound Renderer).
+ (ASR output destination is specified during ASR initialization.) + */ + CriAtomSoundRendererType sound_renderer_type; +} CriAtomHcaMxConfig; + +/*========================================================================== + * CRI Atom Decrypter API + *=========================================================================*/ +/*EN + * \brief Configuration structure for creating decrypter + * \ingroup ATOMLIB_DECRYPTER + * \par Description: + * Contains the parameters required for creating a decrypter.
+ * This structure is specified as an argument of the ::criAtomDecrypter_Create function.
+ * \attention + * Be sure to zero clear the structure before using because members may be added in the future.
+ * (Make sure that no indefinite value is set to any member of the structure.) + * \sa criAtomDecrypter_Create + */ +typedef struct CriAtomDecrypterConfigTag { + /*EN + \brief Decryption key + \par Description: + Specifies the key number used for decryption.
+ You must specify the same value as the key used when encrypting the data.
+ \attention + You cannot specify 0 as decryption key.
+ (If you specify 0, creation of decrypter will fail.)
+ + */ + CriUint64 key; +} CriAtomDecrypterConfig; + +/*EN + * \brief Decrypter handle + * \ingroup ATOMLIB_DECRYPTER + * \par Description: + * Handle for operating the decrypter.
+ * It is returned as the return value of the ::criAtomDecrypter_Create function.
+ * \sa criAtomDecrypter_Create + */ +typedef void *CriAtomDecrypterHn; + +/*========================================================================== + * CRI Atom AWB API + *=========================================================================*/ +struct CriAtomAwbTag; +/*EN + * \brief AWB handle + * \ingroup ATOMLIB_AWB + * \par Description: + * Handle indicating the TOC information of the AWB file containing the playback data.
+ * It is obtained with the ::criAtomAwb_LoadToc function.
+ * \sa criAtomAwb_LoadToc + */ +typedef struct CriAtomAwbTag *CriAtomAwbHn; + +/*EN + * \brief AWB status + * \ingroup ATOMLIB_AWB + * \par Description: + * Indicates the preparation status of an AWB.
+ * It is obtained with the ::criAtomAwb_GetStatus function.
+ * \sa criAtomAwb_GetStatus + */ +typedef enum CriAtomAwbStatusTag { + CRIATOMAWB_STATUS_STOP = 0, /*EN + * \sa criAtomAwb_GetType + */ +typedef enum CriAtomAwbTypeTag { + CRIATOMAWB_TYPE_TOC = 0, /*EN + * This structure is specified as an argument of the ::criAtomPlayer_CreateStandardPlayer function.
+ *
+ * When a handle to the player is created, as much internal resources as needed are allocated for the player + * based on the settings specified in the structure.
+ * The size of the work area needed for the player varies depending on the parameters specified in the structure. + * \attention + * More members will be added in the future. So, when the ::criAtomPlayer_SetDefaultConfigForStandardPlayer + * macro is not used, make sure to initialize the structure to zero before using it.
+ * (Make sure that no indefinite value is set to any member of the structure.) + * \sa criAtomPlayer_CreateStandardPlayer, criAtomPlayer_SetDefaultConfigForStandardPlayer + */ +typedef struct CriAtomStandardPlayerConfigTag { + /*EN + \brief Maximum number of output channels + \par Description: + Specifies the number of channels of the sound played by an Atom player.
+ Atom player created with the ::criAtomPlayer_CreateStandardPlayer function can play back audio data with number of + output channels less than or equal to the number of channels specified with max_channels.
+ The relationship between the value specified as the maximum number of output channels and the data that can be played back with the created Atom + player is shown below.
+ \table "Relationship between maximum number of output channels and the data that can be played back" align=center border=1 cellspacing=0 cellpadding=4 + [maximum number of output channels (specified value) | data that can be played with the created Atom player ] + [1 | Mono ] + [2 | Mono, Stereo ] + [6 | Mono, Stereo, 5.1ch ] + [8 | Mono, Stereo, 5.1ch, 7.1ch ] + \endtable +
+ \par Remarks: + On platform using hardware resource during sound output, + use of hardware resource can be suppressed by reducing the number of + output channels.
+ \attention + You cannot play back data exceeding the specified maximum number of output channels.
+ For example, if the maximum number of output channels is set to 1, stereo audio cannot be played + with the created Atom player.
+ (It is not down mixed to monophonic output.) + */ + CriSint32 max_channels; + + /*EN + \brief Maximum sampling rate + \par Description: + Specifies the sampling rate of the sound played by an Atom player.
+ Atom player created with the ::criAtomPlayer_CreateStandardPlayer function can play back audio data with sampling rate + less than or equal to the value specified with max_sampling_rate.
+
+ \par Remarks: + The size of work memory necessary to create the Atom player can be reduced + by reducing the maximum sampling rate. + \attention + You cannot play back data exceeding the specified maximum sampling rate.
+ For example, if the maximum sampling rate is set to 24000, 48000Hz audio cannot be played + with the created Atom player.
+ (It is not down sampled and output.) + */ + CriSint32 max_sampling_rate; + + /*EN + \brief Whether to perform streaming playback + \par Description: + Specifies whether to perform streaming playback (playback from file) with an Atom player.
+ If streaming_flag is set to CRI_FALSE, the created Atom player will support only on-memory data + playback (playback of memory address specified with the ::criAtomPlayer_SetData + function). (Playback from file is not possible.)
+ If streaming_flag is set to CRI_TRUE, the created Atom player will support on-memory data + playback and playback from file (playback of file specified with the ::criAtomPlayer_SetFile function or + ::criAtomPlayer_SetContentId function.
+ \par Supplement: + If streaming_flag is set to CRI_TRUE, resource for reading file is allocated + when creating Atom player.
+ Therefore, compared to when the streaming_flag is set to CRI_FALSE, more memory is + required to create the Atom player. + */ + CriBool streaming_flag; + + /*EN + \brief Sound renderer type + \par Description: + Specifies the type of sound renderer used by an Atom player.
+ If you specify CRIATOM_SOUND_RENDERER_DEFAULT as sound_renderer_type, + audio data is sent to the default sound renderer.
+ If you specify CRIATOM_SOUND_RENDERER_NATIVE as sound_renderer_type, + audio data is sent to sound output of each default platform.
+ If you specify CRIATOM_SOUND_RENDERER_ASR as sound_renderer_type, + audio data is sent to ASR (Atom Sound Renderer).
+ (ASR output destination is specified during ASR initialization.) + */ + CriAtomSoundRendererType sound_renderer_type; + + /*EN + \brief Decoder process latency + \par Description: + Specifies the decoder process latency.
+ When decode_latency is set to 0, the player will decode audio data with least amount of latency + when audio playback is started.
+ (During on-memory playback, sound output is started after executing the ::criAtomPlayer_Start function by decoding the + amount of data necessary to start playback in the + first server process.)
+ On the other hand, if decode_latency is set to 1, + the amount of data necessary to start playback is divided among several server processes.
+ (Even if on-memory playback, sound output is not started after executing the ::criAtomPlayer_Start function + until the number of server processes specified by decode_latency is executed).
+ \par Remarks: + The Atom player determines the amount of sound data to + decode per server process based on the data remaining in the sound buffer.
+ Since the sound buffer is empty before starting sound playback, + more data is decoded than during sound playback (around 2 to 4 times).
+ Since the sound data decode process load per player is small, + the processing load when starting to output each sound is not likely to be a problem.
+ However, if large amount of sound output requests are made simultaneously to 1V in an application, + the peak processing load of all players will be synchronized and the load may increase significantly.
+ When performing such control, local increase in processing load can be + avoided by increasing the value of decode_latency.
+
+ The default value of decode_latency is set to 0 in most environment.
+ However, in environment such as portable game machines where even a small change in load may have great effect on the application, + the default value may be set to 1 or greater.
+ (Refer to the result of applying the ::criAtomPlayer_SetDefaultConfigForAdxPlayer function + for the actually set value.)
+
+ Currently, decode_latency cannot be set to 4 or greater.
+ (If decode_latency is set to 4 or greater, it is changed to 3 within the library.)
+ */ + CriSint32 decode_latency; +} CriAtomStandardPlayerConfig; + +/*EN + * ADX player creation configuration structure + * \ingroup ATOMLIB_PLAYER + * \par Description: + * Structure for specifying the behavior when creating a player capable of ADX playback.
+ * This structure is specified as an argument of the ::criAtomPlayer_CreateAdxPlayer function.
+ *
+ * When a handle to the player is created, as much internal resources as needed are allocated for the player + * based on the settings specified in the structure.
+ * The size of the work area needed for the player varies depending on the parameters specified in the structure. + * \attention + * More members will be added in the future. So, when not using the ::criAtomPlayer_SetDefaultConfigForAdxPlayer + * macro, make sure to initialize the structure to zero before using it.
+ * (Make sure that no indefinite value is set to any member of the structure.) + * \sa criAtomPlayer_CreateAdxPlayer, criAtomPlayer_SetDefaultConfigForAdxPlayer + */ +typedef struct CriAtomAdxPlayerConfigTag { + /*EN + \brief Maximum number of output channels + \par Description: + Specifies the number of channels for the sounds played by an Atom player.
+ Atom player created with the ::criAtomPlayer_CreateAdxPlayer function can play back audio data with number of + output channels less than or equal to the number of channels specified with max_channels.
+ The relationship between the value specified as the maximum number of output channels and the data that can be played back with the created Atom + player is shown below.
+ \table "Relationship between maximum number of output channels and the data that can be played back" align=center border=1 cellspacing=0 cellpadding=4 + [maximum number of output channels (specified value) | data that can be played with the created Atom player ] + [1 | Mono ] + [2 | Mono, Stereo ] + [6 | Mono, Stereo, 5.1ch ] + [8 | Mono, Stereo, 5.1ch, 7.1ch ] + \endtable +
+ \par Remarks: + On platform using hardware resource during sound output, + use of hardware resource can be suppressed by reducing the number of + output channels.
+ \attention + You cannot play back data exceeding the specified maximum number of output channels.
+ For example, if the maximum number of output channels is set to 1, stereo audio cannot be played + with the created Atom player.
+ (It is not down mixed to monophonic output.) + */ + CriSint32 max_channels; + + /*EN + \brief Maximum sampling rate + \par Description: + Specifies the sampling rate of the sounds played by an Atom player.
+ Atom player created with the ::criAtomPlayer_CreateAdxPlayer function can play back audio data with sampling rate + less than or equal to the value specified with max_sampling_rate.
+
+ \par Remarks: + The size of work memory necessary to create the Atom player can be reduced + by reducing the maximum sampling rate. + \attention + You cannot play back data exceeding the specified maximum sampling rate.
+ For example, if the maximum sampling rate is set to 24000, 48000Hz audio cannot be played + with the created Atom player.
+ (It is not down sampled and output.) + */ + CriSint32 max_sampling_rate; + + /*EN + \brief Whether to perform streaming playback + \par Description: + Specifies whether to perform streaming playback (playback from file) with Atom player.
+ If streaming_flag is set to CRI_FALSE, the created Atom player will support only on-memory data + playback (playback of memory address specified with the ::criAtomPlayer_SetData + function). (Playback from file is not possible.)
+ If streaming_flag is set to CRI_TRUE, the created Atom player will support on-memory data + playback and playback from file (playback of file specified with the ::criAtomPlayer_SetFile function or + ::criAtomPlayer_SetContentId function.
+ \par Supplement: + If streaming_flag is set to CRI_TRUE, resource for reading file is allocated + when creating Atom player.
+ Therefore, compared to when the streaming_flag is set to CRI_FALSE, more memory is + required to create the Atom player. + */ + CriBool streaming_flag; + + /*EN + \brief Sound renderer type + \par Description: + Specifies the type of sound renderer used by an Atom player.
+ If you specify CRIATOM_SOUND_RENDERER_DEFAULT as sound_renderer_type, + audio data is sent to the default sound renderer.
+ If you specify CRIATOM_SOUND_RENDERER_NATIVE as sound_renderer_type, + audio data is sent to sound output of each default platform.
+ If you specify CRIATOM_SOUND_RENDERER_ASR as sound_renderer_type, + audio data is sent to ASR (Atom Sound Renderer).
+ (ASR output destination is specified during ASR initialization.) + */ + CriAtomSoundRendererType sound_renderer_type; + + /*EN + \brief Decoder process latency + \par Description: + Specifies the decoder process latency.
+ When decode_latency is set to 0, the player will decode audio data with least amount of latency + when audio playback is started.
+ (During on-memory playback, sound output is started after executing the ::criAtomPlayer_Start function by decoding the + amount of data necessary to start playback in the + first server process.)
+ On the other hand, if decode_latency is set to 1, + the amount of data necessary to start playback is divided among several server processes.
+ (Even if on-memory playback, sound output is not started after executing the ::criAtomPlayer_Start function + until the number of server processes specified by decode_latency is executed).
+ \par Remarks: + The Atom player determines the amount of sound data to + decode per server process based on the data remaining in the sound buffer.
+ Since the sound buffer is empty before starting sound playback, + more data is decoded than during sound playback (around 2 to 4 times).
+ Since the sound data decode process load per player is small, + the processing load when starting to output each sound is not likely to be a problem.
+ However, if large amount of sound output requests are made simultaneously to 1V in an application, + the peak processing load of all players will be synchronized and the load may increase significantly.
+ When performing such control, local increase in processing load can be + avoided by increasing the value of decode_latency.
+
+ The default value of decode_latency is set to 0 in most environment.
+ However, in environment such as portable game machines where even a small change in load may have great effect on the application, + the default value may be set to 1 or greater.
+ (Refer to the result of applying the ::criAtomPlayer_SetDefaultConfigForAdxPlayer function + for the actually set value.)
+
+ Currently, decode_latency cannot be set to 4 or greater.
+ (If decode_latency is set to 4 or greater, it is changed to 3 within the library.)
+ */ + CriSint32 decode_latency; +} CriAtomAdxPlayerConfig; + +/*EN + * \ingroup ATOMLIB_PLAYER + * HCA player creation configuration structure + * \par Description: + * Structure for specifying the behavior when creating a player capable of HCA playback.
+ * This structure is specified as an argument of the ::criAtomPlayer_CreateHcaPlayer function.
+ *
+ * When a handle to the player is created, as much internal resources as needed are allocated for the player + * based on the settings specified in the structure.
+ * The size of the work area needed for the player varies depending on the parameters specified in the structure. + * \attention + * More members will be added in the future. So, when not using the ::criAtomPlayer_SetDefaultConfigForHcaPlayer + * macro, make sure to initialize the structure to zero before using it.
+ * (Make sure that no indefinite value is set to any member of the structure.) + * \sa criAtomPlayer_CreateHcaPlayer, criAtomPlayer_SetDefaultConfigForHcaPlayer + */ +typedef struct CriAtomHcaPlayerConfigTag { + /*EN + \brief Maximum number of output channels + \par Description: + Specifies the number of channels for the sounds played by an Atom player.
+ Atom player created with the ::criAtomPlayer_CreateHcaPlayer function can play back audio data with number of + output channels less than or equal to the number of channels specified with max_channels.
+ */ + CriSint32 max_channels; + + /*EN + \brief Maximum sampling rate + \par Description: + Specifies the sampling rate of the sounds played by an Atom player.
+ Atom player created with the ::criAtomPlayer_CreateHcaPlayer function can play back audio data with sampling rate + less than or equal to the value specified with max_sampling_rate.
+
+ \par Remarks: + The size of work memory necessary to create the Atom player can be reduced + by reducing the maximum sampling rate. + \attention + You cannot play back data exceeding the specified maximum sampling rate.
+ For example, if the maximum sampling rate is set to 24000, 48000Hz audio cannot be played + with the created Atom player.
+ (It is not down sampled and output.) + */ + CriSint32 max_sampling_rate; + + /*EN + \brief Whether to perform streaming playback + \par Description: + Specifies whether to perform streaming playback (playback from file) with Atom player.
+ If streaming_flag is set to CRI_FALSE, the created Atom player will support only on-memory data + playback (playback of memory address specified with the ::criAtomPlayer_SetData + function). (Playback from file is not possible.)
+ If streaming_flag is set to CRI_TRUE, the created Atom player will support on-memory data + playback and playback from file (playback of file specified with the ::criAtomPlayer_SetFile function or + ::criAtomPlayer_SetContentId function.
+ \par Supplement: + If streaming_flag is set to CRI_TRUE, resource for reading file is allocated + when creating Atom player.
+ Therefore, compared to when the streaming_flag is set to CRI_FALSE, more memory is + required to create the Atom player. + */ + CriBool streaming_flag; + + /*EN + \brief Sound renderer type + \par Description: + Specifies the type of sound renderer used by an Atom player.
+ If you specify CRIATOM_SOUND_RENDERER_DEFAULT as sound_renderer_type, + audio data is sent to the default sound renderer.
+ If you specify CRIATOM_SOUND_RENDERER_NATIVE as sound_renderer_type, + audio data is sent to sound output of each default platform.
+ If you specify CRIATOM_SOUND_RENDERER_ASR as sound_renderer_type, + audio data is sent to ASR (Atom Sound Renderer).
+ (ASR output destination is specified during ASR initialization.) + */ + CriAtomSoundRendererType sound_renderer_type; + + /*EN + \brief Decoder process latency + \par Description: + Specifies the decoder process latency.
+ When decode_latency is set to 0, the player will decode audio data with least amount of latency + when audio playback is started.
+ (During on-memory playback, sound output is started after executing the ::criAtomPlayer_Start function by decoding the + amount of data necessary to start playback in the + first server process.)
+ On the other hand, if decode_latency is set to 1, + the amount of data necessary to start playback is divided among several server processes.
+ (Even if on-memory playback, sound output is not started after executing the ::criAtomPlayer_Start function + until the number of server processes specified by decode_latency is executed).
+ \par Remarks: + The Atom player determines the amount of sound data to + decode per server process based on the data remaining in the sound buffer.
+ Since the sound buffer is empty before starting sound playback, + more data is decoded than during sound playback (around 2 to 4 times).
+ Since the sound data decode process load per player is small, + the processing load when starting to output each sound is not likely to be a problem.
+ However, if large amount of sound output requests are made simultaneously to 1V in an application, + the peak processing load of all players will be synchronized and the load may increase significantly.
+ When performing such control, local increase in processing load can be + avoided by increasing the value of decode_latency.
+
+ The default value of decode_latency is set to 0 in most environment.
+ However, in environment such as portable game machines where even a small change in load may have great effect on the application, + the default value may be set to 1 or greater.
+ (Refer to the result of applying the ::criAtomPlayer_SetDefaultConfigForAdxPlayer function + for the actually set value.)
+
+ Currently, decode_latency cannot be set to 4 or greater.
+ (If decode_latency is set to 4 or greater, it is changed to 3 within the library.)
+ */ + CriSint32 decode_latency; +} CriAtomHcaPlayerConfig; + +/*EN + * \ingroup ATOMLIB_PLAYER + * HCA-MX player creation configuration structure + * \par Description: + * Structure for specifying the behavior when creating a player capable of HCA-MX playback.
+ * This structure is specified as an argument of the ::criAtomPlayer_CreateHcaMxPlayer function.
+ *
+ * When a handle to the player is created, as much internal resources as needed are allocated for the player + * based on the settings specified in the structure.
+ * The size of the work area needed for the player varies depending on the parameters specified in the structure. + * \attention + * More members will be added in the future. So, when not using the ::criAtomPlayer_SetDefaultConfigForHcaMxPlayer + * macro, make sure to initialize the structure to zero before using it.
+ * (Make sure that no indefinite value is set to any member of the structure.) + * \sa criAtomPlayer_CreateHcaMxPlayer, criAtomPlayer_SetDefaultConfigForHcaMxPlayer + */ +typedef struct CriAtomHcaMxPlayerConfigTag { + /*EN + \brief Maximum number of output channels + \par Description: + Specifies the number of channels for the sounds played by an Atom player.
+ Atom player created with the ::criAtomPlayer_CreateHcaMxPlayer function can play back audio data with number of + output channels less than or equal to the number of channels specified with max_channels.
+ */ + CriSint32 max_channels; + + /*EN + \brief Maximum sampling rate + \par Description: + Specifies the sampling rate of the sounds played by an Atom player.
+ Atom player created with the ::criAtomPlayer_CreateHcaMxPlayer function can play back audio data with sampling rate + equal to the value specified with max_sampling_rate.
+
+ \par Remarks: + The size of work memory necessary to create the Atom player can be reduced + by reducing the maximum sampling rate. + \attention + You cannot play back data exceeding the specified maximum sampling rate.
+ For example, if the maximum sampling rate is set to 48000, 48000Hz audio cannot be played + with the created Atom player.
+ (It is not rate converted and output.) + */ + CriSint32 max_sampling_rate; + + /*EN + \brief Whether to perform streaming playback + \par Description: + Specifies whether to perform streaming playback (playback from file) with Atom player.
+ If streaming_flag is set to CRI_FALSE, the created Atom player will support only on-memory data + playback (playback of memory address specified with the ::criAtomPlayer_SetData + function). (Playback from file is not possible.)
+ If streaming_flag is set to CRI_TRUE, the created Atom player will support on-memory data + playback and playback from file (playback of file specified with the ::criAtomPlayer_SetFile function or + ::criAtomPlayer_SetContentId function.
+ \par Supplement: + If streaming_flag is set to CRI_TRUE, resource for reading file is allocated + when creating Atom player.
+ Therefore, compared to when the streaming_flag is set to CRI_FALSE, more memory is + required to create the Atom player. + */ + CriBool streaming_flag; +} CriAtomHcaMxPlayerConfig; + +/*EN + * \ingroup ATOMLIB_PLAYER + * WAVE player creation configuration structure + * \par Description: + * Structure for specifying the behavior when creating a player capable of WAVE playback.
+ * This structure is specified as an argument of the ::criAtomPlayer_CreateWavePlayer function.
+ *
+ * When a handle to the player is created, as much internal resources as needed are allocated for the player + * based on the settings specified in the structure.
+ * The size of the work area needed for the player varies depending on the parameters specified in the structure. + * \attention + * More members will be added in the future. So, when not using the ::criAtomPlayer_SetDefaultConfigForWavePlayer + * macro, make sure to initialize the structure to zero before using it.
+ * (Make sure that no indefinite value is set to any member of the structure.) + * \sa criAtomPlayer_CreateWavePlayer, criAtomPlayer_SetDefaultConfigForWavePlayer + */ +typedef struct CriAtomWavePlayerConfigTag { + /*EN + \brief Maximum number of output channels + \par Description: + Specifies the number of channels for the sounds played by an Atom player.
+ Atom player created with the ::criAtomPlayer_CreateWavePlayer function can play back audio data with number of + output channels less than or equal to the number of channels specified with max_channels.
+ */ + CriSint32 max_channels; + + /*EN + \brief Maximum sampling rate + \par Description: + Specifies the sampling rate of the sounds played by an Atom player.
+ Atom player created with the ::criAtomPlayer_CreateWavePlayer function can play back audio data with sampling rate + less than or equal to the value specified with max_sampling_rate.
+
+ \par Remarks: + The size of work memory necessary to create the Atom player can be reduced + by reducing the maximum sampling rate. + \attention + You cannot play back data exceeding the specified maximum sampling rate.
+ For example, if the maximum sampling rate is set to 24000, 48000Hz audio cannot be played + with the created Atom player.
+ (It is not down sampled and output.) + */ + CriSint32 max_sampling_rate; + + /*EN + \brief Whether to perform streaming playback + \par Description: + Specifies whether to perform streaming playback (playback from file) with Atom player.
+ If streaming_flag is set to CRI_FALSE, the created Atom player will support only on-memory data + playback (playback of memory address specified with the ::criAtomPlayer_SetData + function). (Playback from file is not possible.)
+ If streaming_flag is set to CRI_TRUE, the created Atom player will support on-memory data + playback and playback from file (playback of file specified with the ::criAtomPlayer_SetFile function or + ::criAtomPlayer_SetContentId function.
+ \par Supplement: + If streaming_flag is set to CRI_TRUE, resource for reading file is allocated + when creating Atom player.
+ Therefore, compared to when the streaming_flag is set to CRI_FALSE, more memory is + required to create the Atom player. + */ + CriBool streaming_flag; + + /*EN + \brief Sound renderer type + \par Description: + Specifies the type of sound renderer used by an Atom player.
+ If you specify CRIATOM_SOUND_RENDERER_DEFAULT as sound_renderer_type, + audio data is sent to the default sound renderer.
+ If you specify CRIATOM_SOUND_RENDERER_NATIVE as sound_renderer_type, + audio data is sent to sound output of each default platform.
+ If you specify CRIATOM_SOUND_RENDERER_ASR as sound_renderer_type, + audio data is sent to ASR (Atom Sound Renderer).
+ (ASR output destination is specified during ASR initialization.) + */ + CriAtomSoundRendererType sound_renderer_type; + + /*EN + \brief Decoder process latency + \par Description: + Specifies the decoder process latency.
+ When decode_latency is set to 0, the player will decode audio data with least amount of latency + when audio playback is started.
+ (During on-memory playback, sound output is started after executing the ::criAtomPlayer_Start function by decoding the + amount of data necessary to start playback in the + first server process.)
+ On the other hand, if decode_latency is set to 1, + the amount of data necessary to start playback is divided among several server processes.
+ (Even if on-memory playback, sound output is not started after executing the ::criAtomPlayer_Start function + until the number of server processes specified by decode_latency is executed).
+ \par Remarks: + The Atom player determines the amount of sound data to + decode per server process based on the data remaining in the sound buffer.
+ Since the sound buffer is empty before starting sound playback, + more data is decoded than during sound playback (around 2 to 4 times).
+ Since the sound data decode process load per player is small, + the processing load when starting to output each sound is not likely to be a problem.
+ However, if large amount of sound output requests are made simultaneously to 1V in an application, + the peak processing load of all players will be synchronized and the load may increase significantly.
+ When performing such control, local increase in processing load can be + avoided by increasing the value of decode_latency.
+
+ The default value of decode_latency is set to 0 in most environment.
+ However, in environment such as portable game machines where even a small change in load may have great effect on the application, + the default value may be set to 1 or greater.
+ (Refer to the result of applying the ::criAtomPlayer_SetDefaultConfigForAdxPlayer function + for the actually set value.)
+
+ Currently, decode_latency cannot be set to 4 or greater.
+ (If decode_latency is set to 4 or greater, it is changed to 3 within the library.)
+ */ + CriSint32 decode_latency; +} CriAtomWavePlayerConfig; + +/*EN + * \ingroup ATOMLIB_PLAYER + * Configuration structure for AIFF player creation + * \par Description: + * Structure for specifying the behavior when creating a player capable of AIFF playback.
+ * This structure is specified as an argument of the ::criAtomPlayer_CreateAiffPlayer function.
+ *
+ * As much internal resources as needed are allocated for the player depending on the settings specified in the structure + * when a handle to the player is created.
+ * The size of the work area needed for the player varies depending on the parameters specified in the structure. + * \attention + * More members will be added in the future. When not using the ::criAtomPlayer_SetDefaultConfigForAiffPlayer macro, + * make sure to initialize the structure to zero before use.
+ * (Make sure that no indefinite value is set to any member of the structure.) + * \sa criAtomPlayer_CreateAiffPlayer, criAtomPlayer_SetDefaultConfigForAiffPlayer + */ +typedef struct CriAtomAiffPlayerConfigTag { + /*EN + \brief Maximum number of output channels + \par Description: + Specifies the number of channels of the sound played by an Atom player.
+ An Atom player created with the ::criAtomPlayer_CreateAiffPlayer function can play back + audio data with up to the number of channels specified for max_channels.
+ */ + CriSint32 max_channels; + + /*EN + \brief Maximum sampling rate + \par Description: + Specifies the sampling rate of the sound played by an Atom player.
+ An Atom player created with the ::criAtomPlayer_CreateAiffPlayer function can play back + audio data with a sampling rate up to that specified for max_sampling_rate.
+
+ \par Remarks: + The size of work memory necessary to create the Atom player can be reduced + by decreasing the maximum sampling rate. + \attention + Any data that exceeds the specified maximum sampling rate will not be played.
+ For example, a 48,000 Hz sound cannot be played by an Atom player that was + created with a maximum sampling rate of 24000.
+ (It is not down sampled and output.) + */ + CriSint32 max_sampling_rate; + + /*EN + \brief Whether to perform streaming playback + \par Description: + Specifies whether to perform streaming playback (playback from file) with Atom player.
+ If streaming_flag is set to CRI_FALSE, the created Atom player will support only on-memory data + playback (playback of memory addresses specified with the ::criAtomPlayer_SetData + function. (Playback from a file is not possible.)
+ If streaming_flag is set to CRI_TRUE, the created Atom player supports both on-memory data + playback and playback from a file (playback of a file specified by the ::criAtomPlayer_SetFile or + ::criAtomPlayer_SetContentId functions).
+ \par Supplement: + If streaming_flag is set to CRI_TRUE, resources for loading files are allocated when + the Atom player is created.
+ Therefore, compared to when the streaming_flag is set to CRI_FALSE, more memory is + required to create the Atom player. + */ + CriBool streaming_flag; + + /*EN + \brief Sound renderer type + \par Description: + Specifies the type of sound renderer used by an Atom player.
+ When CRIATOM_SOUND_RENDERER_DEFAULT is specified as the sound_renderer_type, + audio data is transferred to the default sound renderer.
+ When CRIATOM_SOUND_RENDERER_NATIVE is specified as the sound_renderer_type, + audio data is transferred to the default sound output of each platform.
+ When CRIATOM_SOUND_RENDERER_ASR is specified as the sound_renderer_type, + audio data is transferred to the ASR (Atom Sound Renderer).
+ (The ASR output destination is specified during ASR initialization.) + */ + CriAtomSoundRendererType sound_renderer_type; + + /*EN + \brief Decoder process latency + \par Description: + Specifies the decoder process latency.
+ When decode_latency is set to 0, the player will decode audio data with the least amount of latency + when audio playback is started.
+ (During on-memory playback, sound output is started after executing the ::criAtomPlayer_Start function and decoding the + amount of data necessary to start playback in the + first server process.)
+ On the other hand, if decode_latency is set to 1, + the amount of data necessary to start playback is divided among several server processes.
+ (Even for on-memory playback, sound output is not started after executing the ::criAtomPlayer_Start function + until the number of server processes specified by decode_latency is executed).
+ \par Remarks: + The Atom player determines the amount of sound data to + decode per server process based on the data remaining in the sound buffer.
+ Since the sound buffer is empty before starting sound playback, + more data is decoded than during sound playback (around 2 to 4 times).
+ Since the sound data decode process load per player is small, + the processing load when starting to output each sound is not likely to be a problem.
+ However, if large amount of sound output requests are made simultaneously to 1V in an application, + the peak processing load of all players will be synchronized and the load may increase significantly.
+ When performing such control, local increase in processing load can be + avoided by increasing the value of decode_latency.
+
+ The default value of decode_latency is set to 0 in most environments.
+ However, in environments such as portable game devices where even a small change in load may have great effect on the application, + the default value may be set to 1 or greater.
+ (Refer to the result of applying the ::criAtomPlayer_SetDefaultConfigForAdxPlayer function + for the actual set value.)
+
+ Currently, decode_latency cannot be set to 4 or greater.
+ (If decode_latency is set to 4 or greater, it is changed to 3 within the library.)
+ */ + CriSint32 decode_latency; +} CriAtomAiffPlayerConfig; + +/*EN + * \ingroup ATOMLIB_PLAYER + * Raw PCM player creation configuration structure + * \par Description: + * Structure for specifying the behavior when creating a player capable of raw PCM playback.
+ * This structure is specified as an argument of the ::criAtomPlayer_CreateRawPcmPlayer function.
+ *
+ * When a handle to the player is created, as much internal resources as needed are allocated for the player + * based on the settings specified in the structure.
+ * The size of the work area needed for the player varies depending on the parameters specified in the structure. + * \attention + * More members will be added in the future. So, when not using the ::criAtomPlayer_SetDefaultConfigForRawPcmPlayer + * macro, make sure to initialize the structure to zero before using it.
+ * (Make sure that no indefinite value is set to any member of the structure.) + * \sa criAtomPlayer_CreateRawPcmPlayer, criAtomPlayer_SetDefaultConfigForRawPcmPlayer + */ +typedef struct CriAtomRawPcmPlayerConfigTag { + /*EN + \brief PCM data format + \par Description: + Specifies the PCM data format played by the Atom player.
+ \attention + RawPCM format data other than the specified format cannot be played.
+ The sound data will be played back as the specified format, regardless of what format the sound data actually is.
+ */ + CriAtomPcmFormat pcm_format; + + /*EN + \brief Maximum number of output channels + \par Description: + Specifies the number of channels for the sounds played by an Atom player.
+ Atom player created with the ::criAtomPlayer_CreateRawPcmPlayer function can play back audio data with number of + output channels less than or equal to the number of channels specified with max_channels.
+ \attention + RawPCM format data other than the specified format cannot be played.
+ The sound data will be played back as the specified format, regardless of what format the sound data actually is.
+ */ + CriSint32 max_channels; + + /*EN + \brief Maximum sampling rate + \par Description: + Specifies the sampling rate of the sounds played by an Atom player.
+ Atom player created with the ::criAtomPlayer_CreateRawPcmPlayer function can play back audio data with sampling rate + less than or equal to the value specified with max_sampling_rate.
+
+ \par Remarks: + The size of work memory necessary to create the Atom player can be reduced + by reducing the maximum sampling rate. + \attention + Data that is different from the specified sampling rate cannot be played.
+ The sound data will be played back in the specified sampling rate, regardless of what format the sound data actually is.
+ */ + CriSint32 max_sampling_rate; + + /*EN + \brief Sound renderer type + \par Description: + Specifies the type of sound renderer used by an Atom player.
+ If you specify CRIATOM_SOUND_RENDERER_DEFAULT as sound_renderer_type, + audio data is sent to the default sound renderer.
+ If you specify CRIATOM_SOUND_RENDERER_NATIVE as sound_renderer_type, + audio data is sent to sound output of each default platform.
+ If you specify CRIATOM_SOUND_RENDERER_ASR as sound_renderer_type, + audio data is sent to ASR (Atom Sound Renderer).
+ (ASR output destination is specified during ASR initialization.) + */ + CriAtomSoundRendererType sound_renderer_type; + + /*EN + \brief Decoder process latency + \par Description: + Specifies the decoder process latency.
+ When decode_latency is set to 0, the player will decode audio data with least amount of latency + when audio playback is started.
+ (During on-memory playback, sound output is started after executing the ::criAtomPlayer_Start function by decoding the + amount of data necessary to start playback in the + first server process.)
+ On the other hand, if decode_latency is set to 1, + the amount of data necessary to start playback is divided among several server processes.
+ (Even if on-memory playback, sound output is not started after executing the ::criAtomPlayer_Start function + until the number of server processes specified by decode_latency is executed).
+ \par Remarks: + The Atom player determines the amount of sound data to + decode per server process based on the data remaining in the sound buffer.
+ Since the sound buffer is empty before starting sound playback, + more data is decoded than during sound playback (around 2 to 4 times).
+ Since the sound data decode process load per player is small, + the processing load when starting to output each sound is not likely to be a problem.
+ However, if large amount of sound output requests are made simultaneously in an application during 1V, + the peak processing load of all players will be synchronized and the load may increase significantly.
+ When performing such control, local increase in processing load can be + avoided by increasing the value of decode_latency.
+
+ The default value of decode_latency is set to 0 in most environment.
+ However, in environment such as portable game machines where even a small change in load may have great effect on the application, + the default value may be set to 1 or greater.
+ (Refer to the result of applying the ::criAtomPlayer_SetDefaultConfigForRawPcmPlayer function + for the actually set value.)
+
+ Currently, decode_latency cannot be set to 4 or greater.
+ (If decode_latency is set to 4 or greater, it is changed to 3 within the library.)
+ */ + CriSint32 decode_latency; +} CriAtomRawPcmPlayerConfig; + +/*EN + * \brief Playback status + * \ingroup ATOMLIB_PLAYER + * \par Description: + * Indicates the playback status of an Atom Player.
+ * The value of the playback status can be acquired by using the ::criAtomPlayer_GetStatus function. + *
+ * Usually, the playback status changes in the following order.
+ * -# CRIATOMPLAYER_STATUS_STOP + * -# CRIATOMPLAYER_STATUS_PREP + * -# CRIATOMPLAYER_STATUS_PLAYING + * -# CRIATOMPLAYER_STATUS_PLAYEND + * . + * Immediately after an Atom Player is created, the player is in a stop status (CRIATOMPLAYER_STATUS_STOP).
+ * By setting data using a function such as the ::criAtomPlayer_SetData function and then executing the ::criAtomPlayer_Start function, + * the player enters a playback preparation status (CRIATOMPLAYER_STATUS_PREP) and starts preparing for playback.
+ * Once a sufficient amount of data is provided and the playback is ready, the player enters a playback status (CRIATOMPLAYER_STATUS_PLAYING) + * and starts audio playback.
+ * When the playback of all data that have been set is complete, the player enters a playback completion status + * (CRIATOMPLAYER_STATUS_PLAYEND). + * \par Remarks: + * If the ::criAtomPlayer_Stop function is executed during playback, the status eventually returns to + * CRIATOMPLAYER_STATUS_STOP regardless of the above flow.
+ * (Depending on when the ::criAtomPlayer_Stop function is called, it may take time + * to change the status to CRIATOMPLAYER_STATUS_STOP.)
+ * Also, during playback, if an invalid data is read or file access fails, + * the status changes to CRIATOMPLAYER_STATUS_ERROR regardless of the above flow. + * \attention + * When the status is CRIATOMPLAYER_STATUS_PREP or CRIATOMPLAYER_STATUS_PLAYING, + * data cannot be set ( ::criAtomPlayer_SetData function) and playback cannot be started ( ::criAtomPlayer_Start + * function).
+ * In order to stop the currently playing Atom player and play another data, you must first stop playback with the ::criAtomPlayer_Stop + * function and then set/play the next data after the status changes to CRIATOMPLAYER_STATUS_STOP. + * \sa criAtomPlayer_GetStatus, criAtomPlayer_SetData, criAtomPlayer_Start, criAtomPlayer_Stop + */ +typedef enum CriAtomPlayerStatusTag { + CRIATOMPLAYER_STATUS_STOP = 0, /*EN< Stopped */ + CRIATOMPLAYER_STATUS_PREP = 1, /*EN< In preparation for playback */ + CRIATOMPLAYER_STATUS_PLAYING = 2, /*EN< In playback */ + CRIATOMPLAYER_STATUS_PLAYEND = 3, /*EN< Playback ended */ + CRIATOMPLAYER_STATUS_ERROR = 4, /*EN< An error occurred */ + + /* enum size is 4bytes */ + CRIATOMPLAYER_STATUS_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomPlayerStatus; + +struct CriAtomPlayerTag; +/*EN + * \brief Atom player handle + * \ingroup ATOMLIB_PLAYER + * \par Description: + * Handle for operating a player created for audio playback.
+ * When the ::criAtomPlayer_CreateAdxPlayer function is used for creating a player for audio playback, + * the function returns this "Atom player handle" for operating the player. + *
+ * Atom player is an abstracted player object that provides an interface for playback control + * that does not rely on codec.
+ * The method of creating an Atom player depends on the playback sound codec. + * The API for the Atom player can be used in common to control the created player. + *
+ * All operations, such as setting data, starting playback, and acquiring status, performed to the player are operated + * through the Atom player handle.
+ * \sa criAtomPlayer_CreateAdxPlayer + */ +typedef struct CriAtomPlayerTag *CriAtomPlayerHn; + +/*EN + * \brief Data request callback function + * \ingroup ATOMLIB_PLAYER + * \par Description: + * \param[in] obj user specified object + * \param[in] player Atom player handle + * \return None + * \par Description: + * Callback function for specifying the data to playback next.
+ * Use this to seamlessly concatenate and play back multiple sound data.
+ *
+ * Use the ::criAtomPlayer_SetDataRequestCallback function to register the callback function.
+ * The registered callback function is executed when the Atom player requests + * the concatenated playback data.
+ * (The callback function is executed when requesting the data to + * playback next after the previous data is read.) + * When data is set in Atom player from this function using the ::criAtomPlayer_SetData function, + * the set data is seamlessly concatenated to the currently playing data and played back continuously.
+ * Also, if the ::criAtomPlayer_SetPreviousDataAgain function is executed within this function, + * the same data can be played back repeatedly. + * \par Remarks: + * If data is not specified within this function, after playback of the current data is finished, + * the Atom player status changes to CRIATOMPLAYER_STATUS_PLAYEND.
+ *
+ * If you cannot specify the data due to timing but do not want the status to change to + * CRIATOMPLAYER_STATUS_PLAYEND, + * execute the ::criAtomPlayer_DeferCallback function within the callback function.
+ * By executing the ::criAtomPlayer_DeferCallback function, the data request callback function is + * called once more after approximately 1V. (The callback process can be retried.)
+ * However, playback may be interrupted when the ::criAtomPlayer_DeferCallback function is executed + * (there may be a certain amount of silence at the concatenation point).
+ * \attention + * Note that problems such as interruption of playback may occur if a process is blocked for an extended time within this callback function. + *
+ * \sa criAtomPlayer_SetDataRequestCallback, criAtomPlayer_SetData, + * criAtomPlayer_SetPreviousDataAgain, criAtomPlayer_DeferCallback + */ +typedef void (CRIAPI *CriAtomPlayerDataRequestCbFunc)(void *obj, CriAtomPlayerHn player); + +/*EN + * \brief Status change callback function + * \ingroup ATOMLIB_PLAYER + * \par Description: + * \param[in] obj user specified object + * \param[in] player Atom player handle + * \return None + * \par Description: + * Callback function that is called when the Atom player status is changed.
+ *
+ * Use the ::criAtomPlayer_SetStatusChangeCallback function to register the callback function.
+ * The registered callback function is executed when the Atom player status + * is updated.
+ * The changed status can be obtained by executing the + * ::criAtomPlayer_GetStatus function against the Atom player handle (player) passed with an argument. + * \par Remarks: + * Strictly speaking, the timing from status change to execution of the + * callback function may change because another process can interrupt and run during this interval.
+ * \attention + * Note that problems such as interruption of playback may occur if a process is blocked for an extended time within this callback function. + *
+ * \sa criAtomPlayer_SetStatusChangeCallback, criAtomPlayer_GetStatus + */ +typedef void (CRIAPI *CriAtomPlayerStatusChangeCbFunc)(void *obj, CriAtomPlayerHn player); + +/*EN + * \brief Parameters change callback function + * \ingroup ATOMLIB_PLAYER + * \par Description: + * \param[in] obj user specified object + * \param[in] player Atom player handle + * \param[in] id Parameter ID + * \param[in] value Parameter value + * \return None + * \par Description: + * Callback function that is called when the Atom player parameters is changed.
+ *
+ * Use the ::criAtomPlayer_SetParameterChangeCallback function to register the callback function.
+ * The registered callback function is executed when the Atom player parameter + * is updated.
+ * \attention + * Note that problems such as interruption of playback may occur if a process is blocked for an extended time within this callback function. + *
+ * \sa criAtomPlayer_SetParameterChangeCallback + */ +typedef void (CRIAPI *CriAtomPlayerParameterChangeCbFunc)(void *obj, + CriAtomPlayerHn player, CriAtomParameterId id, CriFloat32 value); + +/*EN + * \brief Wave filter callback function + * \ingroup ATOMLIB_PLAYER + * \par Description: + * \param[in] obj user specified object + * \param[in] format PCM format + * \param[in] num_channels number of channels + * \param[in] num_samples number of samples + * \param[in/out] data PCM data channel layout + * \return None + * \par Description: + * Callback function that receives decoded PCM data.
+ *
+ * Use the ::criAtomPlayer_SetFilterCallback function to register the callback function.
+ * When this callback function is registered, it is + * executed each time the Atom player decodes sound data.
+ *
+ * The address of an area containing the format of the PCM data, the number of channels in the PCM data, + * the number of samples accessible, and the actual PCM data is returned to the filter callback function.
+ * Since PCM data can be accessed directly within the callback function, + * it can be used for applications such as checking the amplitude of the sound during playback.
+ *
+ * Also, user unique effects can be applied to the PCM data + * because modification made to the PCM data within the callback function is reflected during playback.
+ * (However, modification that changes the data size such as time stretch process cannot be performed.)
+ * \par Remarks: + * The PCM data is separated per channel.
+ * (It is not interleaved.)
+ * The sixth argument (data array) contains the top address of each channel's PCM data array.
+ * (Not the top address of the two-dimensional array, but + * a one-dimensional pointer array containing the top address of each channel's PCM data array.)
+ *
+ * The PCM data format depends on the platform.
+ * The data format of the execution environment can be determined from the third argument (format).
+ * If the format of PCM data is 16 bit integer, format is CRIATOM_PCM_FORMAT_SINT16, + * if it is 32 bit floating-point, format is CRIATOM_PCM_FORMAT_FLOAT32.
+ * Not that the range of PCM data is different for each case.
+ * - CRIATOM_PCM_FORMAT_SINT16: -32768 to +32767 + * - CRIATOM_PCM_FORMAT_FLOAT32: -1.0f to +1.0f + * . + * (Because no clipping is performed during decoding, for CRIATOM_PCM_FORMAT_FLOAT32, + * value slightly exceeding the above range is possible.)
+ * \attention + * Note that problems such as interruption of playback may occur if a process is blocked for an extended time within this callback function.
+ * \sa criAtomPlayer_SetFilterCallback + */ +typedef void (CRIAPI *CriAtomPlayerFilterCbFunc)(void *obj, CriAtomPcmFormat format, + CriSint32 num_channels, CriSint32 num_samples, void *data[]); + +/*EN + * \brief Load request callback function + * \ingroup ATOMLIB_PLAYER + * \par Description: + * \param[in] obj User specified object + * \param[in] binder Binder to which the file is loaded + * \param[in] path File path + * \param[in] offset Load start position + * \param[in] length Load request size + * \return None + * \par Description: + * This callback function for debug is used to monitor the file load status of the Atom player.
+ * The ::criAtomPlayer_SetLoadRequestCallback function is used to register a callback function.
+ *
+ * The registered callback function is executed when the Atom player issues a request to load sound data.
+ * \par Note: + * \attention + * Note that if processes are blocked in the callback function for a long time, some problems, such as a playback interruption + * may occur.
+ * \sa criAtomPlayer_SetLoadRequestCallback + */ +typedef void (CRIAPI *CriAtomPlayerLoadRequestCbFunc)(void *obj, + CriFsBinderHn binder, const CriChar8 *path, CriSint64 offset, CriSint64 length); + +/*========================================================================== + * CRI Atom D-BAS API + *=========================================================================*/ +/*EN + * \brief Atom D-BAS ID + * \ingroup ATOMLIB_DBAS + * \par Description: + * ID for managing D-BAS.
+ * The ID can be acquired by creating D-BAS using the ::criAtomDbas_Create function. + *
+ * Applications use this D-BAS ID only for destroying D-BAS. + * \sa criAtomDbas_Create, criAtomDbas_Destroy + */ +typedef CriSint32 CriAtomDbasId; + +/*EN + * \brief D-BAS creation parameter structure + * \ingroup ATOMLIB_DBAS + * \par Description: + * D-BAS creation parameter structure specified as argument of the ::criAtomDbas_Create function.
+ *
+ * \attention + * More members will be added in the future. So, when not using the ::criAtomDbas_SetDefaultConfig + * macro, make sure to initialize the structure to zero before using it.
+ * (Make sure that no indefinite value is set to any member of the structure.) + * \sa criAtomDbas_Create, criAtomDbas_CalculateWorkSize, criAtomDbas_SetDefaultConfig + */ +typedef struct CriAtomDbasConfigTag { + /*EN + \brief D-BAS identifier + \par Description: + Identifier specified by the application when creating a D-BAS.
+ It is used to explicitly specify the D-BAS used by the application.
+ */ + CriUint32 identifier; /*EN< D-BAS identifier */ + /*EN + \brief Maximum number of streaming + \par Description: + Specifies the instantaneous maximum number of streamings managed by D-BAS.
+ The number of movie data streams played back by Sofdec2 must also be considered in addition to audio.
+ For example, assume that scene A has two sources of audio data + and scene B has one source of audio data and two sources of movie data for streaming playback.
+ In this case, set the instantaneous maximum number of streams to 3 as in scene B.
+ In other words, you must set the value that anticipates the worst possible state for the number of streams throughout the entire application. + */ + CriSint32 max_streams; + /*EN + \brief Maximum bit rate + \par Description: + Specifies the instantaneous maximum bit rate for the entire streaming.
+ For this value, set the consumed bit rate peak value + for streaming playback throughout the entire application.
+ The consumed bit rate for movie data played back by Sofdec2 must also be considered in addition to audio.
+ For example, assume that scene A has four sources of audio data and scene B has one source of movie data for streaming playback.
+ In this case, if the consumed bit rate for the one source of movie data is greater than that of the four sources of audio data,
+ you should set the consumed bit rate for the movie data.
+ In other words, you must set the value that anticipates the worst possible state for the consumed bit rate throughout the entire application. + */ + CriSint32 max_bps; + /*EN + \brief Maximum number of streams played back by CRI Mana + \par Description: + Specifies the instantaneous maximum number of streams played back by CRI Mana.
+ In the memory usage calculations for D-BAS, this value is subtracted from max_streams
+ and the resulting value is considered the maximum number of CRI Atom streams.
+ Set this value to 0 if not performing any CRI Mana streaming playback.
+ */ + CriSint32 max_mana_streams; + /*EN + \brief Maximum bit rate for CRI Mana playback + \par Description: + Specifies the instantaneous maximum bit rate for CRI Mana playback.
+ In the memory usage calculations for D-BAS, this value is subtracted from max_bps
+ and the resulting value is considered the maximum bit rate for CRI Atom.
+ Set this value to 0 if not performing any CRI Mana streaming playback.
+ */ + CriSint32 max_mana_bps; + /*EN + \brief Minimum number of guaranteed buffers assigned to one stream + \par Description: + Specifies the minimum number of guaranteed buffers assigned to one stream. Specify the number of buffers.
+ Because buffers are managed per block inside ADX2, + one buffer block is assigned even to an odd data size, + such as the end of a file and the beginning of a loop.
+ During one-shot streaming playback, + streaming is not interrupted, + even for a simple process of loading data with double buffering.
+ On the other hand, for data with loops, if one block is used + for small data both at the end and the beginning of a loop,
+ streaming is interrupted in spite of very small buffered data, + because no buffer is available for reading the next data.
+ This parameter affects the size of the streaming buffer allocated by D-BAS.
+ If it is sufficiently verified that no interruptions occur, + the lower limit of this parameter is ::CRIATOMDBAS_MINIMUM_NUM_SECUREMENT_BUFFERS.
+ */ + CriSint32 num_securement_buffers; +} CriAtomDbasConfig; + +/* ========================================================================*/ +/* CRI Atom Streaming Cache API */ +/* ========================================================================*/ +/*EN + * \brief Streaming cache ID + * \ingroup ATOMLIB_STREAMING_CACHE + * \par Description: + * ID used for managing the streaming cache.
+ * It can be obtained by creating a streaming cache with the ::criAtomStreamingCache_Create function.
+ * \sa criAtomStreamingCache_Create + */ +typedef CriUintPtr CriAtomStreamingCacheId; + +/*EN + * \brief Streaming cache creation configuration structure + * \ingroup ATOMLIB_PLAYER + * \par Description: + * Structure for registering the file size that can be + * cached when creating a streaming cache for the player.
+ * It is specified as argument of the ::criAtomStreamingCache_CalculateWorkSize function and + * ::criAtomStreamingCache_Create function.
+ *
+ * \attention + * Be sure to zero clear the structure before using because members may be added in the future.
+ * (Make sure that no indefinite value is set to any member of the structure.) + * \sa criAtomStreamingCache_CalculateWorkSize, criAtomStreamingCache_Create + */ +typedef struct CriAtomStreamingCacheConfigTag { + /*EN + \brief Maximum path length of cached file + \par Description: + Specifies the maximum path length of the file to be cached in streaming cache.
+ */ + CriSint32 max_path; + /*EN + \brief Maximum number of files that can be cached + \par Description: + Specifies the number of files that can be cached in streaming cache.
+ */ + CriSint32 max_files; + /*EN + \brief File size that can be cached + \par Description: + Specifies the file size that can be cached in streaming cache.
+ File exceeding the size specified with this parameter cannot be cached.
+ Also, size equal to or greater than the size specified with this parameter + is requested as the required work size of streaming cache.
+ */ + CriSint32 cache_size; +} CriAtomStreamingCacheConfig; + +/* ========================================================================*/ +/* CRI Atom DSP API */ +/* ========================================================================*/ + +/*EN + * \brief Pitch shift attach parameter structure + * \ingroup ATOMLIB_DSP + * \par Description: + * A parameter that is specified when attaching the pitch shifter DSP.
+ * It is specified as the member of the ::CriAtomExDspPitchShifterConfig structure + * to the ::criAtomExVoicePool_AttachPitchShifter function.
+ * \sa criAtomExVoicePool_AttachPitchShifter + */ +typedef struct CriAtomDspPitchShifterConfigTag { + /*EN + \brief Pitch shift mode + \par Description: + Specifies the pitch shift processing method (algorithm).
+ Changing this setting according to sound may improve sound quality.
+ The following are the allowed values and the corresponding mode name:
+ 0: Music
+ 1: Vocal
+ 2: SoundEffect
+ 3: Speech
+ */ + CriSint32 mode; + + /*EN + \brief Window size + \par Description: + Specifies the unit for pitch shift processing.
+ Changing this setting according to sound may improve sound quality.
+ The allowed values are: 128, 256, 512, 1024, and 2048.
+ */ + CriSint32 window_size; + + /*EN + \brief Overlap count + \par Description: + Specifies the overlap count for the pitch shift result.
+ Increasing this value improves quality but processing load is increased.
+ The allowed values are: 1, 2, 4, and 8.
+ */ + CriSint32 overlap_times; +} CriAtomDspPitchShifterConfig; + +/*EN + * \brief Parameter for the pitch shifter + * \ingroup ATOMLIB_DSP + * \par Description: + * Parameter specified for the pitch shifter DSP.
+ * Specified for the param_id of ::criAtomExPlayer_SetDspParameter function. + * \sa criAtomExPlayer_SetDspParameter + */ +typedef enum CriAtomDspPitchShifterParameterIdTag { + /*EN + \brief Pitch + \par Description: + Amount of pitch shift by the pitch shifter.
+ The unit is cent.
+ The valid range of the value is -2400 to 2400.
+ \par Remarks: + When the value is 1200, the pitch is doubled from the original sound. When the value is -1200, the pitch is halved.
+ */ + CRIATOMDSP_PITCHSHIFTER_PARAM_PITCH = 0, + + /*EN + \brief Formant + \par Description: + Amount of formant shift by the pitch shifter.
+ The unit is cent.
+ The valid range of the value is -2400 to 2400.
+ \par Remarks: + When the value is 1200, the formant is doubled from the original sound. When the value is -1200, the formant is halved.
+ \attention + The formant shift is valid only when the pitch-shift mode
+ is Vocal or Speech.
+ */ + CRIATOMDSP_PITCHSHIFTER_PARAM_FORMANT = 1, + + /*EN + \brief Pitch-shift mode + \par Description: + Specifies the pitch shift processing method (algorithm).
+ Depending on the sound, sound quality may be improved by changing this setting.
+ Permitted values and their corresponding mode names are as follows:
+ 0: Music
+ 1: Vocal
+ 2: SoundEffect
+ 3: Speech
+ */ + CRIATOMDSP_PITCHSHIFTER_PARAM_MODE = 2 +} CriAtomDspPitchShifterParameterId; + +/*EN + * \brief Parameter structure for time stretching + * \ingroup ATOMLIB_DSP + * \par Description: + * Parameter specified when attaching a time-stretching DSP.
+ * Specify this parameter for the ::criAtomExVoicePool_AttachDspTimeStretch function, + * as a member of the ::CriAtomExDspTimeStretchConfig structure.
+ * \sa criAtomExVoicePool_AttachDspTimeStretch + */ +typedef struct CriAtomDspTimeStretchConfigTag { + CriSint32 reserved; +} CriAtomDspTimeStretchConfig; + +/*EN + * \brief Parameter for time stretching + * \ingroup ATOMLIB_DSP + * \par Description: + * Parameter specified for the time-stretching DSP.
+ * Specify this parameter for param_id of the ::criAtomExPlayer_SetDspParameter function. + * \sa criAtomExPlayer_SetDspParameter + */ +typedef enum CriAtomDspTimeStretchParameterIdTag { + /*EN + \brief Stretch ratio + \par Description: + Scale factor for the playback time.
+ The playback time of a stretched playback is calculated by multiplying the playback time of the original data by this ratio.
+ The valid range of ratio is 0.5f to 2.0f.
+ \attention + Note that the value specifies the scale factor for the "playback time," and not the playback speed.
+ To specify the stretch ratio in terms of playback speed, + set the ratio to the inverse of the scale factor for the desired playback speed.
+ */ + CRIATOMDSP_TIMESTRETCH_PARAM_RATIO = 0, + + /*EN + \brief Frame time + \par Description: + The frame time (in milliseconds) for time stretching.
+ Sound quality can be improved by adjusting this value according to the type of sound.
+ The valid range of frame_time is 10 to 60.
+ \par Remarks: + For optimal quality, set the frame time to around 20 msec for voices, and around 50 msec for music.
+ */ + CRIATOMDSP_TIMESTRETCH_PARAM_FRAME_TIME = 1, + + /*EN + \brief Quality + \par Description: + Quality of time stretching.
+ Time stretch queality can be improved by adjusting this value, but high quality cause high cpu usage.
+ The valid range of quality is 0 to 10.
+ \par Remarks: + Low quality value is enough for sound of voices, but not for music.
+ */ + CRIATOMDSP_TIMESTRETCH_PARAM_QUALITY = 2 +} CriAtomDspTimeStretchParameterId; + +/*EN + * \brief Parameter structure for spectrum analyzer creation + * \ingroup ATOMLIB_DSP + * \par Description: + * Parameter specified when attaching a spectrum analyzer.
+ * Used as an argument of the ::criAtomDspSpectra_Create function.
+ * \sa criAtomDspSpectra_Create + */ +typedef struct CriAtomDspSpectraConfigTag { + /*EN + \brief Number of spectrum divisions + \par Description: + Specifies how many sections to divide the frequency axis up into for measurement.
+ The return value of the ::criAtomDspSpectra_GetLevels function (CriFloat32 array) + will be the same length as the number specified for this parameter.
+ */ + CriUint32 num_bands; +} CriAtomDspSpectraConfig; + +/* Spectrum analyzer handle */ +struct CriAtomDspSpectraObj; +typedef struct CriAtomDspSpectraObj *CriAtomDspSpectraHn; + +/* ========================================================================*/ +/* CRI Atom Meter API */ +/* ========================================================================*/ + +/*EN + * \brief Configuration structure for adding level meter function + * \ingroup ATOMLIB_METER + * \par Description: + * Structure for adding the level meter function.
+ * This structure is specified as an argument of the ::criAtomMeter_AttachLevelMeter function.
+ * \par Remarks: + * If using default settings, set the default parameters to the structure using the +* ::criAtomMeter_SetDefaultConfigForLevelMeter macro, then specify the structure +* to the ::criAtomMeter_AttachLevelMeter function.
+ * \attention + * More members will be added in the future. When not using the ::criAtomMeter_SetDefaultConfigForLevelMeter macro, + * make sure to initialize the structure to zero before use.
+ * (Make sure that no indefinite value is set to any member of the structure.) + * \sa criAtomMeter_AttachLevelMeter + */ +typedef struct { + /*EN + \brief Measurement interval (in milliseconds) + \par Description: + Interval for updating measurement results.
+ */ + CriSint32 interval; + + /*EN + \brief Peak hold time (in milliseconds) + \par Description: + Duration for which the peak value is held when it is updated by a larger value, so that it does not decrease immediately.
+ */ + CriSint32 hold_time; +} CriAtomLevelMeterConfig; + +/*EN + * \brief Level information + * \ingroup ATOMLIB_METER + * \par Description: + * Structure for acquiring level information.
+ * This is used in the ::criAtomMeter_GetLevelInfo function. + * \par Remarks: + * The unit used for level values is dB.
+ * \sa criAtomMeter_GetLevelInfo + */ +typedef struct CriAtomLevelInfoTag { + /*EN + \brief Number of valid channels + \par Description: + The number of channels with valid measurement results.
+ */ + CriSint32 num_channels; + + /*EN + \brief RMS level + \par Description: + Calculated RMS (root mean square) of the sound amplitude within a measurement interval.
+ This is handled as the sound pressure level. + */ + CriFloat32 rms_levels[8]; + + /*EN + \brief Peak level + \par Description + Maximum value of the sound amplitude within a measurement interval.
+ */ + CriFloat32 peak_levels[8]; + + /*EN + \brief Peak hold level + \par Description + Peak level value being held.
+ */ + CriFloat32 peak_hold_levels[8]; +} CriAtomLevelInfo; + +/*EN + * \brief Configuration structure for adding the loudness meter function + * \ingroup ATOMLIB_METER + * This is the configuration structure for adding the loudness meter function.
+ * This structure is specified as an argument of the ::criAtomMeter_AttachLoudnessMeter function.
+ * \par Remarks: + * If using default settings, set the default parameters to the structure using the +* ::criAtomMeter_SetDefaultConfigForLoudnessMeter macro, then specify the structure +* to the ::criAtomMeter_AttachLoudnessMeter function.
+ * \attention + * More members will be added in the future. When not using the ::criAtomMeter_SetDefaultConfigForLoudnessMeter macro, + * make sure to initialize the structure to zero before use.
+ * (Make sure that no indefinite value is set to any member of the structure.) + * \sa criAtomMeter_AttachLoudnessMeter + */ +typedef struct { + /*EN + \brief Short-term measurement time + \par Description: + The measurement time (in seconds) for short-term average loudness.
+ The standard setting is 3 seconds.
+ */ + CriSint32 short_term_time; + + /*EN + \brief Integrated measurement time + \par Description: + The measurement time (in seconds) for long-term average loudness.
+ The integrated value is the average loudness per content unit.
+ */ + CriSint32 integrated_time; +} CriAtomLoudnessMeterConfig; + +/*EN + * \brief Loudness information + * \ingroup ATOMLIB_METER + * \par Description: + * Structure for acquiring loudness information.
+ * This is used in the ::criAtomMeter_GetLoudnessInfo function. + * \par Remarks: + * The unit used for level values is LKFS.
+ * \sa criAtomMeter_GetLoudnessInfo + */ +typedef struct CriAtomLoudnessInfoTag { + /*EN + \brief Measurement count + \par Description: + The number of measurements taken.
+ One measurement is taken every 0.1 second.
+ */ + CriSint32 count; + /*EN + \brief Momentary value + \par Description: + The instantaneous loudness level.
+ */ + CriFloat32 momentary; + /*EN + \brief Short-term value + \par Description: + The short-term average loudness level.
+ */ + CriFloat32 short_term; + /*EN + \brief Integrated value + \par Description: + The long-term average loudness level.
+ */ + CriFloat32 integrated; +} CriAtomLoudnessInfo; + +/*EN + * \brief Configuration structure for adding the true peak meter function. + * \ingroup ATOMLIB_METER + * This is the configuration structure for adding the true peak meter function.
+ * This structure is specified as an argument of the ::criAtomMeter_AttachTruePeakMeter function.
+ * \par Remarks: + * If using default settings, set the default parameters to the structure using the +* ::criAtomMeter_SetDefaultConfigForTruePeakMeter macro, then specify the structure +* to the ::criAtomMeter_AttachTruePeakMeter function.
+ * \attention + * More members will be added in the future. When not using the ::criAtomMeter_SetDefaultConfigForTruePeakMeter macro, + * make sure to initialize the structure to zero before use.
+ * (Make sure that no indefinite value is set to any member of the structure.) + * \sa criAtomMeter_AttachTruePeakMeter + */ +typedef struct { + /*EN + \brief Clipping + \par Description: + Flag that designates whether to clip the waveform sample before measurement.
+ Flag that designates whether to clip the waveform sample before measurement.
+ */ + CriBool sample_clipping; + + /*EN + \brief Measurement interval (in milliseconds) + \par Description: + Interval for updating measurement results.
+ */ + CriSint32 interval; + + /*EN + \brief Hold time (in milliseconds) + \par Description + Duration for which the peak value is held when it is updated by a larger value, so that it does not decrease immediately.
+ */ + CriSint32 hold_time; +} CriAtomTruePeakMeterConfig; + +/*EN + * \brief True peak information + * \ingroup ATOMLIB_METER + * \par Description: + * Structure for acquiring true peak information.
+ * This is used in the ::criAtomMeter_GetTruePeakInfo function. + * \par Remarks: + * The unit used for level values is dB.
+ * \sa criAtomMeter_GetTruePeakInfo + */ +typedef struct CriAtomTruePeakInfoTag { + /*EN + \brief Number of valid channels + \par Description: + The number of channels with valid measurement results.
+ */ + CriSint32 num_channels; + + /*EN + \brief True Peak Level + \par Description: + It is the measurement result of the true peak meter.
+ */ + CriFloat32 levels[8]; + + /*EN + \brief Peak Hold Level + \par Description: + It is the peak level being held.
+ */ + CriFloat32 hold_levels[8]; +} CriAtomTruePeakInfo; + +/*************************************************************************** + * 変数宣言 + * Prototype Variables + ***************************************************************************/ + +/*************************************************************************** + * 関数宣言 + * Prototype Functions + ***************************************************************************/ +#ifdef __cplusplus +extern "C" { +#endif + +/*========================================================================== + * CRI Atom API + *=========================================================================*/ +/*EN + * \brief Get library version + * \ingroup ATOMLIB_GLOBAL + * \return CriUint32 Version + * \par Description: + * Obtains the library version.
+ * If the value obtained with this function differs from the + * value of CRI_ATOM_VERSION in the header file ( cri_atom.h ), the version of the included header may + * not match the version of the linked library.
+ * (Check the include path and library path set in the build environment.)
+ * \par Remarks: + * The following code can be used during debugging to detect the difference in the library and header version.
+ * \code + * : + * // Check library and header consistency + * assert(CRI_ATOM_VERSION == criAtom_GetVersionNumber()); + * : + * \endcode + */ +CriUint32 CRIAPI criAtom_GetVersionNumber(void); + +/*EN + * \brief Calculate work area size required for initializing library + * \ingroup ATOMLIB_GLOBAL + * \param[in] config configuration structure for initialization + * \return CriSint32 work area size + * \retval >= 0 successfully completed + * \retval -1 error occurred + * \par Description: + * Obtains the size of the work area required to use the CRI Atom library.
+ *
+ * If work area size calculation fails, this function returns -1.
+ * The reason for work area size calculation failure can be determined by viewing the error callback message.
+ * \par Remarks: + * The work area size required for the CRI Atom library varies depending on + * the content of the library initialization configuration structure ( ::CriAtomConfig ).
+ *
+ * If you specify NULL as argument, the work area size is calculated using the default setting + * (i.e., the same parameters as when ::criAtom_SetDefaultConfig is used) are used + * for calculating the work area size. + *
+ * Information in argument config is referenced only within the function.
+ * It is not referenced after exiting the function and its area can be released + * after executing the function. + * \sa CriAtomConfig, criAtom_Initialize + */ +CriSint32 CRIAPI criAtom_CalculateWorkSize(const CriAtomConfig *config); + +/*EN + * \brief Initialize library + * \ingroup ATOMLIB_GLOBAL + * \param[in] config configuration structure for initialization + * \param[in] work work area + * \param[in] work_size work area size + * \par Description: + * Initializes the CRI Atom library.
+ * Before using the features of the library, always execute this function.
+ * (After this function is executed, the features of the library are available until the ::criAtom_Finalize function + * is executed.)
+ *
+ * To initialize the library, you must allocate a memory area (work area) + * internally used by the library.
+ * There are two methods to allocate the work area.
+ * (a) User Allocator method: This method uses a user-prepared function to allocate/deallocate the memory.
+ * (b) Fixed Memory method: This method passes a necessary memory area directly to the library.
+ *
+ * When using the User Allocator method, the user must register a memory allocation function to the CRI Atom library.
+ * By specifying NULL for work and 0 for work_size, and then calling this function, + * the library can use the registered memory allocation function to automatically allocate a necessary memory area.
+ * The user does not need to prepare the work area.
+ * The memory area allocated at initialization is released when the library is finalized (by executing the ::criAtom_Finalize function).
+ *
+ * When using the Fixed Memory method, you must set a separately allocated memory + * for this function as work area.
+ * The size of the work area can be obtained with the ::criAtom_CalculateWorkSize function.
+ * Before initialization, allocate as much memory area as the size acquired by the ::criAtom_CalculateWorkSize function, + * and set the memory area for this function.
+ * When the Fixed Memory method is used, the library uses the work area until the library is finalized (by the ::criAtom_Finalize + * function).
+ * Do not release the memory area of the work area before the library is finalized.
+ * \par Example: + * [Initialization of the library by using the User Allocator method]
+ * The following shows the procedure for initializing/finalizing the library when the User Allocator method is used.
+ * -# Before initialization, use the ::criAtom_SetUserMallocFunction function and + * ::criAtom_SetUserFreeFunction function to register the memory allocation/deallocation function.
+ * -# Set parameters for the configuration structure for initialization.
+ * -# Execute the ::criAtom_Initialize function to initialize the library.
+ * (Specify NULL for work and 0 for work_size.)
+ * -# When exiting an application, execute the ::criAtom_Finalize function to finalize the library.
+ * . + *
The specific code is as follows:
+ * \code + * // User's memory allocation function + * void *user_malloc(void *obj, CriUint32 size) + * { + * void *mem; + * + * // Allocate a memory + * mem = malloc(size); + * + * return (mem); + * } + * + * // Prepare user's memory release function + * void user_free(void *obj, void *mem) + * { + * // Release memory + * free(mem); + * + * return; + * } + * + * main() + * { + * CriAtomConfig config; // Configuration structure for initializing the library + * : + * // User's memory allocation function + * criAtom_SetUserMallocFunction(user_malloc, NULL); + * + * // Register user's memory deallocation function + * criAtom_SetUserFreeFunction(user_free, NULL); + * + * // Set default values for a configuration structure for initializing the library + * criAtom_SetDefaultConfig(&config); + * + * // Initialize the library + * // Specify NULL and 0 for the work area. + * // -> The required memory is allocated using the registered memory allocation function. + * criAtom_Initialize(&config, NULL, 0); + * : + * // Application's main routine + * : + * // Finalize the library when exiting the application + * // -> The memory allocated at initialization is released using the registered memory deallocation function. + * criAtom_Finalize(); + * : + * } + * \endcode + *
+ * [Initialization of the library by using the Fixed Memory method]
+ * The following shows the procedure for initializing/finalizing the library when the Fixed Memory method is used.
+ * -# Set parameters for the configuration structure for initialization.
+ * -# Use the ::criAtom_CalculateWorkSize function to calculate the size of the work area + * required for initializing the library.
+ * -# Allocate as much memory as the size of the work area.
+ * -# Execute the ::criAtom_Initialize function to initialize the library.
+ * (Specify the address of the allocated memory for work and the work area size for work_size.)
+ * -# When exiting an application, execute the ::criAtom_Finalize function to finalize the library.
+ * -# Release the memory of the work area.
+ * . + *
The specific code is as follows:
+ * \code + * main() + * { + * CriAtomConfig config; // Configuration structure for initializing the library + * void *work; // Address of the work area + * CriSint32 work_size; // Work area size + * : + * // Set default values for a configuration structure for initializing the library + * criAtom_SetDefaultConfig(&config); + * + * // Calculate the size of the work area required for initializing the library + * work_size = criAtom_CalculateWorkSize(&config); + * + * // Allocate memory for the work area + * work = malloc((size_t)work_size); + * + * // Initialize the library + * // -> Specify the allocated work area. + * criAtom_Initialize(&config, NULL, 0); + * : + * // Application's main routine + * // -> The allocated memory must be kept in the routine. + * : + * // Finalize the library when exiting the application + * criAtom_Finalize(); + * + * // Release work area no longer necessary. + * free(work); + * : + * } + * \endcode + * \par Remarks: + * The size of the work area needed for the library varies depending on the contents of the configuration structure + * for initialization.
+ * In addition, the necessary work area size also depends on the platform. + *
+ * Information in argument config is referenced only within the function.
+ * It is not referenced after exiting the function and its area can be released + * after executing the function. + * \attention + * Currently, the CRI File System library must be initialized before the + * CRI Atom library regardless of whether streaming playback is performed.
+ * If the CRI File System library has not been initialized, + * initialize the CRI File System library within the CRI Atom library.
+ * In that case, the initialization parameter is the value set with the criFs_SetDefaultConfig process macro. + *
+ * After executing this function, always execute the ::criAtom_Finalize function.
+ * Also, this function cannot be executed again before executing the ::criAtom_Finalize function.
+ * \sa CriAtomConfig, criAtom_Finalize, criAtom_SetUserMallocFunction, + * criAtom_SetUserFreeFunction, criAtom_CalculateWorkSize + */ +void CRIAPI criAtom_Initialize(const CriAtomConfig *config, void *work, CriSint32 work_size); + +/*EN + * \brief Finalize library + * \ingroup ATOMLIB_GLOBAL + * \par Description: + * Finalizes the CRI Atom library.
+ * \attention + * This function cannot be executed before the ::criAtom_Initialize function is executed.
+ * \sa criAtom_Initialize + */ +void CRIAPI criAtom_Finalize(void); + +/*EN + * \brief Check library initialization status + * \ingroup ATOMLIB_GLOBAL + * \return CriBool whether to be initialized + * \retval CRI_FALSE uninitialized + * \retval CRI_TRUE initialized + * \par Description: + * Checks whether the CRI Atom library is initialized or not.
+ * \sa criAtom_Initialize, criAtom_Finalize + */ +CriBool CRIAPI criAtom_IsInitialized(void); + +/*EN + * \brief Checking whether the audio output is valid + * \ingroup ATOMLIB_GLOBAL + * \return CriBool Whether the audio output is valid + * \retval CRI_TRUE Valid + * \retval CRI_FALSE Invalid + * \par Description: + * Checks whether the audio output is valid.
+ * If the sound device is available when the CRI Atom library is initialized, + * this function returns CRI_TRUE.
+ * If the sound device is unavailable when the CRI Atom library is initialized, + * this function returns CRI_FALSE.
+ * \par Additional information: + * Even if the sound device is invalid, the Atom works without outputting sounds.
+ * (It calculates how much sound data is consumed based on the timer, and emulates the same behavior as when sound output is valid as much as possible.)
+ * Therefore, even when the sound output device is unavailable, + * the application does not need to avoid calling APIs in the Atom library.
+ * (If you want to notify the user that the sound device is invalid in a PC environment, + * use this function.)
+ * \attention + * This function returns a value to show whether the audio device was available or not when the Atom library was initialized.
+ * This function cannot detect that the user has installed or removed the sound device after the library is initialized.
+ * (You must use a device-specific API.)
+ *
+ * If the Atom library is initialized when the audio output is invalid + * and then the user enables the audio device, the Atom library does not output sounds.
+ * (The Atom library does not automatically detect that an audio device is installed.)
+ * To enable the audio device while the application is running, + * you must initialize the Atom library again.
+ *\sa criAtom_Initialize + */ +CriBool CRIAPI criAtom_IsAudioOutputActive(void); + +/*EN + * \brief Execute server processing for multithreading. + * \ingroup ATOMLIB_GLOBAL + * \par Description: + * Updates the internal state of the CRI Atom library.
+ * The application must execute this function regularly.
+ *
+ * The number of times the sever process must be executed depends on the parameters specified during library initialization.
+ * If the threading model is set to ::CRIATOM_THREAD_MODEL_MULTI at the initialization of the library, + * all processes that must be executed in real-time are executed regularly and automatically in the CRI Atom library. + * And therefore, even if the call frequency of this function is small, no problem occurs.
+ * (If this function is executed at least once per second, problems such as interruption of playback will not occur.)
+ * When the library is initialized, if the threading model is set to ::CRIATOM_THREAD_MODEL_SINGLE or + * ::CRIATOM_THREAD_MODEL_USER_MULTI , this function performs almost all processes + * required for audio playback, such as file-reading management, data decoding, and audio output.
+ * Also, this function performs file accesses and data expansion processes for the CRI File System library synchronizing with audio playback.
+ * Note, therefore, that if this function is executed less frequently than the execution frequency of server processing (server_frequency in the ::CriAtomConfig structure) + * specified when the library is initialized, + * or if a large data or compressed file is read, + * problems such as interruption of playback may occur.
+ * \par Remarks: + * Also when the threading model is set to ::CRIATOM_THREAD_MODEL_MULTI at the initialization of the library, + * this function must be executed.
+ * (If the threading model is set to ::CRIATOM_THREAD_MODEL_MULTI , only some processes such as status update are + *
+ * Server processing of the CRI File System library is executed in the CRI Atom library.
, + * Therefore, if this function has been executed, the application does not need to call + * server processing of the CRI File System library.
+ * \sa criAtom_ExecuteAudioProcess + */ +void CRIAPI criAtom_ExecuteMain(void); + +/*EN + * \brief Execute server processing for user multithreading. + * \ingroup ATOMLIB_GLOBAL + * \par Description: + * Updates only the CRI Atom library.
+ * When the threading model is ::CRIATOM_THREAD_MODEL_USER_MULTI, + * the application must execute this function regularly.
+ * + *
+ * This function performs almost all processes required for audio playback, + * such as file-reading management, data decoding, and audio output.
+ * Note, therefore, that if this function is executed less frequently than the execution frequency of server processing (server_frequency in the ::CriAtomConfig structure), + * problems such as interruption of playback + * may occur.
+ * In addition, unlike the ::criAtom_ExecuteMain function, this function does not execute server processing of the CRI File System library.
+ * The application must execute necessary server processing in a correct order.
+ * \par Remarks: + * When ::CRIATOM_THREAD_MODEL_SINGLE is selected, exclusive control for server processing is not performed, + * and therefore, do not call this function from multiple threads.
+ * \sa criAtom_ExecuteMain + */ +void CRIAPI criAtom_ExecuteAudioProcess(void); + +/*EN + * \brief Register memory allocation function + * \ingroup ATOMLIB_GLOBAL + * \param[in] func memory allocation function + * \param[in] obj user specified object + * \par Description: + * Registers a memory allocation function with the CRI Atom library.
+ * It is used when replacing the memory allocation process performed within the CRI Atom library + * with user's memory allocation process.
+ *
+ * This function is used as follows:
+ * (1) Prepare a memory allocation function compliant with the ::CriAtomMallocFunc interface.
+ * (2) Use the ::criAtom_SetUserMallocFunction function to register the + * memory allocation function with the CRI Atom library.
+ *
+ * The specific coding example is as follows: + * \par Example: + * \code + * // Prepare user's memory allocation function + * void *user_malloc(void *obj, CriUint32 size) + * { + * void *mem; + * + * // Allocate a memory + * mem = malloc(size); + * + * return (mem); + * } + * + * main() + * { + * : + * // Register memory allocation function + * criAtom_SetUserMallocFunction(user_malloc, NULL); + * : + * } + * \endcode + * \par Remarks: + * The value specified in argument obj is passed to ::CriAtomMallocFunc as argument.
+ * If you need to access the memory manager during memory allocation, set the relevant object as the + * argument for this function and access through the argument from + * the callback function.
+ * \attention + * You must also register the memory deallocation function (::CriAtomFreeFunc ) + * when registering the memory allocation function. + * \sa CriAtomMallocFunc, criAtom_SetUserFreeFunction + */ +void CRIAPI criAtom_SetUserMallocFunction(CriAtomMallocFunc func, void *obj); + +/*EN + * \brief Register memory deallocation function + * \ingroup ATOMLIB_GLOBAL + * \param[in] func memory deallocation function + * \param[in] obj user specified object + * \par Description: + * Registers a memory deallocation function with the CRI Atom library.
+ * It is used when replacing the memory deallocation process performed within the CRI Atom library + * with user's memory deallocation process.
+ *
+ * This function is used as follows:
+ * (1) Supply memory deallocation function complying with the ::CriAtomFreeFunc interface.
+ * (2) Use the ::criAtom_SetUserFreeFunction function to register the + * memory deallocation function in the CRI Atom library.
+ *
+ * The specific coding example is as follows: + * \par Example: + * \code + * // Prepare user's memory release function + * void user_free(void *obj, void *mem) + * { + * // Release memory + * free(mem); + * + * return; + * } + * + * main() + * { + * : + * // Register memory deallocation function + * criAtom_SetUserFreeFunction(user_free, NULL); + * : + * } + * \endcode + * \par Remarks: + * The value specified in argument obj is passed to ::CriAtomFreeFunc as argument.
+ * If you need to access the memory manager during memory allocation, set the relevant object as the + * argument for this function and access through the argument from + * the callback function.
+ * \attention + * You must also register the memory allocation function (::CriAtomMallocFunc ) + * when registering the memory deallocation function. + * \sa CriAtomFreeFunc, criAtom_SetUserMallocFunction + */ +void CRIAPI criAtom_SetUserFreeFunction(CriAtomFreeFunc func, void *obj); + +/*EN + * \brief Register start audio frame callback function + * \ingroup ATOMLIB_GLOBAL + * \param[in] func start audio frame callback function + * \param[in] obj user specified object + * \par Description: + * Registers the start audio frame callback with the CRI Atom library.
+ * An audio frame indicates the timing to start server process within a CRI Atom library.
+ * The callback function registered with this function is executed when starting an audio frame + * (just before starting the server process). + * \par Remarks: + * If the threading model is set to multithreading ( ::CRIATOM_THREAD_MODEL_MULTI ) at the initialization of the library, + * the callback function is called from the thread created in the CRI Atom + * library.
+ * If the threading model is set to user multithreading ( ::CRIATOM_THREAD_MODEL_USER_MULTI ) or + * single threading ( ::CRIATOM_THREAD_MODEL_SINGLE ) at the initialization of the library, the callback function is called from the + * ::criAtom_ExecuteMain function.
+ *
+ * The value specified in argument obj is passed to ::CriAtomAudioFrameStartCbFunc as argument.
+ */ +void CRIAPI criAtom_SetAudioFrameStartCallback( + CriAtomAudioFrameStartCbFunc func, void *obj); + +/*EN + * \brief Register end audio frame callback function + * \ingroup ATOMLIB_GLOBAL + * \param[in] func end audio frame callback function + * \param[in] obj user specified object + * \par Description: + * Registers the end audio frame callback with the CRI Atom library.
+ * An audio frame indicates the timing to start server process within a CRI Atom library.
+ * The callback function registered with this function is executed when ending an audio frame + * (just after ending the server process). + * \par Remarks: + * If the threading model is set to multithreading ( ::CRIATOM_THREAD_MODEL_MULTI ) at the initialization of the library, + * the callback function is called from the thread created in the CRI Atom + * library.
+ * If the threading model is set to user multithreading ( ::CRIATOM_THREAD_MODEL_USER_MULTI ) or + * single threading ( ::CRIATOM_THREAD_MODEL_SINGLE ) at the initialization of the library, the callback function is called from the + * ::criAtom_ExecuteMain function.
+ *
+ * The value specified in argument obj is passed to ::CriAtomAudioFrameEndCbFunc as argument.
+ */ +void CRIAPI criAtom_SetAudioFrameEndCallback( + CriAtomAudioFrameEndCbFunc func, void *obj); + +/*EN + * \brief Prevent server process interrupt + * \ingroup ATOMLIB_GLOBAL + * \par Description: + * Suppresses server process interrupt.
+ * After executing this function, server process operation is suppressed until the ::criAtom_Unlock function is executed.
+ * In order to ensure execution of multiple APIs within the same audio frame, suppress server process + * interrupt with this function and execute those functions. + * \par Example: + * \code + * : + * // Prevent server process interrupt + * criAtom_Lock(); + * + * // Start playback of multiple sounds simultaneously + * criAtomPlayer_Start(player1); + * criAtomPlayer_Start(player2); + * criAtomPlayer_Start(player3); + * criAtomPlayer_Start(player4); + * + * // Allow server process interrupt + * criAtom_Unlock(); + * : + * \endcode + * \attention + * Even when starting playback simultaneously with multiple players as in the above example, + * sound output may not start simultaneously during stream playback.
+ * (Due to playback latency caused by buffering.)
+ *
+ * After executing this function, playback may be interrupted if the ::criAtom_Unlock function is not called for a long time.
+ * The interval to prevent server process interrupt must be kept to a minimum. + * \sa criAtom_Unlock + */ +void CRIAPI criAtom_Lock(void); + +/*EN + * \brief Allow server process interrupt + * \ingroup ATOMLIB_GLOBAL + * \par Description: + * Allows server process interrupt prevented by the ::criAtom_Lock function. + * \sa criAtom_Lock + */ +void CRIAPI criAtom_Unlock(void); + +/*EN + * \brief Specify channel mapping pattern + * \ingroup ATOMLIB_GLOBAL + * \param[in] nch number of channels to change mapping pattern + * \param[in] type mapping pattern + * \par Description: + * Changes the mapping of audio data channels to output speakers.
+ * For example, when a 5-channel audio data is played back, by default, channels are + * output in the order of L, R, C, Ls, and Rs.
+ * In this case, executing ::criAtom_SetChannelMapping(5, 1); will + * change the output order to L, R, LFE, Ls, and Rs.
+ * \par Remarks: + * This function currently allows mapping pattern changes on 5-channel audio data only.
+ */ +void CRIAPI criAtom_SetChannelMapping(CriSint32 nch, CriUint32 type); + +/*EN + * \brief Add performance monitor function + * \ingroup ATOMLIB_GLOBAL + * \par Description: + * Adds the performance measuring function and starts a performance measuring process.
+ * After executing this function, by executing the ::criAtom_GetPerformanceInfo function, + * performance information of the library, including the load of the server process and execution interval of the server process + * can be acquired. + * \sa criAtom_GetPerformanceInfo, criAtom_DetachPerformanceMonitor + * \par Example: + * \code + * // Structure for acquiring performance information + * CriAtomPerformanceInfo info; + * + * // Initialize the library + * criAtom_Initialize(...); + * + * // Add the performance monitor function + * criAtom_AttachPerformanceMonitor(); + * + * // Reset the performance monitor + * criAtom_ResetPerformanceMonitor(); + * + * // Performance measurement interval + * : + * + * // Acquire performance information + * criAtom_GetPerformanceInfo(&info); + * + * // Display the measurement results + * printf( + * "Max CPU Load : %d (us)\n" \ + * "Average CPU Load : %d (us)\n" \ + * "Max Server Interval : %d (us)\n" \ + * "Average Server Interval : %d (us)\n", + * info.max_server_time, info.average_server_time, + * info.max_server_interval, info.average_server_interval + * ); + * \endcode + */ +void CRIAPI criAtom_AttachPerformanceMonitor(void); + +/*EN + * \brief Delete performance monitor function + * \ingroup ATOMLIB_GLOBAL + * \par Description: + * Stops a performance measuring process and deletes the performance measuring function. + * \attention + * This function is a blocking function.
+ * Once this function is executed, server processing of the Atom library is blocked for a while.
+ * If this function is executed during audio playback, problems such as interruption of playback may occur. + * Call this function only when load fluctuations are acceptable, for example, when a game scene is changed. + */ +void CRIAPI criAtom_DetachPerformanceMonitor(void); + +/*EN + * \brief Reset performance monitor + * \ingroup ATOMLIB_GLOBAL + * \par Description: + * Discards all preceding measurement results.
+ * A performance monitor starts to acquire performance information immediately after the ::criAtom_AttachPerformanceMonitor function + * is executed, and accumulates the measurement results.
+ * If you do not want to mix past and subsequent measurement results, + * execute this function to discard the accumulated measurement results. + */ +void CRIAPI criAtom_ResetPerformanceMonitor(void); + +/*EN + * \brief Acquire performance information + * \ingroup ATOMLIB_GLOBAL + * \par Description: + * Acquires performance information.
+ * This function is available after the ::criAtom_AttachPerformanceMonitor function is executed, + * before the ::criAtom_DetachPerformanceMonitor function is executed.
+ * \sa criAtom_AttachPerformanceMonitor, criAtom_DetachPerformanceMonitor + */ +void CRIAPI criAtom_GetPerformanceInfo(CriAtomPerformanceInfo *info); + +/*EN + * \brief Calculate bit rate of ADX data + * \ingroup ATOMLIB_GLOBAL + * \param[in] num_channels number of channels in the data + * \param[in] sampling_rate sampling rate of the data + * \return CriSint32 bit rate [bps] + * \par Description: + * Calculates the bit rate of an ADX data.
+ * If this function fails to calculate the bit rate, it returns -1.
+ * To know the reason of the failure in the calculation, check the error callback message.
+ */ +CriSint32 CRIAPI criAtom_CalculateAdxBitrate( + CriSint32 num_channels, CriSint32 sampling_rate); + +/*EN + * \brief Calculate bit rate of HCA data + * \ingroup ATOMLIB_GLOBAL + * \param[in] num_channels number of channels in the data + * \param[in] sampling_rate sampling rate of the data + * \param[in] quality encode quality of the data + * \return CriSint32 bit rate [bps] + * \par Description: + * Calculates the bit rate of an HCA data.
+ * If this function fails to calculate the bit rate, it returns -1.
+ * To know the reason of the failure in the calculation, check the error callback message.
+ * \par Remarks: + * For quality, specify the encode quality set by CRI Atom Craft or CRI Atom Encoder. + */ +CriSint32 CRIAPI criAtom_CalculateHcaBitrate( + CriSint32 num_channels, CriSint32 sampling_rate, CriAtomEncodeQuality quality); + +/*EN + * \brief Calculate bit rate of HCA-MX data + * \ingroup ATOMLIB_GLOBAL + * \param[in] num_channels number of channels in the data + * \param[in] sampling_rate sampling rate of the data + * \param[in] quality encode quality of the data + * \return CriSint32 bit rate [bps] + * \par Description: + * Calculates the bit rate of an HCA-MX data.
+ * If this function fails to calculate the bit rate, it returns -1.
+ * To know the reason of the failure in the calculation, check the error callback message.
+ * \par Remarks: + * For quality, specify the encode quality set by CRI Atom Craft or CRI Atom Encoder. + */ +CriSint32 CRIAPI criAtom_CalculateHcaMxBitrate( + CriSint32 num_channels, CriSint32 sampling_rate, CriAtomEncodeQuality quality); + +/*EN + * \brief Acquire streaming info + * \ingroup ATOMLIB_GLOBAL + * \param[out] streaming_info Pointer to location to save streaming information + * \retval CRI_TRUE Values were acquired + * \retval CRI_FALSE Values were not acquired + * \par Description: + * Acquires streaming information from the CRI Atom library's streaming management module.
+ * This function saves the streaming information at the time the function was called to streaming_info.
+ * \attention + * Note that some exclusive control is performed with the Atom server internal processing, + * so be sure not to stop the Atom server due to reversed priorities.
+ * Streaming information cannot be acquired on some platforms.
+ * Check the return value of this function to determine if the information was acquired.
+ * To determine if the streaming information could not be acquired due to an error,
+ * check if the error callback has been triggered. + * \sa CriAtomStreamingInfo + */ +CriBool CRIAPI criAtom_GetStreamingInfo(CriAtomStreamingInfo* streaming_info); + +/*EN + * \brief Returns whether to load streaming during file I/O downtime + * \ingroup ATOMLIB_GLOBAL + * \param[in] flag CRI_TRUE = Use downtime during file I/O for loading + * \retval CRI_TRUE Process completed normally. + * \retval CRI_FALSE An error occurred. + * \par Description: + * This sets whether or not to load streaming data during downtime between file I/O operations
+ * via the streaming management module of the CRI Atom library.
+ * If CRI_TRUE is set, the CRI Atom library's streaming management module + * will use any downtime between file I/O operations to load extra data into empty buffer space.
+ * If CRI_FALSE is set, the CRI Atom library's streaming management module + * will not use the downtime between file I/O operations to load extra data into empty buffer space.
+ * The default setting is CRI_TRUE.
+ * \par Remarks: + * By utilizing the downtime between file I/O operations to load extra data into empty buffer space, + * the frequency of seeking can be reduced and overall file I/O efficiency will be improved.
+ * On the other hand, normal file loading has lower priority that loading performed for streaming, + * so if the empty buffer is too large, normal file loading will be delayed significantly.
+ * \attention + * Some internal Atom server processing is performed under exclusive control, + * so be sure not to stop the Atom server due to priority inversion. + */ +CriBool CRIAPI criAtom_SetFreeTimeBufferingFlagForDefaultDevice(CriBool flag); + +/*EN + * \brief Set ADX1 decryption key + * \ingroup ATOMLIB_GLOBAL + * \param[in] key_string decryption key string for ADX1 + * \par Description: + * This function specifies a key string that is used for decrypting the encrypted ADX data created for ADX1.
+ * \par Remarks: + * This function corresponds to the ADXT_SetDefKeyString function for ADX1.
+ * \attention: + * This function provides a feature that plays encrypted ADX data on the ADX2 runtime, which was created for ADX1.
+ * To decrypt the audio data that has been created with tools included in the ADX2 SDK (e.g. Atom Craft or Atom Encoder), the decrypter API (::criAtomDecrypter_Create or other functions) should be used instead of this function.
+ *
+ * The decryption key specified by this function is not used when decoding unencrypted ADX data.
+ * (The processing is different from ADX1's.)
+ * To embed noise into unencrypted ADX data, this function should be used together with decrypter API.
+ *
+ * This function is provided only for the purpose of reusing the data in the released game title.
+ * When newly creating ADX data, please use tools included in the ADX2 SDK to create encrypted data.
+ * \sa criAtomDecrypter_Create + */ +void CRIAPI criAtom_SetAdx1KeyString(const CriChar8 *key_string); + +/*========================================================================== + * CRI Atom HCA-MX API + *=========================================================================*/ +/*EN + * \brief Calculate work area size required for initializing HCA-MX + * \ingroup ATOMLIB_HCA_MX + * \param[in] config configuration structure for initializing HCA-MX + * \return CriSint32 work area size + * \retval >= 0 successfully completed + * \retval -1 error occurred + * \par Description: + * Obtains the work area size required for initializing HCA-MX.
+ * If you are not using the ::criAtom_SetUserAllocator macro to register the allocator, + * but using the ::criAtomHcaMx_Initialize function to initialize HCA-MX, + * as much memory area as the size calculated by this function must be passed as the work area.
+ *
+ * If work area size calculation fails, this function returns -1.
+ * The reason for work area size calculation failure can be determined by viewing the error callback message.
+ * \par Remarks: + * The working memory size required for initializing HCA-MX varies depending on + * the contents of the configuration structure ( ::CriAtomHcaMxConfig ) for initializing HCA-MX.
+ *
+ * If you specify NULL as argument, the work area size is calculated using the default setting + * (i.e., the same parameters as when ::criAtomHcaMx_SetDefaultConfig is used) are used + * for calculating the work area size. + *
+ * Information in argument config is referenced only within the function.
+ * It is not referenced after exiting the function and its area can be released + * after executing the function. + * \sa criAtom_SetUserAllocator, criAtomHcaMx_Initialize + */ +CriSint32 CRIAPI criAtomHcaMx_CalculateWorkSize(const CriAtomHcaMxConfig *config); + +/*EN + * \brief Set configuration structure for work area size calculation + * \ingroup ATOMLIB_HCA_MX + * \param[in] config Configuration structure for HCA-MX initialization + * \par Description: + * Tentatively registers a configuration structure + * ( ::CriAtomHcaMxConfig structure) for calculating the work area size.
+ *
+ * The work area size required for HCA-MX player creation varies + * depending on the parameters of the structure specified for library initialization + * (i.e., when the ::criAtomHcaMx_Initialize function is executed).
+ * Thus, in general, the library must be initialized before calculating + * the required work area size.
+ * When this function is used to register a configuration structure for + * HCA-MX initialization, the ::criAtomPlayer_CalculateWorkSizeForHcaMxPlayer + * function can be used without initializing the library.
+ * \par Remarks: + * When NULL is specified for the argument (config), the default settings + * (i.e., the same parameters as when ::criAtomPlayer_SetDefaultConfigForHcaMxPlayer is used) + * will be used to calculate the work area size.
+ *
+ * This function currently cannot be undone. + * That is, once executed, there is no means to restore the previous state + * (in which the library has not been initialized, and work area size calculation results in an error).
+ * (It is still possible to overwrite parameters by executing the function again.)
+ * \attention + * The configuration structure for initialization, registered by this function, + * is used only for calculating the work area size when HCA-MX is not initialized.
+ * Once the library is initialized, instead of parameters specified for this function, + * parameters specified during the initialization will be used to calculate the work area size.
+ * (If the parameters of the structure registered by this function + * differ from the parameters of the structure used for HCA-MX initialization, + * handle creation may fail due to insufficient work area size.)
+ * \par Example: + * \code + * CriAtomHcaMxConfig hca_mx_config; + * + * // Tentatively register HCA-MX initialization parameters for calculating the work area size + * criAtomHcaMx_SetDefaultConfig(&hca_mx_config); + * criAtomHcaMx_SetConfigForWorkSizeCalculation(&hca_mx_config); + * + * // Calculate the work area size for creating a HCA-MX player + * hca_mx_vp_work_size = criAtomPlayer_CalculateWorkSizeForHcaMxPlayer(NULL); + * : + * \endcode + * \sa criAtomPlayer_CalculateWorkSizeForHcaMxPlayer, criAtomPlayer_SetDefaultConfigForHcaMxPlayer + */ +void CRIAPI criAtomHcaMx_SetConfigForWorkSizeCalculation(const CriAtomHcaMxConfig *config); + +/*EN + * \brief Initialize HCA-MX + * \ingroup ATOMLIB_HCA_MX + * \param[in] config configuration structure for initializing HCA-MX + * \param[in] work work area + * \param[in] work_size work area size + * \par Description: + * Initializes HCA-MX.
+ * By executing this function, the function for outputting HCA-MX data is started.
+ * \par Remarks: + * The working memory size required for initializing HCA-MX varies depending on + * the contents of the configuration structure ( ::CriAtomHcaMxConfig ) for initializing HCA-MX.
+ *
+ * If you specify NULL as argument, the work area size is calculated using the default setting + * (i.e., the same parameters as when ::criAtomHcaMx_SetDefaultConfig is used) are used for initialization.
+ *
+ * Information in argument config is referenced only within the function.
+ * It is not referenced after exiting the function and its area can be released + * after executing the function. + * \attention + * You must initialize the library before executing this function.
+ *
+ * This function is a blocking function.
+ * Once this function is executed, server processing of the Atom library is blocked for a while.
+ * If this function is executed during audio playback, problems such as interruption of playback may occur. + * Call this function only when load fluctuations are acceptable, for example, when a game scene is changed. + *
+ * After executing this function, always execute the ::criAtomHcaMx_Finalize function.
+ * Also, before executing the ::criAtomHcaMx_Finalize function, do not execute this function again.
+ * \sa criAtom_SetUserAllocator, criAtomHcaMx_CalculateWorkSize + */ +void CRIAPI criAtomHcaMx_Initialize( + const CriAtomHcaMxConfig *config, void *work, CriSint32 work_size); + +/*EN + * \brief Finalize HCA-MX + * \ingroup ATOMLIB_HCA_MX + * \par Description: + * Finalizes HCA-MX.
+ * By executing this function, output of HCA-MX data is stopped.
+ * If the allocator is registered with the ::criAtom_SetUserAllocator macro, + * this function releases the memory area allocated when HCA-MX is initialized.
+ * (If you pass a work area during HCA-MX initialization, the work area can be released + * after executing this function.)
+ * \attention + * This function is a blocking function.
+ * Once this function is executed, server processing of the Atom library is blocked for a while.
+ * If this function is executed during audio playback, problems such as interruption of playback may occur. + * Call this function only when load fluctuations are acceptable, for example, when a game scene is changed. + * \sa criAtom_SetUserAllocator, criAtomHcaMx_Initialize + */ +void CRIAPI criAtomHcaMx_Finalize(void); + +/*EN + * \brief Set mixer bus send level + * \ingroup ATOMLIB_HCA_MX + * \param[in] mixer_id mixer id + * \param[in] bus_name Bus name + * \param[in] level send level (0.0f to 1.0f) + * \par Description: + * Sets the mixer bus send level.
+ * By default, the HCA-MX decoding result is stored in the mixer and then + * sent to bus 0 at 1.0f level.
+ * By using this function, the decoding result can also be sent to other buses.
+ * (Different bus effect can be applied to each mixer.)
+ */ +void CRIAPI criAtomHcaMx_SetBusSendLevelByName( + CriSint32 mixer_id, const CriChar8* bus_name, CriFloat32 level); + +/*EN + * \brief Set output frequency adjustment ratio of mixer + * \ingroup ATOMLIB_HCA_MX + * \param[in] mixer_id mixer ID + * \param[in] ratio send level (0.25f to 4.0f) + * \par Description: + * This function sets the output frequency adjustment ratio of a mixer.
+ * The frequency adjustment ratio is the ratio of the audio data frequency to the playback frequency, and is equal to the scale factor of the playback speed.
+ * When the frequency ratio exceeds 1.0f, sound data is played back faster than the original sound. + * When the ratio is less than 1.0f, sound data is played back slower than the original sound.
+ * This function enables changing the playback speed of all the players connected to the same mixer. + * (Disables changing the playback speed of the players individually.)
+ */ +void CRIAPI criAtomHcaMx_SetFrequencyRatio(CriSint32 mixer_id, CriFloat32 ratio); + +/*========================================================================== + * CRI Atom Decrypter API + *=========================================================================*/ +/*EN + * \brief Calculate work area size required for creating decrypter + * \ingroup ATOMLIB_DECRYPTER + * \param[in] config configuration structure for creating decrypter + * \return CriSint32 work area size + * \retval >= 0 successfully completed + * \retval -1 error occurred + * \par Description: + * Calculates the work area size required for creating a decrypter.
+ * If you are not using the ::criAtom_SetUserAllocator macro to register the allocator, + * but using the ::criAtomDecrypter_Create function to create a decrypter, + * as much memory area as the size calculated by this function must be passed as the work area.
+ *
+ * If work area size calculation fails, this function returns -1.
+ * The reason for work area size calculation failure can be determined by viewing the error callback message.
+ * \par Remarks: + * Information in argument config is referenced only within the function.
+ * It is not referenced after exiting the function and its area can be released + * after executing the function. + * \sa CriAtomDecrypterConfig, criAtomDecrypter_Create, criAtom_SetUserAllocator + */ +CriSint32 CRIAPI criAtomDecrypter_CalculateWorkSize( + const CriAtomDecrypterConfig *config); + +/*EN + * \brief Create decrypter + * \ingroup ATOMLIB_DECRYPTER + * \param[in] config configuration structure for creating decrypter + * \param[in] work work area + * \param[in] work_size work area size + * \return CriAtomDecrypterHn decrypter handel + * \par Description: + * Creates a decrypter for decrypting encrypted audio data.
+ *
+ * If work area size calculation fails, this function returns -1.
+ * The reason for work area size calculation failure can be determined by viewing the error callback message.
+ * \par Remarks: + * Currently, a decrypter is activated as soon as it is created and applied globally.
+ * Therefore, after executing this function, "only encrypted data can be played back".
+ * (Unencrypted audio data and audio data with difference encryption key are all treated as noise.)
+ *
+ * Information in argument config is referenced only within the function.
+ * It is not referenced after exiting the function and its area can be released + * after executing the function. + * \par Example: + * \code + * CriAtomDecrypterConfig decrypter_config; + * CriAtomDecrypterHn decrypter; + * CriAtomPlayerHn player; + * + * // Zero clear decrypter creation configuration structure + * memset(&decrypter_config, 0, sizeof(decrypter_config)); + * + * // Set encryption key + * decrypter_config.key = 123456789; + * + * // Create decrypter + * decrypter = criAtomDecrypter_Create(&decrypter_config, NULL, 0); + * + * // Create player + * player = criAtomPlayer_CreateStandardPlayer(NULL, NULL, 0); + * \endcode + * \attention + * You must initialize the library before executing this function.
+ *
+ * Currently, only one decrypter can be used at a type within an application.
+ * (Multiple decrypter cannot be created at the same time.)
+ *
+ * If a player is created after creating a decrypter, + * do not destroy the decrypter until the player is destroyed.
+ * If a decrypter is destroyed while a player is remaining, + * audio data may not playback correctly or access violation may occur.
+ *
+ * After executing this function, always execute the ::criAtomDecrypter_Destroy function.
+ * Also, execute the ::criAtomDecrypter_Destroy function before + * releasing the work area set with this function or re-executing this function.
+ * \sa CriAtomDecrypterConfig, criAtomDecrypter_CalculateWorkSize, criAtomDecrypter_Destroy, criAtom_SetUserAllocator + */ +CriAtomDecrypterHn CRIAPI criAtomDecrypter_Create( + const CriAtomDecrypterConfig *config, void *work, CriSint32 work_size); + +/*EN + * \brief Destroy decrypter + * \ingroup ATOMLIB_DECRYPTER + * \par Description: + * Destroys the decrypter.
+ * By executing this function, decryption of encrypted data is stopped.
+ * If the allocator is registered with the ::criAtom_SetUserAllocator macro, + * the memory allocated when creating a decrypter is released.
+ * (If you pass a work area when creating a decrypter, the work area can be released + * after executing this function.)
+ * \attention + * This function is a blocking function.
+ * Once this function is executed, server processing of the Atom library is blocked for a while.
+ * If this function is executed during audio playback, problems such as interruption of playback may occur. + * Call this function only when load fluctuations are acceptable, for example, when a game scene is changed. + * \sa criAtomDecrypter_Create, criAtom_SetUserAllocator + */ +void CRIAPI criAtomDecrypter_Destroy(CriAtomDecrypterHn decrypter); + +/*========================================================================== + * CRI Atom AWB API + *=========================================================================*/ +/*EN + * \brief Calculate work area size required for loading AWB file's TOC information + * \ingroup ATOMLIB_AWB + * \param[in] num number of contents in AWB file + * \return CriSint32 work area size + * \retval >= 0 successfully completed + * \retval -1 error occurred + * \par Description: + * Retrieves the work area size required for loading the AWB file TOC information.
+ *
+ * If work area size calculation fails, this function returns -1.
+ * The reason for work area size calculation failure can be determined by viewing the error callback message.
+ * \attention + * You must initialize the library before executing this function.
+ * \sa criAtomAwb_LoadToc, criAtomAwb_LoadTocAsync + */ +CriSint32 CRIAPI criAtomAwb_CalculateWorkSizeForLoadToc(CriSint32 num); + +/*EN + * \brief Load AWB file's TOC information (synchronous version) + * \ingroup ATOMLIB_AWB + * \param[in] binder binder handle + * \param[in] path AWB file name + * \param[in] work AWB file TOC information load work area + * \param[in] work_size work area size + * \return CriAtomAwbHn AWB handle + * \par Description: + * Loads the TOC information for an AWB file used as the sound source for sound playback.
+ * Execute when scene switching or variation in load is + * permissible because this function does not return until loading completes.
+ * When loading succeeds, a valid AWB handle is returned which + * should be specified in the ::criAtomPlayer_SetWaveId function.
+ * Release the finished AWB handle with the ::criAtomAwb_Release function.
+ * NULL is returned if loading of TOC information fails.
+ * \par Remarks: + * If this function is executed specifying NULL as the third argument and 0 as the fourth argument, + * the required work area is dynamically allocated within the function. + * The dynamically allocated area is released with the ::criAtomAwb_Release function. + * \attention + * An AWB handle internally allocates a binder ( CriFsBinderHn ) + * and loader ( CriFsLoaderHn ).
+ * When loading AWB file TOC information, Atom library (or CRI File System library) must be initialized + * with setting that can allocate as many binders and + * loaders as the number of AWB handles.
+ * \sa criAtomPlayer_SetWaveId, criAtomAwb_Release, criAtomAwb_LoadTocById + */ +CriAtomAwbHn CRIAPI criAtomAwb_LoadToc( + CriFsBinderHn binder, const CriChar8 *path, void *work, CriSint32 work_size); + +/*EN + * \brief Load AWB file's TOC information specifying ID (synchronous version) + * \ingroup ATOMLIB_AWB + * \param[in] binder binder handle + * \param[in] id ID of CPK content containing AWB file + * \param[in] work AWB file TOC information load work area + * \param[in] work_size work area size + * \return CriAtomAwbHn AWB handle + * \par Description: + * This function is similar to the ::criAtomAwb_LoadToc function. + * However, unlike the ::criAtomAwb_LoadToc function, + * this function specifies content ID in the CPK rather than the path to load AWB file TOC information.
+ * \sa criAtomPlayer_SetWaveId, criAtomAwb_Release, criAtomAwb_LoadToc + */ +CriAtomAwbHn CRIAPI criAtomAwb_LoadTocById( + CriFsBinderHn binder, CriUint16 id, void *work, CriSint32 work_size); + +/*EN + * \brief Load AWB file's TOC information (asynchronous version) + * \ingroup ATOMLIB_AWB + * \param[in] binder binder handle + * \param[in] path AWB file name + * \param[in] work AWB file TOC information load work area + * \param[in] work_size work area size + * \return CriAtomAwbHn AWB handle + * \par Description: + * Loads the TOC information for an AWB file used as the sound source for sound playback.
+ * Because this is an asyncrhonous function that issues load request, + * an application must wait until load completes.
+ * Periodically retrieve the status of AWB handle with the ::criAtomAwb_GetStatus function + * and wait unitl load completes.
+ * While waiting for load to complete, + * the ::criAtom_ExecuteMain function must be executed periodically to update the status of the AWB handle.
+ * When issuing of load request succeeds, a valid AWB handle is returned.
+ * After load completes successfully, specify this in the ::criAtomPlayer_SetWaveId function.
+ * Release the finished AWB handle with the ::criAtomAwb_Release function.
+ * NULL is returned if issuing of TOC information load request fails.
+ * \par Remarks: + * If this function is executed specifying NULL as the third argument and 0 as the fourth argument, + * the required work area is dynamically allocated within the function. + * The dynamically allocated area is released with the ::criAtomAwb_Release function.
+ * When the status of AWB handle obtained with this function is error (::CRIATOMAWB_STATUS_ERROR), + * also release with the ::criAtomAwb_Release function. + * \attention + * An AWB handle internally allocates a binder ( CriFsBinderHn ) + * as the number of Voices.
+ * When loading AWB file TOC information, Atom library (or CRI File System library) must be initialized + * with setting that can allocate as many binders and + * this function.
+ * \sa criAtomPlayer_SetWaveId, criAtomAwb_Release, criAtomAwb_GetStatus, criAtomAwb_LoadTocAsyncById + */ +CriAtomAwbHn CRIAPI criAtomAwb_LoadTocAsync( + CriFsBinderHn binder, const CriChar8 *path, void *work, CriSint32 work_size); + +/*EN + * \brief Load AWB file's TOC information specifying ID (asynchronous version) + * \ingroup ATOMLIB_AWB + * \param[in] binder binder handle + * \param[in] id ID of CPK content containing AWB file + * \param[in] work AWB file TOC information load work area + * \param[in] work_size work area size + * \return CriAtomAwbHn AWB handle + * \par Description: + * This function is similar to the ::criAtomAwb_LoadTocAsync function. + * However, unlike the ::criAtomAwb_LoadTocAsync function, + * this function specifies content ID in the CPK rather than the path to load AWB file TOC information.
+ * \sa criAtomPlayer_SetWaveId, criAtomAwb_Release, criAtomAwb_GetStatus, criAtomAwb_LoadTocAsync + */ +CriAtomAwbHn CRIAPI criAtomAwb_LoadTocAsyncById( + CriFsBinderHn binder, CriUint16 id, void *work, CriSint32 work_size); + +/*EN + * \brief Create on-memory AWB handle + * \ingroup ATOMLIB_AWB + * \param[in] awb_mem pointer to memory area in which AWB file is loaded + * \param[in] awb_mem_size AWB file size + * \param[in] work pointer to on-memory AWB work area + * \param[in] work_size on-memory AWB work area size + * \return CriAtomAwbHn on-memory AWB handle + * \par Description: + * Creates an on-memory AWB handle from an AWB file image loaded in memory.
+ * Multiple on-memory AWB handles can be created from the same on-memory AWB file image.
+ * There are two ways to allocate a work area.
+ * (a) User Allocator method: A user provided function is used to allocate/release memory.
+ * (b) Fixed Memory method: The required memory is passed directly to the library.
+ *
+ * When using the User Allocator method, you do not need to provide a work area.
+ * You can allocate the required memory with the registered memory allocation function simply by specifying NULL for work and 0 for work_size.
+ * The memory dynamically allocated when creating on-memory AWB handle is
+ * released when on-memory AWB is destroyed (when ::criAtomAwb_Release function is executed).
+ * When using Fixed Memory method, obtain the required work area size with the ::CRIATOMAWB_WORKSIZE_FOR_LOADFROMMEMORY + * function.
+ * \attention + * When this function succeeds, the memory area passed with awb_mem is overwritten for on-memory AWB data.
+ * Therefore, if the ::CRIATOMAWB_WORKSIZE_FOR_LOADFROMMEMORY function is called from multiple threads,
+ * the thread execution sequence may be changed due to exclusive control.
+ *
+ * An AWB handle internally allocates a binder ( CriFsBinderHn ).
+ * When AWB file TOC information is loaded, the Atom library (or CRI File System library) must be initialized + * with the setting that can allocate as many binders as the number of AWB handles.
+ * \sa CRIATOMAWB_WORKSIZE_FOR_LOADFROMMEMORY,criAtomAwb_Release + */ +CriAtomAwbHn CRIAPI criAtomAwb_LoadFromMemory( + void *awb_mem, CriSint32 awb_mem_size, void *work, CriSint32 work_size); + +/*EN + * \brief Get value indicating AWB handle type + * \ingroup ATOMLIB_AWB + * \param[in] awb information source AWB handle + * \return CriAtomAwbType value indicating AWB handle type + * \par Description: + * Obtains a value indicating whether the AWB handle contains only the TOC information, or is an actual AWB handle loaded onto the memory. + * If this function fails, ::CRIATOMAWB_TYPE_ERROR is returned.
+ * \sa criAtomAwb_GetWaveDataInfo, criAtomPlayer_SetData, + */ +CriAtomAwbType CRIAPI criAtomAwb_GetType(CriAtomAwbHn awb); + +/*EN + * \brief Get wave data file information from AWB TOC information + * \ingroup ATOMLIB_AWB + * \param[in] awb information source AWB handle + * \param[in] id wave data ID + * \param[out] offset wave data offset (bytes) + * \param[out] size wave data size (bytes) + * \return CriBool + * \par Description: + * For an AWB handle, obtains the file offset and size of wave data specified with id.
+ * The obtained offset and size are used when directly reading wave data from AWB file.
+ * \attention + * Check the type of AWB handle with the ::criAtomAwb_GetType function before executing this function.
+ * If the AWB handle type is different or the AWB handle is invalid, this function fails and an error callback occurs.
+ * If this function fails, the output offset and size are undefined.
+ * \sa criAtomAwb_GetType, criAtomAwb_GetWaveDataInfo, criAtomPlayer_SetData,criAtomAwb_GetType + */ +CriBool CRIAPI criAtomAwb_GetWaveFileInfo( + CriAtomAwbHn awb, CriSint32 id, CriSint64 *offset, CriUint32 *size); + +/*EN + * \brief Get wave data information from on-memory AWB + * \ingroup ATOMLIB_AWB + * \param[in] awb information source AWB handle + * \param[in] id wave data ID + * \param[out] wave_data_start wave data pointer (bytes) + * \param[out] size wave data size (bytes) + * \return None + * \par Description: + * For an on-memory AWB, obtains the pointer and size of wave data specified with id.
+ * When playing wave data from on-memory AWB, also refer to the ::criAtomPlayer_SetWaveId function because this is normally sufficient.
+ * \attention + * Check the type of AWB handle with the ::criAtomAwb_GetType function before executing this function.
+ * If the AWB handle type is different or the AWB handle is invalid, this function fails and an error callback occurs.
+ * If this function fails, the output wave_data_start and size are undefined.
+ * + * \sa criAtomAwb_GetType, criAtomAwb_GetWaveFileInfo, criAtomPlayer_SetData,criAtomPlayer_SetWaveId + * + */ +void CRIAPI criAtomAwb_GetWaveDataInfo(CriAtomAwbHn awb, CriSint32 id, void **wave_data_start, CriUint32 *size); + +/*EN + * \brief Get number of contents in AWB file through AWB handle + * \ingroup ATOMLIB_AWB + * \param[in] awb information source AWB handle + * \return number of content files (0 to 65535) + * \par Description: + * Gets the number of contents (wave data) in an AWB file through an AWB handle.
+ * The valid range for the number of content files is from 1 to 65535.
+ * Zero is returned when there is an error.
+ * \sa criAtomAwb_LoadToc, criAtomAwb_LoadFromMemory + */ +CriUint16 CRIAPI criAtomAwb_GetNumContents(CriAtomAwbHn awb); + +/*EN + * \brief Release AWB handle + * \ingroup ATOMLIB_AWB + * \param[in] awb AWB handle + * \return None + * \par Description: + * Releases an AWB handle.
+ * Release the finished AWB handle with this function.
+ * Do not use the released AWB handle because it will become an invalid handle.
+ * \attention + * When this function is executed, the Atom player referencing the specified AWB data does not exist or + * the library is searched.
+ * Therefore, if an Atom Player is created/destroyed on another thread while this function is in process, + * a serious problem such as an access violation or deadlock may be induced.
+ * If you need to create/destroy an Atom Player on another thread while this function is in process, + * Lock this function with the ::criAtom_Lock function before executing.
+ *
+ * When playing an AWB file using an AtomEx player, do not destroy the AWB handle by this function during playback.
+ * Please make sure to execute this function after stopping the AtomEx player.
+ * \sa criAtomAwb_LoadToc, criAtomAwb_LoadTocAsync, criAtomAwb_GetStatus + */ +void CRIAPI criAtomAwb_Release(CriAtomAwbHn awb); + +/*EN + * \brief Check whether AWB handle can be released immediately + * \ingroup ATOMLIB_AWB + * \param[in] awb AWB handle + * \return CriBool AWB status (CRI_TRUE = immediate release allowed, CRI_FALSE = active player present) + * \par Description: + * Checks whether an AWB handle can be released immediately.
+ * When the ::criAtomAwb_Release function is executed when this function returns CRI_FALSE, + * the player accessing the AWB handle is stopped.
+ * (In the case of AWB handle for stream playback, processing may be blocked for a long time within the + * ::criAtomAwb_Release function while waiting for file load to complete.)
+ * \attention + * When this function is executed, the Atom player referencing the specified AWB data does not exist or + * the library is searched.
+ * Therefore, if an Atom Player is created/destroyed on another thread while this function is in process, + * a serious problem such as an access violation or deadlock may be induced.
+ * If you need to create/destroy an Atom Player on another thread while this function is in process, + * Lock this function with the ::criAtom_Lock function before executing.
+ * \sa criAtomAwb_Release + */ +CriBool CRIAPI criAtomAwb_IsReadyToRelease(CriAtomAwbHn awb); + +/*EN + * \brief Get AWB handle status + * \ingroup ATOMLIB_AWB + * \param[in] awb AWB handle + * \return CriAtomAwbStatus value indicating the AWB handle status + * \par Description: + * Obtains the AWB handle status.
+ * The status of the AWB handle obtained with this function is updated by executing the ::criAtom_ExecuteMain + * function.
+ * \sa criAtomAwb_LoadToc, criAtomAwb_LoadTocAsync + */ +CriAtomAwbStatus CRIAPI criAtomAwb_GetStatus(CriAtomAwbHn awb); + +/*========================================================================== + * CRI Atom Player API + *=========================================================================*/ +/*EN + * \brief Calculate work area size required for creating standard player + * \ingroup ATOMLIB_PLAYER + * \param[in] config standard player creation configuration structure + * \return CriSint32 work area size + * \retval >= 0 successfully completed + * \retval -1 error occurred + * \par Description: + * Obtains the work area size required for creating a standard player + * (player capable of playing ADX and HCA).
+ *
+ * If work area size calculation fails, this function returns -1.
+ * The reason for work area size calculation failure can be determined by viewing the error callback message.
+ * \par Remarks: + * The size of work memory required to create a player depends on the content of the player creation configuration + * structure ( ::CriAtomStandardPlayerConfig ).
+ *
+ * If you specify NULL as argument, the default setting + * (the same parameters as when ::criAtomPlayer_SetDefaultConfigForStandardPlayer is used) is used + * to calculate the work area size. + *
+ * Information in argument config is referenced only within the function.
+ * It is not referenced after exiting the function and its area can be released + * after executing the function. + * \attention + * The size of the work area depends on the parameter you specified when initializing the library (when executing the ::criAtom_Initialize + * function).
+ * Therefore, you must initialize the library before executing this function.
+ * \sa CriAtomStandardPlayerConfig, criAtomPlayer_CreateStandardPlayer + */ +CriSint32 CRIAPI criAtomPlayer_CalculateWorkSizeForStandardPlayer( + const CriAtomStandardPlayerConfig *config); + +/*EN + * \brief Create standard player + * \ingroup ATOMLIB_PLAYER + * \param[in] config standard player creation configuration structure + * \param[in] work work area + * \param[in] work_size work area size + * \return CriAtomPlayerHn Atom player handle + * \par Description: + * Creates a player capable of playing ADX and HCA.
+ * The Atom player created with this function will have ADX data and HCA data decoding function.
+ *
+ * The format of the sound that can be played with the created player is determined by the parameter specified as the first argument (config). + *
+ * For example, if max_sampling_rate in config is set to 24000, the created player + * will not be able to play sound data with sampling rate above 24kHz.
+ * If you specify NULL for config, the player is created with the default setting (same parameter as when ::criAtomPlayer_SetDefaultConfigForStandardPlayer + * is applied). + *
+ * When creating a player, the memory area (work area) used internally by the library + * must be allocated.
+ * There are two ways to allocate a work area.
+ * (a) User Allocator method: A user provided function is used to allocate/release memory.
+ * (b) Fixed Memory method: The required memory is passed directly to the library.
+ *
+ * When using the User Allocator method, you do not need to provide a work area.
+ * You can allocate the required memory with the registered memory allocation function simply by specifying NULL for work and 0 for work_size.
+ * The memory allocated when creating the standard player is released when the standard player is destroyed (when executing the ::criAtomPlayer_Destroy + * function).
+ *
+ * When using the Fixed Memory method, you must set a separately allocated memory + * for this function as work area.
+ * The size of the work area can be obtained with the ::criAtomPlayer_CalculateWorkSizeForStandardPlayer function.
+ * Allocate memory equal to the size obtained with the ::criAtomPlayer_CalculateWorkSizeForStandardPlayer function + * before creating the standard player and set it to this function.
+ * Also, if you use the Fixed Memory method, the work area will be used within the library until the standard player + * is destroyed ( ::criAtomPlayer_Destroy function).
+ * Do not release the work area memory before destroying the standard player.
+ * \par Example: + * [Creating a Standard Player with the User Allocator method]
+ * When using the User Allocator method, the standard player create/destroy procedure is as follows:
+ * -# Before creating the standard player, use the ::criAtom_SetUserMallocFunction function and + * ::criAtom_SetUserFreeFunction function to register the memory allocation/deallocation function.
+ * -# Set parameters in the standard player creation configuration structure.
+ * -# Create the standard player with the ::criAtomPlayer_CreateStandardPlayer function.
+ * (Specify NULL for work and 0 for work_size.)
+ * -# When the handle is no longer necessary, destroy the standard player with the ::criAtomPlayer_Destroy function.
+ * . + *
The specific code is as follows:
+ * \code + * // User's memory allocation function + * void *user_malloc(void *obj, CriUint32 size) + * { + * void *mem; + * + * // Allocate a memory + * mem = malloc(size); + * + * return (mem); + * } + * + * // Prepare user's memory release function + * void user_free(void *obj, void *mem) + * { + * // Release memory + * free(mem); + * + * return; + * } + * + * main() + * { + * CriAtomStandardPlayerConfig config; // standard player creation configuration structure + * CriAtomPlayerHn player; // Atom player handle + * : + * // User's memory allocation function + * criAtom_SetUserMallocFunction(user_malloc, NULL); + * + * // Register user's memory deallocation function + * criAtom_SetUserFreeFunction(user_free, NULL); + * + * // Set standard player creation configuration structure + * memset(&config, 0, sizeof(config)); + * config.max_channels = 2; // Create stereo playback capable player + * config.max_sampling_rate = 48000; // Play maximum 48000Hz sound + * + * // Create standard player + * // Specify NULL and 0 in work area. + * // ->Allocate the required memory using the registered memory allocation function. + * player = criAtomPlayer_CreateStandardPlayer(&config, NULL, 0); + * : + * // Sound playback processing + * : + * // Destroy standard player when it is no longer necessary + * // ->Memory allocated in library when creating the standard player is released. + * criAtomPlayer_Destroy(player); + * : + * } + * \endcode + * *If memory allocate/deallocate function is registered during library initialization, it need not be + * registered again when creating the standard player.
+ *
+ * [Creating a Standard Player with the Fixed Memory Method]
+ * When using the Fixed Memory method, the standard player create/destroy procedure is as follows:
+ * -# Set parameters in the standard player creation configuration structure.
+ * -# Calculate the size of work area necessary to create the standard player + * with the ::criAtomPlayer_CalculateWorkSizeForStandardPlayer function.
+ * -# Allocate memory equal to the size of the work area.
+ * -# Create the standard player with the ::criAtomPlayer_CreateStandardPlayer function.
+ * (Specify the address of the allocated memory for work and the size of the work area for work_size.)
+ * -# When the handle is no longer necessary, destroy the standard player with the ::criAtomPlayer_Destroy function.
+ * -# Release the work area memory.
+ * . + *
The specific code is as follows:
+ * \code + * main() + * { + * CriAtomStandardPlayerConfig config; // standard player creation configuration structure + * CriAtomPlayerHn player; // Atom player handle + * void *work; // work area address + * CriSint32 work_size; // work area size + * : + * // Set standard player creation configuration structure + * memset(&config, 0, sizeof(config)); + * config.max_channels = 2; // Create stereo playback capable player + * config.max_sampling_rate = 48000; // Play maximum 48000Hz sound + * + * // Calculate the size of the work area necessary to creat the standard player + * work_size = criAtomPlayer_CalculateWorkSizeForStandardPlayer(&config); + * + * // Allocate memory for the work area + * work = malloc((size_t)work_size); + * + * // Create standard player + * // Specify NULL and 0 in work area. + * // ->Specify allocated work area. + * player = criAtomPlayer_CreateStandardPlayer(&config, work, work_size); + * : + * // Sound playback processing + * // ->Allocated memory is retained during this time. + * : + * // Destroy standard player when it is no longer necessary + * criAtomPlayer_Destroy(player); + * + * // Release work area no longer necessary. + * free(work); + * : + * } + * \endcode + * When you execute the ::criAtomPlayer_CreateStandardPlayer function, Atom player is created + * and the handle (::CriAtomPlayerHn ) to control the player is returned.
+ * Atom player operations such as set data and decoder, start playback, and get status + * are all performed against the handle.
+ *
+ * The procedure to play sound data using the created Atom player handle is as follows:
+ * -# Use the ::criAtomPlayer_SetData function and set in the Atom player the data to play.
+ * (For file playback, use the ::criAtomPlayer_SetFile function or the ::criAtomPlayer_SetContentId + * function.)
+ * -# Start playback with the ::criAtomPlayer_Start function.
+ * \par Remarks: + * Information in argument config is referenced only within the function.
+ * It is not referenced after exiting the function and its area can be released + * after executing the function. + * \attention + * You must initialize the library before executing this function.
+ *
+ * The stream playback Atom player internally allocates the loader (CriFsLoaderHn).
+ * When creating a stream playback Atom player, the Atom library (or CRI File System library) must be initialized + * with setting that can allocate as many loaders as + * the number of player handles.
+ *
+ * This function is a blocking function.
+ * The time required to create the standard player depends on the platform.
+ * When you execute this function at timing requiring screen refresh such as game loop, + * processing is blocked by the millisecond, and frames may be dropped.
+ * Create/destroy standard player when change in load is permissible + * such as at the change of scenes.
+ * \sa CriAtomStandardPlayerConfig, criAtomPlayer_CalculateWorkSizeForStandardPlayer, + * CriAtomPlayerHn, criAtomPlayer_Destroy, + * criAtomPlayer_SetData, criAtomPlayer_SetFile, criAtomPlayer_SetContentId, + * criAtomPlayer_Start, criAtomPlayer_CreateStandardPlayer + */ +CriAtomPlayerHn CRIAPI criAtomPlayer_CreateStandardPlayer( + const CriAtomStandardPlayerConfig *config, void *work, CriSint32 work_size); + +/*EN + * \brief Calculate work area size required for creating ADX player + * \ingroup ATOMLIB_PLAYER + * \param[in] config ADX player creation configuration structure + * \return CriSint32 work area size + * \retval >= 0 successfully completed + * \retval -1 error occurred + * \par Description: + * Obtain the work area size required for creating an ADX playback player.
+ *
+ * If work area size calculation fails, this function returns -1.
+ * The reason for work area size calculation failure can be determined by viewing the error callback message.
+ * \par Remarks: + * The size of work memory required to create a player depends on the content of the player creation configuration + * structure ( ::CriAtomAdxPlayerConfig ).
+ *
+ * If you specify NULL as argument, the work area size is calculated using the default setting + * (i.e., the same parameters as when ::criAtomPlayer_SetDefaultConfigForAdxPlayer is used) are used + * for calculating the work area size. + *
+ * Information in argument config is referenced only within the function.
+ * It is not referenced after exiting the function and its area can be released + * after executing the function. + * \attention + * The size of the work area depends on the parameter you specified when initializing the library (when executing the ::criAtom_Initialize + * function).
+ * Therefore, you must initialize the library before executing this function.
+ * \sa CriAtomAdxPlayerConfig, criAtomPlayer_CreateAdxPlayer + */ +CriSint32 CRIAPI criAtomPlayer_CalculateWorkSizeForAdxPlayer( + const CriAtomAdxPlayerConfig *config); + +/*EN + * \brief Create an ADX player + * \ingroup ATOMLIB_PLAYER + * \param[in] config ADX player creation configuration structure + * \param[in] work work area + * \param[in] work_size work area size + * \return CriAtomPlayerHn Atom player handle + * \par Description: + * Creates a player capable of playing ADX.
+ * The Atom player created with this function will have ADX data decoding function.
+ *
+ * The format of the sound that can be played with the created player is determined by the parameter specified as the first argument (config). + *
+ * For example, if max_sampling_rate in config is set to 24000, the created player + * will not be able to play sound data with sampling rate above 24kHz.
+ * If you specify NULL for config, the player is created with the default setting (same parameter as when ::criAtomPlayer_SetDefaultConfigForAdxPlayer + * is applied). + *
+ * When creating a player, the memory area (work area) used internally by the library + * must be allocated.
+ * There are two ways to allocate a work area.
+ * (a) User Allocator method: A user provided function is used to allocate/release memory.
+ * (b) Fixed Memory method: The required memory is passed directly to the library.
+ *
+ * When using the User Allocator method, you do not need to provide a work area.
+ * You can allocate the required memory with the registered memory allocation function simply by specifying NULL for work and 0 for work_size.
+ * The memory allocated when creating the ADX player is released when ADX player is destroyed (when executing the ::criAtomPlayer_Destroy + * function).
+ *
+ * When using the Fixed Memory method, you must set a separately allocated memory + * for this function as work area.
+ * The size of the work area can be obtained with the ::criAtomPlayer_CalculateWorkSizeForAdxPlayer function.
+ * Allocate memory equal to the size obtained with the ::criAtomPlayer_CalculateWorkSizeForAdxPlayer function + * before creating the ADX player and set it to this function.
+ * Also, if you use the Fixed Memory method, the work area will be used within the library until the ADX player + * is destroyed ( ::criAtomPlayer_Destroy function).
+ * Do not release the work area memory before destroying the ADX player.
+ * \par Example: + * [Creating an ADX Player with the User Allocator method] + * When using the User Allocator method, the ADX player create/destroy procedure is as follows:
+ * -# Before creating the ADX player, use the ::criAtom_SetUserMallocFunction function and + * ::criAtom_SetUserFreeFunction function to register the memory allocation/deallocation function.
+ * -# Set parameters in the ADX player creation configuration structure.
+ * -# Create the ADX player with the ::criAtomPlayer_CreateAdxPlayer function.
+ * (Specify NULL for work and 0 for work_size.)
+ * -# When the handle is no longer necessary, destroy the ADX player with the ::criAtomPlayer_Destroy function.
+ * . + *
The specific code is as follows:
+ * \code + * // User's memory allocation function + * void *user_malloc(void *obj, CriUint32 size) + * { + * void *mem; + * + * // Allocate a memory + * mem = malloc(size); + * + * return (mem); + * } + * + * // Prepare user's memory release function + * void user_free(void *obj, void *mem) + * { + * // Release memory + * free(mem); + * + * return; + * } + * + * main() + * { + * CriAtomAdxPlayerConfig config; // ADX player creation configuration structure + * CriAtomPlayerHn player; // Atom player handle + * : + * // User's memory allocation function + * criAtom_SetUserMallocFunction(user_malloc, NULL); + * + * // Register user's memory deallocation function + * criAtom_SetUserFreeFunction(user_free, NULL); + * + * // Set ADX player creation configuration structure + * memset(&config, 0, sizeof(config)); + * config.max_channels = 2; // Create stereo playback capable player + * config.max_sampling_rate = 48000; // Play maximum 48000Hz sound + * + * // Create ADX player + * // Specify NULL and 0 in work area. + * // ->Allocate the required memory using the registered memory allocation function. + * player = criAtomPlayer_CreateAdxPlayer(&config, NULL, 0); + * : + * // Sound playback processing + * : + * // Destroy ADX player when it is no longer necessary + * // ->Memory allocated in library when creating the ADX player is released. + * criAtomPlayer_Destroy(player); + * : + * } + * \endcode + * *If memory allocation/release function is registered during library initialization, it need not be + * registered again when creating the ADX player.
+ *
+ * [Creating an ADX Player with the Fixed Memory Method] + * When using the Fixed Allocator method, the ADX player create/destroy procedure is as follows:
+ * -# Set parameters in the ADX player creation configuration structure.
+ * -# Calculate the size of work area necessary to create the ADX player + * with the ::criAtomPlayer_CalculateWorkSizeForAdxPlayer function.
+ * -# Allocate memory equal to the size of the work area.
+ * -# Create the ADX player with the ::criAtomPlayer_CreateAdxPlayer function.
+ * (Specify the address of the allocated memory for work and the size of the work area for work_size.)
+ * -# When the handle is no longer necessary, destroy the ADX player with the ::criAtomPlayer_Destroy function.
+ * -# Release the work area memory.
+ * . + *
The specific code is as follows:
+ * \code + * main() + * { + * CriAtomAdxPlayerConfig config; // ADX player creation configuration structure + * CriAtomPlayerHn player; // Atom player handle + * void *work; // Work area address + * CriSint32 work_size; // Work area size + * : + * // Set ADX player creation configuration structure + * memset(&config, 0, sizeof(config)); + * config.max_channels = 2; // Create stereo playback capable player + * config.max_sampling_rate = 48000; // Play maximum 48000Hz sound + * + * // Calculate the size of the work area necessary to create the ADX player + * work_size = criAtomPlayer_CalculateWorkSizeForAdxPlayer(&config); + * + * // Allocate memory for the work area + * work = malloc((size_t)work_size); + * + * // Create ADX player + * // Specify NULL and 0 in work area. + * // ->Specify allocated work area. + * player = criAtomPlayer_CreateAdxPlayer(&config, work, work_size); + * : + * // Sound playback processing + * // ->Allocated memory is retained during this time. + * : + * // Destroy ADX player when it is no longer necessary + * criAtomPlayer_Destroy(player); + * + * // Release work area no longer necessary. + * free(work); + * : + * } + * \endcode + * When you execute the ::criAtomPlayer_CreateAdxPlayer function, Atom player is created + * and the handle (::CriAtomPlayerHn ) to control the player is returned.
+ * Atom player operations such as set data and decoder, start playback, and get status + * are all performed against the handle.
+ *
+ * The procedure to play sound data using the created Atom player handle is as follows:
+ * -# Use the ::criAtomPlayer_SetData function and set in the Atom player the data to play.
+ * (For file playback, use the ::criAtomPlayer_SetFile function or the ::criAtomPlayer_SetContentId + * function.)
+ * -# Start playback with the ::criAtomPlayer_Start function.
+ * \par Remarks: + * Information in argument config is referenced only within the function.
+ * It is not referenced after exiting the function and its area can be released + * after executing the function. + * \attention + * You must initialize the library before executing this function.
+ *
+ * The stream playback Atom player internally allocates the loader (CriFsLoaderHn).
+ * When creating a stream playback Atom player, the Atom library (or CRI File System library) must be initialized + * with setting that can allocate as many loaders as + * this function.
+ *
+ * This function is a blocking function.
+ * The time required to create the ADX player depends on the platform.
+ * When you execute this function at timing requiring screen refresh such as game loop, + * processing is blocked by the millisecond, and frames may be dropped.
+ * Create/destroy ADX player when change in load is permissible + * such as at the change of scenes.
+ * \sa CriAtomAdxPlayerConfig, criAtomPlayer_CalculateWorkSizeForAdxPlayer, + * CriAtomPlayerHn, criAtomPlayer_Destroy, + * criAtomPlayer_SetData, criAtomPlayer_SetFile, criAtomPlayer_SetContentId, + * criAtomPlayer_Start, criAtomPlayer_CreateAdxPlayer + */ +CriAtomPlayerHn CRIAPI criAtomPlayer_CreateAdxPlayer( + const CriAtomAdxPlayerConfig *config, void *work, CriSint32 work_size); + +/*EN + * \brief Calculate work area size required for creating HCA player + * \ingroup ATOMLIB_PLAYER + * \param[in] config HCA player creation configuration structure + * \return CriSint32 work area size + * \retval >= 0 successfully completed + * \retval -1 error occurred + * \par Description: + * Obtain the work area size required for creating an HCA playback player.
+ *
+ * If work area size calculation fails, this function returns -1.
+ * The reason for work area size calculation failure can be determined by viewing the error callback message.
+ * \par Remarks: + * The size of work memory required to create a player depends on the content of the player creation configuration + * structure ( ::CriAtomHcaPlayerConfig ).
+ *
+ * If you specify NULL as argument, the work area size is calculated using the default setting + * (i.e., the same parameters as when ::criAtomPlayer_SetDefaultConfigForHcaPlayer is used) are used + * for calculating the work area size. + *
+ * Information in argument config is referenced only within the function.
+ * It is not referenced after exiting the function and its area can be released + * after executing the function. + * \attention + * The size of the work area depends on the parameter you specified when initializing the library (when executing the ::criAtom_Initialize + * function).
+ * Therefore, you must initialize the library before executing this function.
+ * \sa CriAtomHcaPlayerConfig, criAtomPlayer_CreateHcaPlayer + */ +CriSint32 CRIAPI criAtomPlayer_CalculateWorkSizeForHcaPlayer( + const CriAtomHcaPlayerConfig *config); + +/*EN + * \brief Create an HCA player + * \ingroup ATOMLIB_PLAYER + * \param[in] config HCA player creation configuration structure + * \param[in] work work area + * \param[in] work_size work area size + * \return CriAtomPlayerHn Atom player handle + * \par Description: + * Creates a player capable of playing HCA.
+ * The Atom player created with this function will have HCA data decoding function.
+ *
+ * The format of the sound that can be played with the created player is determined by the parameter specified as the first argument (config). + *
+ * For example, if max_sampling_rate in config is set to 24000, the created player + * will not be able to play sound data with sampling rate above 24kHz.
+ * If you specify NULL for config, the player is created with the default setting (same parameter as when ::criAtomPlayer_SetDefaultConfigForHcaPlayer + * is applied). + *
+ * When creating a player, the memory area (work area) used internally by the library + * must be allocated.
+ * There are two ways to allocate a work area.
+ * (a) User Allocator method: A user provided function is used to allocate/release memory.
+ * (b) Fixed Memory method: The required memory is passed directly to the library.
+ * Refer to the description of the ::criAtomPlayer_CreateAdxPlayer function for the details of each method.
+ *
+ * When you execute the ::criAtomPlayer_CreateHcaPlayer function, Atom player is created + * and the handle (::CriAtomPlayerHn ) to control the player is returned.
+ * Atom player operations such as set data and decoder, start playback, and get status + * are all performed against the handle.
+ *
+ * The procedure to play sound data using the created Atom player handle is as follows:
+ * -# Use the ::criAtomPlayer_SetData function and set in the Atom player the data to play.
+ * (For file playback, use the ::criAtomPlayer_SetFile function or the ::criAtomPlayer_SetContentId + * function.)
+ * -# Start playback with the ::criAtomPlayer_Start function.
+ * \par Remarks: + * Information in argument config is referenced only within the function.
+ * It is not referenced after exiting the function and its area can be released + * after executing the function. + * \attention + * You must initialize the library before executing this function.
+ *
+ * The stream playback Atom player internally allocates the loader (CriFsLoaderHn).
+ * When creating a stream playback Atom player, the Atom library (or CRI File System library) must be initialized + * with setting that can allocate as many loaders as + * this function.
+ *
+ * This function is a blocking function.
+ * The time required to create the HCA player depends on the platform.
+ * When you execute this function at timing requiring screen refresh such as game loop, + * processing is blocked by the millisecond, and frames may be dropped.
+ * Create/destroy HCA player when change in load is permissible + * such as at the change of scenes.
+ * \sa CriAtomHcaPlayerConfig, criAtomPlayer_CalculateWorkSizeForHcaPlayer, + * CriAtomPlayerHn, criAtomPlayer_Destroy, + * criAtomPlayer_SetData, criAtomPlayer_SetFile, criAtomPlayer_SetContentId, + * criAtomPlayer_Start, criAtomPlayer_CreateHcaPlayer + */ +CriAtomPlayerHn CRIAPI criAtomPlayer_CreateHcaPlayer( + const CriAtomHcaPlayerConfig *config, void *work, CriSint32 work_size); + +/*EN + * \brief Calculate work area size required for creating HCA-MX player + * \ingroup ATOMLIB_PLAYER + * \param[in] config HCA-MX player creation configuration structure + * \return CriSint32 work area size + * \retval >= 0 successfully completed + * \retval -1 error occurred + * \par Description: + * Obtains the work area size required for creating an HCA-MX playback player.
+ *
+ * If work area size calculation fails, this function returns -1.
+ * The reason for work area size calculation failure can be determined by viewing the error callback message.
+ * \par Remarks: + * The size of work memory required to create a player depends on the content of the player creation configuration + * structure ( ::CriAtomHcaMxPlayerConfig ).
+ *
+ * If you specify NULL as argument, the work area size is calculated using the default setting + * (i.e., the same parameters as when ::criAtomPlayer_SetDefaultConfigForHcaMxPlayer is used) are used + * for calculating the work area size. + *
+ * Information in argument config is referenced only within the function.
+ * It is not referenced after exiting the function and its area can be released + * after executing the function. + * \attention + * The size of the work area depends on the parameter you specified when initializing HCA-MX (when executing the ::criAtomHcaMx_Initialize + * function).
+ * Therefore, you must initialize HCA-MX before executing this function.
+ * \sa CriAtomHcaMxPlayerConfig, criAtomPlayer_CreateHcaMxPlayer + */ +CriSint32 CRIAPI criAtomPlayer_CalculateWorkSizeForHcaMxPlayer( + const CriAtomHcaMxPlayerConfig *config); + +/*EN + * \brief Create an HCA-MX player + * \ingroup ATOMLIB_PLAYER + * \param[in] config HCA-MX player creation configuration structure + * \param[in] work work area + * \param[in] work_size work area size + * \return CriAtomPlayerHn Atom player handle + * \par Description: + * Creates a player capable of playing HCA-MX.
+ * The Atom player created with this function will have HCA-MX data decoding function.
+ *
+ * The format of the sound that can be played with the created player is determined by the parameter specified as the first argument (config). + *
+ * For example, if max_sampling_rate in config is set to 24000, the created player + * will not be able to play sound data with sampling rate above 24kHz.
+ * If you specify NULL for config, the player is created with the default setting (same parameter as when ::criAtomPlayer_SetDefaultConfigForHcaMxPlayer + * is applied). + *
+ * When creating a player, the memory area (work area) used internally by the library + * must be allocated.
+ * There are two ways to allocate a work area.
+ * (a) User Allocator method: A user provided function is used to allocate/release memory.
+ * (b) Fixed Memory method: The required memory is passed directly to the library.
+ * Refer to the description of the ::criAtomPlayer_CreateAdxPlayer function for the details of each method.
+ *
+ * When you execute the ::criAtomPlayer_CreateHcaMxPlayer function, Atom player is created + * and the handle (::CriAtomPlayerHn ) to control the player is returned.
+ * Atom player operations such as set data and decoder, start playback, and get status + * are all performed against the handle.
+ *
+ * The procedure to play sound data using the created Atom player handle is as follows:
+ * -# Use the ::criAtomPlayer_SetData function and set in the Atom player the data to play.
+ * (For file playback, use the ::criAtomPlayer_SetFile function or the ::criAtomPlayer_SetContentId + * function.)
+ * -# Start playback with the ::criAtomPlayer_Start function.
+ * \par Remarks: + * Information in argument config is referenced only within the function.
+ * It is not referenced after exiting the function and its area can be released + * after executing the function. + * \attention + * The stream playback Atom player internally allocates the loader (CriFsLoaderHn).
+ * When creating a stream playback Atom player, the Atom library (or CRI File System library) must be initialized + * with setting that can allocate as many loaders as + * this function.
+ *
+ * You must initialize HCA-MX before executing this function.
+ *
+ * This function is a blocking function.
+ * The time required to create the HCA-MX player depends on the platform.
+ * When you execute this function at timing requiring screen refresh such as game loop, + * processing is blocked by the millisecond, and frames may be dropped.
+ * Create/destroy HCA-MX player when change in load is permissible + * such as at the change of scenes.
+ * \sa CriAtomHcaMxPlayerConfig, criAtomPlayer_CalculateWorkSizeForHcaMxPlayer, + * CriAtomPlayerHn, criAtomPlayer_Destroy, + * criAtomPlayer_SetData, criAtomPlayer_SetFile, criAtomPlayer_SetContentId, + * criAtomPlayer_Start, criAtomPlayer_CreateHcaMxPlayer + */ +CriAtomPlayerHn CRIAPI criAtomPlayer_CreateHcaMxPlayer( + const CriAtomHcaMxPlayerConfig *config, void *work, CriSint32 work_size); + +/*EN + * \brief Calculate work area size required for creating WAVE player + * \ingroup ATOMLIB_PLAYER + * \param[in] config WAVE player creation configuration structure + * \return CriSint32 work area size + * \retval >= 0 successfully completed + * \retval -1 error occurred + * \par Description: + * Obtain the work area size required for creating a WAVE playback player.
+ *
+ * If work area size calculation fails, this function returns -1.
+ * The reason for work area size calculation failure can be determined by viewing the error callback message.
+ * \par Remarks: + * The size of work memory required to create a player depends on the content of the player creation configuration + * structure ( ::CriAtomWavePlayerConfig ).
+ *
+ * If you specify NULL as argument, the work area size is calculated using the default setting + * (i.e., the same parameters as when ::criAtomPlayer_SetDefaultConfigForWavePlayer is used) are used + * for calculating the work area size. + *
+ * Information in argument config is referenced only within the function.
+ * It is not referenced after exiting the function and its area can be released + * after executing the function. + * \attention + * The size of the work area depends on the parameter you specified when initializing the library (when executing the ::criAtom_Initialize + * function).
+ * Therefore, you must initialize the library before executing this function.
+ * \sa CriAtomWavePlayerConfig, criAtomPlayer_CreateWavePlayer + */ +CriSint32 CRIAPI criAtomPlayer_CalculateWorkSizeForWavePlayer( + const CriAtomWavePlayerConfig *config); + +/*EN + * \brief Create a WAVE player + * \ingroup ATOMLIB_PLAYER + * \param[in] config WAVE player creation configuration structure + * \param[in] work work area + * \param[in] work_size work area size + * \return CriAtomPlayerHn Atom player handle + * \par Description: + * Creates a player capable of playing WAVE.
+ * The Atom player created with this function will have WAVE data decoding function.
+ *
+ * The format of the sound that can be played with the created player is determined by the parameter specified as the first argument (config). + *
+ * For example, if max_sampling_rate in config is set to 24000, the created player + * will not be able to play sound data with sampling rate above 24kHz.
+ * If you specify NULL for config, the player is created with the default setting (same parameter as when ::criAtomPlayer_SetDefaultConfigForWavePlayer + * is applied). + *
+ * When creating a player, the memory area (work area) used internally by the library + * must be allocated.
+ * There are two ways to allocate a work area.
+ * (a) User Allocator method: A user provided function is used to allocate/release memory.
+ * (b) Fixed Memory method: The required memory is passed directly to the library.
+ * Refer to the description of the ::criAtomPlayer_CreateAdxPlayer function for the details of each method.
+ *
+ * When you execute the ::criAtomPlayer_CreateWavePlayer function, Atom player is created + * and the handle (::CriAtomPlayerHn ) to control the player is returned.
+ * Atom player operations such as set data and decoder, start playback, and get status + * are all performed against the handle.
+ *
+ * The procedure to play sound data using the created Atom player handle is as follows:
+ * -# Use the ::criAtomPlayer_SetData function and set in the Atom player the data to play.
+ * (For file playback, use the ::criAtomPlayer_SetFile function or the ::criAtomPlayer_SetContentId + * function.)
+ * -# Start playback with the ::criAtomPlayer_Start function.
+ * \par Remarks: + * Information in argument config is referenced only within the function.
+ * It is not referenced after exiting the function and its area can be released + * after executing the function. + * \attention + * You must initialize the library before executing this function.
+ *
+ * The stream playback Atom player internally allocates the loader (CriFsLoaderHn).
+ * When creating a stream playback Atom player, the Atom library (or CRI File System library) must be initialized + * with setting that can allocate as many loaders as + * this function.
+ *
+ * This function is a blocking function.
+ * The time required to create the WAVE player depends on the platform.
+ * When you execute this function at timing requiring screen refresh such as game loop, + * processing is blocked by the millisecond, and frames may be dropped.
+ * Create/destroy WAVE player when change in load is permissible + * such as at the change of scenes.
+ *
+ * Currently, chunks of Wave files are not strictly analyzed.
+ * Parsing of a Wave file may fail if FORM chunk, COMM chunk, and SSND chunk + * are not included in this order or the file includes other chunks.
+ * In addition, only monophonic or stereo 16bit uncompressed data + * is supported at this time.
+ * \sa CriAtomWavePlayerConfig, criAtomPlayer_CalculateWorkSizeForWavePlayer, + * CriAtomPlayerHn, criAtomPlayer_Destroy, + * criAtomPlayer_SetData, criAtomPlayer_SetFile, criAtomPlayer_SetContentId, + * criAtomPlayer_Start, criAtomPlayer_CreateWavePlayer + */ +CriAtomPlayerHn CRIAPI criAtomPlayer_CreateWavePlayer( + const CriAtomWavePlayerConfig *config, void *work, CriSint32 work_size); + + /*EN + * \brief Work area size calculation for AIFF player creation + * \ingroup ATOMLIB_PLAYER + * \param[in] config Configuration structure for AIFF player creation + * \return CriSint32 Work area size + * \retval 0 or greater Processing finished normally + * \retval -1 Error occurred + * \par Description: + * Acquires the work area size required for creating a player for AIFF playback.
+ *
+ * If this function fails to calculate the work area size, it returns -1.
+ * The reason for work area size calculation failure can be determined by viewing the error callback message.
+ * \par Remarks: + * The amount of work memory required to create a player depends on the content of the player creation configuration + * structure (::CriAtomAiffPlayerConfig).
+ *
+ * If NULL is specified for the argument, the default settings + * (the same parameters used when ::criAtomPlayer_SetDefaultConfigForAiffPlayer was applied) + * will be used to calculate the work area size. + *
+ * The information of the config argument is referenced only in the function.
+ * Information is not referenced once the function exits, so the area used for config can be released without any problem +* after executing the function. + * \attention +* The size of the work area depends on the parameter you specified when initializing the library +* (when executing the ::criAtom_Initialize function).
+ * Therefore, the library must be initialized before this function is executed.
+ * \sa CriAtomAiffPlayerConfig, criAtomPlayer_CreateAiffPlayer + */ +CriSint32 CRIAPI criAtomPlayer_CalculateWorkSizeForAiffPlayer( + const CriAtomAiffPlayerConfig *config); + +/*EN + * \brief AIFF player creation + * \ingroup ATOMLIB_PLAYER + * \param[in] config Configuration structure for AIFF player creation + * \param[in] work Work area + * \param[in] work_size Work area size + * \return CriAtomPlayerHn Atom player handle + * \par Description: + * Creates a player capable of playing AIFF sounds.
+ * The Atom player created with this function will have AIFF data decoding function.
+ *
+ * The format of the sound that can be played with the created player is determined by the parameter + * specified as the first argument (config).
+ * For example, if the max_sampling_rate is set to 24000 in config, the created player + * will not be able to play sound data with sampling rate above 24 kHz.
+ * If NULL is specified for config, the default settings (the same parameters used when + * ::criAtomPlayer_SetDefaultConfigForAiffPlayer was applied) will be used to create the player. + *
+ * When creating a player, the memory area (work area) used internally by the library + * must be allocated.
+ * There are two ways to allocate a work area.
+ * (a) User Allocator method: A user provided function is used to allocate/release memory.
+ * (b) Fixed Memory Method: This method passes a necessary memory area directly to the library.
+ * Refer to the description of the ::criAtomPlayer_CreateAdxPlayer function for the details of each method.
+ *
+ * When the ::criAtomPlayer_CreateAiffPlayer function is executed, an Atom player is created + * and a handle for controlling the player (::CriAtomPlayerHn) is returned.
+ * Atom player operations such as set data and decoder, start playback, and get status + * are all performed against the handle.
+ *
+ * The procedure to play sound data using the created Atom player handle is as follows:
+ * -# Use the ::criAtomPlayer_SetData function and set in the Atom player the data to play.
+ * (For file playback, use the ::criAtomPlayer_SetFile function or the ::criAtomPlayer_SetContentId + * function.)
+ -# Use the ::criAtomPlayer_Start function to start playback.
+ * \par Remarks: + * The information of the config argument is referenced only in the function.
+ * Information is not referenced once the function exits, so the area used for config can be released + * without any problem. + * \attention + * You must initialize the library before executing this function.
+ *
+ * The stream playback Atom player internally allocates the loader (CriFsLoaderHn).
+ * When creating a stream playback Atom player, the Atom library (or CRI File System library) + * must be initialized with settings that can allocate as many loaders as + * there are player handles.
+ *
+ * This function is a blocking function.
+ * The time required to create an AIFF player varies depending on the platform.
+ * If this function is executed in the main game loop or any other time when a screen update is required, + * processing will be blocked for a few milliseconds which may result in dropped frames.
+ * Only create and destroy AIFF players when a fluctuation in load is acceptable, + * for example, during a scene change.
+ *
+ * Currently, chunks of AIFF files are not strictly analyzed.
+ * Parsing of an AIFF file may fail if FORM chunk, COMM chunk, and SSND chunk + * are not included in this order or the file includes other chunks.
+ * In addition, only monaural or stereo 16-bit uncompressed data + * is supported at this time.
+ * \sa CriAtomAiffPlayerConfig, criAtomPlayer_CalculateWorkSizeForAiffPlayer, + * CriAtomPlayerHn, criAtomPlayer_Destroy, + * criAtomPlayer_SetData, criAtomPlayer_SetFile, criAtomPlayer_SetContentId, + * criAtomPlayer_Start, criAtomPlayer_CreateAiffPlayer + */ +CriAtomPlayerHn CRIAPI criAtomPlayer_CreateAiffPlayer( + const CriAtomAiffPlayerConfig *config, void *work, CriSint32 work_size); + +/*EN + * \brief Calculate work area size required for creating raw PCM player + * \ingroup ATOMLIB_PLAYER + * \param[in] config raw PCM player creation configuration structure + * \return CriSint32 work area size + * \retval >= 0 successfully completed + * \retval -1 error occurred + * \par Description: + * Obtain the work area size required for creating a raw PCM playback player.
+ *
+ * If work area size calculation fails, this function returns -1.
+ * The reason for work area size calculation failure can be determined by viewing the error callback message.
+ * \par Remarks: + * The size of work memory required to create a player depends on the content of the player creation configuration + * structure ( ::CriAtomRawPcmPlayerConfig ).
+ *
+ * If you specify NULL as argument, the work area size is calculated using the default setting + * (i.e., the same parameters as when ::criAtomPlayer_SetDefaultConfigForRawPcmPlayer is used) are used + * for calculating the work area size. + *
+ * Information in argument config is referenced only within the function.
+ * It is not referenced after exiting the function and its area can be released + * after executing the function. + * \attention + * The size of the work area depends on the parameter you specified when initializing the library (when executing the ::criAtom_Initialize + * function).
+ * Therefore, you must initialize the library before executing this function.
+ * \sa CriAtomRawPcmPlayerConfig, criAtomPlayer_CreateRawPcmPlayer + */ +CriSint32 CRIAPI criAtomPlayer_CalculateWorkSizeForRawPcmPlayer( + const CriAtomRawPcmPlayerConfig *config); + +/*EN + * \brief Create raw PCM player + * \ingroup ATOMLIB_PLAYER + * \param[in] config raw PCM player creation configuration structure + * \param[in] work work area + * \param[in] work_size work area size + * \return CriAtomPlayerHn Atom player handle + * \par Description: + * Creates a player capable of playing raw PCM.
+ * The Atom player created with this function will have raw PCM data decoding function.
+ *
+ * The format of the sound that can be played with the created player is determined by the parameter specified as the first argument (config). + *
+ * For example, if max_sampling_rate in config is set to 24000, the created player + * will not be able to play sound data with sampling rate above 24kHz.
+ * If you specify NULL for config, the player is created with the default setting (same parameter as when ::criAtomPlayer_SetDefaultConfigForRawPcmPlayer + * is applied). + *
+ * When creating a player, the memory area (work area) used internally by the library + * must be allocated.
+ * There are two ways to allocate a work area.
+ * (a) User Allocator method: A user provided function is used to allocate/release memory.
+ * (b) Fixed Memory method: The required memory is passed directly to the library.
+ * Refer to the description of the ::criAtomPlayer_CreateAdxPlayer function for the details of each method.
+ *
+ * When you execute the ::criAtomPlayer_CreateRawPcmPlayer function, Atom player is created + * and the handle (::CriAtomPlayerHn ) to control the player is returned.
+ * Atom player operations such as set data and decoder, start playback, and get status + * are all performed against the handle.
+ *
+ * The procedure to play sound data using the created Atom player handle is as follows:
+ * -# Use the ::criAtomPlayer_SetData function and set in the Atom player the data to play.
+ * (For file playback, use the ::criAtomPlayer_SetFile function or the ::criAtomPlayer_SetContentId + * function.)
+ * -# Start playback with the ::criAtomPlayer_Start function.
+ * \par Remarks: + * Information in argument config is referenced only within the function.
+ * It is not referenced after exiting the function and its area can be released + * after executing the function. + * \attention + * You must initialize the library before executing this function.
+ *
+ * The stream playback Atom player internally allocates the loader (CriFsLoaderHn).
+ * When creating a stream playback Atom player, the Atom library (or CRI File System library) must be initialized + * with setting that can allocate as many loaders as + * this function.
+ *
+ * This function is a blocking function.
+ * The time required to create the raw PCM player depends on the platform.
+ * When you execute this function at timing requiring screen refresh such as game loop, + * processing is blocked by the millisecond, and frames may be dropped.
+ * Create/destroy raw PCM player when change in load is permissible + * such as at the change of scenes.
+ * \sa CriAtomRawPcmPlayerConfig, criAtomPlayer_CalculateWorkSizeForRawPcmPlayer, + * CriAtomPlayerHn, criAtomPlayer_Destroy, + * criAtomPlayer_SetData, criAtomPlayer_SetFile, criAtomPlayer_SetContentId, + * criAtomPlayer_Start, criAtomPlayer_CreateRawPcmPlayer + */ +CriAtomPlayerHn CRIAPI criAtomPlayer_CreateRawPcmPlayer( + const CriAtomRawPcmPlayerConfig *config, void *work, CriSint32 work_size); + +/*EN + * \brief Destroy Atom player + * \ingroup ATOMLIB_PLAYER + * \param[in] player Atom player handle + * \par Description: + * Destroys an Atom player.
+ * The memory allocated when you created the Atom player is released when you execute this function.
+ * Also, the Atom player handle specified as argument is disabled.
+ * \attention + * This function is a blocking function.
+ * If you attempt to destroy the Atom player while playing sound, + * resources are released after waiting to stop playback within this function.
+ * (If you are playing from a file, there is also a wait for load to complete.)
+ * Therefore, processing may be blocked for an extended time (few frames) within this function.
+ * Create/destroy Atom player when change in load is permissible + * such as at the change of scenes.
+ * \sa criAtomPlayer_CreateAdxPlayer, CriAtomPlayerHn + */ +void CRIAPI criAtomPlayer_Destroy(CriAtomPlayerHn player); + +/*EN + * \brief Set sound data (specify On-memory data) + * \ingroup ATOMLIB_PLAYER + * \param[in] player Atom player handle + * \param[in] buffer buffer address + * \param[in] buffer_size buffer size + * \par Description: + * Associates the sound data in memory to an Atom player.
+ * Specify the memory address and size with this function, and then start playback with the ::criAtomPlayer_Start function + * to play the specified data. + * \par Example: + * \code + * main() + * { + * : + * // Set sound data + * criAtomPlayer_SetData(player, buffer, buffer_size); + * + * // Play set sound data + * criAtomPlayer_Start(player); + * : + * } + * \endcode + * Note that once data is set, its information is retained within the Atom player until another data + * is set.
+ * Therefore, when repeatedly playing the same data, you do not need to set the data again each time + * you play. + * \par Remarks: + * When this function is executed within a data request callback function ( ::CriAtomPlayerDataRequestCbFunc ), + * next data is played concatenated to the end of the previously set sound.
+ * For example, when the following code is executed, data in buffer1 and buffer2 are seamlessly + * concatenated and played.
+ * (Then data in buffer2 is played repeatedly.)
+ * \code + * // Data request callback function + * void on_data_request(void *obj, CriAtomPlayerHn player) + * { + * // Set data to play successively + * criAtomPlayer_SetData(player, buffer2, buffer_size2); + * } + * + * main() + * { + * : + * // Register data request callback function + * criAtomPlayer_SetDataRequestCallback(player, on_data_request, NULL); + * + * // Set sound data + * criAtomPlayer_SetData(player, buffer1, buffer_size1); + * + * // Play set sound data + * criAtomPlayer_Start(player); + * : + * } + * \endcode + * When this function is executed within a data request callback function ( ::criAtomPlayer_SetFile ), + * on-memory data and file can be concatenated and played.
+ * (However, if the on-memory data to play first is too short, + * there may be a break because there is not enough time to load the file to play next.)
+ * \attention + * The player only stores the address and size of the buffer.
+ * (The data inside the buffer is not copied.)
+ * Therefore, the buffer must be maintained by the application + * until playback of the specified data is finished.
+ *
+ * This function can be executed only for player that is stopped.
+ * \sa criAtomPlayer_Start + */ +void CRIAPI criAtomPlayer_SetData( + CriAtomPlayerHn player, void *buffer, CriSint32 buffer_size); + +/*EN + * \brief Set sound data (specify file) + * \ingroup ATOMLIB_PLAYER + * \param[in] player Atom player handle + * \param[in] binder binder handle + * \param[in] path file path + * \par Description: + * Associates a sound file to an Atom player.
+ * After you specify a file with this function, when you start playback with the ::criAtomPlayer_Start function, + * specified file is played back in streaming.
+ * Note that file loading is not started when you execute this function.
+ * File loading is started when you execute the ::criAtomPlayer_Start function.
+ * \par Example: + * \code + * main() + * { + * : + * // Set sound file + * criAtomPlayer_SetFile(player, NULL, "sample.adx"); + * + * // Play set sound data + * criAtomPlayer_Start(player); + * : + * } + * \endcode + * Note that once file is set, its information is retained within the Atom player until another data + * is set.
+ * Therefore, when repeatedly playing the same data, you do not need to set the data again each time + * you play. + * \par Remarks: + * When this function is executed within a data request callback function ( ::CriAtomPlayerDataRequestCbFunc ), + * next data is played concatenated to the end of the previously set sound.
+ * For example, when the following code is executed, "sample1.adx" and "sample2.adx" are seamlessly + * concatenated and played.
+ * (Then "sample2.adx" is played repeatedly.)
+ * \code + * // Data request callback function + * void on_data_request(void *obj, CriAtomPlayerHn player) + * { + * // Set file to play successively + * criAtomPlayer_SetFile(player, NULL, "sample2.adx"); + * } + * + * main() + * { + * : + * // Register data request callback function + * criAtomPlayer_SetDataRequestCallback(player, on_data_request, NULL); + * + * // Set sound file + * criAtomPlayer_SetFile(player, NULL, "sample1.adx"); + * + * // Play set sound data + * criAtomPlayer_Start(player); + * : + * } + * \endcode + * Note that by specifying a binder for the second argument (binder), + * you can also play content of CPK file.
+ * \code + * main() + * { + * : + * // Bind the CPK file + * criFsBinder_BindCpk(binder, "sample.cpk", work, work_size, &bind_id); + * + * // Wait for the completion of binding + * for (;;) { + * // Check status + * criFsBinder_GetStatus(binder, &status); + * if (status == CRIFSBINDER_STATUS_COMPLETE) { + * break; + * } + * + * // Execute server processing + * criFs_ExecuteMain(); + * + * // Wait for Vsync etc. + * : + * } + * : + * // Set sound file + * // set content.adx in sample.cpk + * criAtomPlayer_SetFile(player, binder, "content.adx"); + * + * // Play set sound data + * criAtomPlayer_Start(player); + * : + * } + * \endcode + * When this function is executed within a data request callback function ( ::criAtomPlayer_SetData ), + * file and on-memory data can be concatenated and played. + * \attention + * To play from a file, Atom player supporting streaming + * playback is necessary.
+ * (Atom player must be created setting streaming_flag in ::CriAtomAdxPlayerConfig to CRI_TRUE.) + *
+ *
+ * This function can be executed only for player that is stopped.
+ * \sa CriAtomAdxPlayerConfig, criAtomPlayer_CreateAdxPlayer, criAtomPlayer_Start + */ +void CRIAPI criAtomPlayer_SetFile( + CriAtomPlayerHn player, CriFsBinderHn binder, const CriChar8 *path); + +/*EN + * \brief Set sound data (specify CPK content ID) + * \ingroup ATOMLIB_PLAYER + * \param[in] player Atom player handle + * \param[in] binder binder handle + * \param[in] id content ID + * \par Description: + * Associates a content to an Atom player.
+ * This function is used to play back a content file in a CPK file using CRI File System library + * by specifying file ID.
+ * After you specify a binder and content ID with this function, when you start playback with the ::criAtomPlayer_Start function, + * specified content file is played back in streaming.
+ * Note that file loading is not started when you execute this function.
+ * File loading is started when you execute the ::criAtomPlayer_Start function.
+ * \par Example: + * \code + * main() + * { + * : + * // Bind the CPK file + * criFsBinder_BindCpk(binder, "sample.cpk", work, work_size, &bind_id); + * + * // Wait for the completion of binding + * for (;;) { + * // Check status + * criFsBinder_GetStatus(binder, &status); + * if (status == CRIFSBINDER_STATUS_COMPLETE) { + * break; + * } + * + * // Execute server processing + * criFs_ExecuteMain(); + * + * // Wait for Vsync etc. + * : + * } + * : + * // Set sound file + * // Set the first content in sample.cpk + * criAtomPlayer_SetContentId(player, binder, 1); + * + * // Play set sound data + * criAtomPlayer_Start(player); + * : + * } + * \endcode + * Note that once file is set, its information is retained within the Atom player until another data + * is set.
+ * Therefore, when repeatedly playing the same data, you do not need to set the data again each time + * you play. + * \par Remarks: + * When this function is executed within a data request callback function ( ::CriAtomPlayerDataRequestCbFunc ), + * next data is played concatenated to the end of the previously set sound.
+ * For example, when the following code is executed, first data and second data are seamlessly + * concatenated and played.
+ * (Then the second data is played repeatedly.)
+ * \code + * // Data request callback function + * void on_data_request(void *obj, CriAtomPlayerHn player) + * { + * // Get binder + * binder = (CriFsBinderHn)obj; + * + * // Set file to play successively + * // ->Set the second content in the binder + * criAtomPlayer_SetContentId(player, binder, 2); + * } + * + * main() + * { + * : + * // Register data request callback function + * criAtomPlayer_SetDataRequestCallback(player, on_data_request, binder); + * + * // Set sound file + * // ->Set the first content in the binder + * criAtomPlayer_SetContentId(player, binder, 1); + * + * // Play set sound data + * criAtomPlayer_Start(player); + * : + * } + * \endcode + * When this function is executed within a data request callback function ( ::criAtomPlayer_SetData ), + * file and on-memory data can be concatenated and played. + * \attention + * To play from a file, Atom player supporting streaming + * playback is necessary.
+ * (Atom player must be created setting streaming_flag in ::CriAtomAdxPlayerConfig to CRI_TRUE.) + *
+ *
+ * This function can be executed only for player that is stopped.
+ * \sa CriAtomAdxPlayerConfig, criAtomPlayer_CreateAdxPlayer, criAtomPlayer_Start + */ +void CRIAPI criAtomPlayer_SetContentId( + CriAtomPlayerHn player, CriFsBinderHn binder, CriSint32 id); + +/*EN + * \brief Set sound data (specify sound data ID) + * \ingroup ATOMLIB_PLAYER + * \param[in] player Atom player handle + * \param[in] awb AWB handle + * \param[in] id wave data ID + * \par Description: + * Associates a wave data to be played back to an Atom player.
+ * After you specify an AWB handle and wave data ID with this function, when you start playback with the ::criAtomPlayer_Start function, + * specified wave data is played back in streaming.
+ * Note that file loading is not started when you execute this function.
+ * File loading is started when you execute the ::criAtomPlayer_Start function.
+ * \par Example: + * \code + * main() + * { + * : + * // Create an AWB handle by loading AWB TOC information + * awb = criAtomAwb_LoadToc(NULL, "sample.awb", NULL, 0); + * : + * // Set wave data + * // Set the first wave data in AWB + * criAtomPlayer_SetWaveId(player, awb, 1); + * + * // Play set sound data + * criAtomPlayer_Start(player); + * : + * } + * \endcode + * Note that once file is set, its information is retained within the Atom player until another data + * is set.
+ * Therefore, when repeatedly playing the same data, you do not need to set the data again each time + * you play. + * \par Remarks: + * When this function is executed within a data request callback function ( ::CriAtomPlayerDataRequestCbFunc ), + * next data is played concatenated to the end of the previously set sound.
+ * For example, when the following code is executed, first data and second data are seamlessly + * concatenated and played.
+ * (Then the second data is played repeatedly.)
+ * \code + * // Data request callback function + * void on_data_request(void *obj, CriAtomPlayerHn player) + * { + * // Get AWB handle + * awb = (CriAtomAwbHn)obj; + * + * // Set file to play successively + * // ->Set the second wave data in AWB + * criAtomPlayer_SetWaveId(player, awb, 2); + * } + * + * main() + * { + * : + * // Register data request callback function + * criAtomPlayer_SetDataRequestCallback(player, on_data_request, awb); + * + * // Set wave data + * // Set the first wave data in AWB + * criAtomPlayer_SetWaveId(player, awb, 1); + * + * // Play set wave data data + * criAtomPlayer_Start(player); + * : + * } + * \endcode + * When this function is executed within a data request callback function ( ::criAtomPlayer_SetData ), + * file and on-memory data can be concatenated and played. + * \attention + * To play from a file, Atom player supporting streaming + * playback is necessary.
+ * (Atom player must be created setting streaming_flag in ::CriAtomAdxPlayerConfig to CRI_TRUE.) + *
+ *
+ * This function can be executed only for player that is stopped.
+ * \sa CriAtomAdxPlayerConfig, criAtomPlayer_CreateAdxPlayer, criAtomPlayer_Start + */ +void CRIAPI criAtomPlayer_SetWaveId( + CriAtomPlayerHn player, CriAtomAwbHn awb, CriSint32 id); + +/*EN + * \brief Re-set same sound data + * \ingroup ATOMLIB_PLAYER + * \param[in] player Atom player handle + * \par Description: + * Instructs the Atom player to replay the data last played.
+ * \par Example: + * The same sound data can be played endlessly with the following process:
+ * \code + * // Data request callback function + * void on_data_request(void *obj, CriAtomPlayerHn player) + * { + * // Re-set last played data + * criAtomPlayer_SetPreviousDataAgain(player); + * } + * + * main() + * { + * : + * // Register data request callback function + * criAtomPlayer_SetDataRequestCallback(player, on_data_request, NULL); + * + * // Set sound data + * criAtomPlayer_SetData(player, buffer, buffer_size); + * + * // Play set sound data + * criAtomPlayer_Start(player); + * : + * } + * \endcode + * \attention + * This function is used only within the data request callback function.
+ * (It can be executed from other functions, but there is no effect.)
+ * \sa criAtomPlayer_SetDataRequestCallback + */ +void CRIAPI criAtomPlayer_SetPreviousDataAgain(CriAtomPlayerHn player); + +/*EN + * \brief Callback function re-execution request + * \ingroup ATOMLIB_PLAYER + * \param[in] player Atom player handle + * \par Description: + * Delays processing of data request callback function.
+ * When the sound data to play next is not determined at the time the data request callback function is executed, + * this callback function can be executed to + * retry the callback function.
+ * (Data request callback function is called once more after a few milliseconds.) + * \par Remarks: + * If nothing is performed within data request callback function, Atom player's status + * changes to CRIATOMPLAYER_STATUS_PLAYEND.
+ * However, if this function is executed within data request callback function, Atom player + * maintains the status CRIATOMPLAYER_STATUS_PLAYING. + * \attention + * When this function is executed, Atom player's status remains CRIATOMPLAYER_STATUS_PLAYING, + * but there may be break in sound output.
+ * (If there is not enough time to read data, there may be silence between the previous sound + * and the sound to be set next.)
+ *
+ * This function can only be used within the data request callback function.
+ * (An error occurs if it is executed outside the data request callback function.)
+ * \sa criAtomPlayer_SetDataRequestCallback + */ +void CRIAPI criAtomPlayer_DeferCallback(CriAtomPlayerHn player); + +/*EN + * \brief Start playback + * \ingroup ATOMLIB_PLAYER + * \param[in] player Atom player handle + * \par Description: + * Starts processing for sound data playback.
+ * Before executing this function, you must use the ::criAtomPlayer_SetData function + * to set the sound data to play in the Atom player.
+ * For example, when playing On-memory sound data, you must use the + * ::criAtomPlayer_SetData function as follows to set the sound data and then execute + * this function.
+ * \code + * main() + * { + * : + * // Set sound data + * criAtomPlayer_SetData(player, buffer, buffer_size); + * + * // Play set sound data + * criAtomPlayer_Start(player); + * : + * } + * \endcode + * After executing this function, you can check the progress of the playback (sounding is started or playback has completed) + * by obtaining the status.
+ * Use the ::criAtomPlayer_GetStatus function to obtain the status.
+ * The ::criAtomPlayer_GetStatus function returns five types of status.
+ * -# CRIATOMPLAYER_STATUS_STOP + * -# CRIATOMPLAYER_STATUS_PREP + * -# CRIATOMPLAYER_STATUS_PLAYING + * -# CRIATOMPLAYER_STATUS_PLAYEND + * -# CRIATOMPLAYER_STATUS_ERROR + * . + * At the time Atom player is created, the status of the Atom player is stop status + * ( CRIATOMPLAYER_STATUS_STOP ).
+ * After setting the sound data to play, the Atom player status changes to + * preparation status ( CRIATOMPLAYER_STATUS_PREP ) when this function is executed.
+ * (In CRIATOMPLAYER_STATUS_PREP status, the player is waiting to receive data or start decoding.)
+ * When there is sufficient data to start playing, the Atom player status changes to + * playing status ( CRIATOMPLAYER_STATUS_PLAYING ) and sound output starts.
+ * When playback of all set data completes, the Atom player status changes to play end status + * ( CRIATOMPLAYER_STATUS_PLAYEND ).
+ * If an error occurs during playback, the Atom player status changes to + * error status ( CRIATOMPLAYER_STATUS_ERROR ).
+ *
+ * By checking the Atom player status and switching processing according to status, + * you can create a program that is linked with sound playback status.
+ * For example, code as follows to continue processing after waiting for sound playback to complete. + * \code + * main() + * { + * : + * // Set sound data + * criAtomPlayer_SetData(player, buffer, buffer_size); + * + * // Play set sound data + * criAtomPlayer_Start(player); + * + * // Wait for playback completion + * for (;;) { + * // Get status + * status = criAtomPlayer_GetStatus(player); + * + * // Check status + * if (status == CRIATOMPLAYER_STATUS_PLAYEND) { + * // Exit loop when playback is complete + * break; + * } + * + * // Execute server processing + * criAtom_ExecuteMain(); + * + * // Refresh screen display etc. + * : + * } + * : + * } + * \endcode + * \par Remarks: + * After starting playback, there is a time lag before the sound is actually played back.
+ * When playing on-memory data (when data is set with the ::criAtomPlayer_SetData function), + * after executing this function, the status changes to + * CRIATOMPLAYER_STATUS_PLAYEND when server process is executed for the first time.
+ * However, during streaming playback, status remains + * CRIATOMPLAYER_STATUS_PREP until sufficient data necessary to continue playback is buffered.
+ * (Status changes to CRIATOMPLAYER_STATUS_PLAYING when sufficient data is supplied.)
+ *
+ * Note that the timing of status change to CRIATOMPLAYER_STATUS_PLAYING is + * always when playback instruction is issued to the sound library.
+ * Therefore, the time sound is actually output from the speaker depends on the + * processing time of each platform's sound library.
+ *
+ * The sound output start timing for streaming playback varies according to the number of sounds to be played back simultaneously + * and the loading speed of the device.
+ * In order to start sound output at the desired timing during streaming playback, + * use the ::criAtomPlayer_Pause function to pause and resume when Atom player's status + * changes to CRIATOMPLAYER_STATUS_PLAYING.
+ * (If the status changes to CRIATOMPLAYER_STATUS_PLAYING while paused, + * sound output starts when the first server process executes after pause is canceled.
+ *
+ * The specific code is as follows:
+ * \code + * main() + * { + * : + * // Set sound file + * criAtomPlayer_SetData(player, NULL, "sample.adx"); + * + * // Pause before starting playback + * criAtomPlayer_Pause(player, CRI_TRUE); + * + * // Play set sound data + * criAtomPlayer_Start(player); + * + * // Wait till status changes to CRIATOMPLAYER_STATUS_PLAYING + * for (;;) { + * // Get status + * status = criAtomPlayer_GetStatus(player); + * + * // Check status + * if (status == CRIATOMPLAYER_STATUS_PLAYING) { + * // Exit loop when status becomes CRIATOMPLAYER_STATUS_PLAYING + * break; + * } + * + * // Execute server processing + * criAtom_ExecuteMain(); + * + * // Refresh screen display etc. + * : + * } + * + * // Resume + * // ->Sound output starts when the next server process is executed + * criAtomPlayer_Pause(player, CRI_FALSE); + * : + * } + * \endcode + * \attention + * This function cannot be executed against an Atom player that has already started playing.
+ * (Unlike the ADX library, an error occurs if an already playing Atom player is instructed to start playback once + * more.)
+ * When instructing the Atom player to play, be sure to check the status beforehand to check that it is not + * in preparation ( CRIATOMPLAYER_STATUS_PREP ) or playing ( CRIATOMPLAYER_STATUS_PLAYING ). + * + * \sa criAtomPlayer_SetData, criAtomPlayer_SetFile, criAtomPlayer_GetStatus, + * criAtomPlayer_Pause, criAtom_ExecuteMain + */ +void CRIAPI criAtomPlayer_Start(CriAtomPlayerHn player); + +/*EN + * \brief Stop playback + * \ingroup ATOMLIB_PLAYER + * \param[in] player Atom player handle + * \par Description: + * Issues stop playback request.
+ * When you execute this function against an Atom player that is playing sound, the Atom player stops playback + * (stops file read, sound output) and changes the status to stop status + * ( CRIATOMPLAYER_STATUS_STOP ).
+ * If you execute this function against an already stopped Atom player (Atom player with status CRIATOMPLAYER_STATUS_PLAYEND or + * CRIATOMPLAYER_STATUS_ERROR), + * the Atom player status changes to CRIATOMPLAYER_STATUS_STOP. + * \attention + * If you execute this function against Atom player that is playing a sound, the status may not change immediately to + * CRIATOMPLAYER_STATUS_STOP.
+ * (It may take some time to enter stop status.)
+ * Therefore, to continue playback of another sound data after stopping playback with this function, + * be sure to check that the status has changed to CRIATOMPLAYER_STATUS_STOP + * and then set the next data (or start playback).
+ *
+ * \code + * main() + * { + * : + * // Request to stop playback + * criAtomPlayer_Stop(player); + * + * // Wait till status changes to CRIATOMPLAYER_STATUS_STOP + * for (;;) { + * // Get status + * status = criAtomPlayer_GetStatus(player); + * + * // Check status + * if (status == CRIATOMPLAYER_STATUS_STOP) { + * // Exit loop when status becomes CRIATOMPLAYER_STATUS_STOP + * break; + * } + * + * // Execute server processing + * criAtom_ExecuteMain(); + * + * // Refresh screen display etc. + * : + * } + * + * // Set another sound file + * criAtomPlayer_SetData(player, NULL, "sample.adx"); + * + * // Play set sound data + * criAtomPlayer_Start(player); + * : + * } + * \endcode + * \sa criAtomPlayer_Start, criAtomPlayer_GetStatus + */ +void CRIAPI criAtomPlayer_Stop(CriAtomPlayerHn player); + +/*EN + * \brief Pause/resume playback + * \ingroup ATOMLIB_PLAYER + * \param[in] player Atom player handle + * \param[in] flag operation flag (CRI_TRUE =pause, CRI_FALSE =resume) + * \par Description: + * Pauses or resumes playback.
+ * Whether to pause or resume is specified with the argument flag.
+ * Playback is paused when flag is CRI_TRUE.
+ * Playback is resumed when flag is CRI_FALSE.
+ * Whether the Atom player is paused can be checked with the ::criAtomPlayer_IsPaused + * function.
+ *
+ * This function is mainly used as follows:
+ * - Pause/resume sound output + * - Cue streaming playback + * . + *
+ * [About pause/resume sound output] + * When an active Atom player is paused, the sound that was output is interrupted.
+ * When a paused Atom player is resumed, playback resumes where it was + * interrupted.
+ *
+ * [About cuing streaming playback] + * Pause can also be used for Atom player before starting playback.
+ * When an Atom player is paused before starting playback, no sound is output when the + * ::criAtomPlayer_Start function is issued for the paused Atom player.
+ * However, preparation for playback is made and if sufficient data is supplied, the status changes to + * CRIATOMPLAYER_STATUS_PLAYING.
+ *
+ * Atom player stopped at status CRIATOMPLAYER_STATUS_PLAYING can start + * sound output when playback is resumed.
+ * Therefore, the sound output timing for streaming output can be synchronized with other actions + * according to the following procedure:
+ * -# Pause Atom player with the ::criAtomPlayer_Pause function. + * -# Instruct Atom player to start playback with the ::criAtomPlayer_Start function. + * -# Wait until Atom player status changes to CRIATOMPLAYER_STATUS_PLAYING. + * -# Resume playback with the ::criAtomPlayer_Pause function when ready to start sound output. + * . + *
+ * The specific code is as follows:
+ * \code + * main() + * { + * : + * // Set sound file + * criAtomPlayer_SetData(player, NULL, "sample.adx"); + * + * // Pause before starting playback + * criAtomPlayer_Pause(player, CRI_TRUE); + * + * // Play set sound data + * criAtomPlayer_Start(player); + * + * // Wait till status changes to CRIATOMPLAYER_STATUS_PLAYING + * for (;;) { + * // Get status + * status = criAtomPlayer_GetStatus(player); + * + * // Check status + * if (status == CRIATOMPLAYER_STATUS_PLAYING) { + * // Exit loop when status becomes CRIATOMPLAYER_STATUS_PLAYING + * break; + * } + * + * // Execute server processing + * criAtom_ExecuteMain(); + * + * // Refresh screen display etc. + * : + * } + * + * // Resume + * // ->Sound output starts when the next server process is executed + * criAtomPlayer_Pause(player, CRI_FALSE); + * : + * } + * \endcode + * \par Remarks: + * Strictly speaking, playback is paused the first time server process executes after executing the ::criAtomPlayer_Pause + * function.
+ * Therefore, if pause => resume is performed before server process executes, + * playback continues without any break in sound. + *
+ * No error will occur if pause is performed for a paused Atom player + * or resume is performed for an Atom player that is not paused.
+ * (The function returns without any operation.) + * \sa criAtomPlayer_IsPaused, criAtomPlayer_Start + */ +void CRIAPI criAtomPlayer_Pause(CriAtomPlayerHn player, CriBool flag); + +/*EN + * \brief Check whether player is paused + * \ingroup ATOMLIB_PLAYER + * \param[in] player Atom player handle + * \return CriBool pause status (CRI_TRUE = paused, CRI_FALSE = resumed) + * \par Description: + * Checks whether the Atom player is paused.
+ * Whether the player is paused is determined by the value set in the argument flag.
+ * Atom player is paused when flag is CRI_TRUE.
+ * Atom player is resumed when flag is CRI_FALSE.
+ * \par Remarks: + * This function simply returns the operation flag specified by the ::criAtomPlayer_Pause function.
+ * (The value set in the second argument of ::criAtomPlayer_Pause function is returned as the flag.)
+ * Therefore, the result of this function may not correctly represent whether the sound output is actually stopped. + *
+ * (Due to a time lag between the execution of the ::criAtomPlayer_Pause function + * and the sound output actually stopping.) + * \sa criAtomPlayer_Pause + */ +CriBool CRIAPI criAtomPlayer_IsPaused(CriAtomPlayerHn player); + +/*EN + * \brief Get status + * \ingroup ATOMLIB_PLAYER + * \param[in] player Atom player handle + * \return CriAtomPlayerStatus status + * \par Description: + * Obtains Atom player status.
+ * Status is a value indicating the playback status of Atom player and can have the following five values:
+ * -# CRIATOMPLAYER_STATUS_STOP + * -# CRIATOMPLAYER_STATUS_PREP + * -# CRIATOMPLAYER_STATUS_PLAYING + * -# CRIATOMPLAYER_STATUS_PLAYEND + * -# CRIATOMPLAYER_STATUS_ERROR + * . + * At the time Atom player is created, the status of the Atom player is stop status + * ( ::CRIATOMPLAYER_STATUS_STOP ).
+ * After setting the sound data to play, execute the ::criAtomPlayer_Start function to + * change the Atom player status to preparation status ( ::CRIATOMPLAYER_STATUS_PREP ).
+ * (In ::CRIATOMPLAYER_STATUS_PREP status, the player is waiting to receive data or start decoding.)
+ * When there is sufficient data to start playing, the Atom player status changes to + * playing status ( ::CRIATOMPLAYER_STATUS_PLAYING ) and sound output starts.
+ * When playback of all set data completes, the Atom player status changes to play end status + * ( ::CRIATOMPLAYER_STATUS_PLAYEND ).
+ * If an error occurs during playback, the Atom player status changes to + * ( ::CRIATOMPLAYER_STATUS_ERROR ).
+ *
+ * By checking the Atom player status and switching processing according to status, + * you can create a program that is linked with sound playback status.
+ * For example, code as follows to continue processing after waiting for sound playback to complete. + * \code + * main() + * { + * : + * // Set sound data + * criAtomPlayer_SetData(player, buffer, buffer_size); + * + * // Play set sound data + * criAtomPlayer_Start(player); + * + * // Wait for playback completion + * for (;;) { + * // Get status + * status = criAtomPlayer_GetStatus(player); + * + * // Check status + * if (status == CRIATOMPLAYER_STATUS_PLAYEND) { + * // Exit loop when playback is complete + * break; + * } + * + * // Execute server processing + * criAtom_ExecuteMain(); + * + * // Refresh screen display etc. + * : + * } + * : + * } + * \endcode + * \par Remarks: + * If data load from device fails or data error occurs + * (when invalid data is loaded), the Atom player status will indicate an error.
+ * In order to display an error message from the application when an data load error occurs, + * check that the status is CRIATOMPLAYER_STATUS_ERROR + * and display an approriate error message.
+ * \code + * main() + * { + * : + * // Get status + * status = criAtomPlayer_GetStatus(player); + * + * // Check status + * if (status == CRIATOMPLAYER_STATUS_ERROR) { + * // Display error message when status becomes CRIATOMPLAYER_STATUS_ERROR + * : + * } + * : + * } + * \endcode + * \sa criAtomPlayer_Start + */ +CriAtomPlayerStatus CRIAPI criAtomPlayer_GetStatus(CriAtomPlayerHn player); + +/*EN + * \brief Get number of channels + * \ingroup ATOMLIB_PLAYER + * \param[in] player Atom player handle + * \return CriSint32 number of channels + * \par Description: + * Obtains the number of channels for the sound being played by the Atom player.
+ *
+ * This function returns -1 if it cannot obtain the number of channels.
+ * \attention + * Playback time cannot be obtained until player status becomes ::CRIATOMPLAYER_STATUS_PLAYING. + *
+ * (An error is returned if this function is executed when the status is ::CRIATOMPLAYER_STATUS_PREP .)
+ */ +CriSint32 CRIAPI criAtomPlayer_GetNumChannels(CriAtomPlayerHn player); + +/*EN + * \brief Get number of played samples + * \ingroup ATOMLIB_PLAYER + * \param[in] player Atom player handle + * \param[out] num_played number of played samples (sample units) + * \param[out] sampling_rate sampling rate (Hz) + * \return CriBool whether the number of samples is obtained ( CRI_TRUE = obtained, CRI_FALSE = not obtained) + * \par Description: + * Obtains the number of played samples and sampling rate + * of sound being played with the Atom player.
+ * Playback time is expressed by the number of sample units, and the sampling rate is expressed in Hz.
+ *
+ * If the number of samples correctly is obtained, return value is CRI_TRUE.
+ * If the number of played samples cannot be obtained, return value is CRI_FALSE.
+ * (The sampling rate will be -1.)
+ * \par Remarks: + * NULL can be specified for unnecessary argument.
+ * For example, to obtain only the sampling rate, NULL can be specified for the second argument ( num_played ). + * + *
+ * The number of played samples returned by this function is the cumulative value of the output sound data.
+ * Therefore, even during loop playback or seamless concatenated playback, + * the number of samples will not be rewound according to the playback position.
+ * Also, the player when paused with the ::criAtomPlayer_Pause function, + * counting of played samples will also stop.
+ * (Counting will resume when the player is resumed.) + * \attention + * The number of played samples cannot be obtained until player status becomes ::CRIATOMPLAYER_STATUS_PLAYING. + *
+ * (An error is returned if this function is executed when the status is ::CRIATOMPLAYER_STATUS_PREP .)
+ *
+ * The accuracy of the played sample count depends on the platform's sound library. + */ +CriBool CRIAPI criAtomPlayer_GetNumPlayedSamples( + CriAtomPlayerHn player, CriSint64 *num_played, CriSint32 *sampling_rate); + +/*EN + * \brief Acquiring the size of decoded data + * \ingroup ATOMLIB_PLAYER + * \param[in] player Atom player handle + * \return CriSint64 Amount of decoded data (bytes) + * \par Description: + * Returns the number of bytes of sound data decoded in the Atom player.
+ * \par Note + * The amount returned by this function shows the accumulated size since playback is started.
+ * Therefore, even during loop playback or seamless concatenated playback, + * the amount will not be rewound based on the playback position.
+ * When playback is paused with the ::criAtomPlayer_Pause function, + * the count-up of the amount is also stopped.
+ * (Count-up starts again when playback is resumed.) + * \attention + * When HCA-MX is used or in a platform where compressed sound data is sent directly to hardware + * (codec where decoding is hidden by the platform SDK), + * this function cannot acquire the amount of decoded data.
+ */ +CriSint64 CRIAPI criAtomPlayer_GetDecodedDataSize(CriAtomPlayerHn player); + +/*EN + * \brief Acquiring the number of decoded samples + * \ingroup ATOMLIB_PLAYER + * \param[in] player Atom player handle + * \return CriSint64 Number of decoded samples + * \par Description: + * Returns the number of decoded samples in the Atom player.
+ * \par Note + * The number of decoded samples that is returned by this function shows the accumulated number since playback is started.
+ * Therefore, even during loop playback or seamless concatenated playback, + * the number of decoded samples will not be rewound based on the playback position.
+ * When playback is paused with the ::criAtomPlayer_Pause function, + * the count-up of the number is also stopped.
+ * (Count-up starts again when playback is resumed.) + * \attention + * When HCA-MX is used or in a platform where compressed sound data is sent directly to hardware + * (codec where decoding is hidden by the platform SDK), + * this function cannot acquire the number of decoded samples.
+ */ +CriSint64 CRIAPI criAtomPlayer_GetNumDecodedSamples(CriAtomPlayerHn player); + +/*EN + * \brief Get playback time + * \ingroup ATOMLIB_PLAYER + * \param[in] player Atom player handle + * \return CriSint64 playback time (milliseconds) + * \par Description: + * Obtains the current playback time for the sound being played by the Atom player.
+ * Playback time is in milliseconds.
+ *
+ * This function returns -1 if there is an error in the argument (if player is NULL).
+ * If this function is executed when playback time is unavailable such as when the player is stopped or in preparation, + * it will return 0.
+ * \par Remarks: + * Playback time is calculated based on the number of played samples.
+ * Therefore, if the pitch is increased with the ::criAtomPlayer_SetFrequencyRatio function, + * playback time will be faster than the actual time.
+ * (If the pitch is reduced, playback time will by slower than the actual time.)
+ *
+ * The playback time returned by this function is the cumulative value of the output sound data.
+ * Therefore, even during loop playback or seamless concatenated playback, + * the time will not be rewound according the playback position.
+ * Also, the player when paused with the ::criAtomPlayer_Pause function, + * counting of played time will also stop.
+ * (Counting will resume when the player is resumed.) + * \attention + * Playback time cannot be obtained until player status becomes ::CRIATOMPLAYER_STATUS_PLAYING. + *
+ * Zero is returned if this function is executed when the status is ::CRIATOMPLAYER_STATUS_PREP .)
+ *
+ * The accuracy of the playback time depends on the platform's sound library. + * \sa criAtomPlayer_GetStatus, criAtomPlayer_SetFrequencyRatio + */ +CriSint64 CRIAPI criAtomPlayer_GetTime(CriAtomPlayerHn player); + +/*EN + * \brief Get playback sound format information + * \ingroup ATOMLIB_PLAYER + * \param[in] player Atom player handle + * \param[out] info format information + * \return CriBool whether information was obtained ( CRI_TRUE = obtained, CRI_FALSE = not obtained) + * \par Description: + * Obtains format information for the sound played by the ::criAtomPlayer_Start function.
+ *
+ * If format information is obtained, this function returns CRI_TRUE.
+ * If format information cannot be obtained, this function returns CRI_FALSE.
+ * \attention + * This function can obtain format information only during sound playback.
+ * Format information cannot be obtained if this function is executed before starting playback or during playback preparation.
+ * \sa criAtomPlayer_Start, criAtomPlayer_GetStatus + */ +CriBool CRIAPI criAtomPlayer_GetFormatInfo( + CriAtomPlayerHn player, CriAtomFormatInfo *info); + +/*EN + * \brief Get amount of data remaining in input buffer + * \ingroup ATOMLIB_PLAYER + * \param[in] player Atom player handle + * \return CriSint32 amount of data remaining in input buffer (bytes) + * \par Description: + * Obtains the amount of data remaining in the Atom player input buffer.
+ * \par Remarks: + * This is a debug function that can be used only for retrieving information.
+ *
+ * If audio break problem occurs, this function can be used to + * check whether there is data remaining in the input buffer.
+ * If the player status is ::CRIATOMPLAYER_STATUS_PLAYING , + * but the amount of remaining data is zero for an extended, + * supply of data may be blocked due to some kind of error.
+ */ +CriSint32 CRIAPI criAtomPlayer_GetInputBufferRemainSize(CriAtomPlayerHn player); + +/*EN + * \brief Get amount of data remaining in output buffer + * \ingroup ATOMLIB_PLAYER + * \param[in] player Atom player handle + * \return CriSint32 amount of data remaining in output buffer (number of samples) + * \par Description: + * Obtains the amount of data remaining in the Atom player output buffer.
+ * \par Remarks: + * This is a debug function that can be used only for retrieving information.
+ *
+ * If audio break problem occurs, this function can be used to + * check whether there is data remaining in the output buffer.
+ * If the player status is ::CRIATOMPLAYER_STATUS_PLAYING , + * but the amount of remaining data is zero for an extended, decode process + * may be disabled due to some kind of error.
+ * \attention + * This function is valid only when decoding sound data in the Atom library.
+ * On platform that sends compressed sound data directly to hardware + * (codec with decode process hidden by platform SDK), + * this function cannot be used to obtain the remaining amount of data.
+ */ +CriSint32 CRIAPI criAtomPlayer_GetOutputBufferRemainSamples(CriAtomPlayerHn player); + +/*EN + * \brief Specify playback start position + * \ingroup ATOMLIB_PLAYER + * \param[in] player Atom player handle + * \param[in] start_time_ms playback start position (milliseconds) + * \par Description: + * Specifies the playback starting position for the sound played by the Atom player.
+ * In order to play sound data from the middle, the playback start position must be specified with this + * function before starting playback.
+ *
+ * Specify the playback start position in milliseconds.
+ * For example, if this function is executed with start_time_ms set to 10000, + * the next sound data is played from position at 10 seconds. + * \par Remarks: + * Even if the playback position is specified with this function, playback may not start exactly + * at the specified time.
+ * (Depending on the sound codec, playback may start slightly before the specified time.)
+ *
+ * When playing from the middle of sound data, start of sound output may be delayed compared to when starting from + * the beginning of the sound data.
+ * This is because the sound data header is first analyzed, + * data is reloaded after jumping to the specified position, and then played. + * \attention + * A 64 bit value can be specified in start_time_ms, but currently playback time greater than 32 bits + * cannot be specified.
+ *
+ * Even if this function is executed during sound playback, playback position of the sound being played is unchanged.
+ * The value set with this function is accessed only when starting sound playback with the ::criAtomPlayer_Start function. + *
+ *
+ * It may not be possible to specify the playback start position even for device specific sound format.
+ *
+ * Encrypted ADX data cannot be played correctly from the middle.
+ * Noise will be generated if encrypted ADX data is played after changing the playback position with this function. + * \sa criAtomPlayer_Start + */ +void CRIAPI criAtomPlayer_SetStartTime(CriAtomPlayerHn player, CriSint64 start_time_ms); + +/*EN + * \brief Specify volume + * \ingroup ATOMLIB_PLAYER + * \param[in] player Atom player handle + * \param[in] vol volume + * \par Description: + * Specifies the output sound volume.
+ * This function can be used to change the volume of + * sound played with Atom player.
+ *
+ * Volume is the scaling factor for the amplitude of the sound data (unit is not decibel).
+ * For example, if you specify 1.0f, the original sound is output with the volume unchanged.
+ * If you specify 0.5f, sound is output at volume equal to data with half the amplitude of the original sound + * wave (-6dB).
+ * If you specify (1.0f / 65536.0f) or less, the sound is muted (silent). + * \Remarks: + * Volume value greater than or equal to 1.0f can be specified.
+ * (In CRI Atom library Ver.1.21.07, this specification change has been made.)
+ * When specifying a value over 1.0f, waveform can be played at the volume + * greater than the material depending on the platform.
+ * When specifying a value less than (1.0f / 65536.0f) or less for volume, the value is clipped to 0.0f.
+ * (Even if specifying a value less than 0.0f, the phase is never reversed.)
+ *
+ * The setting of this function and the volume setting of the following functions + * are controlled independently.
+ * - ::criAtomPlayer_SetChannelVolume + * - ::criAtomPlayer_SetSendLevel + * For example, if this function set 0.5f and the ::criAtomPlayer_SetChannelVolume + * function also sets 0.5f, the volume of the output sound will be 0.25f times + * the original sound.
+ * (Calculated as 0.5f x 0.5f=0.25f.)
+ * \attention + * If specifying volume over 1.0f, the following points should be considered:
+ * - The volume behavior may differ on each platform. + * - The sound cracking may occur. + * . + *
+ * Even when specifying volume over 1.0f, whether the sound is played at the + * volume greater than the source waveform depends on the platform or + * the audio compression codec.
+ * Therefore, when adjusting volume on the multi-platform title, it is + * recommended not to use volume over 1.0f.
+ * (If specifying volume over 1.0f, even when playing the same waveform, + * it may be played at the different volume depending on the platform.)
+ *
+ * And, even on the platform where volume can be increased, its hardware has + * the upper limit of the volume at which the sound can be output, and + * a noise caused by the sound cracking may be generated.
+ * \sa criAtomPlayer_GetVolume + */ +void CRIAPI criAtomPlayer_SetVolume(CriAtomPlayerHn player, CriFloat32 vol); + +/*EN + * \brief Volume specification + * \ingroup ATOMLIB_PLAYER + * \param[in] player Atom player handle + * \return CriFloat32 Volume value + * \par Description: + * Acquires the output sound volume.
+ * Volume is the scaling factor for the amplitude of the sound data (unit is not decibels).
+ * \sa criAtomPlayer_SetVolume + */ +CriFloat32 CRIAPI criAtomPlayer_GetVolume(CriAtomPlayerHn player); + +/*EN + * \brief Specify volume for each channel + * \ingroup ATOMLIB_PLAYER + * \param[in] player Atom player handle + * \param[in] ch channel number + * \param[in] vol volume (0.0f to 1.0f) + * \par Description: + * Specifies the output sound volume for each channel.
+ * This function can be used to change the volume of + * the sounde played with Atom player for each channel.
+ *
+ * Specify the "sound data channel number" as the channel number in the second argument.
+ * (Not output speaker ID.)
+ * For example, if the volume of monophonic sound number 0 is changed, + * all volumes of sound output from the speaker are changed.
+ * (Same behavior as executing the ::criAtomPlayer_SetVolume function.)
+ * On the other hand, if the volume of stereophonic sound number 0 is changed, by defaut, + * only volume of sound output from the left speaker is changed.
+ * (If the ::criAtomPlayer_SetSendLevel function is also used, + * volume of sound output from the left speaker is not always + * changed.)
+ *
+ * Specify a real value between 0.0f and 1.0f for the volume.
+ * Volume is the scaling factor for the amplitude of the sound data (unit is not decibel).
+ * For example, if you specify 1.0f, the original sound is output with the volume unchanged.
+ * If you specify 0.5f, sound is output at volume equal to data with half the amplitude of the original sound + * wave (-6dB).
+ * If you specify 0.0f, the sound is muted (silent). + * \Remarks: + * If value exceeding than 1.0f is specified for volume, the value is clipped to 1.0f.
+ * (Sound is never played at volume greater than the original sound.)
+ * Similarly, if value less than 0.0f is specified for volume, the value is clipped to 0.0f.
+ * (The phase is never reversed.) + *
+ * The setting of this function and the volume setting of the following functions + * are controlled independently.
+ * - ::criAtomPlayer_SetVolume + * - ::criAtomPlayer_SetSendLevel + * For example, if this function is set to 0.5f and the ::criAtomPlayer_SetVolume + * function is also set to 0.5f, + * the volume of the output sound will be 0.25f times the original sound.
+ * (Calculated as 0.5f x 0.5f=0.25f.) + * \sa criAtomPlayer_SetVolume, criAtomPlayer_SetSendLevel, criAtomPlayer_SetPanAdx1Compatible + */ +void CRIAPI criAtomPlayer_SetChannelVolume( + CriAtomPlayerHn player, CriSint32 ch, CriFloat32 vol); + +/*EN + * \brief Set send level + * \ingroup ATOMLIB_PLAYER + * \param[in] player Atom player handle + * \param[in] ch channel number + * \param[in] spk speaker ID + * \param[in] level volume (0.0f to 1.0f) + * \par Description: + * Specifies the send level.
+ * Send level is a mechanism to specify the volume of the sound output + * from each speaker for each channel of the sound data.
+ *
+ * Specify the "sound data channel number" as the channel number in the second argument.
+ * For speaker ID in the third argument, specify the speaker to output the data of the specified channel and + * specify the send volume with the fourth argument.
+ * Specify a real value between 0.0f and 1.0f for the volume.
+ * Volume is the scaling factor for the amplitude of the sound data (unit is not decibel).
+ * For example, if you specify 1.0f, the original sound is output with the volume unchanged.
+ * If you specify 0.5f, sound is output at volume equal to data with half the amplitude of the original sound + * wave (-6dB).
+ * If you specify 0.0f, the sound is muted (silent). + *
+ * For example, specify as follows to output the data for sound data channel number 0 from the right speaker + * at full volume (1.0f). + * \code + * criAtomPlayer_SetSendLevel(player, 0, CRIATOM_SPEAKER_FRONT_RIGHT, 1.0f); + * \endcode + * Unlike specifying volume for each channel (::criAtomPlayer_SetChannelVolume function), + * this function allows you to output data for a single channel from multiple speakers + * with different volumes.
+ * For example, specify as follows to output the sound of channel number 1 at 0.3f from the left speaker, + * 0.5f from the right speaker, and 0.7f from the center speaker. + * \code + * criAtomPlayer_SetSendLevel(player, 1, CRIATOM_SPEAKER_FRONT_LEFT, 0.3f); + * criAtomPlayer_SetSendLevel(player, 1, CRIATOM_SPEAKER_FRONT_RIGHT, 0.5f); + * criAtomPlayer_SetSendLevel(player, 1, CRIATOM_SPEAKER_FRONT_CENTER, 0.7f); + * \endcode + * Note that the set sound level can be reset with the ::criAtomPlayer_ResetSendLevel + * function.
+ * \Remarks: + * There are two ways to set the send level: "Auto" and "Manual".
+ * If immediately after creating the Atom player or if the the ::criAtomPlayer_ResetSendLevel function is used to + * clear the send level, the send level is set to "Auto".
+ * After executing this function, the send level is set to "Manual".
+ *
+ * If "Manual", Atom player routes sound as follows:
+ * [When playing monophonic sound] + * Sound of channel 0 is output from the left and right speakers at approximately 0.7f (-3dB).
+ * [When playing stereophonic sound] + * Sound of channel 0 is output from the left speaker and + * sound of channel 1 is output from the right speaker.
+ * [When playing 4-channel sound] + * Sound of channel 0 from the left speaker, sound of channel from the right speaker, + * sound of channel 2 from the left surround speaker, and + * the sound of channel 3 from the right surround speaker are output, respectively.
+ * For 5 channel sound playback
+ * Channel 0 sound is output from the left speaker, channel 1 sound is output from the right speaker, + * channel 2 sound is output from the center speaker, + * channel 3 sound is output from the left surround speaker, + * and channel 4 sound is output from the right surround speaker.
+ * (You can also change the order for 5 channel sound playback with + * the ::criAtom_SetChannelMapping function.)
+ *
+ * [When playing 5.1-channel sound] + * Sound of channel 0 from the left speaker, sound of channel from the right speaker, + * sound of channel 2 from the center speaker, + * sound of channel 3 from the LFE speaker, and + * sound of channel 4 from the left surround speaker, and + * the sound of channel 5 from the right surround speaker are output, respectively.
+ * (You can also change the order for 6 channel sound playback with + * the ::criAtom_SetChannelMapping function.)
+ *
+ * For 7.1 channel sound playback
+ * Channel 0 sound is output from the left speaker, channel 1 sound is output from the right speaker, + * channel 2 sound is output from the center speaker, channel 3 sound is output from the LFE, + * channel 4 sound is output from the left surround speaker, + * channel 5 sound is output from the right surround speaker.
+ * channel 6 sound is output from the left surround back speaker, + * and channel 7 sound is output from the right surround back speaker.
+ *
+ * On the other hand, if this function is used to set "Manually", sound is output by the specified route + * regardless of the number of sound data channels.
+ * (Sound is not output for channel with no send level set.)
+ * To return routing to "Manual" and clear the send level, + * execute the ::criAtomPlayer_ResetSendLevel function.
+ *
+ * If value exceeding than 1.0f is specified for volume, the value is clipped to 1.0f.
+ * (Sound is never played at volume greater than the original sound.)
+ * Similarly, if value less than 0.0f is specified for volume, the value is clipped to 0.0f.
+ * (The phase is never reversed.) + *
+ * The setting of this function and the volume setting of the following functions are controlled independently.
+ * - ::criAtomPlayer_SetVolume + * - ::criAtomPlayer_SetChannelVolume + * For example, if this function is set to 0.5f and the ::criAtomPlayer_SetVolume function is also set to 0.5f, + * the volume of the output sound will be 0.25f times the original sound.
+ * (Calculated as 0.5f x 0.5f=0.25f.) + * \attention + * Even if the sound data to be played is multi-channel data, + * sound is not output for channel with no send level set + * if the send level is set only for some of the channels.
+ *
+ * Do not use this function together with the ::criAtomPlayer_SetPanAdx1Compatible function.
+ * Since the ::criAtomPlayer_SetPanAdx1Compatible function internally calls this function, + * if both functions are used, settings may be overwritten by the function executed later.
+ * Use either this function or the ::criAtomPlayer_SetPanAdx1Compatible function to + * control the normal position of the sound source.
+ * (Use this function when using 3D pan and ::criAtomPlayer_SetPanAdx1Compatible + * function when using 2D pan only.) + *
+ * This function is available only on some device models.
+ * (It is not available in every environment because it is difficult to implement + * depending on the specification of the platform's sound library.)
+ * Refer to the device dependent information page of the manual to determine whether this function is available. + * \sa criAtomPlayer_SetVolume, criAtomPlayer_SetChannelVolume, criAtomPlayer_SetPanAdx1Compatible, + * criAtomPlayer_ResetSendLevel, criAtom_SetChannelMapping + */ +void CRIAPI criAtomPlayer_SetSendLevel( + CriAtomPlayerHn player, CriSint32 ch, CriAtomSpeakerId spk, CriFloat32 level); + +/*EN + * \brief Reset send level + * \ingroup ATOMLIB_PLAYER + * \param[in] player Atom player handle + * \par Description: + * Resets the send level.
+ * By executing this function, all previously set send levels are cleared.
+ * \Remarks: + * Two types of the send level settings, "auto setting" and "manual setting" are + * available.
+ * The send level setting is set to "auto setting" immediately after creating + * an Atom player or when resetting the send level with this function.
+ * (For details about the routing in the auto setting, see the description + * in the ::criAtomPlayer_SetSendLevel function.)
+ * \attention + * Do not use this function together with the ::criAtomPlayer_ResetPan function.
+ * Since the ::criAtomPlayer_ResetPan function internally calls this function, + * if both functions are used, settings may be overwritten by the function executed later. + * \sa criAtomPlayer_SetSendLevel, criAtomPlayer_ResetPan + */ +void CRIAPI criAtomPlayer_ResetSendLevel(CriAtomPlayerHn player); + +/*EN + * \brief Set pan + * \ingroup ATOMLIB_PLAYER + * \param[in] player Atom player handle + * \param[in] ch channel number + * \param[in] pan pan setting (-1.0f to 1.0f) + * \par Description: + * Specifies pan (normal position of sound source).
+ * By executing this function, the normal position of sound source + * can be controlled for monophonic and sterophonic sound.
+ *
+ * Specify the "sound data channel number" as the channel number in the second argument.
+ * Specify the normal position of the data of the specified channel number + * as the pan setting in the third argument.
+ * Specify a real value between -1.0f and 1.0f for the pan setting.
+ * The sound source moves to the left of center when a negative number is specified (further away as value decreases) + * and to the right of center when a positive number is specified (further away as value increases).
+ * (-1.0f is left end, 0.0f is center, and 1.0f is right end.)
+ * The position of the sound source changes linearly from -1.0f to 1.0f. + * In other words, if the pan setting is changed constantly from -1.0 to 1.0, + * the sound source moves at constant speed from left end to right end.
+ * \par Remarks: + * There are two ways to set the pan: "Auto" and "Manual".
+ * If immediately after creating the Atom player or if the the ::criAtomPlayer_ResetPan function is used to + * clear the pan setting, pan is set to "Auto".
+ * After executing this function, pan is set to "Manual".
+ *
+ * If "Manual", Atom player routes sound as follows:
+ * [When playing monophonic sound] + * Sound of channel 0 is output from the left and right speakers at approximately 0.7f (-3dB).
+ * [When playing stereophonic sound] + * Sound of channel 0 is output from the left speaker and + * sound of channel 1 is output from the right speaker.
+ *
+ * On the other hand, if this function is used to set "Manually", sound is output by the specified route + * regardless of the number of sound data channels.
+ * To return routing to "Manual" and clear the pan setting, + * execute the ::criAtomPlayer_ResetPan function.
+ * \attention + * This function can control pan only for monophonic and stereophonic sound.
+ * To control pan for three or more channels, you must use the ::criAtomPlayer_SetSendLevel + * function.
+ *
+ * If the sound data to be played is stereophonic, pan can be controlled independently + * for channel number 0 and channel number 1.
+ * However, since there is no distinction between pan setting for monophonic sound and stereophonic sound, + * if monophonic sound is played on Atom player with pan set for stereophonic sound, + * the position of the sound source may not be as intended.
+ *
+ * If the sound data to be played is stereophonic, but pan is set only for one of the channels, + * the position of the channel without pan setting will be + * 0.0f (output from center).
+ * Be sure to set the pan for both channels in order to control pan + * of stereophonic sound.
+ *
+ * Do not use this function together with the ::criAtomPlayer_SetSendLevel function.
+ * Since this function internally calls the ::criAtomPlayer_SetSendLevel function, + * if both functions are used, settings may be overwritten by the function executed later.
+ * Use either this function or the ::criAtomPlayer_SetSendLevel function to + * control the normal position of the sound source.
+ * (Use the ::criAtomPlayer_SetSendLevel function when using 3D pan and + * this function when using 2D pan only.) + * \sa criAtomPlayer_SetVolume, criAtomPlayer_SetChannelVolume, criAtomPlayer_SetPanAdx1Compatible + * criAtomPlayer_ResetPan + */ +void CRIAPI criAtomPlayer_SetPanAdx1Compatible( + CriAtomPlayerHn player, CriSint32 ch, CriFloat32 pan); + +/*EN + * \brief Reset pan + * \ingroup ATOMLIB_PLAYER + * \param[in] player Atom player handle + * \par Description: + * Resets the pan setting.
+ * By executing this function, all previously set pan settings are cleared.
+ * \Remarks: + * Two types of the send level settings, "auto setting" and "manual setting" are + * available.
+ * The send level setting is set to "auto setting" immediately after creating + * an Atom player or when resetting the send level with this function.
+ * (For details about the routing in the auto setting, see the description + * in the ::criAtomPlayer_SetPanAdx1Compatible function.)
+ * \attention + * Do not use this function together with the ::criAtomPlayer_ResetSendLevel function.
+ * Since this function internally calls the ::criAtomPlayer_ResetSendLevel function, + * if both functions are used, settings may be overwritten by the function executed later. + * \sa criAtomPlayer_SetPanAdx1Compatible, criAtomPlayer_ResetSendLevel + */ +void CRIAPI criAtomPlayer_ResetPan(CriAtomPlayerHn player); + +/*EN + * \brief Set frequency adjustment ratio + * \ingroup ATOMLIB_PLAYER + * \param[in] player Atom player handle + * \param[in] ratio frequency adjustment ratio + * \par Description: + * Sets the sound frequency adjustment ratio.
+ * The frequency adjustment ratio is the ratio between the sound data frequency and the playback frequency. It is equivalent to applying a scaling factor to the playback speed.
+ * If the frequency ratio exceeds 1.0f, sound data is played faster than the original sound. + * If it is less than 1.0f, the sound data is played slower than the original sound.
+ *
+ * The frequency ratio affects the pitch of the sound.
+ * For example, if played at a frequency ratio of 1.0f, the sound data has the same pitch than the original sound. + * However, if the frequency ratio is set to 2.0f, the pitch is raised one octave.
+ * (Because the playback speed is doubled.)
+ * \par Example: + * \code + * // Specify to play sound at 1/2 speed (-1 octave) + * criAtomPlayer_SetFrequencyRatio(player, 0.5f); + * \endcode + * \attention + * If the frequency ratio is greater than 1.0f, there may not be sufficient time to supply or decode the sound data because + * the data for the sound to be played back is used faster than normal.
+ * (Problems such as interruption of playback may occur.)
+ * If you plan on setting the frequency ratio to a value greater than 1.0f, the maximum sampling rate specified when creating the Atom player + * should take that frequency ratio into account.
+ * (The max_sampling_rate in the ::CriAtomAdxPlayerConfig structure when creating the Atom player + * must be a value equal to "sampling rate of original sound x frequency ratio".) + *
+ * \code + * main() + * { + * CriAtomAdxPlayerConfig config; // Atom player creation configuration structure + * CriAtomAdxPlayerHn player; // Atom player handle + * : + * // Set Atom player creation configuration structure + * memset(&config, 0, sizeof(config)); + * config.max_channels = 2; // Create stereo-capable player + * + * // To play 48000Hz sound at x1.5 speed + * // Create Atom player at 48000 x 1.5=72000Hz + * config.max_sampling_rate = 72000; // Play maximum 72000Hz sound + * + * // Create Atom player + * // Specify NULL and 0 in work area. + * // ->Required memory is dynamically allocated within the library. + * player = criAtomPlayer_CreateAdxPlayer(&config, NULL, 0); + * : + * // Change frequency ratio + * criAtomPlayer_SetFrequencyRatio(player, 1.5f); + * : + * } + * \endcode + * This function is available only on some devices.
+ * (It is not available in every environment because it may be difficult to implement + * depending on the specifications of the target platform's sound library.)
+ * Refer to the device-dependent information page of the manual to determine whether this function is available. + * \sa CriAtomAdxPlayerConfig, criAtomPlayer_CreateAdxPlayer, criAtomPlayer_SetMaxFrequencyRatio + */ +void CRIAPI criAtomPlayer_SetFrequencyRatio(CriAtomPlayerHn player, CriFloat32 ratio); + +/*EN + * \brief Set max of frequency adjustment ratio + * \ingroup ATOMLIB_PLAYER + * \param[in] player Atom player handle + * \param[in] ratio maximum value of frequency adjustment ratio + * \par Description: + * Sets the maximum value of the sound frequency adjustment ratio.
+ * By setting this maximum value, pitch changing within that can be immediately applied.
+ * \par Remarks: + * In previous CRI Atom library versions, increasing pitch may have caused an interuption of playback. + * (New sound data could not be fetched fast enough to catch up with the new playback speed.)
+ * CRI Atom library ver.2.10.00 has fixed this problem. In this new implementation,
+ * enough sound data is buffered before the pitch shift processing.
+ * However, the change is delayed by the buffering of the sound data.
+ * (Therefore, if pitch shift processing is requested many times within a short period, artifacts may be heard.) + *
+ * This function controls the size of the sound data that can be buffered for pitch shift processing. + * Pitch shifting within this maximum value can be applied immediately without extra buffering.
+ * If pitch shift processing is requested many times within a short period, set the expected maximum values with this function.
+ * \sa criAtomPlayer_SetFrequencyRatio + */ +void CRIAPI criAtomPlayer_SetMaxFrequencyRatio(CriAtomPlayerHn player, CriFloat32 ratio); + +/*EN + * \brief Limit the number of loop playbacks + * \ingroup ATOMLIB_PLAYER + * \param[in] player Atom player handle + * \param[in] count number of loop playbacks to be limited + * \par Description: + * Limits the number of loop playbacks for waveform data.
+ * For example, when specifying one for the count, the playback of waveform data is looped only once and finished.
+ * (After reaching the loop-end point, it is returned to the loop start position.)
+ * \par Remarks: + * By default, the playback of audio data with loop points is looped infinitely.
+ * After limiting the number of loop playbacks, to return it to the infinite loop, just specify + * ::CRIATOMPLAYER_NO_LOOP_LIMITATION for the count.
+ *
+ * You can specify ::CRIATOMPLAYER_IGNORE_LOOP for count + * to play sound data that has a loop point without looping.
+ * \attention + * Specify the limited number of loop playbacks before starting an audio playback.
+ * Even when executing this function during the playback, it is not changed.
+ * To stop the loop playback at any timing during the playback, do not use the loop playback + * but control the playback by the seamless concatenated playback.
+ *
+ * The limited number of loop playbacks specified by this function is applied only to the case + * where the waveform data that loop points are embedded beforehand is played.
+ * If loop points are not put into the waveform data, executing this function + * does not have no effect.
+ *
+ * When encoding waveform data with loop points in CRI Atom Craft or CRI Atom Encoder, + * the data area after the loop-end point is discared to reduce data size.
+ * Therefore, for the audio data created by these tools, even if specifying + * the number of loop playbacks, the wave data after the loop-end point will not be played + * when the loop playback is completed.
+ *
+ * As an exception, sound data can also be played as a one-shot sample including data after the loop point + * if the following conditions are met (the sound will not be looped).
+ * - The data is encoded with "-nodelterm" specified as an argument to criatomencd.exe. + * - Playback is executed after specifying ::CRIATOMPLAYER_IGNORE_LOOP for this function. + * . + *
+ * Only the ADX and HCA codecs can be used to limit the number of loops with this function.
+ * Do not execute this function for platform-dependent audio codecs.
+ * (Doing so may result in playback not finishing, noise, or other issues.)
+ */ +void CRIAPI criAtomPlayer_LimitLoopCount(CriAtomPlayerHn player, CriSint32 count); + +/*EN + * \brief Sepcify HCA-MX decode destination mixer ID + * \ingroup ATOMLIB_PLAYER + * \param[in] player Atom player handle + * \param[in] mixer_id mixer id + * \par Description: + * Specifies the HCA-MX decode destination mixer ID.
+ * \attention + * This function is effective only for player created with the ::criAtomPlayer_CreateHcaMxPlayer + * function.
+ * (There is no effect on players created with other functions.)
+ *
+ * This function can be executed only for player that is stopped.
+ * \sa criAtomPlayer_CreateHcaMxPlayer + */ +void CRIAPI criAtomPlayer_SetHcaMxMixerId(CriAtomPlayerHn player, CriSint32 mixer_id); + +/*EN + * \brief Specifying the ASR rack ID + * \param[in] player Atom player handle + * \param[in] rack_id rack ID + * \par Description: + * Specifies the ID of the voice output rack.
+ * \attention + *This function can be executed only for the player that is stopped.
+ */ +void CRIAPI criAtomPlayer_SetAsrRackId(CriAtomPlayerHn player, CriSint32 rack_id); + +/*EN + * \brief Specify raw PCM format + * \ingroup ATOMLIB_PLAYER + * \param[in] player Atom player handle + * \param[in] pcm_format raw PCM data format + * \param[in] num_channels number of channels + * \param[in] sampling_rate sampling rate (Hz) + * \par Description: + * Specifies raw PCM data format information.
+ * \attention + * This function is effective only for player created with the ::criAtomPlayer_CreateRawPcmPlayer + * function.
+ * (There is no effect on players created with other functions.)
+ *
+ * This function can be executed only for player that is stopped.
+ * \sa criAtomPlayer_CreateRawPcmPlayer + */ +void CRIAPI criAtomPlayer_SetRawPcmFormat(CriAtomPlayerHn player, + CriAtomPcmFormat pcm_format, CriSint32 num_channels, CriSint32 sampling_rate); + +/*EN + * \brief Register data request callback function + * \ingroup ATOMLIB_PLAYER + * \param[in] player Atom player handle + * \param[in] func data request callback function + * \param[in] obj user specified object + * \par Description: + * Registers the data request callback function.
+ *
+ * Data request callback is used to seamless concatenate and play + * multiple sound data.
+ * The registered callback function is executed when the Atom player requests + * the concatenated playback data.
+ * (The callback function is executed when requesting the data to + * playback next after the previous data is read.)
+ * When the ::criAtomPlayer_SetData function is used within the registered callback function to set data in Atom player, + * the set data is seamlessly concatenated and played + * after the current data.
+ * Also, by executing the ::criAtomPlayer_SetPreviousDataAgain function within the callback function, + * the same data can be played back repeatedly.
+ * \par Remarks: + * If no data is specified in the registered callback function, + * the Atom player status changes to CRIATOMPLAYER_STATUS_PLAYEND when playback of current data ends.
+ *
+ * If you cannot specify the data due to timing but do not want the status to change to + * CRIATOMPLAYER_STATUS_PLAYEND, + * execute the ::criAtomPlayer_DeferCallback function within the callback function.
+ * By executing the ::criAtomPlayer_DeferCallback function, the data request callback function is + * called once more after approximately 1V. (The callback process can be retried.)
+ * However, playback may be interrupted when the ::criAtomPlayer_DeferCallback function is executed + * (there may be a certain amount of silence at the concatenation point).
+ * \par Example: + * When the following code is executed, data in buffer1 and buffer2 are seamlessly + * concatenated and played.
+ * (Then data in buffer2 is played repeatedly.)
+ * \code + * // Data request callback function + * void on_data_request(void *obj, CriAtomPlayerHn player) + * { + * // Set data to play successively + * criAtomPlayer_SetData(player, buffer2, buffer_size2); + * } + * + * main() + * { + * : + * // Register data request callback function + * criAtomPlayer_SetDataRequestCallback(player, on_data_request, NULL); + * + * // Set sound data + * criAtomPlayer_SetData(player, buffer1, buffer_size1); + * + * // Play set sound data + * criAtomPlayer_Start(player); + * : + * } + * \endcode + * The same sound data can be played endlessly with the following process:
+ * \code + * // Data request callback function + * void on_data_request(void *obj, CriAtomPlayerHn player) + * { + * // Re-set previously plaed data + * criAtomPlayer_SetPreviousDataAgain(player); + * } + * + * main() + * { + * : + * // Register data request callback function + * criAtomPlayer_SetDataRequestCallback(player, on_data_request, NULL); + * + * // Set sound data + * criAtomPlayer_SetData(player, buffer, buffer_size); + * + * // Play set sound data + * criAtomPlayer_Start(player); + * : + * } + * \endcode + * \attention + * Note that problems such as interruption of playback may occur if a process is blocked for + * an extended time within the data request callback function.
+ *
+ * For a codec that seamless concatenated playback is not supported, + * even when the next data is set within the data request callback function, + * the data is not continuously played back.
+ * (When using HCA-MX or a platform specific codec, seamless concatenated playback + * cannot be performed.)
+ * Also, when waveform data with loop information is set within the data request + * callback function, the loop playback is not performed.
+ * (The loop points are discarded, and the playback ends.)
+ *
+ * Do not destroy the Atom player within the callback function.
+ * Since the resource of the relevant handle is access within the server process for a while after exiting the callback, + * severe problems such as access violation may occur. + * \sa CriAtomPlayerDataRequestCbFunc, criAtomPlayer_SetData, + * criAtomPlayer_SetPreviousDataAgain, criAtomPlayer_DeferCallback + */ +void CRIAPI criAtomPlayer_SetDataRequestCallback( + CriAtomPlayerHn player, CriAtomPlayerDataRequestCbFunc func, void *obj); + +/*EN + * \brief Register status change callback function + * \ingroup ATOMLIB_PLAYER + * \param[in] player Atom player handle + * \param[in] func status change callback function + * \param[in] obj user specified object + * \par Description: + * Registers the status change callback function.
+ * The registered callback function is executed when the Atom player status is updated. + *
+ * The changed status can be retrieved by executing the + * ::criAtomPlayer_GetStatus function against the Atom player handle passed as an argument of the callback function.
+ *
+ * By using the status change callback, certain process can be + * performed according to the change in Atom player status.
+ * For example, the following code can be used to display a read error message when the status becomes CRIATOMPLAYER_STATUS_ERROR. + *
+ * \code + * // Status change callback function + * void on_status_change(void *obj, CriAtomPlayerHn player) + * { + * CriAtomPlayerStatus status; + * + * // Get status + * status = criAtomPlayer_GetStatus(player); + * if (status == CRIATOMPLAYER_STATUS_ERROR) { + * // Processing when read error occurs + * : + * } + * } + * + * main() + * { + * : + * // Register status change callback function + * criAtomPlayer_SetStatusChangeCallback(player, on_status_change, NULL); + * + * // Set sound file + * criAtomPlayer_SetFile(player, NULL, "sample.adx"); + * + * // Play set sound file + * criAtomPlayer_Start(player); + * : + * } + * \endcode + * \par Remarks: + * Strictly speaking, the timing from status change to execution of the + * callback function may change because another process can interrupt and run during this interval.
+ * \attention + * Note that problems such as interruption of playback may occur if a process is blocked for an extended time within the status change callback function. + *
+ *
+ * The status of the Atom player is unchanged until the status change callback function is exited. + *
+ * Therefore, if you wait for Atom player status to change within the status change callback function, + * a deadlock will occur and processing cannot continue.
+ *
+ * Do not destroy the Atom player within the callback function.
+ * Since the resource of the relevant handle is access within the server process for a while after exiting the callback, + * severe problems such as access violation may occur. + * \sa criAtomPlayer_GetStatus + */ +void CRIAPI criAtomPlayer_SetStatusChangeCallback( + CriAtomPlayerHn player, CriAtomPlayerStatusChangeCbFunc func, void *obj); + +/*EN + * \brief Register parameter change callback function + * \ingroup ATOMLIB_PLAYER + * \param[in] player Atom player handle + * \param[in] func status change callback function + * \param[in] obj user specified object + * \par Description: + * Registers the parameter change callback function.
+ * The registered callback function is executed when the Atom player parameter is updated.
+ * \attention + * Note that problems such as interruption of playback may occur if a process is blocked for an extended time within the status change callback function. + *
+ *
+ * Do not destroy the Atom player within the callback function.
+ * Since the resource of the relevant handle is access within the server process for a while after exiting the callback, + * severe problems such as access violation may occur. + */ +void CRIAPI criAtomPlayer_SetParameterChangeCallback( + CriAtomPlayerHn player, CriAtomPlayerParameterChangeCbFunc func, void *obj); + +/*EN + * \brief Register wave filter callback function + * \ingroup ATOMLIB_PLAYER + * \param[in] player Atom player handle + * \param[in] func wave filter callback function + * \param[in] obj user specified object + * \par Description: + * Registers the callback function that receives decoded PCM data.
+ * The registered callback function is called when the Atom player decodes the sound data.
+ * \attention + * Note that problems such as interruption of playback may occur if a process is blocked for an extended time within the status change callback function. + *
+ * When using HCA-MX or a platform specific codec, the filter callback is not + * available.
+ *
+ * \sa CriAtomPlayerFilterCbFunc + */ +void CRIAPI criAtomPlayer_SetFilterCallback( + CriAtomPlayerHn player, CriAtomPlayerFilterCbFunc func, void *obj); + +/*EN + * \brief Registering a load request callback function + * \ingroup ATOMLIB_PLAYER + * \param[in] player Atom player handle + * \param[in] func Load request callback function + * \param[in] obj User specified object + * \par Description: + * Registers a load request callback function.
+ *
+ * A load request callback is used to monitor the file load status of the Atom player.
+ * (You do not usually need to use this function, because it is intended for debugging.)
+ * \attention + * Note that when you block the processing in the load request callback function for a long time, + * some problems, such as playback interruption may occur.
+ *
+ * Do not destroy the Atom player within the callback function.
+ * Because the resource of the relevant handle is referenced within the server processing for a while after exiting the callback, + * severe problems, such as access violation may occur. + *
+ * You can register only one callback function.
+ * When you register a callback function again, + * the registered callback function is overwritten with the new callback function.
+ *
+ * By specifying NULL for func, you can unregister the registered function.
+ * \sa CriAtomPlayerLoadRequestCbFunc + */ +void CRIAPI criAtomPlayer_SetLoadRequestCallback( + CriAtomPlayerHn player, CriAtomPlayerLoadRequestCbFunc func, void *obj); + +/*========================================================================== + * Functions for HCA Streaming + *=========================================================================*/ + +/*EN + * \brief Specifying the HCA format + * \ingroup ATOMLIB_PLAYER + * \param[in] player Atom player + * \param[in] num_channels Number of channels + * \param[in] sampling_rate Sampling rate + * \param[in] bitrate Bitrate + * \par Description: + * Sets the format information of HCA data.
+ * *By executing this function, you can play HCA data without a header.
+ */ +void CRIAPI criAtomPlayer_SetHcaFormat(CriAtomPlayerHn player, + CriSint32 num_channels, CriSint32 sampling_rate, CriSint32 bitrate); + +/*========================================================================== + * CRI Atom D-BAS API + *=========================================================================*/ +/*EN + * \brief Calculate work area size for creating D-BAS + * \ingroup ATOMLIB_DBAS + * \param[in] config pointer to the configuration structure for creating D-BAS + * \param[out] CriSint32 work area size for creating D-BAS + * \retval >= 0 successfully completed + * \retval -1 error occurred + * \par Description: + * Calculates the work area size required for creating a D-BAS based on the D-BAS creation parameters.
+ *
+ * If work area size calculation fails, this function returns -1.
+ * The reason for work area size calculation failure can be determined by viewing the error callback message.
+ * \attention + * You must initialize the library before executing this function.
+ *
+ * Depending on the setting, D-BAS may required 2GB or greater work size
+ * in which case an error occurs and -1 is returned.
+ * If an error occurs, reduce the value of max_streams or max_bps.
+ * \sa criAtomDbas_Create + */ +CriSint32 CRIAPI criAtomDbas_CalculateWorkSize(const CriAtomDbasConfig *config); + +/*EN + * \brief Create D-BAS + * \ingroup ATOMLIB_DBAS + * \param[in] config pointer to the configuration structure for creating D-BAS. + * \param[in] work pointer to the work area for creating D-BAS + * \param[in] work_size work area size used for creating D-BAS + * \return CriAtomDbasId D-BAS management ID + * \par Description: + * Creates a D-BAS based on the D-BAS creation parameters.
+ * When the function creates D-BAS successfully, it registers the D-BAS to the library and returns a valid management ID.
+ * The obtained ID is used in the ::criAtomDbas_Destroy function.
+ * When the function fails to create D-BAS, it returns CRIATOMDBAS_ILLEGAL_ID.
+ * \attention + * The library must be initialized before this function is executed.
+ * \sa criAtomDbas_CalculateWorkSize, criAtomDbas_Destroy + */ +CriAtomDbasId CRIAPI criAtomDbas_Create( + const CriAtomDbasConfig *config, void *work, CriSint32 work_size); + +/*EN + * \brief Destroy D-BAS + * \ingroup ATOMLIB_DBAS + * \param[in] atom_dbas_id D-BAS management ID + * \par Description: + * Destroys D-BAS specified by the management ID obtained with the ::criAtomDbas_Create function.
+ * \sa criAtomDbas_Create + */ +void CRIAPI criAtomDbas_Destroy(CriAtomDbasId atom_dbas_id); + +/*EN + * \brief Get Atom player handle in streaming playback + * \ingroup ATOMLIB_DBAS + * \param[in] dbas_id D-BAS management ID + * \param[out] players array for recieving player handles + * \param[in] length number of elements for the above array + * \return CriSint32 number of players + * \retval >= 0 successfully completed + * \retval -1 error occurred + * \par Description: + * Gets an Atom player handle that is in streaming playback.
+ * If successfully getting a player handle, the address of the player handle is + * stored in the third argument (the players array), and the number of player + * handles is returned as a return value.
+ * \par Remarks: + * By specifying NULL for the third argument (the players array) and 0 + * for the fourth argument (the length), only the number of players that are + * playing stream can be returned.
+ * \attention + * When getting a handle after getting the number of players, the exclusive + * control by the criAtom_Lock function is needed so that the server processing + * will not interrupt the process between getting the number of players and + * getting the number of handles + * (If not, the number of players may change depending on the timing of the + * server processing.)
+ *
+ * If the number of elements is less than the number of players in streaming, + * this function returns an error value (-1).
+ */ +CriSint32 CRIAPI criAtomDbas_GetStreamingPlayerHandles( + CriAtomDbasId dbas_id, CriAtomPlayerHn *players, CriSint32 length); + +/* ========================================================================*/ +/* CRI Atom Streaming Cache API */ +/* ========================================================================*/ +/*EN + * \brief Calcuate work size required for creating streaming cache + * \ingroup ATOMLIB_STREAMING_CACHE + * \param[in] config streaming cache creation structure + * \retval >= 0 successfully completed + * \retval -1 error occurred + * \return CriSint32 work size required to create streaming cache + * \par Description: + * Calcuates the work are size required for creating a streaming cache.
+ * Th required work area size increases depending on the parameters provided in config.
+ * \sa criAtomStreamingCache_Create + */ +CriSint32 CRIAPI criAtomStreamingCache_CalculateWorkSize( + const CriAtomStreamingCacheConfig* config); + +/*EN + * \brief Create streaming cache + * \ingroup ATOMLIB_STREAMING_CACHE + * \param[in] config streaming cache creation structure + * \param[in] work streaming cache creation work + * \param[in] work_size streaming cache creation work size + * \return CriAtomStreamingCacheId streaming cache ID + * \par Description: + * Creates a streaming cache.
+ * By setting a streaming cache for the Atom player, + * an entire file is cached in memory while performing streaming playback.
+ * Playback of the same file for the second and subsequent times is switched automatically to memory playback using the cache.
+ * Also, if the playback data contains loop data, + * playback from the loop on is automatically performed by memory playback.
+ * This function is effective only when Atom player performs streaming playback.
+ * If this function failed, CRIATOM_STREAMING_CACHE_ILLEGAL_ID returns.
+ * \attention + * Since the entire file needs to be cached, + * no caching is performed if the memory size assigned for caching + * is smaller than the size of any file to be streamed. + * \sa criAtomStreamingCache_CalculateWorkSize, criAtomStreamingCache_Destroy, + */ +CriAtomStreamingCacheId CRIAPI criAtomStreamingCache_Create( + const CriAtomStreamingCacheConfig* config, void* work, CriSint32 work_size); + +/*EN + * \brief Destroy streaming cache + * \ingroup ATOMLIB_STREAMING_CACHE + * \param[in] stm_cache_id streaming cache ID + * \par Description: + * Destroys the specified streaming cache.
+ * \attention + * Execute this function when no player is using the + * specified streaming cache. + * \sa criAtomStreamingCache_Create + */ +void CRIAPI criAtomStreamingCache_Destroy(CriAtomStreamingCacheId stm_cache_id); + +/*EN + * \brief Clear content of streaming cache + * \ingroup ATOMLIB_STREAMING_CACHE + * \param[in] cache_id streaming cache ID + * \par Description: + * Clears the content of the specified streaming cache.
+ * Cache is cleared from the oldest one.
+ * If there is a player using the specified streaming cache, + * clearing of cache is discontinued.
+ * \attention + * If there is a player using the oldest cache, no cache is + * cleared even if this function is executed. + * \sa criAtomStreamingCache_Create + */ +void CRIAPI criAtomStreamingCache_Clear(CriAtomStreamingCacheId cache_id); + +/*EN + * \brief Search cache specifying WaveID + * \ingroup ATOMLIB_STREAMING_CACHE + * \param[in] stm_cache_id streaming cache ID + * \param[in] awb AWB handle + * \param[in] id WaveID + * \return CriBool CRI_TRUE if cached, otherwise CRI_FALSE + * \par Description: + * Searches the specified streaming cache for the specified sound data.
+ * If the specified sound is cached, CRI_TRUE is returned. + * Otherwise CRI_FALSE is returned.
+ * \attention + * If the AWB handle is for memory playback, this function returns CRI_TRUE regardless of whether there is sound data.
+ * \sa criAtomStreamingCache_Create + */ +CriBool CRIAPI criAtomStreamingCache_IsCachedWaveId( + CriAtomStreamingCacheId stm_cache_id, CriAtomAwbHn awb, CriSint32 id); + +/*EN + * \brief Search cache specifying path + * \ingroup ATOMLIB_STREAMING_CACHE + * \param[in] stm_cache_id streaming cache ID + * \param[in] src_binder sound data file read source binder handle + * \param[in] path sound data file path + * \return CriBool CRI_TRUE if cached, otherwise CRI_FALSE + * \par Description: + * Searches the specified streaming cache for the specified sound data.
+ * If the specified sound is cached, CRI_TRUE is returned. + * Otherwise CRI_FALSE is returned.
+ * \sa criAtomStreamingCache_Create + */ +CriBool CRIAPI criAtomStreamingCache_IsCachedFile( + CriAtomStreamingCacheId stm_cache_id, CriFsBinderHn src_binder, const CriChar8 *path); + + +/*========================================================================== + * CRI Atom DSP API + *=========================================================================*/ +/*EN + * \brief Convert from cent to DSP parameter + * \ingroup ATOMLIB_AWB + * \param[in] cent Cent value + * \return CriFloat32 DSP parameter value + * \par Description: + * Normalizes a range of -1200 to 1200 to a range of 0.0f to 1.0f.
+ */ +CriFloat32 criAtomDsp_ConvertParameterFromCent(CriFloat32 cent); + +/*EN + * \brief Calculates the work area size required for spectrum analyzer creation + * \ingroup ATOMLIB_DSP + * \param[in] config Parameters for spectrum analyzer creation + * \return CriSint32 Required work area size (in bytes) + * \par Description: + * Calculates the work area size required for creating a spectrum analyzer.
+ * The required work area size changes depending on the parameters specified by config.
+ * \par Remarks: + * If this function fails to calculate the work area size, it returns a negative value.
+ * (The cause of the failure is passed to the error callback.)
+ * \sa CriAtomDspSpectraConfig, criAtomDspSpectra_Create + */ +CriSint32 criAtomDspSpectra_CalculateWorkSize(const CriAtomDspSpectraConfig *config); + +/*EN + * \brief Spectrum analyzer creation + * \ingroup ATOMLIB_DSP + * \param[in] config Parameters for spectrum analyzer creation + * \param[in] work Work area + * \param[in] work_size Work area size + * \return CriAtomDspSpectraHn Spectrum analyzer handle + * \par Description: + * Creates a spectrum analyzer.
+ * The spectrum analyzer is a module that analyzes PCM data + * and measures the signal strength of each spectrum.
+ *
+ * Use the ::criAtomDspSpectra_Process function for PCM data input.
+ * Use the ::criAtomDspSpectra_GetLevels function to obtain the results of the analysis.
+ *
+ * You can explicitly destroy an unneeded spectrum analyzer + * with the ::criAtomDspSpectra_Destroy function.
+ * \par Remarks: + * If the spectrum analyzer fails to be created, this function returns NULL.
+ * (The cause of the failure is passed to the error callback.) + *
+ * If this function is executed without registering an allocator with the ::criAtom_SetUserAllocator function, + * you must pass the amount of memory calculated by the ::criAtomDspSpectra_CalculateWorkSize + * function as the work area.
+ * \attention +* The library must be initialized before this function is executed.
+ *
+ * The work area that is set in this function must be maintained by the application until the + * ::criAtomDspSpectra_Destroy function is executed.
+ * (Do not release the memory for the work area before executing the ::criAtomDspSpectra_Destroy function.)
+ *
+ * This function is a synchronous type.
+ * Executing this function blocks server processing of the Atom library for a while.
+ * If this function is executed during audio playback, problems such as audio dropout may occur. + * Call this function only when load fluctuations are acceptable, such as when the game scene is changed.
+ * \sa CriAtomDspSpectraConfig, criAtomDspSpectra_CalculateWorkSize, criAtomDspSpectra_Destroy + */ +CriAtomDspSpectraHn criAtomDspSpectra_Create( + const CriAtomDspSpectraConfig *config, void *work, CriSint32 work_size); + +/*EN + * \brief Destroy spectrum analyzer + * \ingroup ATOMLIB_DSP + * \par Description: + * Destroys a spectrum analyzer.
+ * This function releases the memory area allocated when the spectrum analyzer was created.
+ * (If a work area was passed when the spectrum analyzer was created, the work area can be released +* after this function is executed.)
+ * \attention + * This function is a synchronous type.
+ * Executing this function blocks server processing of the Atom library for a while.
+ * If this function is executed during audio playback, problems such as audio dropout may occur. + * Call this function only when load fluctuations are acceptable, such as when the game scene is changed. + * \sa criAtomDspSpectra_Create + */ +void criAtomDspSpectra_Destroy(CriAtomDspSpectraHn spectra); + +/*EN + * \brief Reset spectrum analyzer + * \ingroup ATOMLIB_DSP + * \par Description: + * Resets a spectrum analyzer.
+ * When this function is executed, the PCM information set to + * ::criAtomDspSpectra_Process is cleared.
+ * \par Remarks: + * Execute this function if you want to clear the return value of the + * ::criAtomDspSpectra_GetLevels function to zero.
+ * \sa criAtomDspSpectra_Process, criAtomDspSpectra_GetLevels + */ +void criAtomDspSpectra_Reset(CriAtomDspSpectraHn spectra); + +/*EN + * \brief Spectrum analysis + * \ingroup ATOMLIB_DSP + * \par Description: + * Analyzes PCM data.
+ * Use the ::criAtomDspSpectra_GetLevels function to obtain the results of the analysis.
+ * \par Remarks: + * The input data stream (pcm) value is expected to be within the range of -1.0f to +1.0f.
+ * However, if a value that is outside of this range is input, this will only cause + * the value returned from the criAtomDspSpectra_GetLevels function to be larger + * so there is no need to perform clipping when the data is input.
+ * \sa criAtomDspSpectra_GetLevels + */ +void criAtomDspSpectra_Process(CriAtomDspSpectraHn spectra, + CriUint32 num_channels, CriUint32 num_samples, CriFloat32 *pcm[]); + +/*EN + * \brief Acquire spectral analysis results + * \ingroup ATOMLIB_DSP + * \par Description: + * Returns the analysis results for the PCM data set by the ::criAtomDspSpectra_Process function.
+ *
+ * The analysis results are returned as a CriFloat32 array.
+ * The number of elements in the array is equal to the value specified for CriAtomDspSpectraConfig::num_bands + * when the ::criAtomDspSpectra_Create function was executed.
+ * The 0th element is the amplitude value of the lowest band and the (num_bands - 1) element is the amplitude value of the highest band.
+ * \par Remarks: + * To analyze multiple channels of PCM data at once, you must + * mix all channels of PCM data together, and then analyze the results of that mix.
+ * Therefore, even if multiple channels of sound data are set to the criAtomDspSpectra_Process function, + * this function will return a one-dimensional array of length num_bands.
+ * \attention + * The values returned by the criAtomDspSpectra_GetLevels function are the amplitude values for each band.
+ * To display the analysis results like a commercially available spectral analyzer, + * you must convert the values returned by this function to decibel values.
+ * \sa criAtomDspSpectra_Process + */ +const CriFloat32* criAtomDspSpectra_GetLevels(CriAtomDspSpectraHn spectra); + +/* ========================================================================*/ +/* CRI Atom Meter API */ +/* ========================================================================*/ + +/*EN + * \brief Work size calculation for level meter function + * \ingroup ATOMLIB_METER + * \param[in] config Configuration structure for adding the level meter + * \return CriSint32 Required work area size + * \par Description: + * Calculates the work area size required for adding a level meter.
+ * If NULL is specified for config, calculation will be performed with the default settings.
+ * \sa criAtomMeter_AttachLevelMeter + */ +CriSint32 CRIAPI criAtomMeter_CalculateWorkSizeForLevelMeter( + const CriAtomLevelMeterConfig *config); + +/*EN + * \brief Add level meter function + * \ingroup ATOMLIB_METER + * \param[in] config Configuration structure for adding the level meter + * \param[in] work Work area + * \param[in] work_size Work area size + * \par Description: + * Adds the level meter function to the library.
+ * If NULL is specified for config, the level meter will be added with the default settings.
+ * If NULL is specified for work and 0 is specified for work_size, the registered user allocator + * will be used to allocate the work area.
+ * \sa criAtomMeter_GetLevelInfo + */ +void CRIAPI criAtomMeter_AttachLevelMeter( + const CriAtomLevelMeterConfig *config, void *work, CriSint32 work_size); + +/*EN + * \brief Remove level meter function + * \ingroup ATOMLIB_METER + * \par Description: + * Removes the level meter function from the library.
+ * \sa criAtomMeter_AttachLevelMeter + */ +void CRIAPI criAtomMeter_DetachLevelMeter(void); + +/*EN + * \brief Obtain level information + * \ingroup ATOMLIB_METER + * \param[out] info Level information structure + * \par Description: + * Acquires the level meter results.
+ * The level meter function must be added in advance to the specified bus + * by using the ::criAtomMeter_AttachLevelMeter function.
+ * \sa criAtomMeter_AttachLevelMeter + */ +void CRIAPI criAtomMeter_GetLevelInfo(CriAtomLevelInfo *info); + +/*EN + * \brief Work size calculation for loudness meter function + * \ingroup ATOMLIB_METER + * \param[in] config Configuration structure for adding the loudness meter + * \return CriSint32 Required work area size + * \par Description: + * Calculates the work area size required for adding an ITU-R BS.1770-3 standard loudness meter.
+ * If NULL is specified for config, calculation will be performed with the default settings.
+ * \sa criAtomMeter_AttachLoudnessMeter + */ +CriSint32 CRIAPI criAtomMeter_CalculateWorkSizeForLoudnessMeter(const CriAtomLoudnessMeterConfig *config); + +/*EN + * \brief Add loudness meter function + * \ingroup ATOMLIB_METER + * \param[in] config Configuration structure for adding the loudness meter + * \param[in] work Work area + * \param[in] work_size Work area size + * \par Description: + * Adds the ITU-R BS.1770-3 standard loudness meter function to the library.
+ * If NULL is specified for config, the loudness meter will be added with the default settings.
+ * If NULL is specified for work and 0 is specified for work_size, the registered user allocator + * will be used to allocate the work area.
+ * \sa criAtomMeter_GetLoudnessInfo + */ +void CRIAPI criAtomMeter_AttachLoudnessMeter(const CriAtomLoudnessMeterConfig *config, void *work, CriSint32 work_size); + +/*EN + * \brief Remove loudness meter function + * \ingroup ATOMLIB_METER + * \par Description: + * Removes the loudness meter function from the library.
+ * \sa criAtomMeter_AttachLoudnessMeter + */ +void CRIAPI criAtomMeter_DetachLoudnessMeter(void); + +/*EN + * \brief Obtain loudness information + * \ingroup ATOMLIB_METER + * \param[out] info Loudness information structure + * \par Description: + * Acquires the loudness meter measurement results. + * You must add a loudness meter to the library before calling this function. + * \sa criAtomMeter_AttachLoudnessMeter + */ +void CRIAPI criAtomMeter_GetLoudnessInfo(CriAtomLoudnessInfo *info); + +/*EN + * \brief Reset loudness meter + * \ingroup ATOMLIB_METER + * \par Description: + * Resets the cumulative loudness meter data. + * You must add a loudness meter to the library before calling this function. + * \sa criAtomMeter_AttachLoudnessMeter + */ +void CRIAPI criAtomMeter_ResetLoudnessMeter(void); + +/*EN + * \brief Work size calculation for true peak meter function + * \ingroup ATOMLIB_METER + * \param[in] config Configuration structure for adding the true peak meter + * \return CriSint32 Required work area size + * \par Description: + * Calculates the work area size required for adding an ITU-R BS.1770-3 standard true peak meter.
+ * If NULL is specified for config, calculation will be performed with the default settings.
+ * \sa criAtomMeter_AttachTruePeakMeter + */ +CriSint32 CRIAPI criAtomMeter_CalculateWorkSizeForTruePeakMeter(const CriAtomTruePeakMeterConfig *config); + +/*EN + * \brief Add true peak meter function + * \ingroup ATOMLIB_METER + * \param[in] config Configuration structure for adding the true peak meter + * \param[in] work Work area + * \param[in] work_size Work area size + * \par Description: + * Adds the ITU-R BS.1770-3 standard true peak meter function to the library.
+ * If NULL is specified for config, the true peak meter will be added with the default settings.
+ * If NULL is specified for work and 0 is specified for work_size, the registered user allocator + * will be used to allocate the work area.
+ * \sa criAtomMeter_GetTruePeakInfo + */ +void CRIAPI criAtomMeter_AttachTruePeakMeter(const CriAtomTruePeakMeterConfig *config, void *work, CriSint32 work_size); + +/*EN + * \brief Remove true peak meter function + * \ingroup ATOMLIB_METER + * \par Description: + * Removes the true peak meter function from the library.
+ * \sa criAtomMeter_AttachLoudnessMeter + */ +void CRIAPI criAtomMeter_DetachTruePeakMeter(void); + +/*EN + * \brief Obtain true peak information + * \ingroup ATOMLIB_METER + * \param[out] info True peak information structure + * \par Description: + * Acquires the true peak meter measurement results. + * You must add a true peak meter to the library before calling this function. + * \sa criAtomMeter_AttachTruePeakMeter + */ +void CRIAPI criAtomMeter_GetTruePeakInfo(CriAtomTruePeakInfo *info); + +/*************************************************************************** + * Tentative API (Please don't use) + ***************************************************************************/ +/* The tentative functions declared below are for Atom's internal processing, + * integration with game engines, etc. + * Because they are subject to change or deletion without prior notice, please refrain from using them. + */ +typedef void (CRIAPI *CriAtomPlayerDataEndCbFunc)(void *obj, void *buffer, CriSint32 size); +typedef void (CRIAPI *CriAtomPlayerCbFunc)(void *obj, CriAtomPlayerHn player); +typedef void (CRIAPI *CriAtomPlayerDecodeCbFunc)(void *obj, CriAtomPcmFormat format, + CriSint32 num_channels, CriSint32 num_samples, void *data[]); +void CRIAPI criAtomPlayer_BreakLoop(CriAtomPlayerHn player); +void CRIAPI criAtomPlayer_SetDataEndCallback( + CriAtomPlayerHn player, CriAtomPlayerDataEndCbFunc func, void *obj); +void CRIAPI criAtomPlayer_SetDecodeCallback( + CriAtomPlayerHn player, CriAtomPlayerDecodeCbFunc func, void *obj); +void CRIAPI criAtomPlayer_DiscardSamples(CriAtomPlayerHn player, CriSint32 num_discard); +typedef CriSint32 CriAtomWaveType; + +#ifdef __cplusplus +} +#endif + +/*************************************************************************** + * For compatibility with old version + ***************************************************************************/ +typedef enum CriAtomDownmixModeTag { + CRIATOM_DOWNMIX_MODE_NONE = 0, + CRIATOM_DOWNMIX_MODE_MONO = 1, + CRIATOM_DOWNMIX_MODE_STEREO = 2, + CRIATOM_DOWNMIX_MODE_STEREO_AND_LFE = 3, + CRIATOM_DOWNMIX_MODE_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomDownmixMode; + +#define CRIATOMAWB_STATUS_NONE (CRIATOMAWB_STATUS_STOP) +#define criAtomPlayer_SetPitch(player, pitch) \ + criAtomPlayer_SetFrequencyRatio((player), (pitch)) +#define criAtomPlayer_SetPan(player, ch, pan) \ + criAtomPlayer_SetPanAdx1Compatible((player), (ch), (pan)) +/* The following function is disabled. */ +#define criAtom_SetDownmixMode(downmix_mode) +#define criAtomHcaMx_SetBusSendLevel(mixer_id, bus_no, level) \ + criAtomExHcaMx_SetBusSendLevel(mixer_id, bus_no, level) + +#endif /* CRI_INCL_CRI_ATOM_H */ + +/* --- end of file --- */ diff --git a/3rdParty/cri2019/pc/include/cri_atom_asr.h b/3rdParty/cri2019/pc/include/cri_atom_asr.h new file mode 100644 index 00000000..2b8c8dac --- /dev/null +++ b/3rdParty/cri2019/pc/include/cri_atom_asr.h @@ -0,0 +1,4310 @@ +/**************************************************************************** + * + * CRI Middleware SDK + * + * Copyright (c) 2010-2017 CRI Middleware Co., Ltd. + * + * Library : CRI Atom + * Module : Library User's Header + * File : cri_atom_asr.h + * + ****************************************************************************/ +/*! + * \file cri_atom_asr.h + */ + +/* Prevention of redefinition */ +#ifndef CRI_ATOM_ASR_H_INCLUDED +#define CRI_ATOM_ASR_H_INCLUDED + +/*************************************************************************** + * Include files + ***************************************************************************/ +#include "cri_xpt.h" +#include "cri_atom.h" +#include "cri_atom_ex.h" + +/*************************************************************************** + * Macro Constants + ***************************************************************************/ +/*EN + * \brief Maximum number of channels + * \ingroup ATOMEXLIB_ASR + * \par Description: + * Maximum number of channels that ASR can process. + */ +#define CRIATOMEXASR_MAX_CHANNELS (8) + +/*EN + * \brief Default number of buses + * \ingroup ATOMEXLIB_ASR + * \par Description: + * The default number of buses. + */ +#define CRIATOMEXASR_DEFAULT_NUM_BUSES (8) + +/*EN + * \brief Maximum number of channels + * \ingroup ATOMEXLIB_ASR + * \par Description: + * Maximum number of buses that can be processed by ASR. + */ +#define CRIATOMEXASR_MAX_BUSES (64) + +/*EN + * \brief Default ASR rack ID + * \ingroup ATOMEXLIB_ASR + * \par Description: + * This ASR rack ID is automatically created at the initialization.
+ * \sa criAtomExAsrRack_Create, criAtomExAsrRack_Destroy + */ +#define CRIATOMEXASR_RACK_DEFAULT_ID (0) + +/*EN + * \brief Illegal rack ID + * \ingroup ATOMEXLIB_ASR + * \par Description: + * This value is returned if the execution of the ::criAtomExAsrRack_Create function fails.
+ * \sa criAtomExAsrRack_Create, criAtomExAsrRack_Destroy + */ +#define CRIATOMEXASR_RACK_ILLEGAL_ID (-1) + +/*EN + * \brief Maximum registered number of user-defined effect interface + * \ingroup ATOMEXLIB_ASR + * \par Description: + * This value is the maximum number of user-defined effect interfaces that can be registered.
+ * \sa criAtomExAsr_RegisterEffectInterface, criAtomExAsr_UnregisterEffectInterface + */ +#define CRIATOMEXASR_MAX_NUM_USER_EFFECT_INTERFACES (256) + +/*========================================================================== + * CRI ASR Bus Effect Name + *=========================================================================*/ +/*EN + * \brief Effect name of amplitude analyzer + * \ingroup ATOMEXLIB_ASR + */ +#define CRIATOMEXASR_AMPLITUDE_ANALYZER_NAME "CRIWARE/AmplitudeAnalyzer" + +/*EN + * \brief Effect name of biquad filter + * \ingroup ATOMEXLIB_ASR + */ +#define CRIATOMEXASR_BIQUAD_FILTER_NAME "CRIWARE/Biquad" + +/*EN + * \brief Effect name of bandpass filer + * \ingroup ATOMEXLIB_ASR + */ +#define CRIATOMEXASR_BANDPASS_FILTER_NAME "CRIWARE/Bandpass" + +/*EN + * \brief Effect name of chorus + * \ingroup ATOMEXLIB_ASR + */ +#define CRIATOMEXASR_CHORUS_NAME "CRIWARE/Chorus" + +/*EN + * \brief Effect name of flanger + * \ingroup ATOMEXLIB_ASR + */ +#define CRIATOMEXASR_FLANGER_NAME "CRIWARE/Flanger" + +/*EN + * \brief Effect name of compressor + * \ingroup ATOMEXLIB_ASR + */ +#define CRIATOMEXASR_COMPRESSOR_NAME "CRIWARE/Compressor" + +/*EN + * \brief Effect name of limiter + * \ingroup ATOMEXLIB_ASR + */ +#define CRIATOMEXASR_LIMITER_NAME "CRIWARE/Limiter" + +/*EN + * \brief Effect name of delay + * \ingroup ATOMEXLIB_ASR + */ +#define CRIATOMEXASR_DELAY_NAME "CRIWARE/Delay" + +/*EN + * \brief Effect name of echo + * \ingroup ATOMEXLIB_ASR + */ +#define CRIATOMEXASR_ECHO_NAME "CRIWARE/Echo" + +/*EN + * \brief Effect name of multi tap delay + * \ingroup ATOMEXLIB_ASR + */ +#define CRIATOMEXASR_MULTITAP_DELAY_NAME "CRIWARE/MultiTapDelay" + +/*EN + * \brief Effect name of distortion + * \ingroup ATOMEXLIB_ASR + */ +#define CRIATOMEXASR_DISTORTION_NAME "CRIWARE/Distortion" + +/*EN + * \brief Effect name of I3DL2 reverb + * \ingroup ATOMEXLIB_ASR + */ +#define CRIATOMEXASR_I3DL2_REVERB_NAME "CRIWARE/I3DL2Reverb" + +/*EN + * \brief Effect name of matrix + * \ingroup ATOMEXLIB_ASR + */ +#define CRIATOMEXASR_MATRIX_NAME "CRIWARE/Matrix" + +/*EN + * \brief Effect name of 3 bands equalizer + * \ingroup ATOMEXLIB_ASR + */ +#define CRIATOMEXASR_3BANDS_EQUALIZER_NAME "CRIWARE/3BandsEQ" + +/*EN + * \brief Effect name of 32 bands equalizer + * \ingroup ATOMEXLIB_ASR + */ +#define CRIATOMEXASR_32BANDS_EQUALIZER_NAME "CRIWARE/32BandsEQ" + +/*EN + * \brief Effect name of pitch shifter + * \ingroup ATOMEXLIB_ASR + */ +#define CRIATOMEXASR_PITCH_SHIFTER_NAME "CRIWARE/PitchShifter" + +/*EN + * \brief Effect name of reverb + * \ingroup ATOMEXLIB_ASR + */ +#define CRIATOMEXASR_REVERB_NAME "CRIWARE/Reverb" + +/*EN + * \brief Effect name of surrounder + * \ingroup ATOMEXLIB_ASR + */ +#define CRIATOMEXASR_SURROUNDER_NAME "CRIWARE/Surrounder" + +/*EN + * \brief Effect name of BitCrusher + * \ingroup ATOMEXLIB_ASR + */ +#define CRIATOMEXASR_BIT_CRUSHER_NAME "CRIWARE/BitCrusher" + +/*EN + * \brief Effect name of Phaser + * \ingroup ATOMEXLIB_ASR + */ +#define CRIATOMEXASR_PHASER_NAME "CRIWARE/Phaser" + +/*========================================================================== + * CRI ASR Bus Effect Parameter Definition Macro + *=========================================================================*/ +/*EN + * \defgroup CRIATOMASR_DSP_PARAM Parameters of the ASR bus effect + * \ingroup ATOMEXLIB_ASR + * \par Description: + * It is a definition concerning the parameters of the CRIWARE in-house manufactured effect used on the ASR bus.
+ * The definition of an index and a definition of a setting value of a specific parameter + * to be specified to ::criAtomExAsrRack_SetEffectParameter or ::criAtomExAsrRack_SetEffectParameter. + * \sa criAtomExAsrRack_SetEffectParameter, criAtomExAsrRack_GetEffectParameter + */ + +/*EN + * \defgroup CRIATOMASR_DSP_PARAM_AMPLITUDE_ANALYZER Parameters of the amplitude analyzer + * \ingroup CRIATOMASR_DSP_PARAM + * \brief The definition of the parameter set by the amplitude analyzer. + * \sa criAtomExAsrRack_SetEffectParameter, criAtomExAsrRack_GetEffectParameter + */ +/*EN + * \brief Side chain table ID of the write destination + * \ingroup CRIATOMASR_DSP_PARAM_AMPLITUDE_ANALYZER + * \par Description: + * In this parameter index, specify the table ID to be written by the amplitude analyzer.
+ * Effects with the same table ID can share analysis results. + */ +#define CRIATOMEXASR_AMPLITUDE_ANALYZER_PARAMETER_SIDE_CHAIN_TABLE_ID (0) + +/*EN + * \brief Number of parameters of amplitude analyzer + * \ingroup CRIATOMASR_DSP_PARAM_AMPLITUDE_ANALYZER + * \par Description: + * Number of parameters of amplitude analyzer. + */ +#define CRIATOMEXASR_AMPLITUDE_ANALYZER_NUM_PARAMETERS (1) + +/*EN + * \defgroup CRIATOMASR_DSP_PARAM_BIQUAD_FILTER Parameters of the biquad filter / band pass filter + * \ingroup CRIATOMASR_DSP_PARAM + * \brief It is the definition of the parameter set by the biquad filter / bandpass filter. + * \sa criAtomExAsrRack_SetEffectParameter, criAtomExAsrRack_GetEffectParameter + */ +/*EN + * \brief Type + * \ingroup CRIATOMASR_DSP_PARAM_BIQUAD_FILTER + * \par Description: + * Specify the type of biquad filter in this parameter index.
+ * \sa CRIATOMEXASR_BIQUAD_FILTER_TYPE_LOWPASS, CRIATOMEXASR_BIQUAD_FILTER_TYPE_HIGHPASS, CRIATOMEXASR_BIQUAD_FILTER_TYPE_NOTCH, CRIATOMEXASR_BIQUAD_FILTER_TYPE_LOWSHELF, CRIATOMEXASR_BIQUAD_FILTER_TYPE_HIGHSHELF, CRIATOMEXASR_BIQUAD_FILTER_TYPE_PEAKING + */ +#define CRIATOMEXASR_BIQUAD_FILTER_PARAMETER_TYPE (0) + +/*EN + * \brief Processing frequency[Hz] + * \ingroup CRIATOMASR_DSP_PARAM_BIQUAD_FILTER + * \par Description: + * Specify the processing frequency of the biquad filter in this parameter index.
+ * The processing frequency varies depending on the type. + * | Type | Frequency | + * | :-----: | :-: | + * | Low pass filter / High pass filter | Cutoff frequency | + * | Notch filter / Peaking filter / Low shelf filter / High shelf filter | Center frequency | + */ +#define CRIATOMEXASR_BIQUAD_FILTER_PARAMETER_FREQUENCY (1) + +/*EN + * \brief Q value + * \ingroup CRIATOMASR_DSP_PARAM_BIQUAD_FILTER + * \par Description: + * Specify the Q value (sharpness, quality factor) of the biquad filter in this parameter index.
+ * The initial value of the parameter is 1.0 f, the minimum value is 0.0 f, and the maximum value is 10.0 f. + * In the signal processing except the band pass filter, the minimum value is limited to 0.001 f. + */ +#define CRIATOMEXASR_BIQUAD_FILTER_PARAMETER_QUALITY_FACTOR (2) + +/*EN + * \brief Output gain [amplitude] + * \ingroup CRIATOMASR_DSP_PARAM_BIQUAD_FILTER + * \par Description: + * Specify the output gain of the biquad filter in this parameter index.
+ * The output gain applies only to the low shelf filter, the high shelf filter, and the peaking filter.
+ * The initial parameter value is 1.0 f, the minimum value is 0.0 f, and the maximum value is 5.0 f. + * In the case of low shelf, high shelf and peaking filter, the minimum value is limited to square root 1 / 65536.0 f during signal processing. + */ +#define CRIATOMEXASR_BIQUAD_FILTER_PARAMETER_GAIN (3) + +/*EN + * \brief Number of parameters of biquad filter + * \ingroup CRIATOMASR_DSP_PARAM_BIQUAD_FILTER + * \par Description: + * This is the number of parameters of the biquad filter. + */ +#define CRIATOMEXASR_BIQUAD_FILTER_NUM_PARAMETERS (4) + +/*EN + * \brief Parameter set value when specifying low pass filter + * \ingroup CRIATOMASR_DSP_PARAM_BIQUAD_FILTER + */ +#define CRIATOMEXASR_BIQUAD_FILTER_TYPE_LOWPASS (0) + +/*EN + * \brief Parameter set value when specifying high pass filter + * \ingroup CRIATOMASR_DSP_PARAM_BIQUAD_FILTER + */ +#define CRIATOMEXASR_BIQUAD_FILTER_TYPE_HIGHPASS (1) + +/*EN + * \brief Parameter setting value when specifying notch filter + * \ingroup CRIATOMASR_DSP_PARAM_BIQUAD_FILTER + */ +#define CRIATOMEXASR_BIQUAD_FILTER_TYPE_NOTCH (2) + +/*EN + * \brief Parameter setting value when specifying low shelf filter + * \ingroup CRIATOMASR_DSP_PARAM_BIQUAD_FILTER + */ +#define CRIATOMEXASR_BIQUAD_FILTER_TYPE_LOWSHELF (3) + +/*EN + * \brief Parameter setting value when specifying high shelf filter + * \ingroup CRIATOMASR_DSP_PARAM_BIQUAD_FILTER + */ +#define CRIATOMEXASR_BIQUAD_FILTER_TYPE_HIGHSHELF (4) + +/*EN + * \brief Parameter setting value when specifying peaking filter + * \ingroup CRIATOMASR_DSP_PARAM_BIQUAD_FILTER + */ +#define CRIATOMEXASR_BIQUAD_FILTER_TYPE_PEAKING (5) + +/*EN + * \brief Low cutoff frequency [Hz] + * \ingroup CRIATOMASR_DSP_PARAM_BIQUAD_FILTER + * \par Description: + * In this parameter index, specify the low cutoff frequency of the bandpass filter (second order Butterworth filter).
+ * The minimum value of the parameter is 24.0 f, and the maximum value is 24000.0 f. + */ +#define CRIATOMEXASR_BANDPASS_FILTER_PARAMETER_LOW_FREQ (0) + +/*EN + * \brief High cutoff frequency [Hz] + * \ingroup CRIATOMASR_DSP_PARAM_BIQUAD_FILTER + * \par Description: + * In this parameter index, specify the high cutoff frequency of the band pass filter (second order Butterworth filter).
+ * The minimum value of the parameter is 24.0 f, and the maximum value is 24000.0 f. + */ +#define CRIATOMEXASR_BANDPASS_FILTER_PARAMETER_HIGH_FREQ (1) + +/*EN + * \brief Number of parameters of band pass filter (second order Butterworth filter) + * \ingroup CRIATOMASR_DSP_PARAM_BIQUAD_FILTER + * \par Description: + * The number of parameters of the band pass filter. + */ +#define CRIATOMEXASR_BANDPASS_FILTER_NUM_PARAMETERS (2) + +/*EN + * \defgroup CRIATOMASR_DSP_PARAM_CHORUS Chorus / Flanger parameters + * \ingroup CRIATOMASR_DSP_PARAM + * \brief Definition of parameters to be set in the chorus / flanger. + * \sa criAtomExAsrRack_SetEffectParameter, criAtomExAsrRack_GetEffectParameter + */ +/*EN + * \brief Delay time [ms] + * \ingroup CRIATOMASR_DSP_PARAM_CHORUS + * \par Description: + * In this parameter index, specify the chorus delay (delay as the center of LFO).
+ * The initial value of the parameter is 30.0 f, the minimum value is 0.1 f, and the maximum value is 100 f. + */ +#define CRIATOMEXASR_CHORUS_PARAMETER_DELAY_TIME_MS (0) + +/*EN + * \brief Depth (LFO amplitude) + * \ingroup CRIATOMASR_DSP_PARAM_CHORUS + * \par Description: + * In this parameter index, specify the depth of the chorus.
+ * The initial value of the parameter is 0.2 f, the minimum value is 0.0 f, and the maximum value is 1.0 f. + */ +#define CRIATOMEXASR_CHORUS_PARAMETER_DEPTH (1) + +/*EN + * \brief Rate (speed, LFO frequency) [Hz] + * \ingroup CRIATOMASR_DSP_PARAM_CHORUS + * \par Description: + * Specify the chorus LFO rate for this parameter index.
+ * The initial value of the parameter is 1.0 f, the minimum value is 0.01 f, and the maximum value is 100.0 f. + */ +#define CRIATOMEXASR_CHORUS_PARAMETER_RATE (2) + +/*EN + * \brief Feedback gain + * \ingroup CRIATOMASR_DSP_PARAM_CHORUS + * \par Description: + * Specify the chorus feedback gain for this parameter index.
+ * The initial value of the parameter is 0.0 f, the minimum value is 0.0 f, and the maximum value is 1.0 f. + */ +#define CRIATOMEXASR_CHORUS_PARAMETER_FEEDBACK (3) + +/*EN + * \brief Mix of dry ingredients + * \ingroup CRIATOMASR_DSP_PARAM_CHORUS + * \par Description: + * In this parameter index, specify the mix ratio of the chorus dry (original sound) component.
+ * The initial value of the parameter is 0.7 f, the minimum value is 0.0 f, and the maximum value is 1.0 f. + */ +#define CRIATOMEXASR_CHORUS_PARAMETER_DRY_MIX (4) + +/*EN + * \brief Number of parameters of chorus + * \ingroup CRIATOMASR_DSP_PARAM_CHORUS + */ +#define CRIATOMEXASR_CHORUS_NUM_PARAMETERS (8) + +/*EN + * \brief Delay time [ms] + * \ingroup CRIATOMASR_DSP_PARAM_CHORUS + * \par Description: + * In this parameter index, specify the flanger delay (delay as the center of LFO) time.
+ * The initial value of the parameter is 10.0 f, the minimum value is 0.1 f, and the maximum value is 10.0 f. + */ +#define CRIATOMEXASR_FLANGER_PARAMETER_DELAY_TIME_MS (0) + +/*EN + * \brief Depth (LFO amplitude) + * \ingroup CRIATOMASR_DSP_PARAM_CHORUS + * \par Description: + * Specify the depth of the flanger in this parameter index.
+ * The initial value of the parameter is 0.1 f, the minimum value is 0.0 f, and the maximum value is 1.0 f. + */ +#define CRIATOMEXASR_FLANGER_PARAMETER_DEPTH (1) + +/*EN + * \brief Rate (speed, LFO frequency) [Hz] + * \ingroup CRIATOMASR_DSP_PARAM_CHORUS + * \par Description: + * Specify the rate of the LFO of the flanger in this parameter index.
+ * The initial value of the parameter is 1.0 f, the minimum value is 0.01 f, and the maximum value is 100.0 f. + */ +#define CRIATOMEXASR_FLANGER_PARAMETER_RATE (2) + +/*EN + * \brief Feedback gain + * \ingroup CRIATOMASR_DSP_PARAM_CHORUS + * \par Description: + * Specify the feedback gain of the flanger for this parameter index.
+ * The initial value of the parameter is 0.0 f, the minimum value is 0.0 f, and the maximum value is 1.0 f. + */ +#define CRIATOMEXASR_FLANGER_PARAMETER_FEEDBACK (3) + +/*EN + * \brief Mix of dry ingredients + * \ingroup CRIATOMASR_DSP_PARAM_CHORUS + * \par Description: + * In this parameter index, specify the mix ratio of the flanger's dry (original sound) component.
+ * The initial value of the parameter is 0.71 f, the minimum value is 0.0 f, and the maximum value is 1.0 f. + */ +#define CRIATOMEXASR_FLANGER_PARAMETER_DRY_MIX (4) + +/*EN + * \brief Mix of wet ingredients + * \ingroup CRIATOMASR_DSP_PARAM_CHORUS + * \par Description: + * Specify the mix ratio of the flanger's wet (original sound) component to this parameter index. + * The initial value of the parameter is 0.71 f, the minimum value is 0.0 f, and the maximum value is 1.0 f. + */ +#define CRIATOMEXASR_FLANGER_PARAMETER_WET_MIX (5) + +/*EN + * \brief Number of parameters of the flanger + * \ingroup CRIATOMASR_DSP_PARAM_CHORUS + */ +#define CRIATOMEXASR_FLANGER_NUM_PARAMETERS (6) + +/*EN + * \defgroup CRIATOMASR_DSP_PARAM_COMPRESSOR Compressor / limiter parameters + * \ingroup CRIATOMASR_DSP_PARAM + * \brief It is the definition of the parameter to set with the compressor / limiter. + * \sa criAtomExAsrRack_SetEffectParameter, criAtomExAsrRack_GetEffectParameter + */ +/*EN + * \brief Threshold + * \ingroup CRIATOMASR_DSP_PARAM_COMPRESSOR + * \par Description: + * In this parameter index, specify the compressor threshold (the value at which amplitude starts to be compressed).
+ * The initial value of the parameter is 1.0 f, the minimum value is 0.0 f, and the maximum value is 1.0 f.
+ * \note Conversion from the ratio value to the dB value can be obtained by multiplying the value obtained by taking + * the common logarithm (logarithm of the base 10) to the ratio value by 20.0f. + */ +#define CRIATOMEXASR_COMPRESSOR_PARAMETER_THRESHOLD (0) + +/*EN + * \brief Ratio + * \ingroup CRIATOMASR_DSP_PARAM_COMPRESSOR + * \par Description: + * Specify the compressor ratio (compression value) for this parameter index.
+ * The initial value of the parameter is 1.0 f, the minimum value, and the maximum value are not limited, + * but the minimum value is limited to 0.01 f during signal processing. + */ +#define CRIATOMEXASR_COMPRESSOR_PARAMETER_RATIO (1) + +/*EN + * \brief Attack time [ms] + * \ingroup CRIATOMASR_DSP_PARAM_COMPRESSOR + * \par Description: + * In this parameter index, specify the compressor attack time (the time to compress to the specified ratio).
+ * The initial value of the parameter is 0.0 f, the minimum value is 0.0 f, and the maximum value is 300.0 f. + */ +#define CRIATOMEXASR_COMPRESSOR_PARAMETER_ATTACK_TIME_MS (2) + +/*EN + * \brief Release time [ms] + * \ingroup CRIATOMASR_DSP_PARAM_COMPRESSOR + * \par Description: + * In this parameter index, specify the compressor release time + * (the time until the compression ends after the amplitude becomes less than the threshold value).
+ * The initial value of the parameter is 0.0 f, the minimum value is 0.0 f, and the maximum value is 50000.0 f. + */ +#define CRIATOMEXASR_COMPRESSOR_PARAMETER_RELEASE_TIME_MS (3) + +/*EN + * \brief Maximum output gain [amplitude] + * \ingroup CRIATOMASR_DSP_PARAM_COMPRESSOR + * \par Description: + * Specify the maximum output gain of the compressor in this parameter index.
+ * The initial value of the parameter is 1.0 f, the minimum value is the (-24 / 5) th power of 10 (corresponding to -96 dB), + * and the maximum value is the (12/5) th power of 10 (corresponding to 48 dB). + */ +#define CRIATOMEXASR_COMPRESSOR_PARAMETER_OUTPUT_GAIN (4) + +/*EN + * \brief Surround link strength + * \ingroup CRIATOMASR_DSP_PARAM_COMPRESSOR + * \par Description: + * Specify the strength of the surround link of the compressor in this parameter index.
+ * The surround link function is a function that changes the strength of compression by using the lowest amplitude value in all channels.
+ * When 1.0 f, the lowest amplitude value in all channels is completely used, and at 0.0 f, the surround link function is turned OFF. + */ +#define CRIATOMEXASR_COMPRESSOR_PARAMETER_SURROUND_LINK (5) + +/*EN + * \brief Type of split EQ + * \ingroup CRIATOMASR_DSP_PARAM_COMPRESSOR + * \par Description: + * In this parameter index, specify the type of split EQ of the compressor.
+ * Split EQ is an EQ that divides the band into two. The compressor is applied only to the band extracted by the filter, and it is combined with the remaining band. + * \sa CRIATOMEXASR_COMPRESSOR_SPLIT_EQ_TYPE_NONE, CRIATOMEXASR_COMPRESSOR_SPLIT_EQ_TYPE_LOWPASS, CRIATOMEXASR_COMPRESSOR_SPLIT_EQ_TYPE_HIGHPASS, CRIATOMEXASR_COMPRESSOR_SPLIT_EQ_TYPE_BANDPASS, CRIATOMEXASR_COMPRESSOR_SPLIT_EQ_TYPE_NOTCH + */ +#define CRIATOMEXASR_COMPRESSOR_PARAMETER_SPLIT_EQ_TYPE (6) + +/*EN + * \brief Split EQ processing frequency [Hz] + * \ingroup CRIATOMASR_DSP_PARAM_COMPRESSOR + * \par Description: + * In this parameter index, specify the processing frequency of the split EQ of the compressor.
+ * The minimum value of the parameter is 24.0 f, and the maximum value is 24000.0 f. + */ +#define CRIATOMEXASR_COMPRESSOR_PARAMETER_SPLIT_EQ_FREQUENCY (7) + +/*EN + * \brief Q value of split EQ + * \ingroup CRIATOMASR_DSP_PARAM_COMPRESSOR + * \par Description: + * In this parameter index, specify the Q value (sharpness, quality factor) of the split EQ of the compressor.
+ * The initial value of the parameter is 1.0f, the minimum value is 0.0f, and the maximum value is 10.0f. + */ +#define CRIATOMEXASR_COMPRESSOR_PARAMETER_SPLIT_EQ_QUALITY_FACTOR (8) + +/*EN + * \brief Number of parameters of the compressor + * \ingroup CRIATOMASR_DSP_PARAM_COMPRESSOR + */ +#define CRIATOMEXASR_COMPRESSOR_NUM_PARAMETERS (9) + +/*EN + * \brief Set value when not using split EQ + * \ingroup CRIATOMASR_DSP_PARAM_COMPRESSOR + */ +#define CRIATOMEXASR_COMPRESSOR_SPLIT_EQ_TYPE_NONE (0) + +/*EN + * \brief Set value when using low pass filter with split EQ + * \ingroup CRIATOMASR_DSP_PARAM_COMPRESSOR + */ +#define CRIATOMEXASR_COMPRESSOR_SPLIT_EQ_TYPE_LOWPASS (1) + +/*EN + * \brief Set value when using high pass filter with split EQ + * \ingroup CRIATOMASR_DSP_PARAM_COMPRESSOR + */ +#define CRIATOMEXASR_COMPRESSOR_SPLIT_EQ_TYPE_HIGHPASS (2) + +/*EN + * \brief Set value when using band pass filter with split EQ + * \ingroup CRIATOMASR_DSP_PARAM_COMPRESSOR + */ +#define CRIATOMEXASR_COMPRESSOR_SPLIT_EQ_TYPE_BANDPASS (3) + +/*EN + * \brief Set value when using notch filter with split EQ + * \ingroup CRIATOMASR_DSP_PARAM_COMPRESSOR + */ +#define CRIATOMEXASR_COMPRESSOR_SPLIT_EQ_TYPE_NOTCH (4) + +/*EN + * \brief Set value when operating the compressor according to its own amplitude measurement result + * \ingroup CRIATOMASR_DSP_PARAM_COMPRESSOR + */ +#define CRIATOMEXASR_COMPRESSOR_MODE_NORMAL (0) + +/*EN + * \brief Set value when operating the compressor using side chain + * \ingroup CRIATOMASR_DSP_PARAM_COMPRESSOR + */ +#define CRIATOMEXASR_COMPRESSOR_MODE_SIDE_CHAIN (1) + +/*EN + * \brief Set value when setting the amplitude detection type of the compressor to the peak value + * \ingroup CRIATOMASR_DSP_PARAM_COMPRESSOR + */ +#define CRIATOMEXASR_COMPRESSOR_TYPE_PEAK (0) + +/*EN + * \brief Set value when setting the amplitude detection type of the compressor to RMS + * \ingroup CRIATOMASR_DSP_PARAM_COMPRESSOR + */ +#define CRIATOMEXASR_COMPRESSOR_TYPE_RMS (1) + +/*EN + * \brief Threshold + * \ingroup CRIATOMASR_DSP_PARAM_COMPRESSOR + * \par Description: + * In this parameter index, specify the threshold of the limiter (the threshold at which the amplitude is compressed).
+ */ +#define CRIATOMEXASR_LIMITER_PARAMETER_THRESHOLD (0) + +/*EN + * \brief Attack time [ms] + * \ingroup CRIATOMASR_DSP_PARAM_COMPRESSOR + * \par Description: + * Specify the attack time of the limiter (time until compression is completed) in this parameter index. + * The initial value of the parameter is 0.0 f, the minimum value is 0.0 f, and the maximum value is 200.0 f. + */ +#define CRIATOMEXASR_LIMITER_PARAMETER_ATTACK_TIME_MS (1) + +/*EN + * \brief Release time [ms] + * \ingroup CRIATOMASR_DSP_PARAM_COMPRESSOR + * \par Description: + * In this parameter index, specify the release time of the limiter (the time until the compression ends after the amplitude becomes below the threshold value). + * The initial value of the parameter is 0.0 f, the minimum value is 0.0 f, and the maximum value is 50000.0 f. + */ +#define CRIATOMEXASR_LIMITER_PARAMETER_RELEASE_TIME_MS (2) + +/*EN + * \brief Maximum output gain [amplitude] + * \ingroup CRIATOMASR_DSP_PARAM_COMPRESSOR + * \par Description: + * Specify the maximum output gain of the limiter in this parameter index.
+ * The initial value of the parameter is 1.0 f, the minimum value is -4 to the power of -4.8 (corresponding to -96 dB), + * and the maximum value is 2.4 power (equivalent to 48 dB) of 10. + */ +#define CRIATOMEXASR_LIMITER_PARAMETER_OUTPUT_GAIN (3) + +/*EN + * \brief Surround link strength + * \ingroup CRIATOMASR_DSP_PARAM_COMPRESSOR + * \par Description: + * Specify the strength of the surround link of the limiter in this parameter index.
+ * The surround link function is a function that changes the strength of compression by using the lowest amplitude value in all channels.
+ * When 1.0 f, the lowest amplitude value in all channels is completely used, and at 0.0 f, the surround link function is turned OFF. + */ +#define CRIATOMEXASR_LIMITER_PARAMETER_SURROUND_LINK (4) + +/*EN + * \brief Amplitude detection value type + * \ingroup CRIATOMASR_DSP_PARAM_COMPRESSOR + * \par Description: + * Specify the amplitude detection value type of the limiter in this parameter index. + * \sa CRIATOMEXASR_LIMITER_TYPE_PEAK, CRIATOMEXASR_LIMITER_TYPE_RMS + */ +#define CRIATOMEXASR_LIMITER_PARAMETER_TYPE (5) + +/*EN + * \brief Number of limiter parameters + * \ingroup CRIATOMASR_DSP_PARAM_COMPRESSOR + */ +#define CRIATOMEXASR_LIMITER_NUM_PARAMETERS (6) + +/*EN + * \brief Set value when operating the limiter according to its own amplitude measurement result + * \ingroup CRIATOMASR_DSP_PARAM_COMPRESSOR + */ +#define CRIATOMEXASR_LIMITER_MODE_NORMAL (0) + +/*EN + * \brief Set value when operating the limiter using side chain + * \ingroup CRIATOMASR_DSP_PARAM_COMPRESSOR + */ +#define CRIATOMEXASR_LIMITER_MODE_SIDE_CHAIN (1) + +/*EN + * \brief Set value when setting the amplitude detection type of the limiter to the peak value + * \ingroup CRIATOMASR_DSP_PARAM_COMPRESSOR + */ +#define CRIATOMEXASR_LIMITER_TYPE_PEAK (0) + +/*EN + * \brief Set value when setting limiter amplitude detection type to RMS + * \ingroup CRIATOMASR_DSP_PARAM_COMPRESSOR + */ +#define CRIATOMEXASR_LIMITER_TYPE_RMS (1) + +/*EN + * \defgroup CRIATOMASR_DSP_PARAM_DELAY Delay / Echo / Multitap Delay Parameters + * \ingroup CRIATOMASR_DSP_PARAM + * \brief Delay / Echo / Definition of parameters to be set with multi tap delay. + * \sa criAtomExAsrRack_SetEffectParameter, criAtomExAsrRack_GetEffectParameter + */ +/*EN + * \brief Delay time [ms] + * \ingroup CRIATOMASR_DSP_PARAM_DELAY + * \par Description: + * Specify the delay time of the delay in this parameter index.
+ * It is initialized with half the maximum delay time. The minimum value of the parameter is 50.0 f, and the maximum value is 1000.0 f. + */ +#define CRIATOMEXASR_DELAY_PARAMETER_DELAY_TIME_MS (0) + +/*EN + * \brief Number of delay parameters + * \ingroup CRIATOMASR_DSP_PARAM_DELAY + */ +#define CRIATOMEXASR_DELAY_NUM_PARAMETERS (1) + +/*EN + * \brief Minimum delay time that can be set with delay [ms] + * \ingroup CRIATOMASR_DSP_PARAM_DELAY + */ +#define CRIATOMEXASR_DELAY_PARAMETER_MIN_DELAY_TIME_MS (50.0f) + +/*EN + * \brief Maximum delay time that can be set with delay [ms] + * \ingroup CRIATOMASR_DSP_PARAM_DELAY + * \attention Even if you set it to be equal to or greater than the configured value, this value is prioritized and restricted. + */ +#define CRIATOMEXASR_DELAY_PARAMETER_MAX_DELAY_TIME_MS (1000.0f) + +/*EN + * \brief Delay time [ms] + * \ingroup CRIATOMASR_DSP_PARAM_DELAY + * \par Description: + * Specify the echo delay time in this parameter index. + */ +#define CRIATOMEXASR_ECHO_PARAMETER_DELAY_TIME_MS (0) + +/*EN + * \brief Feedback gain + * \ingroup CRIATOMASR_DSP_PARAM_DELAY + * \par Description: + * Specify the echo feedback gain in this parameter index.
+ * Please note that the echo sound due to the large feedback gain does not stop even if playback is stopped. + * Although the maximum value of the absolute value of the feedback gain is 1.0 f, internally it is truncated to 0.99 f, + * so there is no danger of sustained oscillation (no echo disappearing). + * \par Description: + * The initial value of the parameter is 0.0 f, the minimum value is -0.99 f, and the maximum value is 0.99 f. + * Due to the above limitation, attenuation will occur even if 1.0 f is set. + */ +#define CRIATOMEXASR_ECHO_PARAMETER_FB_GAIN (1) + +/*EN + * \brief Number of parameters of echo + * \ingroup CRIATOMASR_DSP_PARAM_DELAY + */ +#define CRIATOMEXASR_ECHO_NUM_PARAMETERS (2) + +/*EN + * \brief Minimum delay time that can be set by echo [ms] + * \ingroup CRIATOMASR_DSP_PARAM_DELAY + */ +#define CRIATOMEXASR_ECHO_PARAMETER_MIN_DELAY_TIME_MS (0.0f) + +/*EN + * \brief Maximum delay time that can be set by echo [ms] + * \ingroup CRIATOMASR_DSP_PARAM_DELAY + * \attention This value is preferentially limited over the maximum delay time set in the configuration. + */ +#define CRIATOMEXASR_ECHO_PARAMETER_MAX_DELAY_TIME_MS (1000.0f) + +/*EN + * \brief Minimum feedback gain settable with echo + * \ingroup CRIATOMASR_DSP_PARAM_DELAY + */ +#define CRIATOMEXASR_ECHO_PARAMETER_MIN_FB_GAIN (-0.99f) + +/*EN + * \brief Maximum feedback gain settable with echo + * \ingroup CRIATOMASR_DSP_PARAM_DELAY + */ +#define CRIATOMEXASR_ECHO_PARAMETER_MAX_FB_GAIN (0.99f) + +/*EN + * \brief Number of taps of multi tap delay + * \ingroup CRIATOMASR_DSP_PARAM_DELAY + */ +#define CRIATOMEXASR_MULTITAP_DELAY_NUM_TAPS (4) + +/*EN + * \brief Number of output channels of multi-tap delay + * \ingroup CRIATOMASR_DSP_PARAM_DELAY + * \par Description: + * Normally, it is set to 4 channels (L, R, Surround L, Surround R). + */ +#define CRIATOMEXASR_MULTITAP_DELAY_NUM_CHANNELS (4) + +/*EN + * \brief Maximum delay time that can be set with multi tap delay [ms] + * \ingroup CRIATOMASR_DSP_PARAM_DELAY + * \attention Even if you set it above this value in the configuration, this value will be preferentially restricted. + */ +#define CRIATOMEXASR_MULTITAP_DELAY_PARAMETER_MAX_DELAY_TIME_MS (10000.0f) + +/*EN + * \brief Number of parameters per tap of multi-tap delay + * \ingroup CRIATOMASR_DSP_PARAM_DELAY + */ +#define CRIATOMEXASR_MULTITAP_DELAY_NUM_PARAMETER_PAR_TAP (4) + +/*EN + * \brief The upper limit value of feedback total amount of multitap delay + * \ingroup CRIATOMASR_DSP_PARAM_DELAY + * \par Description: + * Since multi-tap delay feeds back at each tap, the output may diverge in some cases. + * Avoid divergence as much as possible by using the feedback total upper limit value of all taps. + * \attention Even if this upper limit value is used, output may diverge. + */ +#define CRIATOMEXASR_MULTITAP_DELAY_PARAMETER_MAX_SUM_FEEDBACK_GAIN (0.90f) + +/*EN + * \brief Number of multi-tap delay parameters + * \ingroup CRIATOMASR_DSP_PARAM_DELAY + */ +#define CRIATOMEXASR_MULTITAP_DELAY_NUM_PARAMETERS \ + (CRIATOMEXASR_MULTITAP_DELAY_NUM_PARAMETER_PAR_TAP * CRIATOMEXASR_MULTITAP_DELAY_NUM_TAPS) + +/*EN + * \defgroup CRIATOMASR_DSP_PARAM_DISTORTION Distortion parameters + * \ingroup CRIATOMASR_DSP_PARAM + * \brief Definition of parameters to be set in distortion. + * \sa criAtomExAsrRack_SetEffectParameter, criAtomExAsrRack_GetEffectParameter + */ +/*EN + * \brief Strength of distortion [dB] + * \ingroup CRIATOMASR_DSP_PARAM_DISTORTION + * \par Description: + * Specify strength of distortion (drive) for this parameter index.
+ * The initial value of the parameter is 0.5 f, the minimum value is 0.0 f, and the maximum value is 48.0 f. + */ +#define CRIATOMEXASR_DISTORTION_PARAMETER_DRIVE_DB (0) + +/*EN + * \brief The ratio of dry component + * \ingroup CRIATOMASR_DSP_PARAM_DISTORTION + * \par Description: + * Specify the ratio of mixing the dry (original) component of the distortion to this parameter index.
+ * The initial value of the parameter is 0.71 f, the minimum value is 0.0 f, and the maximum value is 1.0 f. + */ +#define CRIATOMEXASR_DISTORTION_PARAMETER_DRY_MIX (1) + +/*EN + * \brief The ratio of wet component + * \ingroup CRIATOMASR_DSP_PARAM_DISTORTION + * \par Description: + * Specify the ratio of mixing the wet (distortion) component of the distortion to this parameter index.
+ * The initial value of the parameter is 0.71 f, the minimum value is 0.0 f, and the maximum value is 1.0 f. + */ +#define CRIATOMEXASR_DISTORTION_PARAMETER_WET_MIX (2) + +/*EN + * \brief Final output level [amplitude] + * \ingroup CRIATOMASR_DSP_PARAM_DISTORTION + * \par Description: + * Specify the final output level of the distortion in this parameter index.
+ * The initial value of the parameter is 0.5 f, the minimum value is 0.0 f, and the maximum value is 2.4 power (value corresponding to 48 dB) of 10. + */ +#define CRIATOMEXASR_DISTORTION_PARAMETER_OUTPUT_GAIN (3) + +/*EN + * \brief Number of distortion parameters + * \ingroup CRIATOMASR_DSP_PARAM_DISTORTION + */ +#define CRIATOMEXASR_DISTORTION_NUM_PARAMETERS (4) + +/*EN + * \defgroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB I3DL2 reverb parameters + * \ingroup CRIATOMASR_DSP_PARAM + * \brief Definition of parameters to be set with I3DL2 reverb. + * \sa criAtomExAsrRack_SetEffectParameter, criAtomExAsrRack_GetEffectParameter + * \attention The preset is an array of information up to parameter index 0 - 10, + * and it can not be specified for index 11 - 13. + */ +/*EN + * \brief Entire effect output volume [mB] + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + * \par Description: + * In this parameter index, specify the final output volume of I3DL2 reverb.
+ * The initial value of the parameter is -1000.0 f, the minimum value is -10000.0 f, and the maximum value is 0.0 f. + */ +#define CRIATOMEXASR_I3DL2_REVERB_PARAMETER_ROOM (0) + +/*EN + * \brief Volume of reference frequency (high frequency) component [mB] + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + * \par Description: + * In this parameter index, specify the volume of reference frequency (high frequency) component of I3DL2 reverb.
+ * The initial value of the parameter is -100.0 f, the minimum value is -10000.0 f, and the maximum value is 0.0 f. + */ +#define CRIATOMEXASR_I3DL2_REVERB_PARAMETER_ROOM_HF (1) + +/*EN + * \brief Decay time of the rear reverberation sound [sec] + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + * \par Description: + * In this parameter index, specify the decay time of the rear reverberation of the I3DL2 reverb.
+ * The initial value of the parameter is 1.49 f, the minimum value is 0.1 f, and the maximum value is 20.0 f. + */ +#define CRIATOMEXASR_I3DL2_REVERB_PARAMETER_DECAY_TIME (2) + +/*EN + * \brief The ratio of high frequency attenuation to low frequency attenuation of the rear reverberation sound + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + * \par Description: + * In this parameter index, specify the ratio of high frequency attenuation to low frequency attenuation in the rear reverberation of the I3DL2 reverb.
+ * The initial parameter value is 0.83 f, the minimum value is 0.1 f, and the maximum value is 2.0 f. + */ +#define CRIATOMEXASR_I3DL2_REVERB_PARAMETER_DECAY_HF_RATIO (3) + +/*EN + * \brief Volume of initial reflected sound [mB] + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + * \par Description: + * In this parameter index, specify the volume of early reflection sound of I3DL2 reverb.
+ * The initial value of the parameter is -2602 f, the minimum value is -10000.0 f, and the maximum value is 1000.0. + */ +#define CRIATOMEXASR_I3DL2_REVERB_PARAMETER_REFLECTIONS (4) + +/*EN + * \brief Delay time of early reflected sound [sec] + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + * \par Description: + * In this parameter index, specify the volume of early reflection sound of I3DL2 reverb.
+ * The initial value of the parameter is 0.007 f, the minimum value is 0.0 f, and the maximum value is 0.3 f. + */ +#define CRIATOMEXASR_I3DL2_REVERB_PARAMETER_REFLECTIONS_DELAY (5) + +/*EN + * \brief Volume of rear reverberation sound [mB] + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + * \par Description: + * In this parameter index, specify the volume of the rear reverberation of the I3DL2 reverb.
+ * The initial value of the parameter is 200 f, the minimum value is -10000.0 f, and the maximum value is 2000.0 f. + */ +#define CRIATOMEXASR_I3DL2_REVERB_PARAMETER_REVERB (6) + +/*EN + * \brief Delay time of the rear reverberation sound [sec] + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + * \par Description: + * In this parameter index, specify the delay time of the rear reverberation of the I3DL2 reverb.
+ * The initial value of the parameter is 0.011 f, the minimum value is 0.0 f, and the maximum value is 0.1 f. + */ +#define CRIATOMEXASR_I3DL2_REVERB_PARAMETER_REVERB_DELAY (7) + +/*EN + * \brief Echo density of the rear reverberation sound [%] + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + * \par Description: + * In this parameter index, specify the echo density of the rear reverberation of the I3DL2 reverb.
+ * The initial value of the parameter is 100.0 f, the minimum value is 0.0 f, and the maximum value is 100.0 f. + */ +#define CRIATOMEXASR_I3DL2_REVERB_PARAMETER_DIFFUSION (8) + +/*EN + * \brief Modal density of rear reverberation [%] + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + * \par Description: + * In this parameter index, specify the modal density of the rear reverberation of the I3DL2 reverb.
+ * The initial value of the parameter is 100.0 f, the minimum value is 0.0 f, and the maximum value is 100.0 f. + */ +#define CRIATOMEXASR_I3DL2_REVERB_PARAMETER_DENSITY (9) + +/*EN + * \brief RoomHF reference frequency (high frequency) [Hz] + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + * \par Description: + * In this parameter index, specify the reference frequency (high range) of RoomHF of I3DL2 reverb.
+ * The initial value of the parameter is 5000.0 f, the minimum value is 20.0 f, and the maximum value is 20000.0 f. + */ +#define CRIATOMEXASR_I3DL2_REVERB_PARAMETER_HF_REFERENCE (10) + +/*EN + * \brief Input level of the front component [mB] + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + * \par Description: + * Specify the input level of the front (L, R channel) component of I3DL2 reverb to this parameter index.
+ * Please note that it can not be specified with the preset of I3DL2 reverb.
+ * The initial value of the parameter is 0.0 f, the minimum value is -10000.0 f, and the maximum value is 0.0 f. + */ +#define CRIATOMEXASR_I3DL2_REVERB_PARAMETER_FRONT_INPUT (11) + +/*EN + * \brief Input level of the rear component [mB] + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + * \par Description: + * Specify the input level of the rear (surround L, surround R channel) component of the I3DL2 reverb to this parameter index.
+ * Please note that it can not be specified with the preset of I3DL2 reverb.
+ * The initial value of the parameter is 0.0 f, the minimum value is -10000.0 f, and the maximum value is 0.0 f. + */ +#define CRIATOMEXASR_I3DL2_REVERB_PARAMETER_REAR_INPUT (12) + +/*EN + * \brief Input level of the center component [mB] + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + * \par Description: + * Specify the input level of the center (C channel) component of I3DL2 reverb to this parameter index.
+ * Please note that it can not be specified with the preset of I3DL2 reverb.
+ * The initial value of the parameter is -10000.0 f, the minimum value is -10000.0 f, and the maximum value is 0.0 f. + */ +#define CRIATOMEXASR_I3DL2_REVERB_PARAMETER_CENTER_INPUT (13) + +/*EN + * \brief Output level of the front component [mB] + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + * \par Description: + * Specify the output level of the front (L, R channel) component of I3DL2 reverb to this parameter index.
+ * Please note that it can not be specified with the preset of I3DL2 reverb.
+ * The initial value of the parameter is 0.0 f, the minimum value is -10000.0 f, and the maximum value is 0.0 f. + */ +#define CRIATOMEXASR_I3DL2_REVERB_PARAMETER_FRONT_OUTPUT (14) + +/*EN + * \brief Output level of rear component [mB] + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + * \par Description: + * Specify the output level of the rear (surround L, surround R channel) component of I3DL2 reverb to this parameter index.
+ * Please note that it can not be specified with the preset of I3DL2 reverb.
+ * The initial value of the parameter is 0.0 f, the minimum value is -10000.0 f, and the maximum value is 0.0 f. + */ +#define CRIATOMEXASR_I3DL2_REVERB_PARAMETER_REAR_OUTPUT (15) + +/*EN + * \brief Output level of center component [mB] + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + * \par Description: + * Specify the output level of the center (C channel) component of I3DL2 reverb to this parameter index.
+ * Please note that it can not be specified with the preset of I3DL2 reverb.
+ * The initial value of the parameter is -10000.0 f, the minimum value is -10000.0 f, and the maximum value is 0.0 f. + */ +#define CRIATOMEXASR_I3DL2_REVERB_PARAMETER_CENTER_OUTPUT (16) + +/*EN + * \brief Number of parameters of I3DL2 reverb + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + */ +#define CRIATOMEXASR_I3DL2_REVERB_NUM_PARAMETERS (17) + +/*EN + * \brief I3DL2 reverb preset "GENERIC" + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + */ +#define CRIATOMEXASR_I3DL2_REVERB_PRESET_GENERIC \ + { -1000, -100, 1.49f, 0.83f, -2602, 0.007f, 200, 0.011f, 100.0f, 100.0f, 5000.0f} +/*EN + * \brief I3DL2 reverb preset "PADED CELL" + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + */ +#define CRIATOMEXASR_I3DL2_REVERB_PRESET_PADDEDCELL \ + { -1000, -6000, 0.17f, 0.10f, -1204, 0.001f, 207, 0.002f, 100.0f, 100.0f, 5000.0f} +/*EN + * \brief I3DL2 reverb preset "ROOM" + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + */ +#define CRIATOMEXASR_I3DL2_REVERB_PRESET_ROOM \ + { -1000, -454, 0.40f, 0.83f, -1646, 0.002f, 53, 0.003f, 100.0f, 100.0f, 5000.0f} +/*EN + * \brief I3DL2 reverb preset "BATH ROOM" + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + */ +#define CRIATOMEXASR_I3DL2_REVERB_PRESET_BATHROOM \ + { -1000, -1200, 1.49f, 0.54f, -370, 0.007f, 1030, 0.011f, 100.0f, 60.0f, 5000.0f} +/*EN + * \brief I3DL2 reverb preset "LIVING ROOM" + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + */ +#define CRIATOMEXASR_I3DL2_REVERB_PRESET_LIVINGROOM \ + { -1000, -6000, 0.50f, 0.10f, -1376, 0.003f, -1104, 0.004f, 100.0f, 100.0f, 5000.0f} +/*EN + * \brief I3DL2 reverb preset "STONE ROOM" + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + */ +#define CRIATOMEXASR_I3DL2_REVERB_PRESET_STONEROOM \ + { -1000, -300, 2.31f, 0.64f, -711, 0.012f, 83, 0.017f, 100.0f, 100.0f, 5000.0f} +/*EN + * \brief I3DL2 reverb preset "AUDITORIUM" + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + */ +#define CRIATOMEXASR_I3DL2_REVERB_PRESET_AUDITORIUM \ + { -1000, -476, 4.32f, 0.59f, -789, 0.020f, -289, 0.030f, 100.0f, 100.0f, 5000.0f} +/*EN + * \brief I3DL2 reverb preset "CONCERT HALL" + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + */ +#define CRIATOMEXASR_I3DL2_REVERB_PRESET_CONCERTHALL \ + { -1000, -500, 3.92f, 0.70f, -1230, 0.020f, -2, 0.029f, 100.0f, 100.0f, 5000.0f} +/*EN + * \brief I3DL2 reverb preset "CAVE" + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + */ +#define CRIATOMEXASR_I3DL2_REVERB_PRESET_CAVE \ + { -1000, 0, 2.91f, 1.30f, -602, 0.015f, -302, 0.022f, 100.0f, 100.0f, 5000.0f} +/*EN + * \brief I3DL2 reverb preset "ARENA" + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + */ +#define CRIATOMEXASR_I3DL2_REVERB_PRESET_ARENA \ + { -1000, -698, 7.24f, 0.33f, -1166, 0.020f, 16, 0.030f, 100.0f, 100.0f, 5000.0f} +/*EN + * \brief I3DL2 reverb preset "HANGER" + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + */ +#define CRIATOMEXASR_I3DL2_REVERB_PRESET_HANGAR \ + { -1000, -1000, 10.05f, 0.23f, -602, 0.020f, 198, 0.030f, 100.0f, 100.0f, 5000.0f} +/*EN + * \brief I3DL2 reverb preset "CARPETED HALLWAY" + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + */ +#define CRIATOMEXASR_I3DL2_REVERB_PRESET_CARPETEDHALLWAY \ + { -1000, -4000, 0.30f, 0.10f, -1831, 0.002f, -1630, 0.030f, 100.0f, 100.0f, 5000.0f} +/*EN + * \brief I3DL2 reverb preset "HALLWAY" + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + */ +#define CRIATOMEXASR_I3DL2_REVERB_PRESET_HALLWAY \ + { -1000, -300, 1.49f, 0.59f, -1219, 0.007f, 441, 0.011f, 100.0f, 100.0f, 5000.0f} +/*EN + * \brief I3DL2 reverb preset "STONE CORRIDOR" + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + */ +#define CRIATOMEXASR_I3DL2_REVERB_PRESET_STONECORRIDOR \ + { -1000, -237, 2.70f, 0.79f, -1214, 0.013f, 395, 0.020f, 100.0f, 100.0f, 5000.0f} +/*EN + * \brief I3DL2 reverb preset "ALLEY" + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + */ +#define CRIATOMEXASR_I3DL2_REVERB_PRESET_ALLEY \ + { -1000, -270, 1.49f, 0.86f, -1204, 0.007f, -4, 0.011f, 100.0f, 100.0f, 5000.0f} +/*EN + * \brief I3DL2 reverb preset "FOREST" + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + */ +#define CRIATOMEXASR_I3DL2_REVERB_PRESET_FOREST \ + { -1000, -3300, 1.49f, 0.54f, -2560, 0.162f, -613, 0.088f, 79.0f, 100.0f, 5000.0f} +/*EN + * \brief I3DL2 reverb preset "CITY" + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + */ +#define CRIATOMEXASR_I3DL2_REVERB_PRESET_CITY \ + { -1000, -800, 1.49f, 0.67f, -2273, 0.007f, -2217, 0.011f, 50.0f, 100.0f, 5000.0f} +/*EN + * \brief I3DL2 reverb preset "MOUNTAINS" + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + */ +#define CRIATOMEXASR_I3DL2_REVERB_PRESET_MOUNTAINS \ + { -1000, -2500, 1.49f, 0.21f, -2780, 0.300f, -2014, 0.100f, 27.0f, 100.0f, 5000.0f} +/*EN + * \brief I3DL2 reverb preset "QUARRY" + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + */ +#define CRIATOMEXASR_I3DL2_REVERB_PRESET_QUARRY \ + { -1000, -1000, 1.49f, 0.83f, -10000, 0.061f, 500, 0.025f, 100.0f, 100.0f, 5000.0f} +/*EN + * \brief I3DL2 reverb preset "PLAIN" + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + */ +#define CRIATOMEXASR_I3DL2_REVERB_PRESET_PLAIN \ + { -1000, -2000, 1.49f, 0.50f, -2466, 0.179f, -2514, 0.100f, 21.0f, 100.0f, 5000.0f} +/*EN + * \brief I3DL2 reverb preset "PARKINGLOT" + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + */ +#define CRIATOMEXASR_I3DL2_REVERB_PRESET_PARKINGLOT \ + { -1000, 0, 1.65f, 1.50f, -1363, 0.008f, -1153, 0.012f, 100.0f, 100.0f, 5000.0f} +/*EN + * \brief I3DL2 reverb preset "SEWER PIPE" + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + */ +#define CRIATOMEXASR_I3DL2_REVERB_PRESET_SEWERPIPE \ + { -1000, -1000, 2.81f, 0.14f, 429, 0.014f, 648, 0.021f, 80.0f, 60.0f, 5000.0f} +/*EN + * \brief I3DL2 reverb preset "UNDER WATER" + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + */ +#define CRIATOMEXASR_I3DL2_REVERB_PRESET_UNDERWATER \ + { -1000, -4000, 1.49f, 0.10f, -449, 0.007f, 1700, 0.011f, 100.0f, 100.0f, 5000.0f} +/*EN + * \brief I3DL2 reverb preset "SMALL ROOM" + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + */ +#define CRIATOMEXASR_I3DL2_REVERB_PRESET_SMALLROOM \ + { -1000, -600, 1.10f, 0.83f, -400, 0.005f, 500, 0.010f, 100.0f, 100.0f, 5000.0f} +/*EN + * \brief I3DL2 reverb preset "MEDIUM ROOM" + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + */ +#define CRIATOMEXASR_I3DL2_REVERB_PRESET_MEDIUMROOM \ + { -1000, -600, 1.30f, 0.83f, -1000, 0.010f, -200, 0.020f, 100.0f, 100.0f, 5000.0f} +/*EN + * \brief I3DL2 reverb preset "LARGE ROOM" + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + */ +#define CRIATOMEXASR_I3DL2_REVERB_PRESET_LARGEROOM \ + { -1000, -600, 1.50f, 0.83f, -1600, 0.020f, -1000, 0.040f, 100.0f, 100.0f, 5000.0f} +/*EN + * \brief I3DL2 reverb preset "MEDIUM HALL" + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + */ +#define CRIATOMEXASR_I3DL2_REVERB_PRESET_MEDIUMHALL \ + { -1000, -600, 1.80f, 0.70f, -1300, 0.015f, -800, 0.030f, 100.0f, 100.0f, 5000.0f} +/*EN + * \brief I3DL2 reverb preset "LARGE HALL" + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + */ +#define CRIATOMEXASR_I3DL2_REVERB_PRESET_LARGEHALL \ + { -1000, -600, 1.80f, 0.70f, -2000, 0.030f, -1400, 0.060f, 100.0f, 100.0f, 5000.0f} +/*EN + * \brief I3DL2 reverb preset "PLATE" + * \ingroup CRIATOMASR_DSP_PARAM_I3DL2_REVERB + */ +#define CRIATOMEXASR_I3DL2_REVERB_PRESET_PLATE \ + { -1000, -200, 1.30f, 0.90f, 0, 0.002f, 0, 0.010f, 100.0f, 75.0f, 5000.0f} + +/*EN + * \defgroup CRIATOMASR_DSP_PARAM_MATRIX Matrix parameters + * \ingroup CRIATOMASR_DSP_PARAM + * \brief The definition of the parameter to be set in the matrix. + * \sa criAtomExAsrRack_SetEffectParameter, criAtomExAsrRack_GetEffectParameter + */ + +/*EN + * \brief Maximum number of channels that can be handled + * \ingroup CRIATOMASR_DSP_PARAM_MATRIX + * \par Description: + * The maximum number of channels that can be processed by the matrix. + */ +#define CRIATOMEXASR_MATRIX_MAX_NUM_CHANNELS (8) + +/*EN + * \brief Number of parameters of matrix + * \ingroup CRIATOMASR_DSP_PARAM_MATRIX + */ +#define CRIATOMEXASR_MATRIX_NUM_PARAMETERS \ + (CRIATOMEXASR_MATRIX_MAX_NUM_CHANNELS * CRIATOMEXASR_MATRIX_MAX_NUM_CHANNELS) + +/*EN + * \defgroup CRIATOMASR_DSP_PARAM_MULTIBANDS_EQ 3 band equalizer / 32 band equalizer parameters + * \ingroup CRIATOMASR_DSP_PARAM + * \brief The definition of parameters to be set with 3 band equalizer and 32 band equalizer. + * \sa criAtomExAsrRack_SetEffectParameter, criAtomExAsrRack_GetEffectParameter + */ + +/*EN + * \brief Parameter setting value when specifying low shelf filter + * \ingroup CRIATOMASR_DSP_PARAM_MULTIBANDS_EQ + */ +#define CRIATOMEXASR_MULTIBANDS_EQ_BAND_FILTER_TYPE_LOWSHELF (0) + +/*EN + * \brief Parameter setting value when specifying high shelf filter + * \ingroup CRIATOMASR_DSP_PARAM_MULTIBANDS_EQ + */ +#define CRIATOMEXASR_MULTIBANDS_EQ_BAND_FILTER_TYPE_HIGHSHELF (1) + +/*EN + * \brief Parameter setting value when specifying peaking filter + * \ingroup CRIATOMASR_DSP_PARAM_MULTIBANDS_EQ + */ +#define CRIATOMEXASR_MULTIBANDS_EQ_BAND_FILTER_TYPE_PEAKING (2) + +/*EN + * \brief Number of parameters per band of 3 band equalizer / 32 band equalizer + * \ingroup CRIATOMASR_DSP_PARAM_MULTIBANDS_EQ + */ +#define CRIATOMEXASR_MULTIBANDS_EQ_NUM_PARAMETER_PAR_BAND (4) + +/*EN + * \defgroup CRIATOMASR_DSP_PARAM_PITCH_SHIFTER Pitch shifter parameters + * \ingroup CRIATOMASR_DSP_PARAM + * \brief The definition of the parameter to be set with the pitch shifter. + * \sa criAtomExAsrRack_SetEffectParameter, criAtomExAsrRack_GetEffectParameter + */ +/*EN + * \brief Pitch change amount [ratio] + * \ingroup CRIATOMASR_DSP_PARAM_PITCH_SHIFTER + * \par Description: + * Specify the pitch change amount of the pitch shifter in this parameter index.
+ * It is the ratio (ratio) of the pitch shift value (cents). The initial value of the parameter is 1.0 f, + * the minimum value is 0.25 f (corresponding to -2400 cents), the maximum value is 4.0 f (equivalent to 2400 cents).
+ * \note Conversion from the ratio value to the cents value can be obtained by multiplying the value obtained by taking the base 2 logarithm to the ratio value by 1200.0 f. + */ +#define CRIATOMEXASR_PITCH_SHIFTER_PARAMETER_PITCH_RATIO (0) + +/*EN + * \brief Formant change amount [ratio] + * \ingroup CRIATOMASR_DSP_PARAM_PITCH_SHIFTER + * \par Description: + * Specify the formant change amount of the pitch shifter for this parameter index.
+ * It is the ratio (ratio) of the pitch shift value (cents). The initial value of the parameter is 1.0 f, + * the minimum value is 0.25 f (corresponding to -2400 cents), the maximum value is 4.0 f (equivalent to 2400 cents).
+ * \note Conversion from the ratio value to the cents value can be obtained by multiplying the value obtained by taking the base 2 logarithm to the ratio value by 1200.0 f. + */ +#define CRIATOMEXASR_PITCH_SHIFTER_PARAMETER_FORMANT_RATIO (1) + +/*EN + * \brief Operation mode + * \ingroup CRIATOMASR_DSP_PARAM_PITCH_SHIFTER + * \par Description: + * Specify the operation mode of the pitch shifter in this parameter index.
+ * The appropriate operation mode will differ depending on whether or not emphasis is placed on the sound localization + * and whether or not the voice including human voice (with pitch) or not. + * \sa CRIATOMEXASR_PITCH_SHIFTER_MODE_MUSIC, CRIATOMEXASR_PITCH_SHIFTER_MODE_VOCAL, CRIATOMEXASR_PITCH_SHIFTER_MODE_SE, CRIATOMEXASR_PITCH_SHIFTER_MODE_SPEECH + */ +#define CRIATOMEXASR_PITCH_SHIFTER_PARAMETER_MODE (2) + +/*EN + * \brief Pitch frequency of input audio data [Hz] + * \ingroup CRIATOMASR_DSP_PARAM_PITCH_SHIFTER + * \par Description: + * Specify the frequency of the input audio data in this parameter index.
+ * Although it becomes hint information at the time of formant analysis, + * please be careful because noise is added to the sound if you specify a value far apart from the actual sound data. + * If not specified, the default pitch (459.375 Hz) is used internally. + */ +#define CRIATOMEXASR_PITCH_SHIFTER_PARAMETER_DATA_PITCH_FREQUENCY (3) + +/*EN + * \brief Number of parameters of pitch shifter + * \ingroup CRIATOMASR_DSP_PARAM_PITCH_SHIFTER + */ +#define CRIATOMEXASR_PITCH_SHIFTER_NUM_PARAMETERS (4) + +/*EN + * \brief Parameter setting value when music is specified in the pitch shifter operation mode + * \ingroup CRIATOMASR_DSP_PARAM_PITCH_SHIFTER + * \par Description: + * Perform LR -> MS conversion (convert L and Rch speech to M, Sch) and do not perform formant shift. + */ +#define CRIATOMEXASR_PITCH_SHIFTER_MODE_MUSIC (0) + +/*EN + * \brief Parameter setting value when vocal is specified in the pitch shifter operation mode + * \ingroup CRIATOMASR_DSP_PARAM_PITCH_SHIFTER + * \par Description: + * Perform LR -> MS conversion and perform formant shift. + */ +#define CRIATOMEXASR_PITCH_SHIFTER_MODE_VOCAL (1) + +/*EN + * \brief Parameter setting value when SE is specified in the pitch shifter operation mode + * \ingroup CRIATOMASR_DSP_PARAM_PITCH_SHIFTER + * \par Description: + * It does not perform LR -> MS conversion and does not perform formant shift. + */ +#define CRIATOMEXASR_PITCH_SHIFTER_MODE_SE (2) + +/*EN + * \brief Parameter setting value for speech is specified in the pitch shifter operation mode + * \ingroup CRIATOMASR_DSP_PARAM_PITCH_SHIFTER + * \par Description: + * It does not perform LR -> MS conversion, but perform formant shift. + */ +#define CRIATOMEXASR_PITCH_SHIFTER_MODE_SPEECH (3) + +/*EN + * \defgroup CRIATOMASR_DSP_PARAM_REVERB Reverb parameters + * \ingroup CRIATOMASR_DSP_PARAM + * \brief The definition of parameters to be set with reverb. + * \sa criAtomExAsrRack_SetEffectParameter, criAtomExAsrRack_GetEffectParameter + */ +/*EN + * \brief Reverberation time [ms] + * \ingroup CRIATOMASR_DSP_PARAM_REVERB + * \par Description: + * Specify the reverberation time in this parameter index.
+ * The initial value of the parameter is 3000.0 f, the minimum value is 1.0 f, and the maximum value is 20000.0 f. + */ +#define CRIATOMEXASR_REVERB_PARAMETER_REVERB_TIME_MS (0) + +/*EN + * \brief Room size [m] + * \ingroup CRIATOMASR_DSP_PARAM_REVERB + * \par Description: + * Specify the reverb room size in this parameter index.
+ * It is initialized with half the maximum room size. The minimum parameter value is 1.0 f, and the maximum value is 50.0 f. + */ +#define CRIATOMEXASR_REVERB_PARAMETER_ROOM_SIZE_M (1) + +/*EN + * \brief Pre-delay time [ms] + * \ingroup CRIATOMASR_DSP_PARAM_REVERB + * \par Description: + * Specify the pre-delay time of the reverb in this parameter index.
+ * The minimum value of the parameter is 10.0 f, the maximum value is 1000.0 f. + */ +#define CRIATOMEXASR_REVERB_PARAMETER_PRE_DELAY_TIME_MS (2) + +/*EN + * \brief Low cutoff frequency [Hz] + * \ingroup CRIATOMASR_DSP_PARAM_REVERB + * \par Description: + * In this parameter index, specify the low cutoff frequency of the reverb output.
+ * The initial value is 0.0 f. The minimum parameter value is 0.0 f, and the maximum value is 24000.0 f. + */ +#define CRIATOMEXASR_REVERB_PARAMETER_LOW_COF (3) + +/*EN + * \brief High cutoff frequency [Hz] + * \ingroup CRIATOMASR_DSP_PARAM_REVERB + * \par Description: + * In this parameter index, specify the high cutoff frequency of the reverb output.
+ * The initial value is 8000.0 f. The minimum value of the parameter is 8000.0 f, and the maximum value is 24000 f. + */ +#define CRIATOMEXASR_REVERB_PARAMETER_HIGH_COF (4) + +/*EN + * \brief Number of parameters of reverb + * \ingroup CRIATOMASR_DSP_PARAM_REVERB + */ +#define CRIATOMEXASR_REVERB_NUM_PARAMETERS (5) + +/*EN + * \brief Parameter setting value when specifying surround in reverb operation mode + * \ingroup CRIATOMASR_DSP_PARAM_REVERB + * \par Description: + * Mix all the inputs of Ch to mono, and expand to matrix ch according to output Ch. + */ +#define CRIATOMEXASR_REVERB_MODE_DEF_SURROUND (0) + +/*EN + * \brief Parameter setting value when stereo is specified in reverb operation mode + * \ingroup CRIATOMASR_DSP_PARAM_REVERB + * \par Description: + * Input-output is performed with 2Ch. + */ +#define CRIATOMEXASR_REVERB_MODE_DEF_STEREO (1) + +/*EN + * \brief Parameter setting value when specifying rear only in reverb operation mode + * \ingroup CRIATOMASR_DSP_PARAM_REVERB + * \par Description: + * Input-output is performed only with rear Ch (rear L, RCh). + */ +#define CRIATOMEXASR_REVERB_MODE_DEF_REAR_ONLY (2) + +/*EN + * \brief Parameter setting value when specifying only center in reverb operation mode + * \ingroup CRIATOMASR_DSP_PARAM_REVERB + * \par Description: + * Input-output is performed only with Center Ch. + */ +#define CRIATOMEXASR_REVERB_MODE_DEF_CENTER_ONLY (3) + +/*EN + * \defgroup CRIATOMASR_DSP_PARAM_SURROUNDER Parameters of the surrounding party + * \ingroup CRIATOMASR_DSP_PARAM + * \brief The definition of the parameter to be set with the surrounding party. + * \sa criAtomExAsrRack_SetEffectParameter, criAtomExAsrRack_GetEffectParameter + */ +/*EN + * \brief Operation mode + * \ingroup CRIATOMASR_DSP_PARAM_SURROUNDER + * \par Description: + * Specify the operation mode of the surrounder in this parameter index. + * \sa CRIATOMEXASR_SURROUNDER_MODE_STRAIGHT, CRIATOMEXASR_SURROUNDER_MODE_CROSS, CRIATOMEXASR_SURROUNDER_MODE_MATRIX + */ +#define CRIATOMEXASR_SURROUNDER_PARAMETER_MODE (0) + +/*EN + * \brief Delay time of surround component [ms] + * \ingroup CRIATOMASR_DSP_PARAM_SURROUNDER + * \par Description: + * In this parameter index, specify the delay time of the surround channel component of the surrounder.
+ * The initial parameter value is 0.0 f, the minimum value is 0.0 f, and the maximum value is 500.0 f. + */ +#define CRIATOMEXASR_SURROUNDER_PARAMETER_DELAY_TIME_MS (1) + +/*EN + * \brief Gain of the surround component [amplitude] + * \ingroup CRIATOMASR_DSP_PARAM_SURROUNDER + * \par Description: + * In this parameter index, specify the output gain of the surround channel component of the surrounder.
+ * The initial value of the parameter is 1.0 f, the minimum value is 0.0 f, and the maximum value is 2.4 (corresponding to 48 dB) of 10. + */ +#define CRIATOMEXASR_SURROUNDER_PARAMETER_GAIN (2) + +/*EN + * \brief Number of parameters of the surrounder + * \ingroup CRIATOMASR_DSP_PARAM_SURROUNDER + */ +#define CRIATOMEXASR_SURROUNDER_NUM_PARAMETERS (3) + + +/*EN + * \brief Parameter setting value when specifying straight in the surrounder operation mode + * \ingroup CRIATOMASR_DSP_PARAM_SURROUNDER + * \par Description: + * Expand input LCh to surround LCh and RCh to surround RCh. + */ +#define CRIATOMEXASR_SURROUNDER_MODE_STRAIGHT (0) + +/*EN + * \brief Parameter setting value when specifying cross in the surrounder operation mode + * \ingroup CRIATOMASR_DSP_PARAM_SURROUNDER + * \par Description: + * Expand input LCh to surround RCh and RCh to surround LCh. + */ +#define CRIATOMEXASR_SURROUNDER_MODE_CROSS (1) + +/*EN + * \brief Parameter setting value when specifying matrix in surrounder operation mode + * \ingroup CRIATOMASR_DSP_PARAM_SURROUNDER + * \par Description: + * Expand input LCh - RCh (LCh input minus RCh input) to surround LCh and RCh - LCh to surround RCh. + */ +#define CRIATOMEXASR_SURROUNDER_MODE_MATRIX (2) + +/*EN + * \defgroup CRIATOMASR_DSP_PARAM_BIT_CRUSHER Parameter of the Bit Crusher + * \ingroup CRIATOMASR_DSP_PARAM + * \brief Definition of parameters to be set with bit crusher. + * \sa criAtomExAsrRack_SetEffectParameter, criAtomExAsrRack_GetEffectParameter + */ +/*EN + * \brief Strength of distortion[dB] + * \ingroup CRIATOMASR_DSP_PARAM_BIT_CRUSHER + * \par Description: + * In this parameter index, specify the distortion strength (drive) of the bit crusher.
+ * The initial value of the parameter is 0.5f, the minimum value is 0.0f, and the maximum value is 48.0f. + */ +#define CRIATOMEXASR_BIT_CRUSHER_PARAMETER_DRIVE_DB (0) + +/*EN + * \brief Number of quantization bits + * \ingroup CRIATOMASR_DSP_PARAM_BIT_CRUSHER + * \par Description: + * Specify the number of quantization bits of the bit crusher.
+ * The smaller the setting, the smaller the amplitude becomes Lo-Fi.
+ * The initial value of the parameter is 8, the minimum value is 1, and the maximum value is 24. + */ +#define CRIATOMEXASR_BIT_CRUSHER_PARAMETER_DEPTH_BITS (1) + +/*EN + * \brief Downsampling + * \ingroup CRIATOMASR_DSP_PARAM_BIT_CRUSHER + * \par Description: + * Specify down sampling of bit crusher.
+ * The longer the setting, the longer the time becomes Lo-Fi.
+ * The initial value of the parameter is 8, the minimum value is 1, and the maximum value is 100. + */ +#define CRIATOMEXASR_BIT_CRUSHER_PARAMETER_DOWN_SAMPLING (2) + +/*EN + * \brief Percentage of dry component + * \ingroup CRIATOMASR_DSP_PARAM_BIT_CRUSHER + * \par Description: + * Specify the ratio at which the bit crusher dry (Original sound) component is mixed.
+ * The initial value of the parameter is 0.71f, the minimum value is 0.0f, and the maximum value is 1.0f. + */ +#define CRIATOMEXASR_BIT_CRUSHER_PARAMETER_DRY_MIX (3) + +/*EN + * \brief Percentage of wet component + * \ingroup CRIATOMASR_DSP_PARAM_BIT_CRUSHER + * \par Description: + * Specify the ratio at which the bit crusher wet (Distortion) component is mixed.
+ * The initial value of the parameter is 0.71f, the minimum value is 0.0f, and the maximum value is 1.0f. + */ +#define CRIATOMEXASR_BIT_CRUSHER_PARAMETER_WET_MIX (4) + +/*EN + * \brief Output level [amplitude] + * \ingroup CRIATOMASR_DSP_PARAM_BIT_CRUSHER + * \par Description: + * Specify the output level of the bit crusher.
+ * The initial value of the parameter is 0.5f, the minimum value is 0.0f, and the maximum value is 2.4 power of 10 (value corresponding to 48 dB). + */ +#define CRIATOMEXASR_BIT_CRUSHER_PARAMETER_OUTPUT_GAIN (5) + +/*EN + * \brief Number of parameters of bit crusher + * \ingroup CRIATOMASR_DSP_PARAM_BIT_CRUSHER + */ +#define CRIATOMEXASR_BIT_CRUSHER_NUM_PARAMETERS (6) + +/*EN + * \defgroup CRIATOMASR_DSP_PARAM_PHASER Parameters of the Phasor + * \ingroup CRIATOMASR_DSP_PARAM + * \brief Definition of parameters to be set by the phaser. + * \sa criAtomExAsrRack_SetEffectParameter, criAtomExAsrRack_GetEffectParameter + */ +/*EN + * \brief Delay time [ms] + * \ingroup CRIATOMASR_DSP_PARAM_PHASER + * \par Description: + * Specify the strength of the phasing effect of the phaser.
+ * The initial value of the parameter is 8, the minimum value is 4, the maximum value is 12. + */ +#define CRIATOMEXASR_PHASER_PARAMETER_STAGES (0) + +/*EN + * \brief Depth (LFO amplitude) + * \ingroup CRIATOMASR_DSP_PARAM_PHASER + * \par Description: + * Specify the depth of the phaser.
+ * The initial value of the parameter is 0.5f, the minimum value is 0.0f, and the maximum value is 1.0f. + */ +#define CRIATOMEXASR_PHASER_PARAMETER_DEPTH (1) + +/*EN + * \brief Rate (speed, LFO frequency) [Hz] + * \ingroup CRIATOMASR_DSP_PARAM_PHASER + * \par Description: + * Specify the rate of the phaser LFO.
+ * The initial value of the parameter is 1.0f, the minimum value is 0.01f, and the maximum value is 100.0f. + */ +#define CRIATOMEXASR_PHASER_PARAMETER_RATE (2) + +/*EN + * \brief Feedback gain + * \ingroup CRIATOMASR_DSP_PARAM_PHASER + * \par Description: + * Specify the feedback gain of the phaser.
+ * The initial value of the parameter is 0.0f, the minimum value is 0.0f, and the maximum value is 1.0f. + */ +#define CRIATOMEXASR_PHASER_PARAMETER_FEEDBACK (3) + +/*EN + * \brief Mix of dry component + * \ingroup CRIATOMASR_DSP_PARAM_PHASER + * \par Description: + * Specify the mixing ratio of the dry (Original sound) component of the phaser.
+ * The initial value of the parameter is 0.71 f, the minimum value is 0.0 f, and the maximum value is 1.0 f. + */ +#define CRIATOMEXASR_PHASER_PARAMETER_DRY_MIX (4) + +/*EN + * \brief Mix of wet component + * \ingroup CRIATOMASR_DSP_PARAM_PHASER + * \par Description: + * Specify the mixing ratio of the wet (Distortion) component of the phaser.
+ * The initial value of the parameter is 0.71 f, the minimum value is 0.0 f, and the maximum value is 1.0 f. + */ +#define CRIATOMEXASR_PHASER_PARAMETER_WET_MIX (5) + +/*EN + * \brief Number of phasor parameters + * \ingroup CRIATOMASR_DSP_PARAM_PHASER + */ +#define CRIATOMEXASR_PHASER_NUM_PARAMETERS (6) + +/*************************************************************************** + * 処理マクロ + * Macro Functions + ***************************************************************************/ +/*========================================================================== + * CRI AtomEx ASR API + *=========================================================================*/ +/*EN + * \brief Set default parameters to CriAtomExAsrConfig + * \ingroup ATOMEXLIB_ASR + * \par Description: + * Sets default values for a configuration structure ( ::CriAtomExAsrConfig ) + * that is set for the ::criAtomExAsr_Initialize function.
+ * \sa criAtomExAsr_Initialize, CriAtomExAsrConfig + */ +#define criAtomExAsr_SetDefaultConfig(p_config) \ +{\ + (p_config)->server_frequency = 60.0f;\ + (p_config)->num_buses = CRIATOMEXASR_DEFAULT_NUM_BUSES; \ + (p_config)->output_channels = CRIATOM_DEFAULT_OUTPUT_CHANNELS;\ + (p_config)->output_sampling_rate = CRIATOM_DEFAULT_OUTPUT_SAMPLING_RATE;\ + (p_config)->sound_renderer_type = CRIATOM_SOUND_RENDERER_NATIVE;\ + (p_config)->context = NULL;\ + (p_config)->max_racks = 8;\ + (p_config)->ambisonics_order_type = CRIATOMAMBISONICS_ORDER_TYPE_NONE;\ +} + +/*EN + * \brief Set default parameters to CriAtomExAsrBusAnalyzerConfig + * \ingroup ATOMEXLIB_ASR + * \par Description + * Sets default values for a configuration structure ( ::CriAtomExAsrBusAnalyzerConfig ) + * that is set for the ::criAtomExAsr_AttachBusAnalyzer function.
+ * \sa criAtomExAsr_AttachBusAnalyzer, CriAtomExAsrBusAnalyzerConfig + */ +#define criAtomExAsr_SetDefaultConfigForBusAnalyzer(p_config) \ +{\ + (p_config)->interval = 50;\ + (p_config)->peak_hold_time = 1000;\ +} + +/*========================================================================== + * CRI AtomEx ASR Rack API + *=========================================================================*/ +/*EN + * \brief Setting default parameters for CriAtomAsrConfig + * \ingroup ATOMLIB_ASR + * \param[out] p_config Pointer to the initialization configuration structure + * \par Description: + * Sets default values for the configuration structure ( ::CriAtomAsrConfig) that is set + for the ::criAtomAsr_Initialize function.
+ * \sa + * CriAtomAsrConfig +*/ +#define criAtomExAsrRack_SetDefaultConfig(p_config) \ +{\ + (p_config)->server_frequency = 60.0f;\ + (p_config)->num_buses = CRIATOMEXASR_DEFAULT_NUM_BUSES; \ + (p_config)->output_channels = CRIATOM_DEFAULT_OUTPUT_CHANNELS;\ + (p_config)->output_sampling_rate = CRIATOM_DEFAULT_OUTPUT_SAMPLING_RATE;\ + (p_config)->sound_renderer_type = CRIATOM_SOUND_RENDERER_NATIVE;\ + (p_config)->output_rack_id = 0;\ + (p_config)->context = NULL;\ +} + +/*========================================================================== + * CRI Atom ASR API + *=========================================================================*/ +/*EN + * \brief Set default parameters for CriAtomAsrConfig + * \ingroup ATOMLIB_ASR + * \param[out] p_config Pointer to the configuration structure for initialization + * \par Description: + * Sets default values for a configuration structure ( ::CriAtomAsrConfig ) + * that is set for the ::criAtomAsr_Initialize function.
+ * function.
+ * \sa + * CriAtomAsrConfig +*/ +#define criAtomAsr_SetDefaultConfig(p_config) \ +{\ + (p_config)->server_frequency = 60.0f;\ + (p_config)->num_buses = CRIATOMEXASR_DEFAULT_NUM_BUSES; \ + (p_config)->output_channels = CRIATOM_DEFAULT_OUTPUT_CHANNELS;\ + (p_config)->output_sampling_rate = CRIATOM_DEFAULT_OUTPUT_SAMPLING_RATE;\ + (p_config)->sound_renderer_type = CRIATOM_SOUND_RENDERER_NATIVE;\ + (p_config)->context = NULL;\ + (p_config)->max_racks = 8;\ + (p_config)->ambisonics_order_type = CRIATOMAMBISONICS_ORDER_TYPE_NONE;\ +} + +/*========================================================================== + * CRI AtomEx API + *=========================================================================*/ +/*EN +* \brief Set default values to the library initialization configuration structure +* \ingroup ATOMEXLIB_GLOBAL +* \param[out] p_config Pointer to the initializing configuration structure +* \par Description: +* Sets default values to the configuration structure (::CriAtomExConfigForUserPcmOutput) +* to be passed to the ::criAtomEx_InitializeForUserPcmOutput function.
+* \sa CriAtomExConfigForUserPcmOutput +*/ +#define criAtomEx_SetDefaultConfigForUserPcmOutput(p_config) \ +{ \ + criAtomEx_SetDefaultConfig(&(p_config)->atom_ex); \ + criAtomExAsr_SetDefaultConfig(&(p_config)->asr); \ + criAtomExHcaMx_SetDefaultConfig(&(p_config)->hca_mx); \ +} + +/*========================================================================== + * CRI ASR bus effect parameter index access macro + *=========================================================================*/ +/*EN + * \brief Mix of wet components + * \ingroup CRIATOMASR_DSP_PARAM_CHORUS + * \param[in] tap_index Index of the modulator tap to be set + * \par Description: + * In this parameter index, specify the mixing ratio of the chorus's wet (feedback) component by the index of the modulator.
+ * For all taps, the initial value of the parameter is 0.5 f, the minimum value is 0.0 f, and the maximum value is 1.0 f. + */ +#define CRIATOMEXASR_CHORUS_PARAMETER_WET_MIX(tap_index) \ + ((tap_index) + 5) + +/*EN + * \brief Send level [amplitude] + * \param[in] input_ch Input channel to be set + * \param[in] output_ch Output channel to be set + * \ingroup CRIATOMASR_DSP_PARAM_MATRIX + * \par Description: + * In this parameter index, specify the send level of the matrix using the number of input / output channels.
+ * The minimum value of the parameter is 0.0 f, the maximum value is 1.0 f. For the initial value, + * 1.0f is set for the element of input_ch == output_ch, otherwise 0.0f is set. + */ +#define CRIATOMEXASR_MATRIX_PARAMETER_LEVELS(input_ch, output_ch) \ + ((input_ch) * CRIATOMEXASR_MATRIX_MAX_NUM_CHANNELS + (output_ch)) + +/*EN + * \brief Filter type of each band + * \ingroup CRIATOMASR_DSP_PARAM_MULTIBANDS_EQ + * \param[in] band_index Band index to be set + * \par Description: + * In this parameter index, specify the type of filter for each band of 3 band equalizer / 32 band equalizer.
+ * Each band's filter consists of a biquad filter. + * \attention In the 32-band equalizer, only the filter of the band enabled on the tool is enabled, and the number of bands is limited only to the number of effective bands. + * \sa CRIATOMEXASR_MULTIBANDS_EQ_BAND_FILTER_TYPE_LOWSHELF, CRIATOMEXASR_MULTIBANDS_EQ_BAND_FILTER_TYPE_HIGHSHELF, CRIATOMEXASR_MULTIBANDS_EQ_BAND_FILTER_TYPE_PEAKING + */ +#define CRIATOMEXASR_MULTIBANDS_EQ_PARAMETER_TYPE(band_index) \ + (CRIATOMEXASR_MULTIBANDS_EQ_NUM_PARAMETER_PAR_BAND * (band_index)) + +/*EN + * \brief The center frequency of each band [Hz] + * \ingroup CRIATOMASR_DSP_PARAM_MULTIBANDS_EQ + * \param[in] band_index Band index to be set + * \par Description: + * In this parameter index, specify the center frequency of the filter of each band of 3 band equalizer / 32 band equalizer.
+ * The initial value of the parameter is 24.0 f, the minimum value is 24.0 f, and the maximum value is 24000 f. + */ +#define CRIATOMEXASR_MULTIBANDS_EQ_PARAMETER_FREQUENCY(band_index) \ + (CRIATOMEXASR_MULTIBANDS_EQ_NUM_PARAMETER_PAR_BAND * (band_index) + 1) + +/*EN + * \brief The Q value of each band + * \ingroup CRIATOMASR_DSP_PARAM_MULTIBANDS_EQ + * \param[in] band_index Band index to be set + * \par Description: + * In this parameter index, specify the Q value (sharpness, quality factor) of each band of the 3 band equalizer / 32 band equalizer.
+ * The initial value of the parameter is 1.0 f, the minimum value is 0.0 f, and the maximum value is 10.0 f.
+ * In the signal processing except the band pass filter, the minimum value is limited to 0.001 f. + */ +#define CRIATOMEXASR_MULTIBANDS_EQ_PARAMETER_QUALITY_FACTOR(band_index) \ + (CRIATOMEXASR_MULTIBANDS_EQ_NUM_PARAMETER_PAR_BAND * (band_index) + 2) + +/*EN + * \brief Output gain of each band [amplitude] + * \ingroup CRIATOMASR_DSP_PARAM_MULTIBANDS_EQ + * \param[in] band_index Band index to be set + * \par Description: + * In this parameter index, specify the output gain of each band of 3 band equalizer / 32 band equalizer.
+ * The initial parameter value is 1.0 f, the minimum value is 0.0 f, and the maximum value is 5.0 f.
+ * In the case of low shelf, high shelf and peaking filter, the minimum value is limited to square root 1 / 65536.0 f during signal processing. + */ +#define CRIATOMEXASR_MULTIBANDS_EQ_PARAMETER_GAIN(band_index) \ + (CRIATOMEXASR_MULTIBANDS_EQ_NUM_PARAMETER_PAR_BAND * (band_index) + 3) + +/*EN + * \brief Calculate the total number of parameters of 3 band equalizer / 32 band equalizer by specifying the number of band. + * \ingroup CRIATOMASR_DSP_PARAM_MULTIBANDS_EQ + * \param[in] num_bands Number of bands + */ +#define CRIATOMEXASR_MULTIBANDS_EQ_NUM_PARAMETERS(num_bands) \ + ((num_bands) * CRIATOMEXASR_MULTIBANDS_EQ_NUM_PARAMETER_PAR_BAND) + +/*EN + * \brief Delay time [ms] + * \ingroup CRIATOMASR_DSP_PARAM_DELAY + * \param[in] i_tapIndex of tap to be set + * \par Description: + * In this parameter index, specify the delay time of each tap of the multi tap delay.
+ * The initial value of the parameter is limited to half the maximum delay time, the maximum value is 10000.0 f, + * and the minimum value is limited to 20.0 f, 40.0 f, 60.0 f, and 80.0 f with 4 taps 1, 2, 3, and 4 respectively. + */ +#define CRIATOMEXASR_MULTITAP_DELAY_PARAMETER_DELAY_TIME_MS(i_tap) \ + (0 + (i_tap) * CRIATOMEXASR_MULTITAP_DELAY_NUM_PARAMETER_PAR_TAP) + +/*EN + * \brief Output level [amplitude] + * \ingroup CRIATOMASR_DSP_PARAM_DELAY + * \param[in] i_tap Index of tap to be set + * \par Description: + * In this parameter index, specify the output level of each tap of the multi tap delay.
+ * The initial value of the parameter is 0.0 f, the minimum value is 0.0 f, and the maximum value is 1.0 f. + */ +#define CRIATOMEXASR_MULTITAP_DELAY_PARAMETER_LEVEL(i_tap) \ + (1 + (i_tap) * CRIATOMEXASR_MULTITAP_DELAY_NUM_PARAMETER_PAR_TAP) + +/*EN +* \brief Direction (pan) angle [degree] + * \ingroup CRIATOMASR_DSP_PARAM_DELAY + * \param[in] i_tap Index of tap to be set + * \par Description: + * In this parameter index, specify the horizontal angle of each tap of the multi tap delay.
+ * By specifying this angle, you can express delayed sound with spreading in the horizontal direction.
+ * The initial parameter value is 0.0 f, the minimum value is -180.0 f, and the maximum value is 180 f. + */ +#define CRIATOMEXASR_MULTITAP_DELAY_PARAMETER_AZIMUTH(i_tap) \ + (2 + (i_tap) * CRIATOMEXASR_MULTITAP_DELAY_NUM_PARAMETER_PAR_TAP) + +/*EN + * \brief Feedback gain + * \ingroup CRIATOMASR_DSP_PARAM_DELAY + * \param[in] i_tap Index of tap to be set + * \par Description: + * In this parameter index, specify feedback gain of multi tap delay. + * \attention When the feedback gain is too large, the output diverges.
+ * The initial value of the parameter is 0.0 f, the minimum value is 0.0 f, + * and the maximum value is 1.0 f at each tap, but the total of all the taps is limited to 0.90 f. + */ +#define CRIATOMEXASR_MULTITAP_DELAY_PARAMETER_FEEDBACK(i_tap) \ + (3 + (i_tap) * CRIATOMEXASR_MULTITAP_DELAY_NUM_PARAMETER_PAR_TAP) + +/*************************************************************************** + * データ型宣言 + * Data Type Declarations + ***************************************************************************/ +/*========================================================================== + * CRI AtomEx ASR API + *=========================================================================*/ +/*EN + * \brief Configuration structure for initializing ASR + * \ingroup ATOMEXLIB_ASR + * \par Description: + * This structure is used for specifying the behavior of the software sound renderer ASR.
+ * This structure is specified as an argument of the ::criAtomExAsr_Initialize function.
+ * \par Remarks: + * When using default settings, after setting default parameters for the structure + * using the ::criAtomExAsr_SetDefaultConfig macro, + * set the structure to the ::criAtomExAsr_Initialize + * function.
+ * \attention + * More members will be added in the future. So, when not using the ::criAtomExAsr_SetDefaultConfig + * macro, make sure to initialize the structure to zero before using it.
+ * (Make sure that no indefinite value is set to any member of the structure.) + * \sa criAtomExAsr_Initialize, criAtomExAsr_SetDefaultConfig + */ +typedef struct CriAtomExAsrConfigTag { + /*EN + \brief Execution frequency of server process + \par Description: + Specifies the execution frequency of the server process.
+ \attention + Set the same value as the one (server_frequency of the ::CriAtomExConfig structure) + set at the initialization of the Atom library.
+ \sa CriAtomConfig + */ + CriFloat32 server_frequency; + + /*EN + \par Description: + \brief Number of buses + \par Description: + Specifies the number of buses created by ASR.
+ Buses mix sounds, manage effects, and perform other tasks.
+ */ + CriSint32 num_buses; + + /*EN + \brief Number of output channels + Specifies the number of output channels for ASR.
+ Specify 6 or more channels when the Pan3D or 3D positioning function is used.
+ */ + CriSint32 output_channels; + + /*EN + \brief Output sampling rate + \par Description: + Specifies the sampling rate used for output and other processes.
+ Usually, specify the sampling rate of the sound device of the target.
+ \par Remarks: + By decreasing the value, processing load can be reduced but the sound quality is degraded.
+ */ + CriSint32 output_sampling_rate; + + /*EN + \brief Sound renderer type + \par Description: + Specifies the type of output destination sound renderer for ASR.
+ If you specify CRIATOM_SOUND_RENDERER_NATIVE for sound_renderer_type, + audio data are transferred to the default sound output of each platform.
+ \attention + Do not specify CRIATOM_SOUND_RENDERER_ASR and CRIATOM_SOUND_RENDERER_DEFAULT. + */ + CriAtomSoundRendererType sound_renderer_type; + + /*EN + \brief Pointer to platform-specific parameters + \par Description: + Specifies the pointer to platform-specific parameters. + If NULL is specified, an ASR is created with default parameters for each platform.
+ Parameter structures are defined in each platform-specific header. + If parameter structures are not defined for a platform, always specify NULL. + */ + void *context; + + /*EN + \brief Maximum number of ASR racks + \par Description: + Maximum number of the ASR racks that can be created.
+ */ + CriSint32 max_racks; + + /*EN + \brief Ambisonics order type + \par Description: + When the Atom library plays Ambisonics, it sets which order type to use.
+ \par Remarks: + For platforms that are not compatible with Ambisonics playback, this value is ignored.
+ Also, if you specify ::CRIATOMAMBISONICS_ORDER_TYPE_NONE, Ambisonics will not play.
+ \par Caution: + The specified type is the maximum order type that can be played.
+ For example, if you specify ::CRIATOMAMBISONICS_ORDER_TYPE_SECOND, + you can play not only 2nd Order but 1st Order, but you can not play 3rd Order.
+ In this case, 1st Order is not up-converted to 2nd Order and played, + it is reproduced with the resolution of 1st Order.
+ */ + CriAtomAmbisonicsOrderType ambisonics_order_type; +} CriAtomExAsrConfig; + +/*EN + * \brief Configuration structure for attaching level measuring function + * \ingroup ATOMEXLIB_ASR + * \par Description: + * This structure is used for attaching the level measuring function to a bus
+ * This structure is specified as an argument of the ::criAtomExAsr_AttachBusAnalyzer function.
+ * \par Remarks: + * When using default settings, after setting default parameters for the structure + * using the ::criAtomExAsr_SetDefaultConfigForBusAnalyzer macro, + * set the structure to the ::criAtomExAsr_AttachBusAnalyzer + * function.
+ * \attention + * More members will be added in the future. So, when not using the ::criAtomExAsr_SetDefaultConfigForBusAnalyzer + * macro, make sure to initialize the structure to zero before using it.
+ * (Make sure that no indefinite value is set to any member of the structure.) + * \sa criAtomExAsr_AttachBusAnalyzer + */ +typedef struct { + /*EN + \brief Measurement interval (in milliseconds) + \par Description: + Interval for updating measurement results.
+ */ + CriSint32 interval; + + /*EN + \brief Peak hold time (in milliseconds) + \par Description: + Duration for which the peak value is held when it is updated by a larger value, + so that it does not decrease immediately.
+ */ + CriSint32 peak_hold_time; +} CriAtomExAsrBusAnalyzerConfig; + +/*EN + * \brief Level measurement information + * \par Description: + * Structure used for acquiring the bus level measurement information.
+ * This is used in the ::criAtomExAsr_GetBusAnalyzerInfo function. + * \par Remarks: + * Each level value is the scaling factor for the amplitude of the sound data (unit is not decibel).
+ * The value can be converted into a decibel notation by using the following code.
+ * dB = 10.0f * log10f(level); + * \sa criAtomExAsr_GetBusAnalyzerInfo + */ +typedef struct CriAtomExAsrBusAnalyzerInfoTag { + /*EN + \brief Number of valid channels + \par Description: + Specifies the number of channels with valid measurement results.
+ */ + CriSint32 num_channels; + + /*EN + \brief RMS level + \par Description: + Calculated RMS (root mean square) of the sound amplitude within a measurement interval.
+ This is handled as the sound pressure level. + */ + CriFloat32 rms_levels[CRIATOMEXASR_MAX_CHANNELS]; + + /*EN + \brief Peak level + \par Description: + Maximum value of the sound amplitude within a measurement interval.
+ */ + CriFloat32 peak_levels[CRIATOMEXASR_MAX_CHANNELS]; + + /*EN + \brief Peak hold level + \par Description: + Peak level value being held.
+ */ + CriFloat32 peak_hold_levels[CRIATOMEXASR_MAX_CHANNELS]; +} CriAtomExAsrBusAnalyzerInfo; + + +/*EN + * \brief Waveform filter callback function + * \ingroup ATOMEXLIB_PLAYER + * \par Description: + * \param obj user specified object + * \param format format of PCM + * \param num_channels number of channels + * \param num_samples number of samples + * \param data channel array for PCM data + * \return NONE + * \par Description: + * This is the callback function that receives PCM data, and it can be assigned to a bus.
+ *
+ * Use the ::criAtomExAsr_SetBusFilterCallback function to register a callback function.
+ * By registering a callback function, every time sound renderer performs audio processing, + * the callback function is executed.
+ *
+ * The format and number of channels of PCM data, + * the number of samples that can be referenced, and the address of the area + * in which the PCM data is stored are returned to the filter callback function.
+ * In the callback function, values of PCM data can be referenced directly, + * and therefore, the callback function can be used for checking the amplitude of a playback sound.
+ *
+ * Also, when PCM data is modified in the callback function, + * the modification is reflected in playback sounds, + * and it is possible to apply a user-own effect to PCM data.
+ * (However, modifications such as a time-stretching process that will change + * the amount of data cannot be performed.)
+ * \par Remarks: + * PCM data consists of data separated for each channel.
+ * (The data are not interleaved.)
+ * In the sixth argument (data array), the first address of PCM data array for each channel is stored.
+ * (It is not the first address of an two-dimensional array, but a one-dimensional pointer array that stores + * the first address of PCM data array for each channel.)
+ * The stored PCM data is audio data processed by the effect specified in a bus.
+ *
+ * The format of PCM data varies depending on each platform.
+ * The data format of the execution environment can be identified by the third argument (format).
+ * If the format of PCM data is a 16-bit integer type, format is CRIATOM_PCM_FORMAT_SINT16. + * If the format of PCM data is a 32-bit floating-point type, format is CRIATOM_PCM_FORMAT_FLOAT32.
+ * Note that the range of PCM data depends on each format.
+ * - For CRIATOM_PCM_FORMAT_SINT16, the range is -32768 to +32767 + * - For CRIATOM_PCM_FORMAT_FLOAT32, the range is -1.0f to +1.0f + * . + * (Depending on the mixing of multiplex sounds or the effects mentioned above, a value + * that exceeds the above ranges may occur.)
+ * \attention + *
+ * Do not execute Atom library APIs in this callback function.
+ * The callback function is executed from the server process in the Atom library.
+ * Therefore, if an API that does not take account of interrupts to the server process is executed, + * an error or deadlock may occur.
+ *
+ * If processes are blocked in the callback function for a long time, some problems + * such as a playback break may occur.
+ * \sa criAtomExAsr_SetBusFilterCallback + */ +typedef void (*CriAtomExAsrBusFilterCbFunc)(void *obj, CriAtomPcmFormat format, + CriSint32 num_channels, CriSint32 num_samples, void *data[]); + +/*EN + * \brief Incomplete type of effect interface structure + * \par Description: + * It is the argument type of the effect interface registration function. + * \sa criAtomExAsr_RegisterEffectInterface, criAtomExAsr_UnregisterEffectInterface + */ +typedef const struct CriAfxInterfaceWithVersionTag* CriAtomExAsrAfxInterfaceWithVersionPtr; + +/*========================================================================== + * CRI AtomEx ASR Rack API + *=========================================================================*/ + +/*EN + * \brief ASR rack ID + * \ingroup ATOMEXLIB_ASR + * \par Description: + * ID type for managing the ASR rack.
+ * It can be acquired by creating an ASR rack with the ::criAtomExAsrRack_Create function.
+ * \sa criAtomExAsrRack_Create, criAtomExAsrRack_AttachDspBusSetting + */ +typedef CriSint32 CriAtomExAsrRackId; + +/*EN + * \brief Configuration structure for creating an ASR rack + * \ingroup ATOMEXLIB_ASR + * This structure is used for specifying the behavior of the ASR (Atom Sound Renderer).
+ * This structure is specified as an argument of the ::criAtomExAsrRack_Create function.
+ * \par Note: + * When using default settings, set default parameters for the structure + * using the ::criAtomExAsrRack_SetDefaultConfig macro, and then specify the structure for + * the ::criAtomExAsrRack_Create function.
+ * \attention + * More members will be added in the future. Therefore, when the ::criAtomExAsrRack_SetDefaultConfig + * macro is not used, make sure to initialize the structure to zero before using it.
+ * (A structure member must not be set to an undefined value.) + * \sa criAtomExAsrRack_Create, criAtomExAsrRack_SetDefaultConfig + */ +typedef struct CriAtomExAsrRackConfigTag { + /*EN + \brief Execution frequency of server processing + \par Description: + Specifies how often server processing are executed.
+ \attention + Set the same value as the one (server_frequency of the ::CriAtomExConfig structure) + that was set at the initialization of the Atom library.
+ \sa CriAtomConfig + */ + CriFloat32 server_frequency; + + /*EN + \par Description: + \brief Number of buses + \par Description: + Specifies the number of the buses created by the ASR.
+ The buses mix sounds and manage effects.
+ */ + CriSint32 num_buses; + + /*EN + \brief Number of output channels + \par Description: + Specifies the number of output channels for the ASR rack.
+ Specify six or more channels when the Pan 3D or 3D positioning feature is used.
+ */ + CriSint32 output_channels; + + /*EN + \brief Output sampling rate + \par Description: + Specifies the sampling rate used for output and other processes at the ASR rack.
+ Usually, specify the sampling rate of the sound device of the target.
+ \par Note: + A smaller value reduces the processing load but it also degrades the sound quality.
+ */ + CriSint32 output_sampling_rate; + + /*EN + \brief Sound renderer type + \par Description: + Specifies the type of the destination sound renderer for the ASR rack.
+ If you specify CRIATOM_SOUND_RENDERER_NATIVE as sound_renderer_type, + audio data are transferred to the default sound output of each platform.
+ */ + CriAtomSoundRendererType sound_renderer_type; + + /*EN + \brief Destination ASR rack ID + \par Description: + Specifies the ID of the destination ASR rack.
+ It is valid only if sound_renderer_type is set to CRIATOM_SOUND_RENDERER_ASR.
+ */ + CriAtomExAsrRackId output_rack_id; + + /*EN + \brief Pointer to platform-specific parameters + \par Description: + Specifies the pointer to platform-specific parameters. + If NULL is specified, an ASR is created with default parameters for each platform.
+ Parameter structures are defined in each platform-specific header. + If parameter structures are not defined for a platform, always specify NULL. + */ + void *context; +} CriAtomExAsrRackConfig; + +/*========================================================================== + * CRI Atom ASR API + *=========================================================================*/ +/*EN + * \brief ASR initialization configuration structure + * \ingroup ATOMLIB_ASR + * This is a structure to specify the behavior of the software sound renderer ASR.
+ * This structure is specified as an argument of the ::criAtomAsr_Initialize function.
+ * \par Remarks: + * When using default settings, after setting default parameters for the structure + * using the ::criAtomAsr_SetDefaultConfig macro, + * specify the structure in the ::criAtomAsr_Initialize + * function.
+ * \attention + * More members will be added in the future. So, when not using the ::criAtomAsr_SetDefaultConfig + * macro, make sure to initialize the structure to zero before using it.
+ * (Make sure that no indefinite value is set to any member of the structure.) + * \sa criAtomAsr_Initialize, criAtomAsr_SetDefaultConfig + */ +typedef struct CriAtomAsrConfigTag { + /*EN + \brief Execution frequency of server process + \par Description: + Specifies the execution frequency of the server process.
+ \attention + You must set the same value as the value specified during Atom library initialization + (server_frequency in ::CriAtomConfig structure).
+ \sa CriAtomConfig + */ + CriFloat32 server_frequency; + + /*EN + \par Description: + \brief Number of buses + \par Description: + Specifies the number of buses created by ASR.
+ Buses mix sounds, manage effects, and perform other tasks.
+ */ + CriSint32 num_buses; + + /*EN + \brief Number of output channels + \par Description: + Specifies the number of ASR output channels.
+ Specify at least 6 channels when using the pan 3D or 3D positioning function.
+ */ + CriSint32 output_channels; + + /*EN + \brief Output sampling rate + \par Description: + Specifies the sampling rate for output and processing.
+ Normally, specify the sampling rate of the target machine's sound device.
+ \par Remarks: + Lowering this value reduces the processing load but also degrades the sound quality.
+ */ + CriSint32 output_sampling_rate; + + /*EN + \brief Sound renderer type + \par Description: + Specifies the type of ASR output sound renderer.
+ If you specify CRIATOM_SOUND_RENDERER_NATIVE as sound_renderer_type, + audio data is sent to sound output of each default platform.
+ \attention + Do not specify CRIATOM_SOUND_RENDERER_ASR or CRIATOM_SOUND_RENDERER_DEFAULT. + */ + CriAtomSoundRendererType sound_renderer_type; + + /*EN + \brief Pointer to platform-specific parameters + \par Description: + Specify a pointer to a platform-specific parameter. + When NULL is specified, ASR rack is created with default parameters for each platform.
+ The parameter structure is defined in each platform specific header. + Always specify NULL on platforms where no parameter structure is defined. + */ + void *context; + + /*EN + \brief Maximum number of ASR racks + \par Description: + The maximum number of ASR racks that can be created.
+ */ + CriSint32 max_racks; + + /*EN + \brief Ambisonics order type + \par Description: + When the Atom library plays Ambisonics, it sets which order type to use.
+ \par Remarks: + For platforms that are not compatible with Ambisonics playback, this value is ignored.
+ Also, if you specify ::CRIATOMAMBISONICS_ORDER_TYPE_NONE, Ambisonics will not play.
+ \par Caution: + The specified type is the maximum order type that can be played.
+ For example, if you specify ::CRIATOMAMBISONICS_ORDER_TYPE_SECOND, + you can play not only 2nd Order but 1st Order, but you can not play 3rd Order.
+ In this case, 1st Order is not up-converted to 2nd Order and played, + it is reproduced with the resolution of 1st Order.
+ */ + CriAtomAmbisonicsOrderType ambisonics_order_type; +} CriAtomAsrConfig; + +/*========================================================================== +* CRI AtomEx API +*=========================================================================*/ +/*EN +* \brief Configuration structure for Atom library initialization +* \ingroup ATOMLIB_PC +* Structure used to specify the behavior of the CRI Atom library.
+* It is passed as an argument to the ::criAtomEx_Initialize_PC function.
+* \sa criAtomEx_Initialize_PC, criAtomEx_SetDefaultConfig_PC +*/ +typedef struct CriAtomExConfigForUserPcmOutputTag { + CriAtomExConfig atom_ex; /*EN< AtomEx initialization config structure */ + CriAtomExAsrConfig asr; /*EN< ASR initialization config structure */ + CriAtomExHcaMxConfig hca_mx; /*EN< HCA-MX initialization config structure */ +} CriAtomExConfigForUserPcmOutput; + +/*************************************************************************** + * Prototype Variables + ***************************************************************************/ + +/*************************************************************************** + * Prototype Functions + ***************************************************************************/ +#ifdef __cplusplus +extern "C" { +#endif +/*========================================================================== + * CRI AtomEx ASR API + *=========================================================================*/ +/*EN + * \brief Calculate work area size required for initializing ASR + * \ingroup ATOMEXLIB_ASR + * \param[in] config Configuration structure for ASR initialization + * \par Description: + * Acquires the work area size required for initializing the software sound renderer ASR.
+ * When the ::criAtomExAsr_Initialize function is used to initialize ASR + * without registering an allocator using the ::criAtomEx_SetUserAllocator macro, + * as much memory area as the size calculated by this function must be passed as the work area.
+ *
+ * If this function fails to calculate the work area size, it returns -1.
+ * For the reason of the failure, refer to the error callback message.
+ * \par Remarks: + * The working memory size required for initializing ASR varies depending on + * the contents of the configuration structure ( ::CriAtomExAsrConfig ) for initializing ASR.
+ *
+ * When NULL is specified for the argument, default settings + * (i.e., the same parameters as when ::criAtomExAsr_SetDefaultConfig is used) are used + * for calculating the work area size. + *
+ * The information of the config argument is referenced only in the function.
+ * It is not referenced after exiting the function and its area can be released + * after executing the function. + * \sa criAtomEx_SetUserAllocator, criAtomExAsr_Initialize + */ +CriSint32 CRIAPI criAtomExAsr_CalculateWorkSize(const CriAtomExAsrConfig *config); + +/*EN + * \brief Set configuration structure for work area size calculation + * \ingroup ATOMEXLIB_ASR + * \param[in] config Configuration structure for ASR initialization + * \par Description: + * Tentatively registers a configuration structure + * ( ::CriAtomExAsrConfig structure) for calculating the work area size.
+ *
+ * The work area size required for attaching effect varies + * depending on the parameters of the structure specified for ASR initialization + * (i.e., when the ::criAtomExAsr_Initialize function is executed).
+ * Thus, in general, the ASR must be initialized before calculating + * the required work area size.
+ * When this function is used to register a configuration structure for + * ASR initialization, the work area size can be calculated + * without initializing the ASR.
+ * (Executing the ::criAtomEx_CalculateWorkSizeForDspBusSettingFromAcfData function is possible.)
+ * \par Remarks: + * When NULL is specified for the argument (config), the default settings + * (i.e., the same parameters as when ::criAtomExAsr_SetDefaultConfig is used) + * will be used to calculate the work area size.
+ *
+ * This function currently cannot be undone. + * That is, once executed, there is no means to restore the previous state + * (in which the library has not been initialized, and work area size calculation results in an error).
+ * (It is still possible to overwrite parameters by executing the function again.)
+ * \attention + * The configuration structure for initialization, registered by this function, + * is used only for calculating the work area size when ASR is not initialized.
+ * Once the library is initialized, instead of parameters specified for this function, + * parameters specified during the initialization will be used to calculate the work area size.
+ * (If the parameters of the structure registered by this function + * differ from the parameters of the structure used for ASR initialization, + * handle creation may fail due to insufficient work area size.)
+ *
+ * The ::criAtomExAsr_CalculateWorkSizeForDspBusSetting function cannot be used + * even when executing this function.
+ * For the work area size calculation for attaching a DSP bus setting, + * use the ::criAtomExAsr_CalculateWorkSizeForDspBusSettingFromAcfData function.
+ * \par Example: + * \code + * CriAtomExAsrConfig asr_config; + * + * // Tentatively register ASR initialization parameters for calculating the work area size + * criAtomExAsr_SetDefaultConfig(&asr_config); + * criAtomExAsr_SetConfigForWorkSizeCalculation(&asr_config); + * + * // Calculate the work area size for attaching a DSP bus setting + * dsp_work_size = criAtomExAsr_CalculateWorkSizeForDspBusSettingFromAcfData( + * acf_data, acf_data_size, "DspBusSetting_0"); + * : + * \endcode + * \sa criAtomExAsr_CalculateWorkSizeForDspBusSettingFromAcfData + */ +void CRIAPI criAtomExAsr_SetConfigForWorkSizeCalculation(const CriAtomExAsrConfig *config); + +/*EN + * \brief Initialize ASR + * \ingroup ATOMEXLIB_ASR + * \param[in] config Configuration structure for ASR initialization + * \param[in] work work area + * \param[in] work_size work area size + * \par Description: + * Initializes the software sound renderer ASR.
+ * By executing this function, ASR is started and ASR starts outputting rendering results.
+ * \par Remarks: + * The working memory size required for initializing ASR varies depending on + * the contents of the configuration structure ( ::CriAtomExAsrConfig ) for initializing ASR.
+ *
+ * When NULL is specified for the argument, default settings
+ * (i.e., the same parameters as when ::criAtomExAsr_SetDefaultConfig is used) are used for initialization.
+ *
+ * The information of the config argument is referenced only in the function.
+ * The information is not referred to after the function is completed. + * Therefore, after the function is executed, the area used for config can be released + * without any problem.
+ * \attention + * This function is a blocking function.
+ * Executing this function blocks server processing of the Atom library for a while.
+ * If this function is executed during audio playback, problems such as audio break may occur. + * Call this function only when a fluctuation in load is acceptable, for example, during a scene change. + *
+ * After executing this function, always execute the ::criAtomExAsr_Finalize function.
+ * Also, before executing the ::criAtomExAsr_Finalize function, do not execute this function again.
+ * \sa criAtomEx_SetUserAllocator, criAtomExAsr_Finalize + */ +void CRIAPI criAtomExAsr_Initialize( + const CriAtomExAsrConfig *config, void *work, CriSint32 work_size); + +/*EN + * \brief Finalize ASR + * \ingroup ATOMEXLIB_ASR + * \par Description: + * Finalizes the software sound renderer ASR.
+ * By executing this function, ASR stops outputting rendering results.
+ * If an allocator has already been registered by using the ::criAtomEx_SetUserAllocator macro, + * this function releases the memory area allocated when ASR is initialized.
+ * (If a work area is passed when ASR is initialized, the work area can be released + * after this function is executed.)
+ * \attention + * This function is a blocking function.
+ * Executing this function blocks server processing of the Atom library for a while.
+ * If this function is executed during audio playback, problems such as audio break may occur.
+ * Call this function only when a fluctuation in load is acceptable, for example, during a scene change.
+ * \sa criAtomEx_SetUserAllocator, criAtomExAsr_Initialize + */ +void CRIAPI criAtomExAsr_Finalize(void); + +/*EN + * \brief Bus volume setting + * \ingroup ATOMEXLIB_ASR + * \param[in] bus_name Bus name + * \param[in] volume Volume value + * \par Description: + * Sets the bus volume.
+ * This function is valid for send destinations whose send type is post-volume or post-panning.
+ *
+ * Specify a real number between 0.0f and 1.0f for the volume.
+ * Volume is the scaling factor for the amplitude of the sound data (unit is not decibels).
+ * For example, if you specify 1.0f, the original sound is output with the volume unchanged.
+ * If you specify 0.5f, sound is output at volume equal to data with half the + * amplitude of the original sound (-6 dB).
+ * If you specify 0.0f, the sound is muted (silent).
+ * The default value of the volume is the one set in CRI Atom Craft.
+ */ +void CRIAPI criAtomExAsr_SetBusVolumeByName(const CriChar8* bus_name, CriFloat32 volume); + +/*EN + * \brief Get the volume of a bus + * \ingroup ATOMEXLIB_ASR + * \param[in] bus_name Bus name + * \param[in] volume Volume value + * \par Description: + * Get the volume of a bus.
+ * This is effective only when the send type of the destination is post volume or post pan.
+ *
+ * The volume value returned is a real value.
+ * The default value of the volume is set in the CRI Atom Craft tool.
+ */ +void CRIAPI criAtomExAsr_GetBusVolumeByName(const CriChar8* bus_name, CriFloat32 *volume); + + /*EN + * \brief Bus panning 3D settings + * \ingroup ATOMEXLIB_ASR + * \param[in] bus_name Bus name + * \param[in] pan3d_angle Pan3D angle + * \param[in] pan3d_distance Pan3D interior distance + * \param[in] pan3d_volume Pan3D volume + * \par Description: + * Sets the panning 3D parameters for the bus.
+ * This function is valid for send destinations whose send type is post-panning.
+ *
+ * Set a value between -180.0f and 180.0f for the Pan3D angle.
+ *
+ * Set a value between 0.0f and 1.0f for the Pan3D interior distance.
+ *
+ * Set a value between 0.0f and 1.0f for the Pan3D volume.
+ * This will be multiplied by the normal volume. + *
+ * Default Pan3D values are those set in CRI Atom Craft.
+ */ +void CRIAPI criAtomExAsr_SetBusPan3dByName(const CriChar8* bus_name, + CriFloat32 pan3d_angle, CriFloat32 pan3d_distance, CriFloat32 pan3d_volume); + +/*EN + * \brief Acquire bus panning 3D parameter + * \ingroup ATOMEXLIB_ASR + * \param[in] bus_name Bus name + * \param[out] pan3d_angle Pan3D angle + * \param[out] pan3d_distance Pan3D interior distance + * \param[out] pan3d_volume Pan3D volume + * \par Description: + * Acquires the panning 3D parameters for the bus.
+*/ +void CRIAPI criAtomExAsr_GetBusPan3dByName(const CriChar8* bus_name, + CriFloat32 *pan3d_angle, CriFloat32 *pan3d_distance, CriFloat32 *pan3d_volume); + + +/*EN + * \brief Set level matrix for a bus + * \ingroup ATOMEXLIB_ASR + * \param[in] bus_name Bus name + * \param[in] input_channels number of input channels + * \param[in] output_channels number of output channels + * \param[in] matrix one-dimensional array of level values that represent a level matrix + * \par Description: + * Sets a level matrix for a bus.
+ * This function is valid for send destinations whose send type is post-panning.
+ *
+ * A level matrix provides a mechanism for specifying which speaker outputs + * each channel of audio data at which volume.
+ * The matrix argument is an [input_channels * output_channels] matrix.
+ * The level for sending data from an input channel ch_in to an output channel ch_out + * must be set for matrix[ch_in * output_channels + ch_out].
+ * The default value of a level matrix is a unit matrix.
+ *
+ * Specify a float value between 0.0f and 1.0f for a level value.
+ * A level value is the scaling factor for the amplitude of the sound data (unit is not decibel).
+ * For example, if you specify 1.0f, the original sound is output with the level unchanged.
+ * If you specify 0.5f, sound is output at volume equal to data with half the amplitude of the original sound + * waveform (-6dB).
+ * If you specify 0.0f, the sound is muted (silent).
+ */ +void CRIAPI criAtomExAsr_SetBusMatrixByName(const CriChar8* bus_name, + CriSint32 input_channels, CriSint32 output_channels, const CriFloat32 matrix[]); + +/*EN + * \brief Set bus send level + * \ingroup ATOMEXLIB_ASR + * \param[in] bus_name Bus name + * \param[in] sendto_bus_name Bus name for the send destination + * \param[in] level level value + * \par Description: + * Sets the level for sending audio data to a send destination bus.
+ *
+ * Specify a float value between 0.0f and 1.0f for a level value.
+ * A level value is the scaling factor for the amplitude of the sound data (unit is not decibel).
+ * For example, if you specify 1.0f, the original sound is output with the level unchanged.
+ * If you specify 0.5f, sound is output at volume equal to data with half the amplitude of the original sound + * waveform (-6dB).
+ * If you specify 0.0f, the sound is muted (silent).
+ * The default value of the level is the one set in CRI Atom Craft.
+ */ +void CRIAPI criAtomExAsr_SetBusSendLevelByName( + const CriChar8* bus_name, const CriChar8* sendto_bus_name, CriFloat32 level); + +/*EN + * \brief Set parameter during effect operation + * \ingroup ATOMEXLIB_ASR + * \param[in] bus_name Bus name + * \param[in] effect_name Effect name + * \param[in] parameter_index Effect operation parameter index + * \param[in] parameter_value Effect operation parameter value + * \par Description: + * Use the default ASR rack ID to set the operating parameters of the effect.
+ * In order to set the operating parameters, the bus must be built beforehand by calling + * the ::criAtomEx_AttachDspBusSetting function.
+ * Which effect exists on which bus depends on the attached DSP bus setting.
+ * If an effect with the specified ID does not exist on the specified bus, the function fails.
+ * The parameters set by this function are not actually reflected in the effect until the criAtomExAsr_UpdateParameter function is called.
+ * For the correspondence between the parameter index and the actual parameter, refer to the parameter index (\ref CRIATOMASR_DSP_PARAM) of each effect. + * \sa criAtomEx_AttachDspBusSetting, criAtomExAsr_UpdateEffectParameters + */ +void CRIAPI criAtomExAsr_SetEffectParameter( + const CriChar8* bus_name, const CriChar8* effect_name, + CriUint32 parameter_index, CriFloat32 parameter_value); + +/*EN + * \brief Update parameter during effect operation + * \ingroup ATOMEXLIB_ASR + * \param[in] bus_name Bus name + * \param[in] effect_name Effect name + * \par Description: + * Use the default ASR rack ID and update the operating parameters of the effect.
+ * In order to actually update the operating parameters, call this function in addition to the criAtomExAsr_SetEffectParameter function. + * \sa criAtomEx_AttachDspBusSetting, criAtomExAsr_SetEffectParameter + */ +void CRIAPI criAtomExAsr_UpdateEffectParameters(const CriChar8* bus_name, const CriChar8* effect_name); + +/*EN + * \brief Get parameter during effect operation + * \ingroup ATOMEXLIB_ASR + * \param[in] bus_name Bus name + * \param[in] effect_name Effect name + * \param[in] parameter_index Effect operation parameter index + * \return Returns value of the parameter of a given effect by specifying the parameter index. + * \par Description: + * Use the default ASR rack ID to get the value of the parameter of the effect.
+ * In order to get the parameter, the bus must be built beforehand by + * calling the ::criAtomEx_AttachDspBusSetting function.
+ * Which effect exists on which bus depends on the attached DSP bus setting. + * If an effect with the specified name does not exist on the specified bus, this function fails.
+ * For details about operating parameters, refer to the parameter index (\ref CRIATOMASR_DSP_PARAM) of each effect. + * \sa criAtomEx_AttachDspBusSetting + */ +CriFloat32 CRIAPI criAtomExAsr_GetEffectParameter( + const CriChar8* bus_name, const CriChar8* effect_name, CriUint32 parameter_index); + + +/*EN + * \brief Enable / disable the bypass of an effect + * \ingroup ATOMEXLIB_ASR + * \param[in] bus_name Bus name + * \param[in] effect_name Effect name + * \param[in] bypass Bypass setting (CRI_TRUE:Enable bypass, CRI_FALSE:Disable bypass) + * \par Description: + * Enable / disable the bypass of an effect.
+ * When the bypass is enabled, the effect is ignored during audio processing.
+ * To enable the bypass of an effect, before calling this function, + * use the ::criAtomEx_AttachDspBusSetting function to build a bus in advance.
+ * The attached DSP bus setting determines which effect exists on which bus. + * If an effect with the specified ID does not exist on the specified bus, this function fails.
+ * \attention + * If a bypass is enabled during audio playback, a noise may occur.
+ * \sa criAtomEx_AttachDspBusSetting + */ +void CRIAPI criAtomExAsr_SetEffectBypass( + const CriChar8* bus_name, const CriChar8* effect_name, CriBool bypass); + +/*EN + * \brief Add a level measurement function + * \ingroup ATOMEXLIB_ASR + * \param[in] bus_name Bus name + * \param[in] config Configuration structure for the level measurement function + * \par Description: + * Adds the function to a bus and starts the level measurement process.
+ * After executing this function, it is possible to call the ::criAtomExAsr_GetBusAnalyzerInfo function + * to get the RMS level (sound pressure), peak level (maximum amplitude), and peak hold level. + * To measure the levels on multiple buses, you must invoke this function for each bus. + * \par Example: + * \code + * // Structure to acquire level measurement information + * CriAtomExAsrBusAnalyzerInfo info; + * + * // Add the level metering to the zeroth bus (master bus) + * criAtomExAsr_AttachBusAnalyzer(0, NULL); + * + * : + * + * // Acquire level measurement information + * criAtomExAsr_GetBusAnalyzerInfo(0, &info); + * + * // Display the measurement results + * for (i = 0; i < CRIATOMEXASR_MAX_CHANNELS; i++) { + * printf("[%d] RMS: %1.6f, Peak: %1.6f, Hold: %1.6f", + * i, info.rms_levels[i], info.peak_levels[i], info.peak_hold_levels[i]); + * } + * \endcode + * \attention + * This function handles the same resource than the ::criAtomEx_AttachDspBusSetting function.
+ * Therefore, when executing this function after the ::criAtomEx_AttachDspBusSetting + * function, the information cannot be retrieved by the ::criAtomExAsr_GetBusAnalyzerInfo + * function.
+ * Be careful when using this function together with the :: criAtomEx_AttachDspBusSetting function. + * First, disable the level measurement function with the :: criAtomExAsr_DetachBusAnalyzer function. + * Next, execute the :: criAtomEx_AttachDspBusSetting function and then execute this function. + * \code + * : + * // Temporarily disable the level measurement feature before changing the DSP bus setting + * criAtomExAsr_DetachBusAnalyzer(0); + * + * // Update the DSP bus setting + * criAtomExAsr_AttachDspBusSetting("DspBusSetting_0", NULL, 0); + * + * // Attach the level measurement feature again + * criAtomExAsr_AttachBusAnalyzer(0, NULL); + * : + * \endcode + * \sa criAtomExAsr_GetBusAnalyzerInfo, criAtomExAsr_DetachBusAnalyzer + */ +void CRIAPI criAtomExAsr_AttachBusAnalyzerByName( + const CriChar8* bus_name, const CriAtomExAsrBusAnalyzerConfig* config); + +/*EN + * \brief Delete level measuring function + * \ingroup ATOMEXLIB_ASR + * \param[in] bus_name Bus name + * \par Description: + * Deletes the level measuring function from a bus. + * \sa criAtomExAsr_AttachBusAnalyzer + */ +void CRIAPI criAtomExAsr_DetachBusAnalyzerByName(const CriChar8* bus_name); + +/*EN + * \brief Acquire level measurement results + * \ingroup ATOMEXLIB_ASR + * \param[in] bus_name Bus name + * \param[out] info structure for level measurement results + * \par Description: + * Acquires results of the level measuring function from a bus. + * \sa criAtomExAsr_AttachBusAnalyzer + */ +void CRIAPI criAtomExAsr_GetBusAnalyzerInfoByName( + const CriChar8* bus_name, CriAtomExAsrBusAnalyzerInfo *info); + +/*EN + * \brief Register waveform filter callback function + * \ingroup ATOMEXLIB_PLAYER + * \param[in] bus_name Bus name + * \param[in] pre_func filter callback function used before effect process + * \param[in] post_func filter callback function used after effect process + * \param[in] obj user specified object + * \par Description: + * Registers a callback function for receiving PCM data sent on a bus.
+ * The registered callback function is invoked when a sound renderer performs audio processing.
+ * If one of the callback functions for effect pre-process or effect post-process is not used, + * NULL can be specified for the callback function not to be used.
+ * \attention + * Do not execute Atom library APIs in this callback function.
+ * The callback function is executed from the server process in the Atom library.
+ * Therefore, if an API that does not take account of interrupts to the server process is executed, + * an error or deadlock may occur.
+ *
+ * Note that if processes are blocked in the waveform filter callback function for a long time, + * some problems such as a playback break + * may occur.
+ * \sa CriAtomExPlayerFilterCbFunc + */ +void CRIAPI criAtomExAsr_SetBusFilterCallbackByName(const CriChar8* bus_name, + CriAtomExAsrBusFilterCbFunc pre_func, CriAtomExAsrBusFilterCbFunc post_func, void *obj); + + +/*EN + * \brief Acquiring the maximum number of buses + * \ingroup ATOMEXLIB_ASR + * \return Maximum number of buses + * \par Description: + * Acquires the maximum number of available buses. + *
+ * By default, ::CRIATOMEXASR_DEFAULT_NUM_BUSES is returned. + *
+ * To change the maximum number of buses, change CriAtomExAsrConfig::num_buses + * and then create an ASR rack. +* \sa CriAtomExAsrConfig, criAtomExAsr_Create, criAtomExAsr_SetDefaultConfig + */ +CriSint32 CRIAPI criAtomExAsr_GetNumBuses(void); + +/*EN + * \brief Register a user-defined effect interface + * \ingroup ATOMEXLIB_ASR + * \param[in] afx_interface Interface with version information of user-defined effect + * \return Whether registration was successful (CRI_TRUE: Success, CRI_FALSE: Failure) + * \par Description: + * Register the user-defined effect interface in the ASR.
+ * Effects that have registered user-defined effect interfaces can be used to attach DSP bus settings.
+ * If the following conditions are satisfied, registration of the user-defined effect interface fails and an error callback is returned: + * - A user-defined effect interface with the same effect name has already been registered + * - Implementation of the interface is different from Atom user-defined effect interface + * - Number of user defined effect interfaces registered exceeded the maximum number(::CRIATOMEXASR_MAX_NUM_USER_EFFECT_INTERFACES) + * \par Notes: + * Please use this function only when registering user-defined effects created with CRI ADX2 Audio Effect Plugin SDK.
+ * Register the user defined effect interface with this function
+ * before attaching the DSP bus setting including the user-defined effect.
+ * If the default DSP bus setting exists in the ACF, the DSP bus setting is also attached by registering the ACF.
+ * Therefore, if the user defined effect is included in the default DSP bus setting, before the ACF is registered,
+ * the user defined effect interface Please register.
+ * The pointer of the interface once registered will continue to be referred to while attaching the DSP bus setting.
+ * To unregister the interface while using the Atom library, please use the ::criAtomExAsr_UnregisterEffectInterface function. + * \sa criAtomExAsr_UnregisterEffectInterface, criAtomEx_AttachDspBusSetting, criAtomEx_DetachDspBusSetting, criAtomEx_RegisterAcfFile, criAtomEx_RegisterAcfData + */ +CriBool CRIAPI criAtomExAsr_RegisterEffectInterface(CriAtomExAsrAfxInterfaceWithVersionPtr afx_interface); + +/*EN + * \brief Unregister a user-defined effect interface + * \ingroup ATOMEXLIB_ASR + * \param[in] afx_interface Interface with version information of user-defined effect + * \par Description: + * Unregister the effect interface.
+ * Effects that are canceled can not be used when attaching DSP bus settings.
+ * It is not possible to unregister an effect interface that has not been registered (error call back will be returned). + * \par Notes: + * Please use this function only when unregistering user-defined effects created with CRI ADX2 Audio Effect Plugin SDK.
+ * Since the registered user-defined effect interface continues to be referred to while the DSP bus setting is attached,
+ * be sure to call this function after calling ::criAtomEx_DetachDspBusSetting.
+ * When you exit the Atom library, all user-defined effect interfaces will be unregistered. + * \sa criAtomExAsr_RegisterEffectInterface, criAtomEx_AttachDspBusSetting, criAtomEx_DetachDspBusSetting + */ +void CRIAPI criAtomExAsr_UnregisterEffectInterface(CriAtomExAsrAfxInterfaceWithVersionPtr afx_interface); + +/*========================================================================== + * CRI AtomEx ASR Rack API + *=========================================================================*/ +/*EN + * \brief Calculating the size of the work area for creating the ASR rack + * \ingroup ATOMEXLIB_ASR + * \param[in] config Configuration structure for ASR initialization + * \par Description: + * Obtains the size of the work area for creating the ASR rack
+ * When the ::criAtomEx_RegisterAcfConfig function is used to initialize the ASR + * without registering an allocator using the ::criAtomEx_SetUserAllocator macro, + * the memory area of the size calculated by this function must be passed as the work area.
+ *
+ * If this function fails to calculate the work area size, it returns -1.
+ * For the reason for the failure, refer to the error callback message.
+ * \par Note: + * The size of the working memory required to initialize the ASR rack varies depending on + * the contents of the configuration structure (::CriAtomExAsrRackConfig) for initializing the ASR rack.
+ *
+ * When NULL is specified for the argument, default settings + * (i.e., the same parameters as when ::criAtomExAsr_SetDefaultConfig is used) are used + * for calculating the work area size. + *
+ * The information of the config argument is referenced only in this function.
+ * The information is not referenced after the function is completed. Therefore, the area used for config can be released + * after executing the function. + * \sa criAtomEx_SetUserAllocator, criAtomExAsrRack_Create + */ +CriSint32 CRIAPI criAtomExAsrRack_CalculateWorkSize(const CriAtomExAsrRackConfig *config); + +/*EN + * \brief Calculating the size of the work area for attaching the DSP bus settings + * \ingroup ATOMEXLIB_ASR + * \param[in] config Configuration structure for creating an ASR rack + * \param[in] setting Name of the DSP bus settings + * \return CriSint32 Required work area size + * \par Description: + * Calculates the work area size required for building a bus based on the DSP bus settings.
+ * Before executing this function, use the ::criAtomEx_RegisterAcfConfig function + * to register ACF information. + * For config, specify the same structure as the one specified for the ::criAtomExAsrRack_Create function.
+ *
+ * If this function fails to calculate the work area size, it returns -1.
+ * For the reason for the failure, refer to the error callback message.
+ * \par Note: + * The size of the work memory required for attaching the DSP bus settings + * varies depending on the DSP bus settings created in CRI Atom Craft.
+ * \sa criAtomExAsrRack_AttachDspBusSetting, criAtomEx_RegisterAcfConfig + */ +CriSint32 CRIAPI criAtomExAsrRack_CalculateWorkSizeForDspBusSettingFromConfig( + const CriAtomExAsrRackConfig *config, const CriChar8 *setting); + +/*EN + * \brief Calculating the size of the work area for attaching the DSP bus settings + * \ingroup ATOMEXLIB_ASR + * \param[in] acf_data ACF data + * \param[in] acf_data_size Size of the ACF data + * \param[in] rack_config Configuration structure for creating the ASR rack + * \param[in] setting Name of the DSP bus settings + * \return CriSint32 Required work area size + * \par Description: + * Calculates the work area size required for building a bus based on the DSP bus settings.
+ * Unlike the ::criAtomExAsrRack_CalculateWorkSizeForDspBusSettingFromConfig function, + * it can calculate the size of the work memory by using the ACF data loaded in memory.
+ *
+ * If this function fails to calculate the work area size, it returns -1.
+ * For the reason for the failure, refer to the error callback message.
+ * \par Note: + * The size of the work memory required for attaching the DSP bus settings + * varies depending on the DSP bus settings created in CRI Atom Craft.
+ * \sa criAtomExAsrRack_AttachDspBusSetting, criAtomEx_RegisterAcfConfig + */ +CriSint32 CRIAPI criAtomExAsrRack_CalculateWorkSizeForDspBusSettingFromAcfDataAndConfig( + void *acf_data, CriSint32 acf_data_size, + const CriAtomExAsrRackConfig *rack_config, const CriChar8 *setting); + +/*EN + * \brief Creating the ASR rack + * \ingroup ATOMEXLIB_ASR + * \param[in] config Configuration structure for ASR initialization + * \param[in] work Work area + * \param[in] work_size Size of the work area + * \return CriAtomExAsrRackId ASR rack ID + * \par Description: + * Creates the ASR rack.
+ * The ASR rack is a collection of the buses. You can attach the DSP bus settings to it.
+ * By executing this function, the ASR rack is added to the ASR, starting the output of rendering results.
+ * You can select the output destination for the ASR rack added with this function. You can select a + * platform-native sound renderer or an ASR for outputting to another ASR rack.
+ * \par Note: + * When the ::criAtomExAsr_Initialize function is executed, the default ASR rack is added.
+ * The criAtomExAsr_***function will be the API for handling the default ASR rack.
+ *
+ * The size of the working memory required for initializing the ASR varies depending on + * the contents of the configuration structure (::CriAtomExAsrConfig) for initializing the ASR.
+ *
+ * When NULL is specified for the argument, default settings
+ * (i.e., the same parameters as when ::criAtomExAsr_SetDefaultConfig is used) are used for initialization.
+ *
+ * The information of the config argument is referenced only in this function.
+ * The information is not referenced after the function is completed. Therefore, the area used for config can be released + * after executing the function.
+ * If ASR rack creation succeeded, this function returns the generated ASR rack ID.
+ * If creation failed, -1 is returned.
+ * \attention + * This function is a blocking function.
+ * Executing this function blocks server processing of the Atom library for a while.
+ * If this function is executed during audio playback, problems such as interruption of playback may occur. + * Call this function only when a fluctuation in load is acceptable, for example, during a scene change. + * \sa criAtomEx_SetUserAllocator, criAtomExAsrRack_Destroy, criAtomExAsrRack_AttachDspBusSetting + */ +CriAtomExAsrRackId CRIAPI criAtomExAsrRack_Create( + const CriAtomExAsrRackConfig *config, void *work, CriSint32 work_size); + +/*EN + * \brief Destruction of the ASR rack + * \ingroup ATOMEXLIB_ASR + * \par Description: + * Disposes of the ASR rack.
+ * By executing this function, ASR stops outputting rendering results.
+ * If an allocator has already been registered by using the ::criAtomEx_SetUserAllocator macro, + * the memory allocated when the ASR rack is created is released.
+ * (If a work area is passed when ASR was created, it can be released + * after this function is executed.)
+ * \attention + * This function is a blocking function.
+ * Executing this function blocks server processing of the Atom library for a while.
+ * If this function is executed during audio playback, problems such as playback interruptions may occur.
+ * Call this function only when a fluctuation in load is acceptable, for example, during a scene change.
+ * \sa criAtomEx_SetUserAllocator, criAtomExAsrRack_Create + */ +void CRIAPI criAtomExAsrRack_Destroy(CriAtomExAsrRackId rack_id); + +/*EN + * \brief Calculating the size of the work area for attaching the DSP bus settings + * \ingroup ATOMEXLIB_ASR + * \param[in] rack_id ASR rack ID + * \param[in] setting Name of the DSP bus settings + * \return CriSint32 Required work area size + * \par Description: + * Calculates the work area size required for building a bus based on the DSP bus settings.
+ * Before executing this function, use the ::criAtomEx_RegisterAcfConfig function + * to register ACF information. + *
+ * If this function fails to calculate the work area size, it returns -1.
+ * For the reason for the failure, refer to the error callback message.
+ * \par Note: + * The size of the work memory required for attaching the DSP bus settings + * varies depending on the DSP bus settings created in CRI Atom Craft.
+ * \sa criAtomExAsrRack_AttachDspBusSetting, criAtomEx_RegisterAcfConfig + */ +CriSint32 CRIAPI criAtomExAsrRack_CalculateWorkSizeForDspBusSetting( + CriAtomExAsrRackId rack_id, const CriChar8 *setting); + +/*EN + * \brief Attaching the DSP bus settings + * \ingroup ATOMEXLIB_ASR + * \param[in] rack_id ASR rack ID + * \param[in] setting Name of the DSP bus settings + * \param[in] work Work area + * \param[in] work_size Size of the work area + * \par Description: + * Builds a bus based on the DSP bus settings and attaches it to the ASR rack.
+ * Before executing this function, use the ::criAtomEx_RegisterAcfConfig function + * to register ACF information. + * \par Note: + * The size of the work memory required for attaching the DSP bus settings + * varies depending on the DSP bus settings created in CRI Atom Craft.
+ * \attention + * This function is a blocking function.
+ * Executing this function blocks server processing of the Atom library for a while.
+ * If this function is executed during audio playback, problems such as interruption of playback may occur. + * Call this function only when a fluctuation in load is acceptable, for example, during a scene change.
+ * \sa criAtomExAsrRack_DetachDspBusSetting, criAtomEx_RegisterAcfConfig + */ +void CRIAPI criAtomExAsrRack_AttachDspBusSetting(CriAtomExAsrRackId rack_id, + const CriChar8 *setting, void *work, CriSint32 work_size); + +/*EN + * \brief Detaching the DSP bus settings + * \ingroup ATOMEXLIB_ASR + * \param[in] rack_id ASR rack ID + * \par Description: + * Detaches the DSP bus settings from the ASR rack.
+ * If an allocator has already been registered by using the ::criAtomEx_SetUserAllocator macro, + * the memory area allocated when DSP bus settings were attached is released.
+ * (If you pass a work area when attaching DSP bus settings, the work area can be released + * after this function is executed.)
+ * \attention + * This function is a blocking function.
+ * Executing this function blocks server processing of the Atom library for a while.
+ * If this function is executed during audio playback, problems such as interruption of playback may occur. + * Call this function only when a fluctuation in load is acceptable, for example, during a scene change. + * \sa criAtomExAsrRack_AttachDspBusSetting + */ +void CRIAPI criAtomExAsrRack_DetachDspBusSetting(CriAtomExAsrRackId rack_id); + +/*EN + * \brief Applying a DSP bus snapshot + * \ingroup ATOMEXLIB_ASR + * \param[in] rack_id ASR rack ID + * \param[in] snapshot_name Name of the snapshot + * \param[in] time_ms Time (milliseconds) + * \par Description: + * Applies the DSP bus snapshot.
+ * When this function is called, the parameters will change to those specified for the snapshot over the time of time_ms.
+ * \sa criAtomExAsrRack_AttachDspBusSetting + */ +void CRIAPI criAtomExAsrRack_ApplyDspBusSnapshot(CriAtomExAsrRackId rack_id, + const CriChar8 *snapshot_name, CriSint32 time_ms); + +/*EN + * \brief Get DSP bus snapshot name + * \ingroup ATOMEXLIB_ASR + * \param[in] rack_id ASR rack ID + * \par Description: + * Specify the ASR rack ID and obtain the DSP bus snapshot name. + * If the snapshot is not applied, CRI_NULL is returned. + * \sa criAtomExAsrRack_ApplyDspBusSnapshot + */ +const CriChar8* CRIAPI criAtomExAsrRack_GetAppliedDspBusSnapshotName(CriAtomExAsrRackId rack_id); + +/*EN + * \brief Setting the volume of the bus + * \ingroup ATOMEXLIB_ASR + * \param[in] rack_id ASR rack ID + * \param[in] bus_name Bus name + * \param[in] volume Volume value + * \par Description: + * Sets the volume of the bus.
+ * This function is valid for send destinations whose send type is post-volume or post-panning.
+ *
+ * Specify a real number between 0.0f and 1.0f for the volume.
+ * The volume is the scaling factor for the amplitude of the sound data (unit is not decibel).
+ * For example, if you specify 1.0f, sound is output at the original volume.
+ * If you specify 0.5f, sound is output at the volume that is half the amplitude of the original sound + * waveform (-6dB).
+ * If you specify 0.0f, the sound is muted (silent).
+ * The default value of the volume is the one set in CRI Atom Craft.
+ */ +void CRIAPI criAtomExAsrRack_SetBusVolumeByName(CriAtomExAsrRackId rack_id, + const CriChar8* bus_name, CriFloat32 volume); + +/*EN + * \brief Get the volume of a bus + * \ingroup ATOMEXLIB_ASR + * \param[in] rack_id ASR rack ID + * \param[in] bus_name Bus name + * \param[in] volume Volume value + * \par Description: + * Get the volume of the bus.
+ * It is effective only when the send type of the destination is post volume or post pan.
+ *
+ * The volume value obtained is a real value.
+ * The default value of the volume is set in the CRI Atom Craft tool.
+ */ +void CRIAPI criAtomExAsrRack_GetBusVolumeByName(CriAtomExAsrRackId rack_id, + const CriChar8* bus_name, CriFloat32* volume); + +/*EN + * \brief Setting the panning 3D of the bus + * \ingroup ATOMEXLIB_ASR + * \param[in] rack_id ASR rack ID + * \param[in] bus_name Bus name + * \param[in] pan3d_angle Pan3D angle + * \param[in] pan3d_distance Pan3D interior distance + * \param[in] pan3d_volume Pan3D volume + * \par Description: + * Sets the panning 3D parameters for the bus.
+ * This function is valid for send destinations whose send type is post-panning.
+ *
+ * The Pan3D angle must be between -180.0f and 180.0f.
+ *
+ * The Pan3D interior distance must be between 0.0f and 1.0f.
+ *
+ * The Pan3D volume must be between 0.0f and 1.0f.
+ * It is multiplied by the normal volume. + *
+ * The default value of the Pan3D is the one set in CRI Atom Craft.
+ */ +void CRIAPI criAtomExAsrRack_SetBusPan3dByName(CriAtomExAsrRackId rack_id, const CriChar8* bus_name, + CriFloat32 pan3d_angle, CriFloat32 pan3d_distance, CriFloat32 pan3d_volume); + +/*EN + * \brief Obtaining the panning 3D for the bus + * \ingroup ATOMEXLIB_ASR + * \param[in] rack_id ASR rack ID + * \param[in] bus_name Bus name + * \param[out] pan3d_angle Pan3D angle + * \param[out] pan3d_distance Pan3D interior distance + * \param[out] pan3d_volume Pan3D volume + * \par Description: + * Obtains the panning 3D parameters for the bus.
+ */ +void CRIAPI criAtomExAsrRack_GetBusPan3dByName(CriAtomExAsrRackId rack_id, const CriChar8* bus_name, + CriFloat32 *pan3d_angle, CriFloat32 *pan3d_distance, CriFloat32 *pan3d_volume); + +/*EN + * \brief Setting the level matrix for the bus + * \ingroup ATOMEXLIB_ASR + * \param[in] rack_id ASR rack ID + * \param[in] bus_name Bus name + * \param[in] input_channels Number of input channels + * \param[in] output_channels Number of output channels + * \param[in] matrix One-dimensional array of level values that represent the level matrix + * \par Description: + * Sets the level matrix for the bus.
+ * This function is valid for send destinations whose send type is post-panning.
+ *
+ * A level matrix is used to specify which speaker outputs + * the sound for each channel at which volume.
+ * The matrix argument is an [input_channels *output_channels] matrix.
+ * The level for sending data from an input channel ch_in to an output channel ch_out + * must be set at matrix[ch_in *output_channels + ch_out].
+ * The default level matrix is a unit matrix.
+ *
+ * Specify a real number between 0.0f and 1.0f for the level value.
+ * The level value is the scaling factor for the amplitude of the sound data (unit is not decibel).
+ * For example, if you specify 1.0f, sound is output at the original level.
+ * If you specify 0.5f, sound is output at the volume that is half the amplitude of the original sound + * waveform (-6dB).
+ * If you specify 0.0f, the sound is muted (silent).
+ */ +void CRIAPI criAtomExAsrRack_SetBusMatrixByName( + CriAtomExAsrRackId rack_id, const CriChar8* bus_name, CriSint32 input_channels, + CriSint32 output_channels, const CriFloat32 matrix[]); + +/*EN + * \brief Setting the send level for the bus + * \ingroup ATOMEXLIB_ASR + * \param[in] rack_id ASR rack ID + * \param[in] bus_name Bus name + * \param[in] sendto_bus_name Bus name of the send destination + * \param[in] level Level value + * \par Description: + * Sets the level for sending audio data to a send destination bus.
+ *
+ * Specify a real number between 0.0f and 1.0f for the level value.
+ * The level value is the scaling factor for the amplitude of the sound data (unit is not decibel).
+ * For example, if you specify 1.0f, sound is output at the original level.
+ * If you specify 0.5f, sound is output at the volume that is half the amplitude of the original sound + * waveform (-6dB).
+ * If you specify 0.0f, the sound is muted (silent).
+ * The default value of the level is the one set in CRI Atom Craft.
+ */ +void CRIAPI criAtomExAsrRack_SetBusSendLevelByName(CriAtomExAsrRackId rack_id, + const CriChar8* bus_name, const CriChar8* sendto_bus_name, CriFloat32 level); + +/*EN + * \brief Set parameter during effect operation + * \ingroup ATOMEXLIB_ASR + * \param[in] rack_id ASR rack ID + * \param[in] bus_name Bus name + * \param[in] effect_name Effect name + * \param[in] parameter_index Effect operation parameter index + * \param[in] parameter_value Effect operation parameter value + * \par Description: + * Sets the the value of an effect parameter.
+ * To set an effect parameter, you must attach a bus + * with the ::criAtomEx_AttachDspBusSetting before calling this function.
+ * The attached bus settings determine which effect exists on which bus. If the specified ID does not exist on the given bus, this function fails.
+ * For the correspondence between the parameter index and the actual parameter, refer to the parameter index (\ref CRIATOMASR_DSP_PARAM) of each effect. + * \sa criAtomEx_AttachDspBusSetting, criAtomExAsrRack_UpdateEffectParameters + */ +void CRIAPI criAtomExAsrRack_SetEffectParameter(CriAtomExAsrRackId rack_id, + const CriChar8* bus_name, const CriChar8* effect_name, + const CriUint32 parameter_index, const CriFloat32 parameter_value); + +/*EN + * \brief Update parameter during effect operation + * \ingroup ATOMEXLIB_ASR + * \param[in] rack_id ASR rack ID + * \param[in] bus_name Bus name + * \param[in] effect_name Effect name + * \par Description: + * Update the operating parameter of an effect.
+ * In order to actually update the operating parameter, please call this function in addition to the criAtomExAsrRack_SetEffectParameter function. + * \sa criAtomEx_AttachDspBusSetting, criAtomExAsrRack_SetEffectParameter + */ +void CRIAPI criAtomExAsrRack_UpdateEffectParameters(CriAtomExAsrRackId rack_id, + const CriChar8* bus_name, const CriChar8* effect_name); + +/*EN + * \brief Get parameter during effect operation + * \ingroup ATOMEXLIB_ASR + * \param[in] rack_id ASR rack ID + * \param[in] bus_name Bus name + * \param[in] effect_name Effect name + * \param[in] parameter_index Effect operation parameter index + * \return Returns the value of the parameter of a given effect by specifying the parameter index. + * \par Description: + * Get the value of the parameter of a fiven effect.
+ * In order to get the operating parameter, it is necessary to attach the bus beforehand by + * calling the ::criAtomEx_AttachDspBusSetting function.
+ * If the effect does not exist on the target bus, the function fails.
+ * For details about the operating parameters, refer to parameter index (\ref CRIATOMASR_DSP_PARAM) of each effect. + * \sa criAtomEx_AttachDspBusSetting + */ +CriFloat32 CRIAPI criAtomExAsrRack_GetEffectParameter(CriAtomExAsrRackId rack_id, + const CriChar8* bus_name, const CriChar8* effect_name, + const CriUint32 parameter_index); + +/*EN + * \brief Enable / disable the bypass of an effect + * \ingroup ATOMEXLIB_ASR + * \param[in] rack_id ASR rack ID + * \param[in] bus_name Bus name + * \param[in] effect_name Effect name + * \param[in] bypass Bypass setting (CRI_TRUE:Enable bypass, CRI_FALSE:Disable bypass) + * \par Description: + * Enables / disables the bypass setting for an effect.
+ * When the bypass is enabled, the effect is ignored during audio processing.
+ * To enable the bypass of an effect, first call + * the ::criAtomEx_AttachDspBusSetting function to build a bus.
+ * The attached DSP bus settings determine which effect exists on which bus. If the effect with the specified ID does not exist on the given bus, this function fails.
+ * \attention + * If a bypass setting is enabled during audio playback, a noise may occur.
+ * \sa criAtomEx_AttachDspBusSetting + */ +void CRIAPI criAtomExAsrRack_SetEffectBypass(CriAtomExAsrRackId rack_id, + const CriChar8* bus_name, const CriChar8* effect_name, const CriBool bypass); + +/*EN + * \brief Adding a level measuring feature + * \ingroup ATOMEXLIB_ASR + * \param[in] rack_id ASR rack ID + * \param[in] bus_name Bus name + * \param[in] config Configuration structure for the level measuring feature + * \par Description: + * Adds the level measuring feature to the bus and starts a level measurement process.
+ * By executing this function and then executing the ::criAtomExAsrRack_GetBusAnalyzerInfo function, + * you can obtain the RMS level (sound pressure), peak level + * (maximum amplitude), and peak hold level. + * To measure the levels of multiple buses, you must invoke this function for each bus. + * \attention + * This function handles the same resources as the ::criAtomExAsrRack_AttachDspBusSetting function.
+ * Currently, after executing the ::criAtomExAsrRack_AttachDspBusSetting function, + * you cannot obtain information by using the ::criAtomExAsrRack_GetBusAnalyzerInfo function.
+ * To use both this function and the ::criAtomExAsrRack_AttachDspBusSetting function, + * use the ::criAtomExAsrRack_DetachBusAnalyzer function to disable the level measurement feature + * before executing the ::criAtomExAsrRack_AttachDspBusSetting function. + * Then execute the ::criAtomExAsrRack_AttachDspBusSetting function before executing this function again. + * \sa criAtomExAsrRack_GetBusAnalyzerInfo, criAtomExAsrRack_DetachBusAnalyzer + */ +void CRIAPI criAtomExAsrRack_AttachBusAnalyzerByName(CriAtomExAsrRackId rack_id, + const CriChar8* bus_name, const CriAtomExAsrBusAnalyzerConfig* config); + +/*EN + * \brief Deleting the level measurement feature + * \ingroup ATOMEXLIB_ASR + * \param[in] rack_id ASR rack ID + * \param[in] bus_name Bus name + * \par Description: + * Deletes the level measuring feature from the bus. + * \sa criAtomExAsrRack_AttachBusAnalyzer + */ +void CRIAPI criAtomExAsrRack_DetachBusAnalyzerByName( + CriAtomExAsrRackId rack_id, const CriChar8* bus_name); + +/*EN + * \brief Obtaining the level measurement results + * \ingroup ATOMEXLIB_ASR + * \param[in] rack_id ASR rack ID + * \param[in] bus_name Bus name + * \param[out] info Structure for level measurement results + * \par Description: + * Obtains the level measurement results from the bus. + * \sa criAtomExAsrRack_AttachBusAnalyzer + */ +void CRIAPI criAtomExAsrRack_GetBusAnalyzerInfoByName(CriAtomExAsrRackId rack_id, + const CriChar8* bus_name, CriAtomExAsrBusAnalyzerInfo *info); + +/*EN + * \brief Registering a wave filter callback function + * \ingroup ATOMEXLIB_ASR + * \param[in] rack_id ASR rack ID + * \param[in] bus_name Bus name + * \param[in] pre_func Filter callback function used before effect processing + * \param[in] post_func Filter callback function used after effect processing + * \param[in] obj User specified object + * \par Description: + * Registers callback functions for receiving PCM data on the bus.
+ * The registered callback function is invoked when a sound renderer performs audio processing.
+ * You can specify NULL for one of the two callback functions that is not used.
+ * \attention + * Do not call Atom library APIs in the callback function.
+ * The callback function is called from the server processing in the Atom library.
+ * Therefore, when an API that doesn't appropriately handle an interrupt to the server processing is called, + * a problem such as error or deadlock may occur.
+ *
+ * Note that if audio processing is blocked in the wave filter callback function for a long time, + * some problems such as playback interruption may occur.
+ * \sa CriAtomExPlayerFilterCbFunc + */ +void CRIAPI criAtomExAsrRack_SetBusFilterCallbackByName(CriAtomExAsrRackId rack_id, + const CriChar8* bus_name, CriAtomExAsrBusFilterCbFunc pre_func, + CriAtomExAsrBusFilterCbFunc post_func, void *obj); + +/*EN + * \brief Setting the alternative ASR rack ID + * \ingroup ATOMEXLIB_ASR + * \param[in] rack_id ASR rack ID + * \param[in] alt_rack_id Alternative ASR rack ID + * \par Description: + * Sets the ID of an alternative ASR rack in case the ASR rack of the specified ID does not exist.
+ * (If the ASR rack of rack_id does not exist, the sound is output via the ASR rack of alt_rack_id.)
+ *
+ * The default setting is ::CRIATOMEXASR_RACK_DEFAULT_ID. + * (The default ASR is used if the ASR rack of the specified ID does not exist.)
+ * \par Note: + * To treat the output to the missing ASR rack as an error, + * set alt_rack_id and rack_id to the same value.
+ */ +void CRIAPI criAtomExAsrRack_SetAlternateRackId( + CriAtomExAsrRackId rack_id, CriAtomExAsrRackId alt_rack_id); + +/*EN + * \brief Acquiring the maximum number of buses + * \ingroup ATOMEXLIB_ASR + * \param[in] rack_id ASR rack ID + * \return Maximum number of buses + * \par Description: + * Acquires the maximum number of available buses in the specified ID. + *
+ * By default, ::CRIATOMEXASR_DEFAULT_NUM_BUSES is returned. + *
+ * To change the maximum number of buses, change CriAtomExAsrRackConfig::num_buses + * and then create an ASR rack. + * \sa CriAtomExAsrRackConfig, criAtomExAsrRack_Create, criAtomExAsrRack_SetDefaultConfig + */ +CriSint32 CRIAPI criAtomExAsrRack_GetNumBuses(CriAtomExAsrRackId rack_id); + +/*EN + * \brief Get the PCM data + * \ingroup ATOMLIB_ASR + * \param[in] output_channels number of channels of the output buffer + * \param[in] output_samples number of samples that the output buffer can store + * \param[out] output_buffer output buffer + * \return CriSint32 number of retrieved samples + * \retval 0 and more than 0 number of retrieved samples + * \retval negative value an error occurred + * \par Description: + * Gets the PCM data that has been output from the library.
+ *
+ * The library should be initialized with ::criAtomEx_InitializeForUserPcmOutput + * to be able to use this function.
+ * \attention + * The ::criAtomExAsr_GetPcmDataFloat32 function should be called + * periodically on an independent thread.
+ * Currently, there are some functions within the Atom libray that do not return the process + * until the PCM data is output (e.g. voice pool destruction process).
+ * When calling this type of function and the ::criAtomExAsr_GetPcmDataFloat32 function + * on the same thread, it may wait for the completion of the PCM data output indefinitely.
+ * \sa criAtomEx_InitializeForUserPcmOutput + */ +CriSint32 CRIAPI criAtomExAsr_GetPcmDataFloat32( + CriSint32 output_channels, CriSint32 output_samples, CriFloat32 *output_buffer[]); + +/*EN + * \brief Get the amount of remaining PCM data + * \ingroup ATOMLIB_ASR + * \return CriSint32 Amount of remaining PCM data (in samples) + * \par Description: + * Returns the number of samples that can be acquired with the ::criAtomExAsr_GetPcmDataFloat32 function.
+ * \sa criAtomExAsr_GetPcmDataFloat32 + */ +CriSint32 CRIAPI criAtomExAsr_GetNumBufferedSamples(void); + +/*EN + * \brief Specify PCM buffer size + * \ingroup ATOMLIB_ASR + * \param[in] num_samples PCM buffer size (in samples) + * \par Description: + * Specifies the size of the buffer used to store the PCM data within the Atom library.
+ * (The size is specified in samples.)
+ * When specifying 0 for the buffer size, a buffer corresponding to 2 Vsync intervals is allocated.
+ * \par Remarks: + * When the Atom library is initialized in the user PCM output mode, + * it stores the output of the ASR in a buffer within the library (PCM buffer).
+ * The size of the PCM buffer can be specified by calling this function.
+ * \attention + * The PCM buffer allocation is performed within the ::criAtomEx_InitializeForUserPcmOutput function.
+ * Therefore, this function should be executed before calling ::criAtomEx_InitializeForUserPcmOutput.
+ *
+ * If the number of samples stored in the buffer is too small to accomodate the interval of PCM data retrieval of the application, + * some problems (such as the sound breaking) may occur.
+ * On the other hand, if the PCM buffer size is too large, + * the audio playback latency will increase.
+ *
+ * On PC, whether the playback is performed correctly with a small PCM buffer size or not + * depends on the sound device performance.
+ * To correctly perform the playback on many environments, + * specify a certain amount of PCM buffer or + * execute the ::criAtomExAsr_GetPcmDataFloat32 function at intervals as short as possible.
+ */ +void CRIAPI criAtomExAsr_SetPcmBufferSize(CriSint32 num_samples); + +/*EN + * \brief Acquiring the PCM data in the ASR rack + * \ingroup ATOMLIB_ASR + * \param[in] output_channels Number of channels in the output buffer + * \param[in] output_samples Number of samples that can be stored in the output buffer + * \param[out] output_buffer Output buffer + * \return CriSint32 Number of acquired samples + * \retval 0 or larger Number of acquired samples + * \retval Negative value An error occurred + * \par Description: + * Acquires output PCM data in the ASR rack.
+ *
+ * Before you can use this function, you must use the ::criAtomEx_InitializeForUserPcmOutput + * function to initialize the library.
+ * \attention + * This function must be called periodically on an independent thread.
+ * Currently, some APIs in the Atom library + * do not return the process until PCM data is output.
+ * (Destruction of a voice pool, etc.)
+ * If such a function and this function are called in turn on the same thread, + * the API may keep waiting for the output of PCM data forever, + * resulting in no return of the process.
+ * \sa criAtomEx_InitializeForUserPcmOutput + */ +CriSint32 CRIAPI criAtomExAsrRack_GetPcmDataFloat32(CriAtomExAsrRackId rack_id, + CriSint32 output_channels, CriSint32 output_samples, CriFloat32 *output_buffer[]); + +/*EN + * \brief Get the amount of remaining PCM data in the ASR rack + * \ingroup ATOMLIB_ASR + * \return CriSint32 Amount of remaining PCM data (number of samples) + * \par Description: + * Returns the number of samples that can be acquired with the ::criAtomExAsrRack_GetPcmDataFloat32 function.
+* \sa criAtomExAsrRack_GetPcmDataFloat32 + */ +CriSint32 CRIAPI criAtomExAsrRack_GetNumBufferedSamples(CriAtomExAsrRackId rack_id); + +/*EN +* \brief Get analysis result of amplitude analyzer of specified bus +* \param[in] rack_id ASR Rack ID +* \param[in] bus_no Bus Number +* \param[out] rms Output Buffer +* \param[in] num_channels Channel Number of Output Buffer +* \return CriBool Whether get was successful (CRI_TRUE: Success, CRI_FALSE: Failure) +* \par Description: +* Gets the current analysis result (RMS value) of the amplitude analyzer. +* This function fails if the specified bus does not have an amplitude analyzer, or if the specified number of channels is greater than that of the ASR bus. +*/ +CriBool CRIAPI criAtomExAsrRack_GetAmplitudeAnalyzerRms(CriAtomExAsrRackId rack_id, + CriSint32 bus_no, CriFloat32* rms, CriUint32 num_channels); + +/*EN +* \brief Get analysis result of amplitude analyzer of specified bus +* \param[in] rack_id ASR Rack ID +* \param[in] bus_name Bus Name +* \param[out] rms Output Buffer +* \param[in] num_channels Channel Number of Output Buffer +* \return CriBool Whether get was successful (CRI_TRUE: Success, CRI_FALSE: Failure) +* \par Description: +* Gets the current analysis result (RMS value) of the amplitude analyzer. +* This function fails if the specified bus does not have an amplitude analyzer, or if the specified number of channels is greater than that of the ASR bus. +*/ +CriBool CRIAPI criAtomExAsrRack_GetAmplitudeAnalyzerRmsByName(CriAtomExAsrRackId rack_id, + const CriChar8* bus_name, CriFloat32* rms, CriUint32 num_channels); + +/*EN +* \brief Get multiplication value of compressor of specified bus +* \param[in] rack_id ASR Rack ID +* \param[in] bus_no Bus Number +* \param[out] gain Output Buffer +* \param[in] num_channels Channel Number of Output Buffer +* \return CriBool Whether get was successful (CRI_TRUE: Success, CRI_FALSE: Failure) +* \par Description: +* Gets the value by which the compressor multiplies the input waveform.
+* This function fails if the specified bus does not have a compressor, or if the specified number of channels is greater than that of the ASR bus. +*/ +CriBool CRIAPI criAtomExAsrRack_GetCompressorGain(CriAtomExAsrRackId rack_id, + CriSint32 bus_no, CriFloat32* gain, CriUint32 num_channels); + +/*EN +* \brief Get multiplication value of compressor of specified bus +* \param[in] rack_id ASR Rack ID +* \param[in] bus_name Bus Name +* \param[out] gain Output Buffer +* \param[in] num_channels Channel Number of Output Buffer +* \return CriBool Whether get was successful (CRI_TRUE: Success, CRI_FALSE: Failure) +* \par Description: +* Gets the value by which the compressor multiplies the input waveform.
+* This function fails if the specified bus does not have a compressor, or if the specified number of channels is greater than that of the ASR bus. +*/ +CriBool CRIAPI criAtomExAsrRack_GetCompressorGainByName(CriAtomExAsrRackId rack_id, + const CriChar8* bus_name, CriFloat32* gain, CriUint32 num_channels); + +/*EN +* \brief Get amplitude value of compressor of specified bus +* \param[in] rack_id ASR Rack ID +* \param[in] bus_no Bus Number +* \param[out] rms Output Buffer +* \param[in] num_channels Channel Number of Output Buffer +* \return CriBool Whether get was successful (CRI_TRUE: Success, CRI_FALSE: Failure) +* \par Description: +* Gets the amplitude value applied to the compressor.
+* This function fails if the specified bus does not have a compressor, or if the specified number of channels is greater than that of the ASR bus. +*/ +CriBool CRIAPI criAtomExAsrRack_GetCompressorRms(CriAtomExAsrRackId rack_id, + CriSint32 bus_no, CriFloat32* rms, CriUint32 num_channels); + +/*EN +* \brief Get amplitude value of compressor of specified bus +* \param[in] rack_id ASR Rack ID +* \param[in] bus_name Bus Name +* \param[out] rms Output Buffer +* \param[in] num_channels Channel Number of Output Buffer +* \return CriBool Whether get was successful (CRI_TRUE: Success, CRI_FALSE: Failure) +* \par Description: +* Gets the amplitude value applied to the compressor.
+* This function fails if the specified bus does not have a compressor, or if the specified number of channels is greater than that of the ASR bus. +*/ +CriBool CRIAPI criAtomExAsrRack_GetCompressorRmsByName(CriAtomExAsrRackId rack_id, + const CriChar8* bus_name, CriFloat32* rms, CriUint32 num_channels); + +/*========================================================================== + * CRI Atom ASR API + *=========================================================================*/ +/*EN + * \brief Calculate work area size required for initializing ASR + * \ingroup ATOMLIB_ASR + * \param[in] config Configuration structure for ASR initialization + * \par Description: + * Obtains the work area size required for initializing the software sound renderer ASR.
+ * If you are not using the ::criAtom_SetUserAllocator macro to register the allocator, + * but using the ::criAtomAsr_Initialize function to initialize ASR, + * as much memory area as the size calculated by this function must be passed as the work area.
+ *
+ * If work area size calculation fails, this function returns -1.
+ * The reason for work area size calculation failure can be determined by viewing the error callback message.
+ * \par Remarks: + * The working memory size required for initializing ASR varies depending on + * the contents of the configuration structure ( ::CriAtomAsrConfig ) for initializing ASR.
+ *
+ * If you specify NULL as argument, the work area size is calculated using the default setting + * (i.e., the same parameters as when ::criAtomAsr_SetDefaultConfig is used) are used + * for calculating the work area size. + *
+ * Information in argument config is referenced only within the function.
+ * It is not referenced after exiting the function and its area can be released + * after executing the function. + * \sa criAtom_SetUserAllocator, criAtomAsr_Initialize + */ +CriSint32 CRIAPI criAtomAsr_CalculateWorkSize(const CriAtomAsrConfig *config); + +/*EN + * \brief Initialize ASR + * \ingroup ATOMLIB_ASR + * \param[in] config Configuration structure for ASR initialization + * \param[in] work work area + * \param[in] work_size work area size + * \par Description: + * Initializes the software sound renderer ASR.
+ * By executing this function, ASR is initiated and ASR starts outputting rendering results.
+ * \par Remarks: + * The working memory size required for initializing ASR varies depending on + * the contents of the configuration structure ( ::CriAtomAsrConfig ) for initializing ASR.
+ *
+ * When NULL is specified for the argument, default settings
+ * (i.e., the same parameters as when ::criAtomAsr_SetDefaultConfig is used) are used for initialization.
+ *
+ * Information in the argument config is referenced only within the function.
+ * It is not referenced after exiting the function and its area can be released + * after executing the function.
+ * \attention + * You must initialize the library before executing this function.
+ *
+ * This function is a blocking function.
+ * Once this function is executed, server processing of the Atom library is blocked for a while.
+ * If this function is executed during audio playback, problems such as interruption of playback may occur. + * Call this function only when load fluctuations are acceptable, for example, when a game scene is changed. + *
+ * After executing this function, always execute the ::criAtomAsr_Finalize function.
+ * Also, before executing the ::criAtomAsr_Finalize function, do not execute this function again.
+ * \sa criAtom_SetUserAllocator, criAtomAsr_Finalize + */ +void CRIAPI criAtomAsr_Initialize( + const CriAtomAsrConfig *config, void *work, CriSint32 work_size); + +/*EN + * \brief End ASR + * \ingroup ATOMLIB_ASR + * \par Description: + * Performs termination processing of the software sound renderer ASR.
+ * By executing this function, output of rendering results is stopped.
+ * If the allocator is registered with the ::criAtom_SetUserAllocator macro, + * this function releases the memory area allocated when ASR is initialized.
+ * (If you pass a work area during ASR initialization, the work area can be released + * after executing this function.)
+ * \attention + * This function is a blocking function.
+ * Once this function is executed, server processing of the Atom library is blocked for a while.
+ * If this function is executed during audio playback, problems such as interruption of playback may occur.
+ * Call this function only when load fluctuations are acceptable, for example, when a game scene is changed.
+ * \sa criAtom_SetUserAllocator, criAtomAsr_Initialize + */ +void CRIAPI criAtomAsr_Finalize(void); + +/*========================================================================== +* CRI AtomEx API +*=========================================================================*/ +/*EN + * \brief Calculate the size of the work area required for the user PCM output method + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] config Configuration structure + * \return CriSint32 Work area size + * \par Description: + * Gets the size of the work area necessary for initializing the library with + * the user PCM output method.
+ * \par Remarks: + * The size of the work area required varies depending on + * the contents of the configuration structure (::CriAtomExConfigForUserPcmOutput).
+ *
+ * The information in the "config" structure is only referenced within this function.
+ * Therefore, it is possible to release the "config" area after executing the function. + * \attention + * This function is used to initialize the library using + * the ::criAtomEx_InitializeForUserPcmOutput function.
+ * When using the ::criAtomEx_Initialize function, + * calculate the work area size using the ::criAtomEx_CalculateWorkSize function instead of this function.
+ * \sa CriAtomExConfigForUserPcmOutput, criAtomEx_InitializeForUserPcmOutput + */ +CriSint32 CRIAPI criAtomEx_CalculateWorkSizeForUserPcmOutput( + const CriAtomExConfigForUserPcmOutput *config); + +/*EN + * \brief Initialization of the user PCM output + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] config Configuration structure for initialization + * \param[in] work Work area + * \param[in] work_size Work area size + * \par Description: + * Initialize the library in user PCM output mode.
+ *
+ * When initialization processing is performed using this function, the Atom library does not output audio.
+ * Users need to periodically obtain PCM data from the library using + * ::criAtomExAsr_GetPcmDataFloat32 function and output audio on the application side.
+ * \attention + * This function and the following functions can not be used together.
+ * - ::criAtom_Initialize + * - ::criAtomAsr_Initialize + * - ::criAtomHcaMx_Initialize + * - ::criAtom_Initialize_PC + * . + * \sa CriAtomExConfigForUserPcmOutput, criAtomEx_FinalizeForUserPcmOutput, + * criAtomExAsr_GetPcmDataFloat32, criAtomEx_CalculateWorkSizeForUserPcmOutput + */ +void CRIAPI criAtomEx_InitializeForUserPcmOutput( + const CriAtomExConfigForUserPcmOutput *config, void *work, CriSint32 work_size); + +/*EN + * \brief End processing of user PCM output library + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * Performs termination processing of the library initialized in user PCM output mode.
+ * \attention + * This function is used when library is initialized using + * ::criAtomEx_InitializeForUserPcmOutput function.
+ * If the ::criAtomEx_Initialize function was called, + * please use the ::criAtomEx_Finalize function instead of this function to perform termination processing.
+ * \sa criAtomEx_InitializeForUserPcmOutput + */ +void CRIAPI criAtomEx_FinalizeForUserPcmOutput(void); + +/*************************************************************************** + * Tentative API (Please don't use it) + ***************************************************************************/ +/* The functions declared below are tentatively used APIs for internal processing of Atom, + * cooperation with game engines, etc. + * Because future modifications will be changed / deleted without prior notice, please refrain from using. + */ +void CRIAPI criAtomExAsr_PauseOutputVoice(CriBool sw); +CriBool CRIAPI criAtomExAsrRack_GetNumOutputSamples( + CriAtomExAsrRackId rack_id, CriSint64 *num_samples, CriSint32 *sampling_rate); +CriSint32 CRIAPI criAtomExAsrRack_GetOutputChannels(CriAtomExAsrRackId rack_id); +CriUint16 CRIAPI criAtomExAsrRack_GetBusNumber( + CriAtomExAsrRackId rack_id, const CriChar8 *bus_name); +void CRIAPI criAtomAsr_PauseOutputVoice(CriBool sw); +CriSint32 CRIAPI criAtomExAsrRack_GetAmbisonicRackId(void); + +#ifdef __cplusplus +} +#endif + +/*************************************************************************** + * For compatibility with old version + ***************************************************************************/ +#define CRIATOMEXASR_DEFAULT_NUM_BASES (CRIATOMEXASR_DEFAULT_NUM_BUSES) +#define CRIATOMEXASR_MAX_BASES (CRIATOMEXASR_MAX_BUSES) +#define criAtomExAsr_CalculateWorkSizeForDspBusSettingFromAcfData(acf_data, acf_buffer_size, setting_name) \ + criAtomEx_CalculateWorkSizeForDspBusSettingFromAcfData((acf_data), (acf_buffer_size), (setting_name)) +#define criAtomExAsr_CalculateWorkSizeForDspBusSetting(setting) \ + criAtomEx_CalculateWorkSizeForDspBusSetting(setting) +#define criAtomExAsr_AttachDspBusSetting(setting, work, work_size) \ + criAtomEx_AttachDspBusSetting(setting, work, work_size) +#define criAtomExAsr_DetachDspBusSetting() \ + criAtomEx_DetachDspBusSetting() +/* The following function is disabled. */ +#define criAtomExAsr_SetDownmixMode(downmix_mode) +#define criAtomExAsrRack_SetDownmixMode(rack_id, downmix_mode) + +/* Mis-typed macros */ +#define CRIATOMEXASR_BIQUAD_FILTER_ANALYZER_NAME "CRIWARE/Biquad" +#define CRIATOMEXASR_BANDPASS_FILTER_PARAMETER_TYPE (-1) +#define CRIATOMEXASR_BUTTERWORTH_FILTER_PARAMETER_TYPE (-1) +#define CRIATOMEXASR_BUTTERWORTH_FILTER_PARAMETER_LOW_FREQ (0) +#define CRIATOMEXASR_BUTTERWORTH_FILTER_PARAMETER_HIGH_FREQ (1) +#define CRIATOMEXASR_BUTTERWORTH_FILTER_NUM_PARAMETERS (2) + +/* + * In CRI Atom Ver.2.13.00 or later, the identification of the effect used for the ASR bus is changed from id (enumerated type) to character string, + * and the parameter of the effect is changed from structure to float array. + * With this change, the following enum types and structures are not used internally. + * For past compatibility, we will leave only type definitions. + */ +typedef enum { + CRIATOMEXASR_DSP_ID_INVALID = 0, + CRIATOMEXASR_DSP_ID_BANDPASS_FILTER, + CRIATOMEXASR_DSP_ID_BIQUAD_FILTER, + CRIATOMEXASR_DSP_ID_DELAY, + CRIATOMEXASR_DSP_ID_ECHO, + CRIATOMEXASR_DSP_ID_REVERB, + CRIATOMEXASR_DSP_ID_PITCH_SHIFTER, + CRIATOMEXASR_DSP_ID_3BAND_EQ, + CRIATOMEXASR_DSP_ID_COMPRESSOR, + CRIATOMEXASR_DSP_ID_COMPRESSOR_EX, + CRIATOMEXASR_DSP_ID_CHORUS, + CRIATOMEXASR_DSP_ID_FLANGER, + CRIATOMEXASR_DSP_ID_DISTORTION, + CRIATOMEXASR_DSP_ID_AMPLITUDE_ANALYZER, + CRIATOMEXASR_DSP_ID_SURROUNDER, + CRIATOMEXASR_DSP_ID_I3DL2_REVERB, + CRIATOMEXASR_DSP_ID_MULTI_TAP_DELAY, + CRIATOMEXASR_DSP_ID_LIMITER, + CRIATOMEXASR_DSP_ID_MATRIX, + CRIATOMEXASR_DSP_ID_32BANDS_EQ, + CRIATOMEXASR_DSP_ID_BIT_CRUSHER, + CRIATOMEXASR_DSP_ID_PHASER, + CRIATOMEXASR_DSP_ID_NO_TYPE = 0xFF, + CRIATOMEXASR_DSP_ID_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomExAsrDspId; + +typedef struct CriAtomExAsrBandpassFilterParameterTag { + CriFloat32 cof_high; + CriFloat32 cof_low; +} CriAtomExAsrBandpassFilterParameter; + +typedef struct CriAtomExAsrBiquadFilterParameterTag { + CriAtomExBiquadFilterType type; + CriFloat32 frequency; + CriFloat32 q_value; + CriFloat32 gain; +} CriAtomExAsrBiquadFilterParameter; + +typedef struct CriAtomExAsrDelayParameterTag { + CriFloat32 max_delay_time_ms; + CriFloat32 delay_time_ms; +} CriAtomExAsrDelayParameter; + +typedef struct CriAtomExAsrEchoParameterTag { + CriFloat32 max_delay_time_ms; + CriFloat32 delay_time_ms; + CriFloat32 gain; +} CriAtomExAsrEchoParameter; + +typedef enum { + CRIATOMEXASR_REVERB_MODE_SURROUND = 0, + CRIATOMEXASR_REVERB_MODE_STEREO, + CRIATOMEXASR_REVERB_MODE_REAR_ONLY, + CRIATOMEXASR_REVERB_MODE_CENTER_ONLY, + CRIATOMEXASR_REVERB_MODE_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomExAsrReverbMode; + +typedef struct CriAtomExAsrReverbParameterTag { + CriFloat32 max_predelay_time_ms; + CriFloat32 max_room_size; + CriAtomExAsrReverbMode mode; + CriFloat32 reverb_time_ms; + CriFloat32 room_size; + CriFloat32 predelay_time_ms; + CriFloat32 cof_low; + CriFloat32 cof_high; +} CriAtomExAsrReverbParameter; + +typedef enum { + CRIATOMEXASR_PITCHSHIFTER_WINDOW_WIDTH_128 = 0, + CRIATOMEXASR_PITCHSHIFTER_WINDOW_WIDTH_256, + CRIATOMEXASR_PITCHSHIFTER_WINDOW_WIDTH_512, + CRIATOMEXASR_PITCHSHIFTER_WINDOW_WIDTH_1024, + CRIATOMEXASR_PITCHSHIFTER_WINDOW_WIDTH_2048, + CRIATOMEXASR_PITCHSHIFTER_WINDOW_WIDTH_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomExAsrPitchShifterWindowWidthType; + +typedef enum { + CRIATOMEXASR_PITCHSHIFTER_OVERLAP_1 = 0, + CRIATOMEXASR_PITCHSHIFTER_OVERLAP_2, + CRIATOMEXASR_PITCHSHIFTER_OVERLAP_4, + CRIATOMEXASR_PITCHSHIFTER_OVERLAP_8, + CRIATOMEXASR_PITCHSHIFTER_OVERLAP_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomExAsrPitchShifterOverlapType; + +typedef struct CriAtomExAsrPitchShifterParameterTag { + CriFloat32 pitch_cent; + CriFloat32 formant_cent; + CriSint32 mode; + CriAtomExAsrPitchShifterWindowWidthType window_width; + CriAtomExAsrPitchShifterOverlapType overlap; +} CriAtomExAsrPitchShifterParameter; + +typedef enum { + CRIATOMEX_EQ_BAND_TYPE_LOWSHELF = 0, + CRIATOMEX_EQ_BAND_TYPE_HIGHSHELF = 1, + CRIATOMEX_EQ_BAND_TYPE_PEAKING = 2, + CRIATOMEX_EQ_BAND_TYPE_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomExAsrEqBandType; + +typedef struct CriAtomExAsr3BandsEqParameterTag { + struct { + CriAtomExAsrEqBandType type; + CriFloat32 frequency; + CriFloat32 q_value; + CriFloat32 gain; + } bands[3]; +} CriAtomExAsr3BandsEqParameter; + +typedef struct CriAtomExAsr32BandsEqParameterTag { + CriSint32 num_used_bands; + struct { + CriAtomExAsrEqBandType type; + CriFloat32 frequency; + CriFloat32 q_value; + CriFloat32 gain; + } bands[32]; +} CriAtomExAsr32BandsEqParameter; + +typedef struct CriAtomExAsrCompressorParameterTag { + CriFloat32 threshold; + CriFloat32 ratio; + CriFloat32 attack_time; + CriFloat32 release_time; + CriFloat32 output_gain; + CriFloat32 surround_link; + CriSint32 side_chain_input_bus_no; +} CriAtomExAsrCompressorParameter; + +typedef enum { + CRIATOMEXASR_SPLIT_EQ_NONE = 0, + CRIATOMEXASR_SPLIT_EQ_LOWPASS = 1, + CRIATOMEXASR_SPLIT_EQ_HIGHPASS = 2, + CRIATOMEXASR_SPLIT_EQ_BANDPASS = 3, + CRIATOMEXASR_SPLIT_EQ_NOTCH = 4, + CRIATOMEXASR_SPLIT_EQ_TYPE_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomExAsrSplitEqType; + +typedef struct CriAtomExAsrCompressorExParameterTag { + CriAtomExAsrCompressorParameter base; + CriAtomExAsrSplitEqType eq_type; + CriFloat32 frequency; + CriFloat32 q_value; +} CriAtomExAsrCompressorExParameter; + +typedef struct CriAtomExAsrChorusParameterTag { + CriFloat32 max_delay_time_ms; + CriFloat32 delay_time_ms; + CriFloat32 rate; + CriFloat32 depth; + CriFloat32 feedback; + CriFloat32 dry_mix; + CriFloat32 wet_mix1; + CriFloat32 wet_mix2; + CriFloat32 wet_mix3; +} CriAtomExAsrChorusParameter; + +typedef struct CriAtomExAsrFlangerParameterTag { + CriFloat32 delay_time_ms; + CriFloat32 rate; + CriFloat32 depth; + CriFloat32 feedback; + CriFloat32 dry_mix; + CriFloat32 wet_mix; +} CriAtomExAsrFlangerParameter; + +typedef struct CriAtomExAsrDistortionParameterTag { + CriFloat32 drive; + CriFloat32 dry_mix; + CriFloat32 wet_mix; + CriFloat32 output_gain; +} CriAtomExAsrDistortionParameter; + +typedef enum { + CRIATOMEX_SURROUNDER_MODE_STRAIGHT = 0, + CRIATOMEX_SURROUNDER_MODE_CROSS = 1, + CRIATOMEX_SURROUNDER_MODE_MATRIX = 2, + CRIATOMEX_SURROUNDER_MODE_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomExAsrSurrounderMode; + +typedef struct CriAtomExAsrSurrounderParameterTag { + CriFloat32 max_delay_time_ms; + CriFloat32 delay_time_ms; + CriFloat32 gain; + CriAtomExAsrSurrounderMode mode; +} CriAtomExAsrSurrounderParameter; + +typedef struct CriAtomExAsrI3DL2ReverbParameterTag { + CriFloat32 room; + CriFloat32 room_hf; + CriFloat32 decay_time; + CriFloat32 decay_hf_ratio; + CriFloat32 reflections; + CriFloat32 reflections_delay; + CriFloat32 reverb; + CriFloat32 reverb_delay; + CriFloat32 diffusion; + CriFloat32 density; + CriFloat32 hf_reference; + CriFloat32 front_input; + CriFloat32 rear_input; + CriFloat32 center_input; + CriFloat32 front_output; + CriFloat32 rear_output; + CriFloat32 center_output; +} CriAtomExAsrI3DL2ReverbParameter; + +typedef struct CriAtomExAsrMultiTapDelayParameterTag { + CriFloat32 max_delay_time_ms; + struct { + CriFloat32 delay_time_ms; + CriFloat32 level; + CriFloat32 pan; + CriFloat32 feedback; + } taps[4]; +} CriAtomExAsrMultiTapDelayParameter; + +typedef enum { + CRIATOMEX_LIMITER_TYPE_PEAK = 0, + CRIATOMEX_LIMITER_TYPE_RMS = 1, + CRIATOMEX_LIMITER_TYPE_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomExAsrLimiterType; + +typedef struct CriAtomExAsrLimiterParameterTag { + CriAtomExAsrLimiterType type; + CriFloat32 threshold; + CriFloat32 attack_time; + CriFloat32 release_time; + CriFloat32 output_gain; + CriFloat32 surround_link; + CriSint32 side_chain_input_bus_no; +} CriAtomExAsrLimiterParameter; + +typedef struct CriAtomExAsrMatrixParameterTag { + CriFloat32 levels[CRIATOMEXASR_MAX_CHANNELS][CRIATOMEXASR_MAX_CHANNELS]; +} CriAtomExAsrMatrixParameter; + +#ifdef __cplusplus +extern "C" { +#endif + +/*EN + * \deprecated + * Deprecated API. + * When you call this, an error callback is returned. + * Consider using ::criAtomExAsr_SetEffectParameter function. + */ +void CRIAPI criAtomExAsr_SetDspParameter( + CriSint32 bus_no, CriAtomExAsrDspId dsp_id, const void* parameter); + +/*EN + * \deprecated + * Deprecated API. + * When you call this, an error callback is returned. + * Consider using ::criAtomExAsr_SetEffectParameter function. + */ +void CRIAPI criAtomExAsr_SetDspParameterByName( + const CriChar8* bus_name, CriAtomExAsrDspId dsp_id, const void* parameter); + +/*EN + * \deprecated + * Deprecated API. + * When you call this, an error callback is returned. + * Consider using ::criAtomExAsr_GetEffectParameter function. + */ +void CRIAPI criAtomExAsr_GetDspParameter( + CriSint32 bus_no, CriAtomExAsrDspId dsp_id, void* parameter_buf, CriSint32 parameter_size); + +/*EN + * \deprecated + * Deprecated API. + * When you call this, an error callback is returned. + * Consider using ::criAtomExAsr_GetEffectParameter function. + */ +void CRIAPI criAtomExAsr_GetDspParameterByName( + const CriChar8* bus_name, CriAtomExAsrDspId dsp_id, void* parameter_buf, CriSint32 parameter_size); + +/*EN + * \deprecated + * Deprecated API. + * When you call this, an error callback is returned. + * Consider using ::criAtomExAsrRack_SetEffectBypass function. + */ +void CRIAPI criAtomExAsr_SetDspBypass( + CriSint32 bus_no, CriAtomExAsrDspId dsp_id, CriBool bypass); + +/*EN + * \deprecated + * Deprecated API. + * When you call this, generate a warning but processing will be done. + * Consider using ::criAtomExAsrRack_SetEffectBypass function. + */ +void CRIAPI criAtomExAsr_SetDspBypassByName( + const CriChar8* bus_name, CriAtomExAsrDspId dsp_id, CriBool bypass); + +/*EN + * \deprecated + * Deprecated API. + * Consider using ::criAtomExAsr_SetBusVolumeByName function. + */ +void CRIAPI criAtomExAsr_SetBusVolume(CriSint32 bus_no, CriFloat32 volume); + +/*EN + * \deprecated + * Deprecated API. + * Consider using ::criAtomExAsr_GetBusVolumeByName function. + */ +void CRIAPI criAtomExAsr_GetBusVolume(CriSint32 bus_no, CriFloat32 *volume); + +/*EN + * \deprecated + * Deprecated API. + * Consider using ::criAtomExAsr_SetBusPan3dByName function. + */ +void CRIAPI criAtomExAsr_SetBusPan3d(CriSint32 bus_no, + CriFloat32 pan3d_angle, CriFloat32 pan3d_distance, CriFloat32 pan3d_volume); + +/*EN + * \deprecated + * Deprecated API. + * Consider using ::criAtomExAsr_GetBusPan3dByName function. + */ +void CRIAPI criAtomExAsr_GetBusPan3d(CriSint32 bus_no, + CriFloat32 *pan3d_angle, CriFloat32 *pan3d_distance, CriFloat32 *pan3d_volume); + +/*EN + * \deprecated + * Deprecated API. + * Consider using ::criAtomExAsr_SetBusMatrixByName function. + */ +void CRIAPI criAtomExAsr_SetBusMatrix(CriSint32 bus_no, + CriSint32 input_channels, CriSint32 output_channels, const CriFloat32 matrix[]); + +/*EN + * \deprecated + * Deprecated API. + * Consider using ::criAtomExAsr_SetBusSendLevelByName function. + */ +void CRIAPI criAtomExAsr_SetBusSendLevel( + CriSint32 bus_no, CriSint32 sendto_no, CriFloat32 level); + +/*EN + * \deprecated + * Deprecated API. + * Consider using ::criAtomExAsr_AttachBusAnalyzerByName function. + */ +void CRIAPI criAtomExAsr_AttachBusAnalyzer( + CriSint32 bus_no, const CriAtomExAsrBusAnalyzerConfig* config); + +/*EN + * \deprecated + * Deprecated API. + * Consider using ::criAtomExAsr_DetachBusAnalyzerByName function. + */ +void CRIAPI criAtomExAsr_DetachBusAnalyzer(CriSint32 bus_no); + +/*EN + * \deprecated + * Deprecated API. + * Consider using ::criAtomExAsr_GetBusAnalyzerInfoByName function. + */ +void CRIAPI criAtomExAsr_GetBusAnalyzerInfo( + CriSint32 bus_no, CriAtomExAsrBusAnalyzerInfo *info); + +/*EN + * \deprecated + * Deprecated API. + * Consider using ::criAtomExAsr_SetBusFilterCallbackByName function. + */ +void CRIAPI criAtomExAsr_SetBusFilterCallback(CriSint32 bus_no, + CriAtomExAsrBusFilterCbFunc pre_func, CriAtomExAsrBusFilterCbFunc post_func, void *obj); + +/*EN + * \deprecated + * Deprecated API. + * When you call this, an error callback is returned. + * Consider using ::criAtomExAsrRack_SetEffectParameter function. + */ +void CRIAPI criAtomExAsrRack_SetDspParameter(CriAtomExAsrRackId rack_id, + CriSint32 bus_no, CriAtomExAsrDspId dsp_id, const void* parameter); + +/*EN + * \deprecated + * Deprecated API. + * When you call this, an error callback is returned. + * Consider using ::criAtomExAsrRack_SetEffectParameter function. + */ +void CRIAPI criAtomExAsrRack_SetDspParameterByName(CriAtomExAsrRackId rack_id, + const CriChar8* bus_name, CriAtomExAsrDspId dsp_id, const void* parameter); + +/*EN + * \deprecated + * Deprecated API. + * When you call this, an error callback is returned. + * Consider using ::criAtomExAsrRack_GetEffectParameter function. + */ +void CRIAPI criAtomExAsrRack_GetDspParameter(CriAtomExAsrRackId rack_id, + CriSint32 bus_no, CriAtomExAsrDspId dsp_id, void* parameter_buf, CriSint32 parameter_size); + +/*EN + * \deprecated + * Deprecated API. + * When you call this, an error callback is returned. + * Consider using ::criAtomExAsrRack_GetEffectParameter function. + */ +void CRIAPI criAtomExAsrRack_GetDspParameterByName(CriAtomExAsrRackId rack_id, + const CriChar8* bus_name, CriAtomExAsrDspId dsp_id, void* parameter_buf, CriSint32 parameter_size); + +/*EN + * \deprecated + * Deprecated API. + * When you call this, an error callback is returned. + * Consider using ::criAtomExAsrRack_SetEffectBypass function. + */ +void CRIAPI criAtomExAsrRack_SetDspBypass(CriAtomExAsrRackId rack_id, + CriSint32 bus_no, CriAtomExAsrDspId dsp_id, CriBool bypass); + +/*EN + * \deprecated + * Deprecated API. + * When you call this, generate a warning but processing will be done. + * Consider using ::criAtomExAsrRack_SetEffectBypass function. + */ +void CRIAPI criAtomExAsrRack_SetDspBypassByName(CriAtomExAsrRackId rack_id, + const CriChar8* bus_name, CriAtomExAsrDspId dsp_id, CriBool bypass); + +/*EN + * \deprecated + * Deprecated API. + * Consider using ::criAtomExAsrRack_SetBusVolumeByName function. + */ +void CRIAPI criAtomExAsrRack_SetBusVolume(CriAtomExAsrRackId rack_id, + CriSint32 bus_no, CriFloat32 volume); + +/*EN + * \deprecated + * Deprecated API. + * Consider using ::criAtomExAsrRack_GetBusVolumeByName function. + */ +void CRIAPI criAtomExAsrRack_GetBusVolume(CriAtomExAsrRackId rack_id, + CriSint32 bus_no, CriFloat32* volume); + +/*EN + * \deprecated + * Deprecated API. + * Consider using ::criAtomExAsrRack_SetBusPan3dByName function. + */ +void CRIAPI criAtomExAsrRack_SetBusPan3d(CriAtomExAsrRackId rack_id, CriSint32 bus_no, + CriFloat32 pan3d_angle, CriFloat32 pan3d_distance, CriFloat32 pan3d_volume); + +/*EN + * \deprecated + * Deprecated API. + * Consider using ::criAtomExAsrRack_GetBusPan3dByName function. + */ +void CRIAPI criAtomExAsrRack_GetBusPan3d(CriAtomExAsrRackId rack_id, CriSint32 bus_no, + CriFloat32 *pan3d_angle, CriFloat32 *pan3d_distance, CriFloat32 *pan3d_volume); + +/*EN + * \deprecated + * Deprecated API. + * Consider using ::criAtomExAsrRack_SetBusMatrixByName function. + */ +void CRIAPI criAtomExAsrRack_SetBusMatrix( + CriAtomExAsrRackId rack_id, CriSint32 bus_no, CriSint32 input_channels, + CriSint32 output_channels, const CriFloat32 matrix[]); + +/*EN + * \deprecated + * Deprecated API. + * Consider using ::criAtomExAsrRack_SetBusSendLevelByName function. + */ +void CRIAPI criAtomExAsrRack_SetBusSendLevel(CriAtomExAsrRackId rack_id, + CriSint32 bus_no, CriSint32 sendto_no, CriFloat32 level); + +/*EN + * \deprecated + * Deprecated API. + * Consider using ::criAtomExAsrRack_AttachBusAnalyzerByName function. + */ +void CRIAPI criAtomExAsrRack_AttachBusAnalyzer(CriAtomExAsrRackId rack_id, + CriSint32 bus_no, const CriAtomExAsrBusAnalyzerConfig* config); + +/*EN + * \deprecated + * Deprecated API. + * Consider using ::criAtomExAsrRack_DetachBusAnalyzerByName function. + */ +void CRIAPI criAtomExAsrRack_DetachBusAnalyzer( + CriAtomExAsrRackId rack_id, CriSint32 bus_no); + +/*EN + * \deprecated + * Deprecated API. + * Consider using ::criAtomExAsrRack_GetBusAnalyzerInfoByName function. + */ +void CRIAPI criAtomExAsrRack_GetBusAnalyzerInfo(CriAtomExAsrRackId rack_id, + CriSint32 bus_no, CriAtomExAsrBusAnalyzerInfo *info); + +/*EN + * \deprecated + * Deprecated API. + * Consider using ::criAtomExAsrRack_SetBusFilterCallbackByName function. + */ +void CRIAPI criAtomExAsrRack_SetBusFilterCallback(CriAtomExAsrRackId rack_id, + CriSint32 bus_no, CriAtomExAsrBusFilterCbFunc pre_func, + CriAtomExAsrBusFilterCbFunc post_func, void *obj); + +#ifdef __cplusplus +} +#endif + +#endif /* CRI_ATOM_ASR_H_INCLUDED */ + +/* --- end of file --- */ diff --git a/3rdParty/cri2019/pc/include/cri_atom_ex.h b/3rdParty/cri2019/pc/include/cri_atom_ex.h new file mode 100644 index 00000000..46b4f37b --- /dev/null +++ b/3rdParty/cri2019/pc/include/cri_atom_ex.h @@ -0,0 +1,16132 @@ +/**************************************************************************** + * + * CRI Middleware SDK + * + * Copyright (c) 2010-2017 CRI Middleware Co., Ltd. + * + * Library : CRI Atom + * Module : AtomEx. + * File : cri_atom_ex.h + * + ****************************************************************************/ +/*! + * \file cri_atom_ex.h + */ + +/* Prevent redefinitions */ +#ifndef CRI_INCL_CRI_ATOM_EX_H +#define CRI_INCL_CRI_ATOM_EX_H + +/*************************************************************************** + * Include Files + ***************************************************************************/ +#include +#include +#include + +/*************************************************************************** + * Macro Constants + ***************************************************************************/ +/* Version Number */ +#define CRIATOMEX_VERSION (0x02142800) +#define CRIATOMEX_VER_NUM "2.14.28" +#define CRIATOMEX_VER_NAME "CRI AtomEx" +#define CRIATOMEX_VER_OPTION + +/*========================================================================== + * CRI AtomEx ACF API + *=========================================================================*/ +/*EN + * \brief Invalid value for AISAC control IDs + * \ingroup ATOMEXLIB_ACF + * \par Description: + * Invalid value for AISAC control IDs.
+ * \sa CriAtomExAisacControlId, criAtomExPlayer_SetAisacControlById, criAtomExAcf_GetAisacControlIdByName, criAtomExAcf_GetAisacControlNameById + */ +#define CRIATOMEX_INVALID_AISAC_CONTROL_ID (0xffff) + +/*EN + * \brief Maximum number of DSP buses + * \ingroup ATOMEXLIB_ACF + * \par Description: + * Maximum number of buses that can be set for a DSP bus setting.
+ * \sa CriAtomExAcfDspSettingInfo, CriAtomExAcfDspBusInfo + */ +#define CRIATOMEXACF_MAX_BUSES (64) + +/*EN + * \brief Maximum number of DSP effects + * \ingroup ATOMEXLIB_ACF + * \par Description: + * Maximum number of effects that can be set for a DSP bus setting.
+ * \sa CriAtomExAcfDspBusInfo + */ +#define CRIATOMEXACF_MAX_FXES (8) + +/*EN + * \brief Invalid value for Cue limits + * \ingroup ATOMEXLIB_ACF + * \par Description: + * Invalid value for the number of Cue limits.
+ * \sa CriAtomExCategoryInfo + */ +#define CRIATOMEXACF_INVALID_CUE_LIMITS (0xffffffff) + +/*EN + * \brief Maximum number of characters for name strings + * \ingroup ATOMEXLIB_ACF + * \par Description: + * The maximum number of characters allowed for name strings (e.g. for Cue names or global AISAC names).
+ * \par Remarks: + * The tool limits text entry to a maximun number of characters (instead of a maximum number of bytes). + * Since full-width characters are handled in Shift_JIS encoding, the maximum number of bytes + * if full-width characters are used is 128. + */ +#define CRIATOMEXACF_MAX_NAME_STRING_COUNT (64) + +/*========================================================================== + * CRI AtomEx Voice Pool API + *=========================================================================*/ +/*EN + * \brief Default number of voices + * \ingroup ATOMEXLIB_VOICE_POOL + * \par Description: + * Default value for the number of voices in a Voice Pool.
+ * When a Voice Pool is created using the default settings, + * as many voices as specified by ::CRIATOMEX_DEFAULT_VOICES_PER_POOL are reserved.
+ * \sa criAtomExVoicePool_SetDefaultConfigForStandardVoicePool + */ +#define CRIATOMEX_DEFAULT_VOICES_PER_POOL (8) + +/*========================================================================== + * CRI AtomEx Player API + *=========================================================================*/ +/*EN + * \brief No group limitation + * \ingroup ATOMEXLIB_PLAYER + * \par Description: + * This constant is used to cancel any limitation by a Voice Limit Group.
+ * When this value is passed to the ::criAtomExPlayer_SetGroupNumber function, + * the specified player will not be restricted by the Voice Limit Group.
+ * (Whenever there is an empty voice or a voice with a lower priority, + * the player will acquire the voice regardless of the Voice Limit Group.) + * \sa criAtomExPlayer_SetGroupNumber + */ +#define CRIATOMEXPLAYER_NO_GROUP_LIMITATION (-1) + +/*EN + * \brief Constants used to cancel a fixed number of repetitions for the loops + * \ingroup ATOMEXLIB_PLAYER + * \par Description: + */ +#define CRIATOMEXPLAYER_NO_LOOP_LIMITATION (CRIATOMPLAYER_NO_LOOP_LIMITATION) /*EN< No limit of loop count */ +#define CRIATOMEXPLAYER_IGNORE_LOOP (CRIATOMPLAYER_IGNORE_LOOP) /*EN< Ignores loop info */ +#define CRIATOMEXPLAYER_FORCE_LOOP (CRIATOMPLAYER_FORCE_LOOP) /*EN< Forced loop playback */ + +/*EN + * \brief Maximum number of ASR racks that can be specified for the player + * \ingroup ATOMEXLIB_PLAYER + * \par Description: + * The maximum number of ASR racks that can be specified for one player. + * \sa criAtomExPlayer_SetAsrRackIdArray + */ +#define CRIATOMEXPLAYER_MAX_ASR_RACKS (8) + +/*========================================================================== + * CRI AtomEx Playback API + *=========================================================================*/ +/*EN + * \brief Invalid playback ID + * \ingroup ATOMEXLIB_PLAYBACK + * \par Description: + * Invalid playback ID that is returned when the ::criAtomExPlayer_Start function + * is called to start playback but voices could not be allocated + * (for example due to voice limit control).
+ * \par Remarks: + * Passing this ID to a function that requires a playback ID + * will not trigger an error callback.
+ * (The function will simply return without doing anything.)
+ * Therefore, regardless of the result of the ::criAtomExPlayer_Start function, + * functions that require a playback ID can still be called at any time without a problem.
+ * \sa CriAtomExPlaybackId, criAtomExPlayer_Start + */ +#define CRIATOMEX_INVALID_PLAYBACK_ID (0xFFFFFFFF) + +/*EN + * \brief Invalid Block Index + * \ingroup ATOMEXLIB_PLAYBACK + * \par Description: + * It is possible to get the index of the block being currently played by calling the + * ::criAtomExPlayback_GetCurrentBlockIndex function. However, if the sound being played + * is not a block sequence, this invalid block index is returned.
+ * \sa criAtomExPlayback_GetCurrentBlockIndex + */ +#define CRIATOMEX_INVALID_BLOCK_INDEX (0xFFFFFFFF) + +/*========================================================================== + * CRI AtomEx Fader API + *=========================================================================*/ +/*EN + * \brief Value used to disable the fade-out process + * \ingroup ATOMEXLIB_FADER + * \par Description: + * Value used to disable the fade-out process of a fader.
+ * By passing this value as the second argument of the ::criAtomExPlayer_SetFadeOutTime function, + * the fade-out process of a fader can be disabled.
+ * \sa criAtomExPlayer_SetFadeOutTime + */ +#define CRIATOMEX_IGNORE_FADE_OUT (-1) + +/*========================================================================== + * CRI AtomEx D-BAS API + *=========================================================================*/ +/*EN + * \brief AtomEx D-BAS illegal ID + * \ingroup ATOMEXLIB_DBAS000 + * \par Description: + * Value returned when the ::criAtomExDbas_Create function fails.
+ * \sa criAtomExDbas_Create, criAtomExDbas_Destroy + */ +#define CRIATOMEXDBAS_ILLEGAL_ID (CRIATOMDBAS_ILLEGAL_ID) + + +/* ========================================================================*/ +/* CRI AtomEx Streaming Cache API */ +/* ========================================================================*/ +/*EN + * \brief Invalid streaming cache ID value + * \ingroup ATOMEXLIB_STREAMING_CACHE + * \par Description: + * Value returned when the ::criAtomExStreamingCache_Create function fails.
+ * \sa criAtomExStreamingCache_Create, criAtomExStreamingCache_Destroy + */ +#define CRIATOMEX_STREAMING_CACHE_ILLEGAL_ID (CRIATOM_STREAMING_CACHE_ILLEGAL_ID) + +/*************************************************************************** + * Macro Functions + ***************************************************************************/ +/*========================================================================== + * CRI AtomEx API + *=========================================================================*/ +/*EN + * \brief Register a custom memory allocator + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] p_malloc_func memory allocation function + * \param[in] p_free_func memory deallocation function + * \param[in] p_obj user-specified object + * \par Description: + * Registers a memory allocator (memory allocation/deallocation functions) with the CRI Atom library.
+ * Once this macro has registered an allocator, whenever the Atom library needs a work buffer, + * the user memory allocation/deallocation processes are called.
+ * Therefore, there is no need to pass a work buffer to each function (such as ::criAtomExPlayer_Create) + * that requires memory.
+ * (If a NULL pointer is passed for the work buffer and 0 bytes for its size, + * the library still works without any problem due to the memory allocation provided by the custome llocator.)
+ * \par Note: + * By setting the pointers to the memory allocation/deallocation functions to NULL, + * the registration of the allocator is canceled.
+ * However, if the registration is canceled and a memory buffer was not deallocated, + * an error callback is triggered and the cancellation will fail.
+ * (The registered allocator will still be called.)
+ *
+ * This macro internally calls the ::criAtom_SetUserAllocator macro, as well as + * ::criAtom_SetUserMallocFunction and ::criAtom_SetUserFreeFunction + * functions.
+ * Therefore, do not call these functions if you are using criAtomEx_SetUserAllocator.
+ * (Calling this macro overwrites the settings of the functions listed above.)
+ *
+ * Also, the registered memory allocator may be called from different threads in multithreading mode. + * Therefore, if a memory allocation process is not thread-safe, it should implement its own exclusive access control.
+ */ +#define criAtomEx_SetUserAllocator(p_malloc_func, p_free_func, p_obj) \ + criAtom_SetUserAllocator((p_malloc_func), (p_free_func), (p_obj)) + +/*EN + * \brief Assign the default values to the configuration structure used for the library's initialization. + * \ingroup ATOMEXLIB_GLOBAL + * \param[out] p_config pointer to the configuration structure used for the library's initialization. + * \par Description: + * Assigns the default values to the configuration structure ( ::CriAtomExConfig ) that is passed to the ::criAtomEx_Initialize + * function.
+ * \sa + * CriAtomExConfig + */ +#define criAtomEx_SetDefaultConfig(p_config) \ +{\ + (p_config)->thread_model = CRIATOMEX_THREAD_MODEL_MULTI;\ + (p_config)->server_frequency = 60.0f;\ + (p_config)->parameter_update_interval = 1;\ + (p_config)->enable_atom_sound_disabled_mode = CRI_FALSE;\ + (p_config)->max_virtual_voices = 16;\ + (p_config)->max_parameter_blocks = 1024;\ + (p_config)->max_voice_limit_groups = 16;\ + (p_config)->max_categories = 16;\ + (p_config)->max_aisacs = 8;\ + (p_config)->categories_per_playback = 4;\ + (p_config)->max_sequences = (p_config)->max_virtual_voices;\ + (p_config)->max_tracks = (p_config)->max_virtual_voices * 2;\ + (p_config)->max_track_items = (p_config)->max_virtual_voices * 2;\ + (p_config)->max_aisac_auto_modulations = 0;\ + (p_config)->max_pitch = 2400.0f;\ + (p_config)->max_faders = 4;\ + (p_config)->coordinate_system = CRIATOMEX_COORDINATE_SYSTEM_LEFT_HANDED;\ + (p_config)->rng_if = NULL;\ + (p_config)->fs_config = NULL;\ + (p_config)->acf_info = NULL;\ + (p_config)->context = NULL;\ + (p_config)->version = CRI_ATOM_VERSION;\ + (p_config)->version_ex = CRIATOMEX_VERSION;\ +} + +/*EN + * \brief Add the performance monitor + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * Adds the performance monitoring function and starts the performance measuring process.
+ * After executing this function, you can get information about the performance of the library + * (such as the load and the execution time of the server process) + * by calling the ::criAtomEx_GetPerformanceInfo function. + * \sa criAtomEx_GetPerformanceInfo, criAtomEx_DetachPerformanceMonitor + * \par Example: + * \code + * // Structure to get the performance information + * CriAtomExPerformanceInfo info; + * + * // Initialize the library + * criAtomEx_Initialize(...); + * + * // Add the performance monitoring function + * criAtomEx_AttachPerformanceMonitor(); + * + * // Reset the performance monitoring + * criAtomEx_ResetPerformanceMonitor(); + * + * // Performance measurement interval + * : + * + * // Ge the performance information + * criAtomEx_GetPerformanceInfo(&info); + * + * // Display the measurements + * printf( + * "Max CPU Load : %d (us)\n" \ + * "Average CPU Load : %d (us)\n" \ + * "Max Server Interval : %d (us)\n" \ + * "Average Server Interval : %d (us)\n", + * info.max_server_time, info.average_server_time, + * info.max_server_interval, info.average_server_interval + * ); + * \endcode + */ +#define criAtomEx_AttachPerformanceMonitor() criAtom_AttachPerformanceMonitor() + +/*EN + * \brief Remove the performance monitor + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * Stops the performance measuring process and removes the performance monitoring function. + * \attention + * This is a blocking function.
+ * Executing this function blocks the server processing of the Atom library for a while.
+ * If this function is executed during audio playback, problems such as the audio breaking up may occur. + * Call this function only when a fluctuation in load is acceptable, for example when loading a new game level. + */ +#define criAtomEx_DetachPerformanceMonitor() criAtom_DetachPerformanceMonitor() + +/*EN + * \brief Reset the performance monitor + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * Discards all the previous measurements.
+ * The performance monitor starts acquiring performance information immediately after the ::criAtomEx_AttachPerformanceMonitor function + * is called and then accumulates the measurement results (for example when calculating averages).
+ * If you do not want to mix the previous measurements with the new ones, + * call this function to discard them. + */ +#define criAtomEx_ResetPerformanceMonitor() criAtom_ResetPerformanceMonitor() + +/*EN + * \brief Get the performance information + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * Acquires the performance information.
+ * This function is only available after calling ::criAtomEx_AttachPerformanceMonitor, + * and until the ::criAtomEx_DetachPerformanceMonitor function is called.
+ * \sa criAtomEx_AttachPerformanceMonitor, criAtomEx_DetachPerformanceMonitor + */ +#define criAtomEx_GetPerformanceInfo(p_info) criAtom_GetPerformanceInfo(p_info) + +/*EN + * \brief Specify the channel mapping pattern + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] nch number of channels for which the mapping pattern is changed + * \param[in] type mapping pattern + * \par Description: + * Changes the mapping of the individual channels to the output speakers.
+ * For example, when a 5-channel audio data is played back, by default, the channels are + * output in the following order: L, R, C, Ls, and Rs.
+ * In this case, calling ::criAtomEx_SetChannelMapping(5, 1); will + * change the output order to L, R, LFE, Ls, and Rs.
+ * \par Remarks: + * This function currently allows mapping pattern changes on 5-channel audio data only.
+ */ +#define criAtomEx_SetChannelMapping(nch, type) \ + criAtom_SetChannelMapping((nch), (type)) + +/*EN + * \brief Calculate the bit rate of ADX data + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] num_channels number of channels in the data + * \param[in] sampling_rate sampling rate of the data + * \return CriSint32 bit rate [bps] + * \par Description: + * Calculates the bit rate of the audio data encoded with the ADX codec, based on its number of channels and its sample rate.
+ * If the function fails to calculate the bit rate, it returns -1.
+ * To know the reason of the failure, refer to the error callback message.
+ */ +#define criAtomEx_CalculateAdxBitrate(num_channels, sampling_rate) \ + criAtom_CalculateAdxBitrate(num_channels, sampling_rate) + +/*EN + * \brief Calculate the bit rate of HCA data + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] num_channels number of channels in the data + * \param[in] sampling_rate sampling rate of the data + * \param[in] quality encoding quality of the data + * \return CriSint32 bit rate [bps] + * \par Description: + * Calculates the bit rate of the audio data encoded with the HCA codec, based on its number of channels, + * its sample rate and the encoding quality.
+ * If the function fails to calculate the bit rate, it returns -1.
+ * To know the reason of the failure, refer to the error callback message.
+ * \par Remarks: + * For the quality parameter, specify the encoding quality set in CRI Atom Craft or CRI Atom Encoder. + */ +#define criAtomEx_CalculateHcaBitrate(num_channels, sampling_rate, quality) \ + criAtom_CalculateHcaBitrate(num_channels, sampling_rate, quality) + +/*EN + * \brief Calculate the bit rate of HCA-MX data + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] num_channels number of channels in the data + * \param[in] sampling_rate sampling rate of the data + * \param[in] quality encoding quality of the data + * \return CriSint32 bit rate [bps] + * \par Description: + * Calculates the bit rate of the audio data encoded with the HCA-MX codec, based on its number of channels, + * its sample rate and the encoding quality.
+ * If the function fails to calculate the bit rate, it returns -1.
+ * To know the reason of the failure, refer to the error callback message.
+ * \par Remarks: + * For the quality parameter, specify the encoding quality set in CRI Atom Craft or CRI Atom Encoder. + */ +#define criAtomEx_CalculateHcaMxBitrate(num_channels, sampling_rate, quality) \ + criAtom_CalculateHcaMxBitrate(num_channels, sampling_rate, quality) + +/*EN + * \brief Calculate the bit rate of Wave data + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] num_channels number of channels of the data + * \param[in] sampling_rate sampling rate of the data + * \param[in] num_bits number of bits per sample + * \return CriSint32 bit [bps] + * \par Description: + * Calculates the bit rate of Wave data, based on its number of channels, sample rate and bit depth.
+ * If the function fails to calculate the bit rate, it returns -1.
+ * To know the reason of the failure, refer to the error callback message.
+ */ +#define criAtomEx_CalculateWaveBitrate(num_channels, sampling_rate, num_bits) \ + criAtom_CalculateWaveBitrate(num_channels, sampling_rate, num_bits) + +/*EN + * \brief Calculate the bit rate of AIFF data + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] num_channels number of channels of the data + * \param[in] sampling_rate sampling rate of the data + * \param[in] num_bits number of bits per sample + * \return CriSint32 bit [bps] + * \par Description: + * Calculates the bit rate of AIFF data, based on its number of channels, sample rate and bit depth.
+ * If the function fails to calculate the bit rate, it returns -1.
+ * To know the reason of the failure, refer to the error callback message.
+ */ +#define criAtomEx_CalculateAiffBitrate(num_channels, sampling_rate, num_bits) \ + criAtom_CalculateAiffBitrate(num_channels, sampling_rate, num_bits) + +/*========================================================================== + * CRI AtomEx HCA-MX API + *=========================================================================*/ +/*EN + * \brief Assign the default values to the configuration structure used to initialize HCA-MX + * \ingroup ATOMEXLIB_HCA_MX + * \param[out] p_config pointer to the configuration structure used for the HCA-MX initialization + * \par Description: + * Assigns the default values to the configuration structure ( ::CriAtomExHcaMxConfig ) + * that is passed to the ::criAtomExHcaMx_Initialize function.
+ * \sa criAtomExHcaMx_Initialize, CriAtomExHcaMxConfig + */ +#define criAtomExHcaMx_SetDefaultConfig(p_config) \ +{\ + (p_config)->server_frequency = 60.0f;\ + (p_config)->num_mixers = 1;\ + (p_config)->max_voices = 16;\ + (p_config)->max_input_channels = CRIATOM_DEFAULT_INPUT_MAX_CHANNELS;\ + (p_config)->max_sampling_rate = CRIATOM_DEFAULT_OUTPUT_SAMPLING_RATE;\ + (p_config)->output_channels = CRIATOM_DEFAULT_OUTPUT_CHANNELS;\ + (p_config)->output_sampling_rate = CRIATOM_DEFAULT_OUTPUT_SAMPLING_RATE;\ + (p_config)->sound_renderer_type = CRIATOM_SOUND_RENDERER_DEFAULT;\ +} + +/*========================================================================== + * CRI AtomEx Voice Pool API + *=========================================================================*/ +/*EN + * \brief Assign the default values to the configuration structure used to create a standard Voice Pool + * \ingroup ATOMEXLIB_VOICE_POOL + * \param[out] p_config pointer to the configuration structure used for the creation of a standard Voice Pool + * \par Description: + * Assigns the default values to the configuration structure ( ::CriAtomExStandardVoicePoolConfig ) + * that is passed to the ::criAtomExVoicePool_AllocateStandardVoicePool function.
+ * \sa CriAtomExStandardVoicePoolConfig, criAtomExVoicePool_AllocateStandardVoicePool + */ +#define criAtomExVoicePool_SetDefaultConfigForStandardVoicePool(p_config) \ +{\ + (p_config)->identifier = 0;\ + (p_config)->num_voices = CRIATOMEX_DEFAULT_VOICES_PER_POOL;\ + (p_config)->player_config.max_channels = CRIATOM_DEFAULT_INPUT_MAX_CHANNELS;\ + (p_config)->player_config.max_sampling_rate = CRIATOM_DEFAULT_INPUT_MAX_SAMPLING_RATE;\ + (p_config)->player_config.streaming_flag = CRI_FALSE;\ + (p_config)->player_config.sound_renderer_type = CRIATOM_SOUND_RENDERER_DEFAULT;\ + (p_config)->player_config.decode_latency = CRIATOM_DEFAULT_DECODE_LATENCY;\ +} + +/*EN + * \brief Assign the default values to the configuration structure used to create an ADX Voice Pool + * \ingroup ATOMEXLIB_VOICE_POOL + * \param[out] p_config pointer to the configuration structure used for the creation of an ADX Voice Pool + * \par Description: + * Assigns the default values to the configuration structure ( ::CriAtomExAdxVoicePoolConfig ) + * that is passed to the ::criAtomExVoicePool_AllocateAdxVoicePool function.
+ * \sa CriAtomExAdxVoicePoolConfig, criAtomExVoicePool_AllocateAdxVoicePool + */ +#define criAtomExVoicePool_SetDefaultConfigForAdxVoicePool(p_config) \ +{\ + (p_config)->identifier = 0;\ + (p_config)->num_voices = CRIATOMEX_DEFAULT_VOICES_PER_POOL;\ + (p_config)->player_config.max_channels = CRIATOM_DEFAULT_INPUT_MAX_CHANNELS;\ + (p_config)->player_config.max_sampling_rate = CRIATOM_DEFAULT_INPUT_MAX_SAMPLING_RATE;\ + (p_config)->player_config.streaming_flag = CRI_FALSE;\ + (p_config)->player_config.sound_renderer_type = CRIATOM_SOUND_RENDERER_DEFAULT;\ + (p_config)->player_config.decode_latency = CRIATOM_DEFAULT_DECODE_LATENCY;\ +} + +/*EN + * \brief Assign the default values to the configuration structure used to create an HCA Voice Pool + * \ingroup ATOMEXLIB_VOICE_POOL + * \param[out] p_config pointer to the configuration structure used for the creation of an HCA Voice Pool + * \par Description: + * Assigns the default values to the configuration structure ( ::CriAtomExHcaVoicePoolConfig ) + * that is passed to the ::criAtomExVoicePool_AllocateHcaVoicePool function.
+ * \sa CriAtomExHcaVoicePoolConfig, criAtomExVoicePool_AllocateHcaVoicePool + */ +#define criAtomExVoicePool_SetDefaultConfigForHcaVoicePool(p_config) \ +{\ + (p_config)->identifier = 0;\ + (p_config)->num_voices = CRIATOMEX_DEFAULT_VOICES_PER_POOL;\ + (p_config)->player_config.max_channels = CRIATOM_DEFAULT_INPUT_MAX_CHANNELS;\ + (p_config)->player_config.max_sampling_rate = CRIATOM_DEFAULT_INPUT_MAX_SAMPLING_RATE;\ + (p_config)->player_config.streaming_flag = CRI_FALSE;\ + (p_config)->player_config.sound_renderer_type = CRIATOM_SOUND_RENDERER_DEFAULT;\ + (p_config)->player_config.decode_latency = CRIATOM_DEFAULT_DECODE_LATENCY;\ +} + +/*EN + * \brief Assign the default values to the configuration structure used to create a HCA-MX Voice Pool + * \ingroup ATOMEXLIB_VOICE_POOL + * \param[out] p_config pointer to the configuration structure used for the creation of a HCA-MX Voice Pool + * \par Description: + * Assigns the default values to the configuration structure ( ::CriAtomExHcaMxVoicePoolConfig ) + * that is passed to the ::criAtomExVoicePool_AllocateHcaMxVoicePool function.
+ * \sa CriAtomExHcaMxVoicePoolConfig, criAtomExVoicePool_AllocateHcaMxVoicePool + */ +#define criAtomExVoicePool_SetDefaultConfigForHcaMxVoicePool(p_config) \ +{\ + (p_config)->identifier = 0;\ + (p_config)->num_voices = CRIATOMEX_DEFAULT_VOICES_PER_POOL;\ + (p_config)->player_config.max_channels = CRIATOM_DEFAULT_INPUT_MAX_CHANNELS;\ + (p_config)->player_config.max_sampling_rate = CRIATOM_DEFAULT_INPUT_MAX_SAMPLING_RATE;\ + (p_config)->player_config.streaming_flag = CRI_FALSE;\ +} + +/*EN + * \brief Assign the default values to the configuration structure used to create a Wave Voice Pool + * \ingroup ATOMEXLIB_VOICE_POOL + * \param[out] p_config pointer to the configuration structure used for the creation of a Wave Voice Pool + * \par Description: + * Assigns the default values to the configuration structure ( ::CriAtomExWaveVoicePoolConfig ) + * that is passed to the ::criAtomExVoicePool_AllocateWaveVoicePool function.
+ * \sa CriAtomExWaveVoicePoolConfig, criAtomExVoicePool_AllocateWaveVoicePool + */ +#define criAtomExVoicePool_SetDefaultConfigForWaveVoicePool(p_config) \ +{\ + (p_config)->identifier = 0;\ + (p_config)->num_voices = CRIATOMEX_DEFAULT_VOICES_PER_POOL;\ + (p_config)->player_config.max_channels = CRIATOM_DEFAULT_INPUT_MAX_CHANNELS;\ + (p_config)->player_config.max_sampling_rate = CRIATOM_DEFAULT_INPUT_MAX_SAMPLING_RATE;\ + (p_config)->player_config.streaming_flag = CRI_FALSE;\ + (p_config)->player_config.sound_renderer_type = CRIATOM_SOUND_RENDERER_DEFAULT;\ + (p_config)->player_config.decode_latency = CRIATOM_DEFAULT_DECODE_LATENCY;\ +} + +/*EN + * \brief Assign the default values to the configuration structure used to create an AIFF Voice Pool + * \ingroup ATOMEXLIB_VOICE_POOL + * \param[out] p_config pointer to the configuration structure used for the creation of an AIFF Voice Pool + * \par Description: + * Assigns the default values to the configuration structure ( ::CriAtomExAiffVoicePoolConfig ) + * that is passed to the ::criAtomExVoicePool_AllocateAiffVoicePool function.
+ * \sa CriAtomExAiffVoicePoolConfig, criAtomExVoicePool_AllocateAiffVoicePool + */ +#define criAtomExVoicePool_SetDefaultConfigForAiffVoicePool(p_config) \ +{\ + (p_config)->identifier = 0;\ + (p_config)->num_voices = CRIATOMEX_DEFAULT_VOICES_PER_POOL;\ + (p_config)->player_config.max_channels = CRIATOM_DEFAULT_INPUT_MAX_CHANNELS;\ + (p_config)->player_config.max_sampling_rate = CRIATOM_DEFAULT_INPUT_MAX_SAMPLING_RATE;\ + (p_config)->player_config.streaming_flag = CRI_FALSE;\ + (p_config)->player_config.sound_renderer_type = CRIATOM_SOUND_RENDERER_DEFAULT;\ + (p_config)->player_config.decode_latency = CRIATOM_DEFAULT_DECODE_LATENCY;\ +} + +/*EN + * \brief Assign the default values to the configuration structure used to create a raw PCM Voice Pool + * \ingroup ATOMEXLIB_VOICE_POOL + * \param[out] p_config pointer to the configuration structure used for the creation of a raw PCM Voice Pool + * \par Description: + * Assigns the default values to the configuration structure ( ::CriAtomExRawPcmVoicePoolConfig ) + * that is passed to the ::criAtomExVoicePool_AllocateRawPcmVoicePool function.
+ * \sa CriAtomExRawPcmVoicePoolConfig, criAtomExVoicePool_AllocateRawPcmVoicePool + */ +#define criAtomExVoicePool_SetDefaultConfigForRawPcmVoicePool(p_config) \ +{\ + (p_config)->identifier = 0;\ + (p_config)->num_voices = CRIATOMEX_DEFAULT_VOICES_PER_POOL;\ + criAtomPlayer_SetDefaultConfigForRawPcmPlayer(&(p_config)->player_config);\ +} + +/*========================================================================== + * CRI AtomEx Player API + *=========================================================================*/ +/*EN + * \brief Assign the default values to the configuration structure used to create an AtomeEx Player + * \ingroup ATOMEXLIB_PLAYER + * \param[out] p_config pointer to the configuration structure used for the creation of an AtomEx Player + * \par Description: + * Assigns the default values to the configuration structure ( ::CriAtomExPlayerConfig ) + * that is passed to the ::criAtomExPlayer_Create function.
+ * \sa CriAtomExPlayerConfig, criAtomExPlayer_Create + */ +#define criAtomExPlayer_SetDefaultConfig(p_config) \ +{\ + (p_config)->voice_allocation_method = CRIATOMEX_ALLOCATE_VOICE_ONCE;\ + (p_config)->max_path_strings = 1;\ + (p_config)->max_path = 0;\ + (p_config)->updates_time = CRI_TRUE;\ + (p_config)->enable_audio_synced_timer = CRI_FALSE;\ + (p_config)->max_aisacs = 8;\ +} + +/*========================================================================== + * CRI AtomEx Fader API + *=========================================================================*/ +/*EN + * \brief Assign the default values to the configuration structure used to attach a Fader + * \ingroup ATOMEXLIB_FADER + * \param[out] p_config pointer to the configuration structure used to attach a Fader + * \par Description: + * Assigns the default values to the configuration structure ( ::CriAtomExFaderConfig ) + * that is passed to the ::criAtomExPlayer_AttachFader function.
+ * \sa CriAtomExFaderConfig, criAtomExPlayer_AttachFader + */ +#define criAtomExFader_SetDefaultConfig(p_config) \ +{\ + (p_config)->reserved = 0;\ +} + +/*========================================================================== + * CRI AtomEx D-BAS API + *=========================================================================*/ +/*EN + * \brief Assign the default values to the configuration structure used to create a D-BAS + * \ingroup ATOMEXLIB_DBAS + * \param[out] p_config pointer to the configuration structure used to create a D-BAS + * \par Description: + * Assigns the default values to the configuration structure ( ::CriAtomExDbasConfig ) + * that is passed to the ::criAtomExDbas_Create function.
+ * \sa CriAtomExDbasConfig, criAtomExDbas_Create, criAtomExDbas_CalculateWorkSize + */ +#define criAtomExDbas_SetDefaultConfig(p_config) \ + criAtomDbas_SetDefaultConfig(p_config) + +/*EN + * \brief Calculate the size of the work buffer required to create a D-BAS + * \ingroup ATOMEXLIB_DBAS + * \param[in] config pointer to the configuration structure used to create a D-BAS + * \return CriSint32 size of the work buffer required to create a D-BAS + * \retval >= 0 successfully completed + * \retval -1 error occurred + * \par Description: + * Calculates the size of the work buffer required to create a D-BAS based on the D-BAS configuration parameters.
+ *
+ * If the function fails to calculate the size of the work buffer, it returns -1.
+ * To know the reason of the failure, refer to the error callback message.
+ * \attention + * The size of the work buffer depends on the parameters specified when initializing the library (i.e. when executing the ::criAtomEx_Initialize + * function).
+ * Therefore, the library must be initialized before calling this function.
+ * \sa criAtomExDbas_Create, criAtomEx_Initialize + */ +#define criAtomExDbas_CalculateWorkSize(config) \ + criAtomDbas_CalculateWorkSize(config) + +/*EN + * \brief Create a D-BAS + * \ingroup ATOMEXLIB_DBAS + * \param[in] config pointer to the configuration structure used to create the D-BAS + * \param[in] work pointer to the work buffer + * \param[in] work_size size of the work buffer + * \return CriAtomDbasId D-BAS management ID + * \par Description: + * Creates a D-BAS based on the D-BAS configuration parameters.
+ * When the function creates a D-BAS successfully, it registers the D-BAS with the library and returns a valid D-BAS management ID.
+ * When it fails, it returns ::CRIATOMEXDBAS_ILLEGAL_ID .
+ * (The reason for the error is passed to the error callback function.)
+ *
+ * The ID obtained will be used when calling the ::criAtomExDbas_Destroy function.
+ * \attention + * The library must be initialized before this function is called.
+ * \sa criAtomExDbas_CalculateWorkSize, criAtomExDbas_Destroy + */ +#define criAtomExDbas_Create(config, work, work_size) \ + criAtomDbas_Create((config), (work), (work_size)) + +/*EN + * \brief Destroy a D-BAS + * \ingroup ATOMEXLIB_DBAS + * \param[in] atom_dbas_id D-BAS management ID + * \par Description: + * Destroys the D-BAS specified by the management ID (returned from the ::criAtomExDbas_Create function).
+ * \sa criAtomExDbas_Create + */ +#define criAtomExDbas_Destroy(atom_dbas_id) \ + criAtomDbas_Destroy(atom_dbas_id); + +/*EN + * \brief Get the handles of the Atom players currently using streaming playback + * \ingroup ATOMEXLIB_DBAS + * \param[in] dbas_id D-BAS management ID + * \param[out] players array to recieve the player handles + * \param[in] length number of elements in the array above + * \return CriSint32 number of players + * \retval >= 0 successfully completed + * \retval -1 error occurred + * \par Description: + * Gets the handles of the Atom players currently using streaming playback.
+ * If successfull, the addresses of the player handles currently streaming are + * stored in the third argument (the player handles array), and the number of player + * handles is returned by the function.
+ * \par Remarks: + * By specifying NULL for the third argument (the players array) and 0 + * for the fourth argument (the length of the array), the function will only returns the number + * of players that are currently streaming.
+ * \attention + * When accessing a player handle after getting the number of players, exclusive + * control (provided by the criAtom_Lock function) is needed so that the server process + * does not interrupt the processing. + * (Otherwise the number of players may change in the meantime.)
+ *
+ * If the size of the array is smaller than the number of players currently streaming, + * this function returns an error value (-1).
+ */ +#define criAtomExDbas_GetStreamingPlayerHandles(dbas_id, players, length) \ + criAtomDbas_GetStreamingPlayerHandles((dbas_id), (players), (length)) + +/* ========================================================================*/ +/* CRI AtomEx Streaming Cache API */ +/* ========================================================================*/ +/*EN + * \brief Assign the default values to the configuration structure used to create the streaming cache + * \ingroup ATOMEXLIB_STREAMING_CACHE + * \param[out] p_config pointer to the configuration structure used to create the streaming cache + * \par Description: + * Assigns the default values to the configuration structure ( ::CriAtomExStreamingCacheUnitConfig ) + * that is passed to the ::criAtomExStreamingCache_CalculateWorkSize and + * ::criAtomExStreamingCache_CalculateWorkSize functions.
+ * \sa criAtomExStreamingCache_CalculateWorkSize, criAtomExStreamingCache_Create + */ +#define criAtomExStreamingCache_SetDefaultConfig(p_config) \ + criAtomStreamingCache_SetDefaultConfig(p_config) + +/*EN + * \brief Calculate the size of the work buffer required to create the streaming cache + * \ingroup ATOMEXLIB_STREAMING_CACHE + * \param[in] p_config pointer to the configuration structure used to create the streaming cache + * \return CriSint32 size of the work buffer required to create the streaming cache + * \retval >= 0 successfully completed + * \retval -1 error occurred + * \par Description: + * Calculates the size of the work buffer required to create the streaming cache.
+ * The size of the work buffer needed depends on the values of the parameters in the configuration structure. + * \sa criAtomExStreamingCache_Create + */ +#define criAtomExStreamingCache_CalculateWorkSize(p_config) \ + criAtomStreamingCache_CalculateWorkSize(p_config) + +/*EN + * \brief Create a streaming cache + * \ingroup ATOMEXLIB_STREAMING_CACHE + * \param[in] config configuration structure used to create the streaming cache + * \param[in] work work buffer used to create the streaming cache + * \param[in] work_size size of the work buffer + * \return CriAtomExStreamingCacheId streaming cache ID + * \par Description: + * Creates a streaming cache.
+ * By assigning a streaming cache to an Atom Player, + * an entire file can be held (cached) in memory during streaming playback.
+ * During subsequent playbacks of the same file, the cache is automatically played from the memory.
+ * Also, if the audio data contains a loop point, + * playback after the loop point is automatically performed from the memory.
+ * This feature only works when an Atom Player performs streaming playback.
+ * If this function fails, CRIATOMEX_STREAMING_CACHE_ILLEGAL_ID is returned.
+ * \attention + * This function assumes that the entire file ca be cached. If the memory size assigned to the cache is + * smaller than the size of any file available for streaming playback, + * no file is actually cached. + * \sa criAtomExStreamingCache_CalculateWorkSize, criAtomExStreamingCache_Destroy, + */ +#define criAtomExStreamingCache_Create(config, work, work_size) \ + criAtomStreamingCache_Create((config), (work), (work_size)); + +/*EN + * \brief Destroy the streaming cache + * \ingroup ATOMEXLIB_STREAMING_CACHE + * \param[in] stm_cache_id streaming cache ID + * \par Description: + * Destroys a streaming cache.
+ * \attention + * Before executing this function, check that no player + * is using that streaming cache anymore. + * \sa criAtomExStreamingCache_Create + */ +#define criAtomExStreamingCache_Destroy(stm_cache_id) \ + criAtomStreamingCache_Destroy(stm_cache_id) + +/*EN + * \brief Clear the contents of the streaming cache + * \ingroup ATOMEXLIB_STREAMING_CACHE + * \param[in] cache_id streaming cache ID + * \par Description: + * Clears the contents of the specified streaming cache.
+ * The oldest cache contents are cleared first .
+ * If a player is using that streaming cache, + * the clearing of the cache is interrupted.
+ * \attention + * If a player is using the oldest contents in the cache, no cache content is cleared by + * executing this function. + * \sa criAtomExStreamingCache_Create + */ +#define criAtomExStreamingCache_Clear(cache_id) \ + criAtomStreamingCache_Clear(cache_id) + +/*EN + * \brief Check whether the data with the specified WaveID is cached or not + * \ingroup ATOMEXLIB_STREAMING_CACHE + * \param[in] stm_cache_id streaming cache ID + * \param[in] awb AWB handle + * \param[in] id WaveID + * \return CriBool CRI_TRUE if cached, or CRI_FALSE otherwise + * \par Description: + * Checks whether the audio data is already cached in the specified streaming cache or not.
+ * The function returns CRI_TRUE if the audio data is already cached, + * and returns CRI_FALSE otherwise.
+ * \attention + * When the AWB handle is for memory playback, this function returns CRI_TRUE regardless of whether the audio data is cached or not.
+ * \sa criAtomExStreamingCache_Create + */ +#define criAtomExStreamingCache_IsCachedWaveId(stm_cache_id, awb, id) \ + criAtomStreamingCache_IsCachedWaveId((stm_cache_id), (awb), (id)) + +/*EN + * \brief Check whether the data at the specified path is cached or not + * \ingroup ATOMEXLIB_STREAMING_CACHE + * \param[in] stm_cache_id streaming cache ID + * \param[in] src_binder binder handle for the audio data file source + * \param[in] path path to the audio data + * \return CriBool CRI_TRUE if cached, or CRI_FALSE otherwise + * \par Description: + * Checks whether the audio data is already cached in the specified streaming cache or not.
+ * The function returns CRI_TRUE if the audio data is already cached, + * and returns CRI_FALSE otherwise.
+ * \sa criAtomStreamingCache_Create + */ +#define criAtomExStreamingCache_IsCachedFile(stm_cache_id, src_binder, path) \ + criAtomStreamingCache_IsCachedFile((stm_cache_id), (src_binder), (path)) + +/*========================================================================== + * CRI AtomEx 3D API + *=========================================================================*/ +/*EN + * \brief Assign the default values to the configuration structure used to create a 3D sound source + * \ingroup ATOMEXLIB_3D + * \param[out] p_config pointer to the configuration structure used to create a 3D sound source + * \par Description: + * Assigns the default values to the configuration structure ( ::CriAtomEx3dSourceConfig ) used to create a 3D sound source. + * \sa + * CriAtomEx3dSourceConfig + */ +#define criAtomEx3dSource_SetDefaultConfig(p_config) \ +{\ + (p_config)->reserved = 0;\ +} + +/*EN + * \brief Assign the default values to the configuration structure used to create a 3D sound sources list + * \ingroup ATOMEXLIB_3D + * \param[out] p_config pointer to the configuration structure used to create a 3D sound sources list + * \par Description: + * Assigns the default values to the configuration structure ( ::CriAtomEx3dSourceConfig ) used to create a 3D sound sources list. + * \sa + * CriAtomEx3dSourceListConfig + */ +#define criAtomEx3dSourceList_SetDefaultConfig(p_config) \ +{\ + (p_config)->reserved = 0;\ +} + +/*EN + * \brief Assign the default values to the configuration structure used to create a 3D listener + * \ingroup ATOMEXLIB_3D + * \param[out] p_config pointer to the configuration structure used to create a 3D listener + * \par Description: + * Assigns the default values to the configuration structure ( ::CriAtomEx3dListenerConfig ) used to create a 3D listener. + * \sa + * CriAtomEx3dListenerConfig + */ +#define criAtomEx3dListener_SetDefaultConfig(p_config) \ +{\ + (p_config)->reserved = 0;\ +} + +/*EN + * \brief Set min and max values of the attenuation distance of a 3D source + * \ingroup ATOMEXLIB_3D + * \param[in] ex_3d_source 3D sound source handle + * \param[in] min_attenuation_distance minimum attenuation distance + * \param[in] max_attenuation_distance maximum attenuation distance + * \par Description: + * Sets the minimum and maximum attenuation distances for a 3D sound source.
+ * The minimum distance represents the distance below which the volume is maximum.
+ * The maximum distance represents the distance at which the minimum volume is reached.
+ * The default values at the initialization of the library are as follows:
+ * - Minimum distance: 0.0f + * - Maximum distance: 0.0f + * . + * The default values can be changed by calling the ::criAtomEx3dSource_ChangeDefaultMinMaxDistance function.
+ * If the minimum and maximum distances are set on the data side (i.e. in the tool), they are overwritten (ignored) when this function is called.
+ * \attention + * To actually apply the specified values, you have to call the ::criAtomEx3dSource_Update function. + * \sa criAtomEx3dSource_Update, criAtomEx3dSource_ChangeDefaultMinMaxAttenuationDistance] + */ +#define criAtomEx3dSource_SetMinMaxDistance(ex_3d_source, min_attenuation_distance, max_attenuation_distance) \ + criAtomEx3dSource_SetMinMaxAttenuationDistance((ex_3d_source), (min_attenuation_distance), (max_attenuation_distance)) + +/*EN + * \brief Change the default values of max and min of attenuation distance of a 3D source + * \ingroup ATOMEXLIB_3D + * \param[in] min_attenuation_distance minimum attenuation distance + * \param[in] max_attenuation_distance maximum attenuation distance + * \par Description: + * Changes the default values for the minimum and maximum attenuation distances of a 3D sound source.
+ * After calling this function, the new default values for minimum and maximum distance attenuation are applied each time a new 3D sound source is created. + * \attention + * If the relevant parameters were not set in the tool, the default values are used implicitly.
+ * Therefore, if you change the default values, the parameters may be different from the ones intended.
+ * Note that in the following cases, parmeters will not be affected by this function: + * - Min/max attenuation distance is set to something else than 0 by default in the tool's properties. + * - The data is built for in-game preview. + * \sa criAtomEx3dSource_SetMinMaxAttenuationDistance + */ +#define criAtomEx3dSource_ChangeDefaultMinMaxDistance(min_attenuation_distance, max_attenuation_distance) \ + criAtomEx3dSource_ChangeDefaultMinMaxAttenuationDistance((min_attenuation_distance), (max_attenuation_distance)) + +/*========================================================================== + * CRI AtomEx DSP API + *=========================================================================*/ + +/*EN + * \brief Assign the default values to the configuration structure used to attach a pitch shifter DSP + * \ingroup ATOMEXLIB_DSP + * \param[out] p_config pointer to the configuration structure used to attach a pitch shifter DSP + * \par Description: + * Assigns the default values to the configuration structure ( ::CriAtomExDspPitchShifterConfig ) + * used to attach a pitch shifter DSP. + * \sa CriAtomExDspPitchShifterConfig, criAtomExVoicePool_AttachDspPitchShifter + */ +#define criAtomExVoicePool_SetDefaultConfigForDspPitchShifter(p_config) \ +{\ + (p_config)->num_dsp = CRIATOMEX_DEFAULT_VOICES_PER_POOL;\ + (p_config)->max_channels = CRIATOM_DEFAULT_INPUT_MAX_CHANNELS;\ + (p_config)->max_sampling_rate = CRIATOM_DEFAULT_INPUT_MAX_SAMPLING_RATE;\ + (p_config)->specific.mode = 0;\ + (p_config)->specific.window_size = 1024;\ + (p_config)->specific.overlap_times = 4;\ +} + +/*EN + * \brief Assign the default values to the configuration structure used to attach a time-streching DSP + * \ingroup ATOMEXLIB_DSP + * \param[out] p_config pointer to the configuration structure used to attach a time-streching DSP + * \par Description: + * Assigns the default values to the configuration structure ( ::CriAtomExDspTimeStretchConfig ) + * used to attach a time-streching DSP. + * \sa CriAtomExDspTimeStretchConfig, criAtomExVoicePool_AttachDspTimeStretch + */ +#define criAtomExVoicePool_SetDefaultConfigForDspTimeStretch(p_config) \ +{\ + (p_config)->num_dsp = CRIATOMEX_DEFAULT_VOICES_PER_POOL;\ + (p_config)->max_channels = CRIATOM_DEFAULT_INPUT_MAX_CHANNELS;\ + (p_config)->max_sampling_rate = CRIATOM_DEFAULT_INPUT_MAX_SAMPLING_RATE;\ + (p_config)->specific.reserved = 0;\ +} + +/*========================================================================== + * CRI AtomEx Tween API + *=========================================================================*/ +/*EN + * \brief Assign the default values to the configuration structure used to create a Tween + * \ingroup ATOMEXLIB_TWEEN + * \param[out] p_config pointer to the configuration structure used to create a Tween + * \par Description: + * Assigns the default values to the configuration structure ( ::CriAtomExTweenConfig ) passed to the ::criAtomExTween_Create + * function.
+ * \sa + * CriAtomExTweenConfig + */ +#define criAtomExTween_SetDefaultConfig(p_config) \ +{\ + (p_config)->id.parameter_id = CRIATOMEX_PARAMETER_ID_VOLUME;\ + (p_config)->parameter_type = CRIATOMEX_PARAMETER_TYPE_BASIC;\ +} + +/*========================================================================== + * CRI AtomEx Sound Object API + *=========================================================================*/ +/*EN + * \brief Assign the default values to the configuration structure used to create a sound object + * \ingroup ATOMEXLIB_SOUND_OBJECT + * \param[out] p_config pointer to the configuration structure used to create a sound object + * \par Description: + * Assigns the default values to the configuration structure ( ::CriAtomExSoundObjectConfig ) + * passed to the ::criAtomExSoundObject_Create function.
+ * \sa CriAtomExSoundObjectConfig, criAtomExSoundObject_Create + */ +#define criAtomExSoundObject_SetDefaultConfig(p_config) \ +{\ + (p_config)->enable_voice_limit_scope = CRI_FALSE;\ + (p_config)->enable_category_cue_limit_scope = CRI_FALSE;\ +} + +/*************************************************************************** + * Data Type Declarations + ***************************************************************************/ +/*========================================================================== + * CRI AtomEx API + *=========================================================================*/ +/*EN + * \brief Memory allocation function + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * Type of the memory allocation function passed during the regitration of the custom allocator. + * \sa criAtomEx_SetUserAllocator + */ +typedef CriAtomMallocFunc CriAtomExMallocFunc; + +/*EN + * \brief Memory deallocation function + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * Type of the memory deallocation function passed during the regitration of the custom allocator. + * \sa criAtomEx_SetUserAllocator + */ +typedef CriAtomFreeFunc CriAtomExFreeFunc; + +/*EN + * \brief Threading models + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * Represents the threading models available when using the Atom library.
+ * The thread model is specified in the ::CriAtomExConfig structure when the library is initialized (by calling the ::criAtomEx_Initialize + * function). + * \sa criAtomEx_Initialize, CriAtomExConfig + */ +typedef enum CriAtomExThreadModelTag { + /*EN + * \brief Multithreading + * \par Description: + * The library internally creates threads and works in multithreading mode.
+ * The threads are created when the ::criAtom_Initialize function is called.
+ * The library's server processing is executed at regular intervals on a the created threads.
+ */ + CRIATOMEX_THREAD_MODEL_MULTI = 0, + + /*EN + * \brief Multithreading (user-driven) + * \par Description: + * The library internally creates threads and works in multithreading mode.
+ * The threads are created when the ::criAtomEx_Initialize function is called.
+ * The library's server processing is executed on the created threads, but unlike with + * CRIATOMEX_THREAD_MODEL_MULTI, they will not be executed automatically.
+ * The user must explicitly execute the server process by calling the ::criAtomEx_ExecuteMain function.
+ * (When the ::criAtomEx_ExecuteMain function is called, the thread starts up and the server process is executed.)
+ */ + CRIATOMEX_THREAD_MODEL_MULTI_USER_DRIVEN = 3, + + /*EN + * \brief User multithreading + * \par Description: + * While the library does not internally create threads, it ensure exclusive access control + * so that user-created threads can call the server processing function.
+ * The server process is executed synchronously in the ::criAtomEx_ExecuteMain function.
+ */ + CRIATOMEX_THREAD_MODEL_USER_MULTI = 1, + + /*EN + * \brief Single threading + * \par Description: + * The library does not internally create threads and also does not garantee exclusive access control.
+ * The server process is executed synchronously in the ::criAtomEx_ExecuteMain function.
+ * \attention + * When this model is selected, call each API and server processing function from the same thread.
+ */ + CRIATOMEX_THREAD_MODEL_SINGLE = 2, + + /* 4-byte enum */ + CRIATOMEX_THREAD_MODEL_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomExThreadModel; + +/*EN + * \brief Coordinate system + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * Represents the coordinate system used by the Atom library for 3D position calculations.
+ * This is specified in the ::CriAtomExConfig structure passed to the ::criAtomEx_Initialize + * function when the library is initialized. + * \sa criAtomEx_Initialize, CriAtomExConfig + */ +typedef enum CriAtomExCoordinateSystemTag { + /*EN + * \brief Left-handed coordinate system + * \par Description: + * A left-handed Cartesian coordinate system in which the positive direction of the x-axis points rightward, the positive direction of the y-axis points upward, and the positive direction of the z-axis points into the screen. + */ + CRIATOMEX_COORDINATE_SYSTEM_LEFT_HANDED = 0, + + /*EN + * \brief Right-handed coordinate system + * \par Description: + * A right-handed Cartesian coordinate system in which the positive direction of the x-axis points rightward, the positive direction of the y-axis points upward, and the positive direction of the z-axis points out of the screen. + */ + CRIATOMEX_COORDINATE_SYSTEM_RIGHT_HANDED = 1, + + /* 4-byte enum */ + CRIATOMEX_COORDINATE_SYSTEM_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomExCoordinateSystem; + +/*EN + * \brief ACF designated type + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * Indicates how the ACF information is provided when ACF registration is performed in the Atom library initialization processing.
+ * This is specified in the ::CriAtomExAcfRegistrationInfo structure of the ::CriAtomExConfig structure passed to the ::criAtomEx_Initialize + * function when the library is initialized. + * \sa criAtomEx_Initialize, CriAtomExConfig, CriAtomExAcfRegistrationInfo + */ +typedef enum CriAtomExAcfLocationInfoTypeTag { + CRIATOMEX_ACF_LOCATION_INFO_TYPE_NONE = 0, /*EN< Not set */ + CRIATOMEX_ACF_LOCATION_INFO_TYPE_NAME, /*EN< File name */ + CRIATOMEX_ACF_LOCATION_INFO_TYPE_ID, /*EN< Content ID */ + CRIATOMEX_ACF_LOCATION_INFO_TYPE_DATA, /*EN< On memory data */ + CRIATOMEX_ACF_LOCATION_INFO_TYPE_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomExAcfLocationInfoType; + +/*EN + * \brief Random Number Generator handle + * \ingroup ATOMEXLIB_GLOBAL + */ +typedef void *CriAtomExRngHn; + +/*EN + * \brief Random Number Generator interface + * \ingroup ATOMEXLIB_GLOBAL + */ +typedef struct CriAtomExRngInterfaceTag { + /*EN + * \brief Calculate the work buffer size + * \return CriSint32 work buffer size + * \par Description: + * Calculates the size of the work buffer required to create a Random Number Generator.
+ */ + CriSint32 (*CalculateWorkSize)(void); + + /*EN + * \brief Create a Random Number Generator + * \param[in] work work buffer + * \param[in] work_size work buffer size + * \return CriAtomExRngHn Random Number Generator handle + * \par Description: + * Creates a Random Number Generator.
+ * If this function fails to create a Random Number Generator, it returns NULL.
+ */ + CriAtomExRngHn (*Create)(void* work, CriSint32 work_size); + + /*EN + * \brief Destroy a Random Number Generator + * \param[in] rng Random Number Generator handle + * \par Description: + * Destroys a Random Number Generator.
+ */ + void (*Destroy)(CriAtomExRngHn rng); + + /*EN + * \brief Generate a random number + * \param[in] rng Random Number Generator handle + * \param[in] min minimum value + * \param[in] max maximum value + * \return CriSint32 random number + * \par Description: + * Generates a new random number.
+ * The generated number will be between min and max (both included). + */ + CriSint32 (*Generate)(CriAtomExRngHn rng, CriSint32 min, CriSint32 max); + + /*EN + * \brief Set a random seed + * \param[in] rng Random Number Generator handle + * \param[in] seed random seed + * \par Description: + * Sets the random seed used to generate a random number.
+ */ + void (*SetSeed)(CriAtomExRngHn rng, CriUint32 seed); + +} CriAtomExRngInterface; + +/*EN + * \brief ACF location information + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * Indicates how the ACF information is provided when ACF registration is performed in the Atom library initialization processing.
+ * This is specified as "acf_info" in the ::CriAtomExConfig structure passed to the ::criAtomEx_Initialize + * function when the library is initialized. + * \par Remarks: + * Depending on the type of data, the information required may differ.
+ * Please select the appropriate "type" and set the corresponding structure in "info" union.
+ * \code + * CriAtomExConfig config; + * CriAtomExAcfLocationInfo acf_info; + * + * criAtomEx_SetDefaultConfig(&config); + * + * acf_info.type = CRIATOMEX_ACF_LOCATION_INFO_TYPE_NAME; + * acf_info.name.binder = NULL; + * acf_info.name.path = "sounddata/project.scf"; + * + * config.acf_info = &acf_info; + * + * criAtomEx_Initialize(&config); + * + * \endcode + * \sa criAtomEx_Initialize, CriAtomExConfig + */ +typedef struct CriAtomExAcfRegistrationInfoTag { + /*EN ACF designated type */ + CriAtomExAcfLocationInfoType type; + + /*EN ACF location information union */ + union CriAtomExAcfLocationInfoTag { + /*EN File name designation information */ + struct CriAtomExAcfLocationInfoNameTag { + CriFsBinderHn binder; /*EN< Binder handle */ + const CriChar8 *path; /*EN< ACF file path */ + } name; + /*EN File ID designation information */ + struct CriAtomExAcfLocationInfoIdTag { + CriFsBinderHn binder; /*EN< Binder handle */ + CriSint32 id; /*EN< Content ID */ + } id; + /*EN On memory data designation information */ + struct CriAtomExAcfLocationInfoDataTag { + void *buffer; /*EN< Memory address */ + CriSint32 size; /*EN< Size */ + } data; + } info; +} CriAtomExAcfRegistrationInfo; + +/*EN + * \brief Configuration structure used to initialize the Atom library + * \ingroup ATOMEXLIB_GLOBAL + * This structure is used to specify the behavior of the CRI Atom library.
+ * It is passed to the ::criAtomEx_Initialize function.
+ *
+ * When the CRI Atom library is initialized, internal resources are allocated + * based on the settings in this structure.
+ * \par Remarks: + * To use the default settings, call the ::criAtomEx_SetDefaultConfig macro on a + * CriAtomExConfigTag structure and pass it to the ::criAtomEx_Initialize function.
+ * \attention + * More members will be added in the future. So, if you are not using the ::criAtomEx_SetDefaultConfig macro, + * make sure to initialize the structure to zero before using it.
+ * (To make sure that no indefinite value is set to any member of the structure.) + * \sa criAtomEx_Initialize, criAtomEx_SetDefaultConfig + */ +typedef struct CriAtomExConfigTag { + /*EN + \brief Threading model + \par Description: + Specifies the threading model to use for the CRI Atom library.
+ \sa CriAtomExThreadModel + */ + CriAtomExThreadModel thread_model; + + /*EN + \brief Execution frequency of the server process + \par Description: + Specifies the execution frequency of the server process.
+ Typically, this should be set to the same value than the frame rate of the application.
+
+ The CRI Atom library performs most of its work (such as + managing files, decoding sound data, playing sound or updating its status) within + a single function.
+ In CRI Middleware, that function is called a "server process."
+
+ When the threading model is ::CRIATOMEX_THREAD_MODEL_MULTI , + the server process is regularly executed in a thread created by the CRI Atom library.
+ When the threading model is ::CRIATOMEX_THREAD_MODEL_SINGLE or ::CRIATOMEX_THREAD_MODEL_USER_MULTI, + the server process is executed when the application calls the ::criAtomEx_ExecuteMain function.
+
+ Set the execution frequency of the server process in server_frequency.
+ When the threading model is ::CRIATOMEX_THREAD_MODEL_MULTI , the CRI Atom library + will adjust the interval at which the server process is called to match the specified frequency.
+ When the threading model is ::CRIATOMEX_THREAD_MODEL_SINGLE or ::CRIATOMEX_THREAD_MODEL_USER_MULTI, + the application must call the ::criAtomEx_ExecuteMain function more frequently than what is + set in server_frequency.
+
+ If the fluctuation of the frame rate of the application is very large and the interval is different each time the server process is executed, + specify a value for server_frequency that assumes the worst frame rate + or use the ::CRIATOMEX_THREAD_MODEL_MULTI threading model. + \par Remarks: + The following tasks are performed within the server process of the Atom library:
+ - Voice requests processing (voice acquisition and so on) + - Parameters updates (applying changes in volume, panning, pitch and so on) + - Decoding and output of the audio data + . + When the frequency of the server process is increased, the amount of audio data to decode per call of the server process will decrease.
+ As a result, the load per server process becomes smaller (the load is distributed). + However, the overhead for executing the server process becomes larger.
+ (The number of thread wakeups and the number of parameter updates are both increasing.)
+
+ When the frequency of the server process is decreased, the number of thread wakeups, the frequency at which voice requests are processed + and the number of parameter updates decrease and the processing load of the entire application decreases as well.
+ However, since the frequency at which the data is buffered decreases, the amount of decoding needed per server process increases, and + a larger buffer is required to store the decoded data.
+ Also, since the frequency at which the voice requests are processed decreases, + it takes a longer time to start the audio output after a voice request.
+ \attention + When ::CRIATOMEX_THREAD_MODEL_SINGLE or ::CRIATOMEX_THREAD_MODEL_USER_MULTI are specified for the threading model + but the ::criAtomEx_ExecuteMain function is not executed more frequently + than the frequency specified in server_frequency, problems such as the audio playback breaking up + may occur.
+ \sa criAtomEx_ExecuteMain + */ + CriFloat32 server_frequency; + + /*EN + \brief Parameter update interval + \par Description: + Specifies the interval between two updates of the parameters.
+ By changing the value of parameter_update_interval, + the frequency of the parameters updates can be decreased without changing the frequency at which the server process is executed.
+
+ In parameter_update_interval, specify how many times the server process should be executed before the parameters are updated.
+ For example, if parameter_update_interval is set to 2, + the parameters will be updated once every other time that the server process is executed.
+ (The frequency of the parameter updates is therefore 1/2.)
+ \par Remarks: + If the server process frequency (server_frequency) is decreased, + since the number of executions of the server process decreases, the processing load of the entire application decreases, + but the interval between the server processes increases and therefore the amount of data to be buffered increases.
+ As a result, the memory size required for buffering increases too.
+
+ On the other hand, if the parameter update interval (parameter_update_interval) is increased without changing the server process frequency, + the load can be decreased without increasing the memory size.
+ However, the process overhead due to activating the server process (i.e. waking up a thread) is not reduced, + and therefore, in this case, the load reduction is smaller than when the server process frequency is decreased.
+ \par Note: + If the value of parameter_update_interval is changed, + the frequency at which the voice requests are processed also decreases.
+ Therefore, in that case, it also takes longer to actually start the audio output after a voice request.
+ */ + CriSint32 parameter_update_interval; + + /*EN + \brief Flag that specifies to output audio using modules that are not CRI Atom Library + \par Description: + Specify CRI_TRUE when outputting audio without using CRI Atom Library.
+ At ::criAtomEx_SetDefaultConfig macro, CRI_FALSE is specified because CRI Atom Library is used.
+ When using an audio output library other than the CRI Atom Library, + specify cri_TRUE for this flag before executing criAtomEx_Initialize. + \attention + If you need to change this flag, please terminate the Atom library with criAtomEx_Finalize, + change the contents of the flag, and initialize with criAtomEx_Initialize again.
+ */ + CriBool enable_atom_sound_disabled_mode; + + /*EN + \brief Maximum number of virtual voices + \par Description: + Specifies the maximum number of voices for which voice control is performed simultaneously in an application.
+ During initialization, the Atom library will allocate the resources required to manage + max_virtual_voices voices.
+ \par Remarks: + More voices than the number specified by max_virtual_voices cannot be played back.
+ Also, even if you request exactly max_virtual_voices voices, + the actual number of playing voices is not always equal to max_virtual_voices.
+ The actual number of playing voices depends on the number of voices reserved in a Voice Pool and + the number of hardware voices available on the platform.
+
+ As a guideline, the number of virtual voices is the maximum number of voices that can be played back simultaneously + the number of voice requests per 1V.
+ If the number of virtual voices is smaller than the maximum number of voices that can be played back simultaneously or + if the sum of the number of playing voices and the number of requests exceeds the maximum number of virtual voices, + the error callback function may be triggered with a warning.
+
+ In addition, if the AtomEx Player is created by specifying CRIATOMEX_RETRY_VOICE_ALLOCATION, + more virtual voices may be required than what is described above.
+ */ + CriSint32 max_virtual_voices; + + /*EN + \brief Maximum number of parameter blocks + \par Description: + The number of buffers to be used for parameter management during audio playback.
+ The Atom library allocates the resources required for the management of parameters + based on the max_parameter_blocks specified at initialization.
+ \par Remarks: + The number of parameter blocks required to play a single Cue + depends on the contents of that Cue.
+ (The number of parameter blocks required increases proportionally with the number of parameters manipulated.)
+
+ If there are not enough parameter blocks, some parameters + may not be set for the Cue that will be played.
+ (Parameters such as volume, pitch or filters may not be set to their intended values.)
+ If an error is triggered in your application due to an insufficient number of parameter blocks, + increase the value of max_parameter_blocks.
+ */ + CriSint32 max_parameter_blocks; + + /*EN + \brief Maximum number of Voice Limit Groups + \par Description: + Specifies the maximum number of Voice Limit Groups that can be created in the application.
+ The Atom library allocates the resources needed to create + max_voice_limit_groups Voice Limit Groups during the initialization.
+ \attention + You can not create more Voice Limit Groups than the number specified in max_voice_limit_group.
+ If the number of Voice Limit Groups created within the authoring tool exceeds the value set in + max_voice_limit_groups, the loading of the corresponding ACF file will fail.
+ */ + CriSint32 max_voice_limit_groups; + + /*EN + \brief Maximum number of categories + \par Description: + Specifies the maximum number of categories that can be created in the application.
+ The Atom library allocates the resources needed to create + max_categories categories during the initialization.
+ \attention + You can not create more categories than the number specified in max_categories.
+ If the number of categories created within the authoring tool exceeds the value set in max_categories, + the loading of the corresponding ACF file will fail.
+ */ + CriSint32 max_categories; + + /*EN + \brief Maximum number of AISACs + \par Description: + The maximum number of AISAC to use in the application.
+ The Atom library reserves resources that can refer to the number of AISACs specified by max_aisacs at initialization.
+ The maximum value that can be specified is ::CRIATOMPARAMETER2_MAX_NUM_AISACS. + */ + CriUint8 max_aisacs; + + /*EN + \brief Number of category references per playback + \par Description: + Specifies the number of categories that can be referenced per playback.
+ During the initialization, The Atom library allocates only enough resources to reference the number of categories set in categories_per_playback.
+ The maximum number that can be specified is CATEGORIES_PER_PLAYBACK . + \attention + You cannot reference more categories than the number specified in categories_per_playback from a Cue or a player.
+ If the number of categories referenced in a Cue created within the authoring tool + exceeds categories_per_playback, the corresponding ACF file will fail to load.
+ */ + CriSint32 categories_per_playback; + + /*EN + \brief Maximum number of playback sequences + \par Description: + Specifies the maximum number of sequences that can be played back simultaneously in the application.
+ At initialization, the Atom library allocates only enough resources to play the number of sequences represented by + the sum of max_sequences and max_virtual_voices .
+ \attention + From version 2.00 onward, all Cues are played as sequences so resources are allocated for max_virtual_voices + in addition to the specified max_sequences.
+ You cannot play back more sequences than the number specified for max_sequences.
+ If an error callback occurs, increase this value.
+ */ + CriSint32 max_sequences; + + /*EN + \brief Maximum number of playback Tracks + \par Description: + Specifies the total number of Tracks in a sequence that can be played back simultaneously in an application.
+ At initialization, the Atom library allocates only enough resources to play the number of tracks represented by + the sum of max_tracks and max_virtual_voices.
+ \attention + From version 2.00 onward, all Cues are played as sequences so resources are allocated for max_virtual_voices + in addition to the specified max_tracks.
/ + You cannot play back more tracks than the number specified for max_tracks.
+ If an error callback occurs, increase this value.
+ */ + CriUint32 max_tracks; + + /*EN + \brief Maximum number of Track items + \par Description: + Specifies the total number of events in a sequence that can be played back simultaneously in an application.
+ At initialization, the Atom library allocates only enough resources to play the number of track items represented by + the sum of max_track_items and max_virtual_voices.
+ \attention + From version 2.00 onward, all Cues are played as sequences so resources are allocated for max_virtual_voices + in addition to the specified max_track_items.
/ + You cannot play back more Track items than the number specified for max_track_items.
+ A Track item is an event, such as a waveform or a loop event, that must be managed + during the playback of a sequence Track.
+ If an error callback occurs, increase this value.
+ */ + CriUint32 max_track_items; + + /*EN + \brief Maximum number of AISAC Auto Modulation (obsolete) + \par Description: + From version 2.00 onward, this value is not referenced anymore within the library.
+ */ + CriUint32 max_aisac_auto_modulations; + + /*EN + \brief Upper limit of the pitch change + \par Description: + Specifies the upper limit of the pitch change applied in the Atom library.
+ A pitch change greater than the value specified by max_pitch will be clipped.
+
+ Specify the pitch in cents.
+ A cent is a 1/1200th of an octave. A half-tone is equal to 100 cents.
+
+ For example, when max_pitch is set to 1200.0f, + even if a Cue is played back with a pitch setting greater than 1200 cents, + the playback pitch is reduced to 1200 cents.
+ \par Remarks: + When the pitch is also modified due to an AISAC or a Doppler effect, + it may rise to unexpected levels.
+ (The amount of decoding per unit of time increases in proportion to the pitch. + Therefore, if a large number of sounds with an extremely high pitch are played back, the processing load may increase rapidly.)
+
+ By setting the upper limit of the pitch with this parameter, + unexpected load fluctuations can be avoided.
+ For example, when max_pitch is set to 1200.0f, + whatever happens in the application, the pitch will be limited to 1200 cents + (= double-speed playback), + and therefore the amount of decoding per unit of time will also be limited (in that case: up to two times the decoding needed for the standard playback).
+ \par Note: + The value of max_pitch must be 0.0f or higher.
+ (if 0.0f is specified, no pitch change is performed.)
+ */ + CriFloat32 max_pitch; + + /*EN + \brief Maximum number of faders + \par Description: + Specifies the maximum number of faders used in the Atom library.
+ The faders are allocated during the initialization based on the value set here. + They are used internally by the library when playing back TrackTransitionBySelector data.
+ */ + CriUint32 max_faders; + + /*EN + \brief Coordinate system for 3D positioning calculation + \par Description: + Specifies the coordinate system used by the Atom library for 3D positioning calculations. + */ + CriAtomExCoordinateSystem coordinate_system; + + /*EN + * \brief Random Number Generator interface + * \par Description: + * Specifies the Random Number Generator interface used by the CRI Atom library.
+ * If NULL is specified, the default Random Number Generator is used.
+ */ + const CriAtomExRngInterface *rng_if; + + /*EN + \brief Pointer to the CRI File System initialization parameters + \par Description: + Specifies a pointer to the CRI File System initialization parameters. + If NULL is specified, the CRI File System is initialized with default parameters. + \sa criAtomEx_Initialize + */ + const CriFsConfig *fs_config; + + /*EN + \brief Pointer to ACF information + \par Description: + Specify a pointer to ACF information when registering ACF at initialization. + When NULL is specified, ACF registration is not performed at initialization. + When setting this member and registering ACF in the initialization processing, each member value of + max_voice_limit_groups, max_categories, categories_per_playback of ::CriAtomExConfig structure + is compared with the ACF setting value and the larger value is set for initialization It is used as a value. + When ACF registration is done at initialization of CriAtomEx, some setting values in ACF are also used + for module initialization such as CriAtomExAsr, CriAtomExHcaMx depending on the environment.
+ If you want to initialize these modules without using the setting values in the ACF, + initialize the library without using this member and then register the ACF.
+ \attention + When setting this member, it is necessary to register the memory allocator function and + error callback function before calling the initialization function.
+ When using this member, initialization using the acquired memory area can not be performed.
+ \sa criAtomEx_Initialize, criAtomEx_SetUserAllocator + */ + const CriAtomExAcfRegistrationInfo *acf_info; + + /*EN + \brief Pointer to platform-specific initialization parameters + \par Description: + Specifies a pointer to platform-specific initialization parameters + required to use the CRI Atom library. + If NULL is specified, the initialization required for each platform is performed with the corresponding default parameters.
+ Parameter structures are defined in each platform-specific header. + If a parameter structure is not defined for a platform, always specify NULL. + \sa criAtomEx_Initialize + */ + void *context; + + /*EN + \brief Library version number + \par Description: + The CRI Atom library version number.
+ The version number defined in the cri_atom.h header is set by the ::criAtomEx_SetDefaultConfig macro.
+ \attention + Do not change this value in your application.
+ */ + CriUint32 version; + + /*EN + \brief Module version number + \par Description: + The CRI Atom Ex version number.
+ The version number defined in this header is set by the ::criAtomEx_SetDefaultConfig macro.
+ \attention + Do not change this value in your application.
+ */ + CriUint32 version_ex; +} CriAtomExConfig; + +/*EN + * \brief Performance information + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * Structure used to acquire performance information.
+ * This structure is used by the ::criAtomEx_GetPerformanceInfo function. + * \sa criAtomEx_GetPerformanceInfo + */ +typedef CriAtomPerformanceInfo CriAtomExPerformanceInfo; + +/*EN + * \brief Waveform data ID + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * A unique ID assigned (in the authoring tool) to an asset of an AWB file.
+ * To reference the waveform data ID through the program, it is necessary to use this variable type.
+ * \sa criAtomExPlayer_SetWaveId + */ +typedef CriSint32 CriAtomExWaveId; + +/*EN + * \brief Vibration ID + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * To reference the vibration ID through the program, it is necessary to use this variable type.
+ */ +typedef CriSint32 CriAtomExVibrationId; + +/*EN + * \brief Format type + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * Data type used to specify the format of the audio data played back on an AtomEx Player.
+ * This type is used by the ::criAtomExPlayer_SetFormat function.
+ * \sa criAtomExPlayer_SetFormat + */ +typedef CriAtomFormat CriAtomExFormat; +#define CRIATOMEX_FORMAT_NONE (CRIATOM_FORMAT_NONE) /*EN< None */ +#define CRIATOMEX_FORMAT_ADX (CRIATOM_FORMAT_ADX) /*EN< ADX */ +#define CRIATOMEX_FORMAT_HCA (CRIATOM_FORMAT_HCA) /*EN< HCA */ +#define CRIATOMEX_FORMAT_HCA_MX (CRIATOM_FORMAT_HCA_MX) /*EN< HCA-MX */ +#define CRIATOMEX_FORMAT_WAVE (CRIATOM_FORMAT_WAVE) /*EN< Wave */ +#define CRIATOMEX_FORMAT_AIFF (CRIATOM_FORMAT_AIFF) /*EN< AIFF */ +#define CRIATOMEX_FORMAT_RAW_PCM (CRIATOM_FORMAT_RAW_PCM) /*EN< raw PCM */ +#define CRIATOMEX_FORMAT_VIBRATION (CRIATOM_FORMAT_VIBRATION) /*EN< Vibration */ +#define CRIATOMEX_FORMAT_AUDIO_BUFFER (CRIATOM_FORMAT_AUDIO_BUFFER) /*EN< Audio buffer */ +#define CRIATOMEX_FORMAT_HW1 (CRIATOM_FORMAT_HW1) /*EN< Hardware-specific 1 */ +#define CRIATOMEX_FORMAT_HW2 (CRIATOM_FORMAT_HW2) /*EN< Hardware-specific 2 */ + +/*EN + * \brief Audio data format information + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * Information on the audio data format.
+ * \par Remarks: + * It is possible to get detailed information about the format of the audio data loaded in memory + * by executing the ::criAtomEx_AnalyzeAudioHeader function.
+ * The format of audio data being played back + * can be acquired by using the ::criAtomExPlayback_GetFormatInfo function.
+ * \sa criAtomEx_AnalyzeAudioHeader, criAtomExPlayback_GetFormatInfo + */ +typedef struct CriAtomExFormatInfoTag { + CriAtomExFormat format; /*EN< Format type */ + CriSint32 sampling_rate; /*EN< Sampling frequency */ + CriSint64 num_samples; /*EN< Total number of samples */ + CriSint64 loop_offset; /*EN< Loop start sample */ + CriSint64 loop_length; /*EN< Number of samples in the loop */ + CriSint32 num_channels; /*EN< Number of channels */ + CriUint32 reserved[1]; /*EN< Reserved area */ +} CriAtomExFormatInfo; + +/*EN + * \brief Resume target + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * Data type used to specify what paused objects should be resumed.
+ * Used as an argument of the ::criAtomExPlayer_Resume and ::criAtomExPlayback_Resume functions. + * \sa criAtomExPlayer_Resume, criAtomExPlayback_Resume + */ +typedef enum CriAtomExResumeModeTag { + CRIATOMEX_RESUME_ALL_PLAYBACK = 0, /*EN< Resume playback regardless of the pause method */ + CRIATOMEX_RESUME_PAUSED_PLAYBACK = 1, /*EN< Resume playback only if the audio was paused by the Pause function */ + CRIATOMEX_RESUME_PREPARED_PLAYBACK = 2, /*EN< Resume playback of the audio which was prepared using the Prepare function */ + CRIATOMEX_RESUME_MODE_RESERVED = 3, + + /* 4-bit enum */ + CRIATOMEX_RESUME_MODE_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomExResumeMode; + +/*EN + * \brief Type of biquad filter + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * Data type used to specify the type of the biquad filter.
+ * It is passed to the ::criAtomExPlayer_SetBiquadFilterParameters function. + * \sa criAtomExPlayer_SetBiquadFilterParameters + */ +typedef enum CriAtomExBiquadFilterTypeTag { + CRIATOMEX_BIQUAD_FILTER_TYPE_OFF = 0, /*EN + * This type is used by the ::criAtomExPlayer_SetSilentMode function.
+ * The library determines if a sound is silent by checking if one of the following values is 0:
+ * - Volume + * - Volume resulting from the 3D panning calculations + * - Volume resulting from the 3D positioning calculations + * . + * \attention + * Note that send levels or 2D panning calculations are not used to determine if a sound is silent.
+ * \sa criAtomExPlayer_SetSilentMode + */ +typedef enum CriAtomExSilentModeTag { + /*EN + * \brief Do nothing + * \par Description: + * No special process is performed when the sound is silent. (Default value) + */ + CRIATOMEX_SILENT_MODE_NORMAL = 0, + + /*EN + * \brief Stop playback + * \par Description: + * The playback is automatically stopped when the sound is silent. + */ + CRIATOMEX_SILENT_MODE_STOP = 1, + + /*EN + * \brief Virtualization + * \par Description: + * Automatically performs virtualization when the sound is silent. + */ + CRIATOMEX_SILENT_MODE_VIRTUAL = 2, + + /*EN + * \brief Virtualization by re-trigger + * \par Description: + * Automatically performs virtualization in re-trigger mode when the sound is silent. + */ + CRIATOMEX_SILENT_MODE_VIRTUAL_RETRIGGER = 3, + + /* 4-byte enum */ + CRIATOMEX_SILENT_MODE_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomExSilentMode; + +/*EN + * \brief Pan type + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * Data type used to specify how 3D sound localization should be determined.
+ * This is passed to the ::criAtomExPlayer_SetPanType function.
+ * \sa criAtomExPlayer_SetPanType + */ +typedef enum CriAtomExPanTypeTag { + /*EN + * \brief Pan3D + * \par Description: + * Pan3D is used to calculate the sound localization. + */ + CRIATOMEX_PAN_TYPE_PAN3D = 0, + /*EN + * \brief 3D Positioning + * \par Description: + * 3D positioning is used to calculate the sound localization. + */ + CRIATOMEX_PAN_TYPE_3D_POS, + /*EN + * \brief Automatic + * \par Description: + * The 3D localization is calculated using 3D positioning if a 3D sound source or 3D listener is set to the AtomEx player + * and using Pan3D otherwise. + */ + CRIATOMEX_PAN_TYPE_AUTO, + /* 4-byte enum */ + CRIATOMEX_PAN_TYPE_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomExPanType; + +/*EN + * \brief Output speaker type for panning + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * Represents the speakers to be used for the sound output after calculating the 3D localization.
+ * This is passed to the ::criAtomExPlayer_ChangeDefaultPanSpeakerType function and the ::criAtomExPlayer_SetPanSpeakerType function.
+ * \par Remarks: + * For a platform with stereo speakers, regardless of the type selected, sounds will be downmixed to stereo. + * \sa criAtomExPlayer_SetPanSpeakerType + */ +typedef enum CriAtomExPanSpeakerTypeTag { + /*EN + * \brief 4ch panning + * \par Description: + * L, R, Ls, and Rs are used for panning.
+ */ + CRIATOMEX_PAN_SPEAKER_TYPE_4CH = 0, + + /*EN + * \brief 5ch panning + * \par Description: + * L, R, C, Ls, and Rs are used for panning. + */ + CRIATOMEX_PAN_SPEAKER_TYPE_5CH = 1, + + /*EN + * \brief 6ch panning + * \par Description: + * L, R, Ls, Rs, Lsb, and Rsb are used for panning. + */ + CRIATOMEX_PAN_SPEAKER_TYPE_6CH = 2, + + /*EN + * \brief 7ch panning + * \par Description: + * L, R, C, Ls, Rs, Lsb, and Rsb are used for panning. + */ + CRIATOMEX_PAN_SPEAKER_TYPE_7CH = 3, + + /* 4-byte enum */ + CRIATOMEX_PAN_SPEAKER_TYPE_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomExPanSpeakerType; + +/*EN + * \brief Panning angle type + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * Specifies how to handle the angles for each input channel when performing localization calculations for multi-channel materials.
+ * This is used by the ::criAtomExPlayer_SetPanAngleType function.
+ * \sa criAtomExPlayer_SetPanAngleType + */ +typedef enum CriAtomExPanAngleTypeTag { + /*EN + * \brief Offset + * \par Description: + * The offset value is added to each channel based on the speaker layout centered around the Pan3D angle specified, + * then panning calculations are performed for each input channel individually.
+ * For example, if a Pan3D angle of 0 degrees is set for a stereo material, the L channel will be at -30 degrees and output as it is from the L speaker. + * The R channel will be at +30 degrees and output as it is from the R speaker. + * If the Pan3D angle is set to +30 degrees, the L channel will be at 0 degrees and the R channel will be at 60 degrees + * for the panning calculations. + */ + CRIATOMEX_PAN_ANGLE_TYPE_OFFSET = 0, + /*EN + * \brief Fixed + * \par Description: + * Determines the panning by calculating the balance between each speaker assuming that each speaker's position + * is fixed based on the number of input channels.
+ * For example, if a Pan3D angle of 0 degrees is set for a stereo material, the L channel will be output from the + * L speaker with a level scaled by approximately 0.7 and the R channel will be output from the R speaker with a level scaled by approximately 0.7. + * If the Pan3D angle is set to +30 degrees, the L channel will not be output and the R channel will be output from the R speaker as it is.
+ * \par Remarks: + * This behavior is how Pan3D was in CRI Audio.
+ * What channel is sent to what speaker is handled in the same way than the dry send level is set via the ::criAtomExPlayer_SetDrySendLevel function. + * \sa criAtomExPlayer_SetDrySendLevel + */ + CRIATOMEX_PAN_ANGLE_TYPE_FIX = 1, + /*EN + * \brief Environmental sound mix + * \par Description: + * A special pan angle type. Do not use. + */ + CRIATOMEX_PAN_ANGLE_TYPE_AMBIENCE_MIX = 4, + /*EN + * \brief Environmental sound linear interpolation + * \par Description: + * A special pan angle type. Do not use. + */ + CRIATOMEX_PAN_ANGLE_TYPE_AMBIENCE_STRAIGHT = 5, + + /* 4-byte enum */ + CRIATOMEX_PAN_ANGLE_TYPE_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomExPanAngleType; + +/*EN + * \brief Order of the output speakers + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * Indicates the mapping between the subscript of each channel and an output speaker.
+ * This is used in the ::criAtomEx_SetSpeakerAngleArray function.
+ * \sa criAtomEx_SetSpeakerAngleArray CRIATOMEX_SPEAKER_SYSTEM_SURROUND_5_1 CRIATOMEX_SPEAKER_SYSTEM_SURROUND_7_1 + */ +typedef CriUint32 CriAtomExSpeakerSystem; + +/*EN + * \brief 5.1 ch surround + * \par Description: + * The following shows the order of output speakers. + * \par +* -# FRONT LEFT + * -# FRONT RIGHT + * -# FRONT CENTER + * -# LOW FREQUENCY + * -# SURROUND LEFT + * -# SURROUND RIGHT + * . + * \sa CriAtomExSpeakerSystem + */ +#define CRIATOMEX_SPEAKER_SYSTEM_SURROUND_5_1 (0) + +/*EN + * \brief 7.1 ch surround + * \par Description: + * The following shows the order of output speakers. + * \par + * -# FRONT LEFT + * -# FRONT RIGHT + * -# FRONT CENTER + * -# LOW FREQUENCY + * -# SURROUND LEFT + * -# SURROUND RIGHT + * -# SURROUND BACK LEFT + * -# SURROUND BACK RIGHT + * . + * \sa CriAtomExSpeakerSystem + */ +#define CRIATOMEX_SPEAKER_SYSTEM_SURROUND_7_1 (1) + +/*EN + * \brief Block index + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * A block index is a number that shows the offset of a block in a block sequence.
+ * (Numbers are assigned sequentially to blocks: 0 is assigned to the first block, 1 is assigned + * to the second block, and so on.)
+ * To maintain a block index in a program, you need to handle the value with this variable type.
+ * \sa criAtomExPlayer_SetFirstBlockIndex, criAtomExPlayback_SetNextBlockIndex, criAtomExPlayback_GetCurrentBlockIndex + */ +typedef CriSint32 CriAtomExBlockIndex; + +/*EN + * \brief Game variable ID + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * A game variable ID is assigned to a game variable in ACF by the user on an authoring tool.
+ * To maintain a game variable ID in a program, you need to handle the value with this variable type.
+ * \sa criAtomEx_GetGameVariableById, criAtomEx_SetGameVariableById + */ +typedef CriUint32 CriAtomExGameVariableId; + +/*EN + * \brief Structure for acquiring game variable information + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * This structure is used for acquiring game variable information.
+ * It is passed to the ::CriAtomExGameVariableInfo function as an argument.
+ * \sa criAtomEx_GetGameVariableInfo + */ +typedef struct CriAtomExGameVariableInfoTag { + const CriChar8*name; /*EN< Name of the game variable */ + CriAtomExGameVariableId id; /*EN< Game variable ID */ + CriFloat32 value; /*EN< Value of the game variable */ +} CriAtomExGameVariableInfo; + +/*EN + * \brief Streaming information + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * The streaming status at the point when the information was acquired by the ::criAtomEx_GetStreamingInfo function.
+ * \sa criAtomEx_GetStreamingInfo + */ +typedef CriAtomStreamingInfo CriAtomExStreamingInfo; + +/*EN + * \brief Character code + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * Describes the character encoding method used. + */ +typedef enum CriAtomExCharacterEncodingTag { + CRIATOMEX_CHARACTER_ENCODING_UTF8 = 0, /*EN< UTF-8 */ + CRIATOMEX_CHARACTER_ENCODING_SJIS = 1, /*EN< Shift_JIS */ + + /* 4-byte enum */ + CRIATOMEX_CHARACTER_ENCODING_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomExCharacterEncoding; + +/*EN + * \brief Usage status of various resources + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * Structure that shows the usage of various resources. + */ +typedef struct CriAtomExResourceUsageTag { + CriUint32 use_count; /*EN< Number of resources currently used */ + CriUint32 limit; /*EN< Limit of resources that can be used */ +} CriAtomExResourceUsage; + +/*========================================================================== + * CRI AtomEx Debug API + *=========================================================================*/ +/*EN + * \brief Status of CriAtomEx internal resources + * \ingroup ATOMEXLIB_GLOBAL_DEBUG + * \par Description: + * Structure that shows the status of the CriAtomEx internal resources.
+ * Please use the ::criAtomExDebug_GetResourcesInfo function to get it.
+ * \attention + * Development support debugging function. Please use only when developing applications. + * \sa criAtomExDebug_GetResourcesInfo + */ +typedef struct CriAtomExDebugResourcesInfoTag { + /*EN Usage status of virtual voice ("limit" is the number of CriAtomExConfig::max_virtual_voices specified at library initialization) */ + CriAtomExResourceUsage virtual_voice_usage; + /*EN Usage status of sequence ("limit" is the number of CriAtomExConfig::max_virtual_voices specified at library initialization) */ + CriAtomExResourceUsage sequence_usage; + /*EN Usage status of sequence track ("limit" is the number of CriAtomExConfig::max_tracks specified at library initialization) */ + CriAtomExResourceUsage sequence_track_usage; + /*EN Usage status of sequence track item ("limit" is the number of CriAtomExConfig::max_track_items specified at library initialization) */ + CriAtomExResourceUsage sequence_track_item_usage; +} CriAtomExDebugResourcesInfo; + +/*========================================================================== + * CRI AtomEx HCA-MX API + *=========================================================================*/ +/*EN + * \brief Configuration structure used to initialize HCA-MX + * \ingroup ATOMEXLIB_HCA_MX + * \par Description: + * This structure is used to specify the behavior of HCA-MX.
+ * It is passed to the ::criAtomExHcaMx_Initialize function.
+ * \par Remarks: + * To use the default settings, pass this structure to the ::criAtomExHcaMx_SetDefaultConfig macro + * and then to the ::criAtomExHcaMx_Initialize function.
+ * \attention + * More members will be added in the future. Therefore, if you are not using the ::criAtomExHcaMx_SetDefaultConfig + * macro, make sure to initialize the structure to zero before using it.
+ * (Make sure that no member of the structure has an undefined value.) + * \sa criAtomExHcaMx_Initialize, criAtomExHcaMx_SetDefaultConfig + */ +typedef struct CriAtomExHcaMxConfigTag { + /*EN + \brief Execution frequency of the server process + \par Description: + Specifies the execution frequency of the server process.
+ \attention + Set the same value than for server_frequency in the ::CriAtomExConfig structure when you + initialize the Atom library.
+ \sa CriAtomExConfig + */ + CriFloat32 server_frequency; + + /*EN + \brief Number of mixers + \par Description: + Specifies the number of mixers to which the HCA-MX decoding results are sent.
+ By creating multiple mixers, different DSP FX can be assigned to each of them.
+ \attention + The load of the HCA-MX decoding and processing will grow + proportionally to the number of mixers.
+
+ A mixer will be created even if this parameter is set to 0.
+ (This is to maintain the compatibility with older versions.)
+ When HCA-MX is not used, set both this parameter + and max_voices to 0.
+ */ + CriSint32 num_mixers; + + /*EN + \brief Maximum number of voices that can be used with a mixer + \par Description: + Specifies the maximum number of HCA-MX voices that can be used with a mixer.
+ When creating an HCA-MX Voice Pool, make sure the total number of voices + does not exceed num_mixers x max_voices. + */ + CriSint32 max_voices; + + /*EN + \brief Maximum number of channels of input data + \par Description: + Specifies the maximum number of channels for the HCA-MX data played back by the application.
+ Specify 1 if the audio data is mono or 2 if it is stereo.
+ \par Remarks: + The number of sound buffers that can be played back simultaneously is less than or equal to + the number specified for max_input_channels during the initialization of HCA-MX.
+ For example, if max_input_channels is set to 6, not only 5.1-channel sounds can be played + but also mono and stereo sounds.
+ When you want to play back 99 mono buffers and one stereo buffer out of 100 sound buffers, + you must set max_input_channels to 2.
+ */ + CriSint32 max_input_channels; + + /*EN + \brief Maximum sampling rate + \par Description: + Specifies the maximum sampling rate for the HCA-MX output.
+ It is used to change the pitch at the final mixer's output.
+ If you don't want to change the pitch, specify the same value than the output_sampling_rate.
+ \par Remarks: + For example, if you want to pass 2.0f to the ::criAtomExHcaMx_SetFrequencyRatio function to increase the pitch, + you need to initialize HCA-MX by specifying output_sampling_rate * 2 here.
+ */ + CriSint32 max_sampling_rate; + + /*EN + \brief Number of output channels + \par Description: + Specifies the number of output channels for the HCA-MX data.
+ Usually, you should specify the number of speakers (maximum number of channels of the output device) + connected to the target.
+ \par Remarks: + When only mono sounds are played back and panning is not controlled, + the processing load can be reduced by setting output_channels to 1.
+ \attention + A value less than or equal to max_input_channels + cannot be set for output_channels.
+ */ + CriSint32 output_channels; + + /*EN + \brief Output sampling rate + \par Description: + Specifies the sampling rate for the HCA-MX data.
+ When creating the HCA-MX data, always use the same sampling rate for all the audio data, + and specify this value for output_sampling_rate.
+ \par Remarks: + With the HCA-MX codec, sampling rates cannot be changed individually for each sound.
+ */ + CriSint32 output_sampling_rate; + + /*EN + \brief Sound renderer type + \par Description: + Specifies the output destination of the HCA-MX data.
+ If you specify CRIATOM_SOUND_RENDERER_DEFAULT for sound_renderer_type, + the audio data will be transferred to the default sound renderer.
+ If you specify CRIATOM_SOUND_RENDERER_NATIVE for sound_renderer_type, + the audio data will be transferred to the default sound output of each platform.
+ If you specify CRIATOM_SOUND_RENDERER_ASR for sound_renderer_type, + the audio data will be transferred to the ASR (Atom Sound Renderer).
+ (The output destination of the ASR is specified separately, during the initialization of the ASR.) + */ + CriAtomSoundRendererType sound_renderer_type; +} CriAtomExHcaMxConfig; + +/*========================================================================== + * CRI AtomEx Decrypter API + *=========================================================================*/ +/*EN + * \brief Configuration structure used to create a decrypter + * \ingroup ATOMEXLIB_DECRYPTER + * \par Description: + * This structure is used to configure the parameters required to create a decrypter.
+ * It is passed to the ::criAtomExDecrypter_Create function.
+ * \attention + * More members will be added in the future. Make sure to initialize the structure to zero before using it.
+ * (Make sure that no member of the structure has an undefined value.) + * \sa criAtomExDecrypter_Create + */ +typedef CriAtomDecrypterConfig CriAtomExDecrypterConfig; + +/*EN + * \brief Decrypter handle + * \ingroup ATOMEXLIB_DECRYPTER + * \par Description: + * Handle to use a decrypter.
+ * The ::criAtomExDecrypter_Create function returns this handle.
+ * \sa criAtomExDecrypter_Create + */ +typedef CriAtomDecrypterHn CriAtomExDecrypterHn; + +/*========================================================================== + * CRI AtomEx ACF API + *=========================================================================*/ +/*EN + * \brief ACF information + * \ingroup ATOMEXLIB_ACF + * \par Description: + * Detailed information about the ACF data.
+ * \sa criAtomExAcf_GetAcfInfo, criAtomExAcf_GetAcfInfoFromAcfData + */ +typedef struct CriAtomExAcfInfoTag { + const CriChar8* name; /*EN< Name */ + CriUint32 size; /*EN< Size */ + CriUint32 version; /*EN< ACB version */ + CriAtomExCharacterEncoding character_encoding; /*EN< Character code */ + CriSint32 num_dsp_settings; /*EN< Number of DSP settings */ + CriSint32 num_categories; /*EN< Number of categories */ + CriSint32 num_categories_per_playback; /*EN< Number of category references per playback */ + CriSint32 num_reacts; /*EN< Number of REACTs */ + CriSint32 num_aisac_controls; /*EN< Number of AISAC controls */ + CriSint32 num_global_aisacs; /*EN< Number of global AISACs */ + CriSint32 num_game_variables; /*EN< Number of game variables */ + CriSint32 max_buses_of_dsp_bus_settings; /*EN< Maximum number of buses in the DSP settings */ + CriSint32 num_buses; /*EN< Number of buses */ + CriSint32 num_voice_limit_groups; /*EN< Number of voice limit groups */ +} CriAtomExAcfInfo; + + +/*EN + * \brief AISAC control ID + * \ingroup ATOMEXLIB_ACF + * \par Description: + * A unique ID assigned to an AISAC control.
+ * It is used to reference a specific AISAC control within the application.
+ * \sa criAtomExPlayer_SetAisacControlById, criAtomExAcf_GetAisacControlIdByName, criAtomExAcf_GetAisacControlNameById + */ +typedef CriUint32 CriAtomExAisacControlId; + +/*EN + * \brief Structure used to get information about an AISAC control + * \ingroup ATOMEXLIB_ACF + * \par Description: + * This structure is used to get information about an AISAC control.
+ * It is passed to the ::criAtomExAcf_GetAisacControlInfo function.
+ * \sa criAtomExAcf_GetAisacControlInfo + */ +typedef struct CriAtomExAisacControlInfoTag { + const CriChar8* name; /*EN< AISAC control name */ + CriAtomExAisacControlId id; /*EN< AISAC control ID */ +} CriAtomExAisacControlInfo; + +/*EN + * \brief Structure used to get information about an AISAC + * \ingroup ATOMEXLIB_ACF + * \par Description: + * This structure is used to get information about an AISAC.
+ * It is passed to the ::criAtomExPlayer_GetAttachedAisacInfo function.
+ * \sa criAtomExPlayer_GetAttachedAisacInfo + */ +typedef struct CriAtomExAisacInfoTag { + const CriChar8* name; /*EN< AISAC name */ + CriBool default_control_flag; /*EN< Whether the default control value is set */ + CriFloat32 default_control_value; /*EN< Default AISAC control value */ + CriAtomExAisacControlId control_id; /*EN< Control Id */ + const CriChar8* control_name; /*EN< Control Name */ +} CriAtomExAisacInfo; + +/*EN + * \brief Structure used to get information about a DSP Setting + * \ingroup ATOMEXLIB_ACF + * \par Description: + * This structure is used to get information about a DSP Setting.
+ * It is passed to the ::criAtomExAcf_GetDspSettingInformation function which fills it.
+ * \sa criAtomExAcf_GetDspSettingInformation + */ +typedef struct CriAtomExAcfDspSettingInfoTag { + const CriChar8* name; /*EN< Setting name */ + CriUint16 bus_indexes[CRIATOMEXACF_MAX_BUSES]; /*EN< DSP bus index array */ + CriUint16 extend_bus_indexes[CRIATOMEXACF_MAX_BUSES]; /*EN< Extended DSP bus index array */ + CriUint16 snapshot_start_index; /*EN< Snapshot start index */ + CriUint8 num_buses; /*EN< Number of valid DSP buses */ + CriUint8 num_extend_buses; /*EN< Number of valid extended DSP buses */ + CriUint16 num_snapshots; /*EN< Number of snapshots */ + CriUint16 snapshot_work_size; /*EN< Work buffer size for the snapshots */ +} CriAtomExAcfDspSettingInfo; + +/*EN + * \brief Structure used to get information about a snapshot of a DSP bus setting + * \ingroup ATOMEXLIB_ACF + * \par Description: + * Structure used to get information about a snapshot of a DSP bus setting.
+ */ +typedef struct CriAtomExAcfDspSettingSnapshotInfoTag { + const CriChar8* name; /*EN< Snapshot name */ + CriUint8 num_buses; /*EN< Number of valid DSP buses */ + CriUint8 num_extend_buses; /*EN< Number of valid extended DSP buses */ + CriUint8 reserved[2]; /*EN< Reserved area */ + CriUint16 bus_indexes[CRIATOMEXACF_MAX_BUSES]; /*EN< DSP bus index array */ + CriUint16 extend_bus_indexes[CRIATOMEXACF_MAX_BUSES]; /*EN< DSP extended bus index array */ +} CriAtomExAcfDspSettingSnapshotInfo; + +/*EN + * \brief Structure used to get information about a DSP Bus + * \ingroup ATOMEXLIB_ACF + * \par Description: + * Structure used to get information about a DSP Bus.
+ * It is passed to the ::criAtomExAcf_GetDspBusInformation function which fills it.
+ * \sa criAtomExAcf_GetDspBusInformation + */ +typedef struct CriAtomExAcfDspBusInfoTag { + const CriChar8* name; /*EN< Name */ + CriFloat32 volume; /*EN< Volume */ + CriFloat32 pan3d_volume; /*EN< Pan3D volume */ + CriFloat32 pan3d_angle; /*EN< Pan3D angle */ + CriFloat32 pan3d_distance; /*EN< Pan3D interior distance */ + CriUint16 fx_indexes[CRIATOMEXACF_MAX_FXES]; /*EN< FX index array */ + CriUint16 bus_link_indexes[CRIATOMEXACF_MAX_BUSES]; /*EN< DSP bus link index array */ + CriUint16 bus_no; /*EN< DSP bus number in a setting */ + CriUint8 num_fxes; /*EN< Number of DSP FXes */ + CriUint8 num_bus_links; /*EN< Number of DSP bus links */ +} CriAtomExAcfDspBusInfo; + +/*EN + * \brief DSP Bus Link type + * \ingroup ATOMEXLIB_ACF + * \sa CriAtomExAcfDspBusLinkInfo + */ +typedef enum CriAtomExAcfDspBusLinkTypeTag { + CRIATOMEXACF_DSP_BUS_LINK_TYPE_PRE_VOLUME, /*EN< Pre-volume type */ + CRIATOMEXACF_DSP_BUS_LINK_TYPE_POST_VOLUME, /*EN< Post-volume type */ + CRIATOMEXACF_DSP_BUS_LINK_TYPE_POST_PAN, /*EN< Post-panning type */ + /* 4-byte enum */ + CRIATOMEXACF_DSP_BUS_LINK_TYPE_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomExAcfDspBusLinkType; + +/*EN + * \brief Structure used to get information about a DSP Bus Link + * \ingroup ATOMEXLIB_ACF + * \par Description: + * Structure used to get information about a DSP Bus Link.
+ * It is passed to the ::criAtomExAcf_GetDspBusLinkInformation function which fills it.
+ * \sa criAtomExAcf_GetDspBusLinkInformation + */ +typedef struct CriAtomExAcfDspBusLinkInfoTag { + CriAtomExAcfDspBusLinkType type; /*EN< Type */ + CriFloat32 send_level; /*EN< Send level */ + CriUint16 bus_no; /*EN< DSP bus number (destination setting) */ + CriUint16 bus_id; /*EN< DSP bus ID (destination setting) */ +} CriAtomExAcfDspBusLinkInfo; + +/*EN + * \brief AISAC type + * \ingroup ATOMEXLIB_ACF + * \sa CriAtomExGlobalAisacInfo + */ +typedef enum CriAtomExAcfAisacTypeTag { + CRIATOMEXACF_AISAC_TYPE_NORMAL, /*EN< Normal type */ + CRIATOMEXACF_AISAC_TYPE_AUTO_MODULATION, /*EN< Auto modulation type */ + /* 4-byte enum */ + CRIATOMEXACF_AISAC_TYPE_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomExAcfAisacType; + + +/*EN + * \brief Structure to get information about a Global AISAC + * \ingroup ATOMEXLIB_ACF + * \par Description: + * Structure used to information about a Global AISAC.
+ * It is passed to the ::criAtomExAcf_GetGlobalAisacInfo function.
+ * \attention + * If type is :: CRIATOMEXACF_AISAC_TYPE_AUTO_MODULATION, + * control_id is the internally used index value. + * \sa criAtomExAcf_GetGlobalAisacInfo + */ +typedef struct CriAtomExGlobalAisacInfoTag { + const CriChar8* name; /*EN< Global AISAC name */ + CriUint16 index; /*EN< Data index */ + CriUint16 num_graphs; /*EN< Number of graphs */ + CriAtomExAcfAisacType type; /*EN< AISAC type */ + CriFloat32 random_range; /*EN< Random range */ + CriUint16 control_id; /*EN< Control Id */ + CriUint16 dummy; /*EN< unused */ +} CriAtomExGlobalAisacInfo; + +/* Aisac Graph type */ +/*EN + * \brief Aisac Graph type + * \ingroup ATOMEXLIB_ACF + * \par Description: + * Defines AISAC Graph types.
+ * \sa CriAtomExAisacGraphInfo + */ +typedef enum CriAtomExAisacGraphTypeTag { + CRIATOMEX_AISAC_GRAPH_TYPE_NON = 0, /*EN< Unused */ + CRIATOMEX_AISAC_GRAPH_TYPE_VOLUME, /*EN< Volume */ + CRIATOMEX_AISAC_GRAPH_TYPE_PITCH, /*EN< Pitch */ + CRIATOMEX_AISAC_GRAPH_TYPE_BANDPASS_HI, /*EN< High-range cutoff frequency for a band pass filter */ + CRIATOMEX_AISAC_GRAPH_TYPE_BANDPASS_LOW, /*EN< Low-range cutoff frequency for a band pass filter */ + CRIATOMEX_AISAC_GRAPH_TYPE_BIQUAD_FREQ, /*EN< Frequency for a biquad filter */ + CRIATOMEX_AISAC_GRAPH_TYPE_BIQUAD_Q, /*EN< Q value for a biquad filter */ + CRIATOMEX_AISAC_GRAPH_TYPE_BUS_0_SEND, /*EN< Bus send level 0 */ + CRIATOMEX_AISAC_GRAPH_TYPE_BUS_1_SEND, /*EN< Bus send level 1 */ + CRIATOMEX_AISAC_GRAPH_TYPE_BUS_2_SEND, /*EN< Bus send level 2 */ + CRIATOMEX_AISAC_GRAPH_TYPE_BUS_3_SEND, /*EN< Bus send level 3 */ + CRIATOMEX_AISAC_GRAPH_TYPE_BUS_4_SEND, /*EN< Bus send level 4 */ + CRIATOMEX_AISAC_GRAPH_TYPE_BUS_5_SEND, /*EN< Bus send level 5 */ + CRIATOMEX_AISAC_GRAPH_TYPE_BUS_6_SEND, /*EN< Bus send level 6 */ + CRIATOMEX_AISAC_GRAPH_TYPE_BUS_7_SEND, /*EN< Bus send level 7 */ + CRIATOMEX_AISAC_GRAPH_TYPE_PAN3D_ANGLE, /*EN< Panning 3D angle */ + CRIATOMEX_AISAC_GRAPH_TYPE_PAN3D_VOLUME, /*EN< Panning 3D volume */ + CRIATOMEX_AISAC_GRAPH_TYPE_PAN3D_INTERIOR_DISTANCE, /*EN< Panning 3D distance */ + CRIATOMEX_AISAC_GRAPH_TYPE_PAN3D_CENTER, /*EN< Not used in ACB Ver.0.11.00 or later */ + CRIATOMEX_AISAC_GRAPH_TYPE_PAN3D_LFE, /*EN< Not used in ACB Ver.0.11.00 or later */ + CRIATOMEX_AISAC_GRAPH_TYPE_AISAC_0, /*EN< AISAC control ID 0 */ + CRIATOMEX_AISAC_GRAPH_TYPE_AISAC_1, /*EN< AISAC control ID 1 */ + CRIATOMEX_AISAC_GRAPH_TYPE_AISAC_2, /*EN< AISAC control ID 2 */ + CRIATOMEX_AISAC_GRAPH_TYPE_AISAC_3, /*EN< AISAC control ID 3 */ + CRIATOMEX_AISAC_GRAPH_TYPE_AISAC_4, /*EN< AISAC control ID 4 */ + CRIATOMEX_AISAC_GRAPH_TYPE_AISAC_5, /*EN< AISAC control ID 5 */ + CRIATOMEX_AISAC_GRAPH_TYPE_AISAC_6, /*EN< AISAC control ID 6 */ + CRIATOMEX_AISAC_GRAPH_TYPE_AISAC_7, /*EN< AISAC control ID 7 */ + CRIATOMEX_AISAC_GRAPH_TYPE_AISAC_8, /*EN< AISAC control ID 8 */ + CRIATOMEX_AISAC_GRAPH_TYPE_AISAC_9, /*EN< AISAC control ID 9 */ + CRIATOMEX_AISAC_GRAPH_TYPE_AISAC_10, /*EN< AISAC control ID 10 */ + CRIATOMEX_AISAC_GRAPH_TYPE_AISAC_11, /*EN< AISAC control ID 11 */ + CRIATOMEX_AISAC_GRAPH_TYPE_AISAC_12, /*EN< AISAC control ID 12 */ + CRIATOMEX_AISAC_GRAPH_TYPE_AISAC_13, /*EN< AISAC control ID 13 */ + CRIATOMEX_AISAC_GRAPH_TYPE_AISAC_14, /*EN< AISAC control ID 14 */ + CRIATOMEX_AISAC_GRAPH_TYPE_AISAC_15, /*EN< AISAC control ID 15 */ + CRIATOMEX_AISAC_GRAPH_TYPE_PRIORITY, /*EN< Voice Priorities */ + CRIATOMEX_AISAC_GRAPH_TYPE_PRE_DELAY_TIME, /*EN< Pre-delay */ + CRIATOMEX_AISAC_GRAPH_TYPE_BIQUAD_GAIN, /*EN< Gain of a biquad filter */ + CRIATOMEX_AISAC_GRAPH_TYPE_PAN3D_MIXDOWN_CENTER, /*EN< Panning 3D center level */ + CRIATOMEX_AISAC_GRAPH_TYPE_PAN3D_MIXDOWN_LFE, /*EN< Panning 3D LFE level */ + CRIATOMEX_AISAC_GRAPH_TYPE_EG_ATTACK, /*EN< Envelope attack */ + CRIATOMEX_AISAC_GRAPH_TYPE_EG_RELEASE, /*EN< Envelope release */ + CRIATOMEX_AISAC_GRAPH_TYPE_PLAYBACK_RATIO, /*EN< Sequence playback ratio */ + CRIATOMEX_AISAC_GRAPH_TYPE_DRY_SEND_L, /*EN< L ch dry send */ + CRIATOMEX_AISAC_GRAPH_TYPE_DRY_SEND_R, /*EN< R ch dry send */ + CRIATOMEX_AISAC_GRAPH_TYPE_DRY_SEND_CENTER, /*EN< Center ch dry send */ + CRIATOMEX_AISAC_GRAPH_TYPE_DRY_SEND_LFE, /*EN< LFE ch dry send */ + CRIATOMEX_AISAC_GRAPH_TYPE_DRY_SEND_SL, /*EN< Surround L ch dry send */ + CRIATOMEX_AISAC_GRAPH_TYPE_DRY_SEND_SR, /*EN< Surround R ch dry send */ + CRIATOMEX_AISAC_GRAPH_TYPE_DRY_SEND_EX1, /*EN< Ex1 ch dry send */ + CRIATOMEX_AISAC_GRAPH_TYPE_DRY_SEND_EX2, /*EN< Ex2 ch dry send */ + CRIATOMEX_AISAC_GRAPH_TYPE_PAN_SPREAD, /*EN< Pan spread */ + + /* enum size is 4bytes */ + CRIATOMEX_AISAC_GRAPH_TYPE_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomExAisacGraphType; + +/*EN + * \brief Structure for acquiring Aisac Graph information + * \ingroup ATOMEXLIB_ACF + * \par Description: + * This structure is used for acquiring Global Aisac Graph information.
+ * It is passed to the ::criAtomExAcf_GetGlobalAisacGraphInfo function as an argument.
+ * \sa criAtomExAcf_GetGlobalAisacGraphInfo + */ +typedef struct CriAtomExAisacGraphInfoTag { + CriAtomExAisacGraphType type; /*EN< Graph type */ +} CriAtomExAisacGraphInfo; + +/*EN + * \brief Structure to get information about a selector + * \ingroup ATOMEXLIB_ACF + * \par Description: + * Structure to get information about a selector.
+ * It is passed to the ::criAtomExAcf_GetSelectorInfo function that fills it.
+ * \attention + * \sa criAtomExAcf_GetSelectorInfo, criAtomExAcf_GetSelectorLabelInfo + */ +typedef struct CriAtomExSelectorInfoTag { + const CriChar8* name; /*EN< Selector name */ + CriUint16 index; /*EN< Data index */ + CriUint16 num_labels; /*EN< Number of labels */ + CriUint16 global_label_index; /*EN< Global reference label index */ +} CriAtomExSelectorInfo; + + +/*EN + * \brief Structure used to get information about a selector label + * \ingroup ATOMEXLIB_ACF + * \par Description: + * Structure used to get information about a selector label.
+ * It is passed to the ::criAtomExAcf_GetSelectorLabelInfo function.
+ * \sa criAtomExAcf_GetSelectorLabelInfo + */ +typedef struct CriAtomExSelectorLabelInfoTag { + const CriChar8* selector_name; /*EN< Selector name */ + const CriChar8* label_name; /*EN< Selector label name */ +} CriAtomExSelectorLabelInfo; + +/*========================================================================== + * CRI AtomEx Category API + *=========================================================================*/ +/*EN + * \brief Category ID + * \ingroup ATOMEXLIB_CATEGORY + * \par Description: + * A unique ID assigned to a category by the user in the authoring tool.
+ * It is used to reference a specific category across the application.
+ * \sa criAtomExCategory_SetVolumeById, criAtomExCategory_MuteById, criAtomExCategory_SoloById + */ +typedef CriUint32 CriAtomExCategoryId; + +/*EN + * \brief Maximum number of category references per playback + * \ingroup ATOMEXLIB_CATEGORY + * The maximum number of category references per playback.
+ * \sa CriAtomExCueInfo + */ +#define CRIATOMEXCATEGORY_MAX_CATEGORIES_PER_PLAYBACK (16) + +/*EN + * \brief Structure used to get information about a category + * \ingroup ATOMEXLIB_CATEGORY + * \par Description: + * Structure used to get information about a category.
+ * It is passed to the ::criAtomExAcf_GetCategoryInfo function which fills it.
+ * \sa criAtomExAcf_GetCategoryInfo + */ +typedef struct CriAtomExCategoryInfoTag { + CriUint32 group_no; /*EN< Group number */ + CriUint32 id; /*EN< Category ID */ + const CriChar8* name; /*EN< Category name */ + CriUint32 num_cue_limits; /*EN< Number of Cue limits */ + CriFloat32 volume; /*EN< Volume */ +} CriAtomExCategoryInfo; + +/*EN + * \brief REACT Type + * \ingroup ATOMEXLIB_CATEGORY + * \par Description: + * REACT Type.
+ * \sa CriAtomExReactParameter, criAtomExCategory_SetReactParameter, criAtomExCategory_GetReactParameter + */ +typedef enum CriAtomExReactTypeTag { + CRIATOMEX_REACT_TYPE_DUCKER = 0, /*EN< Ducker */ + CRIATOMEX_REACT_TYPE_AISAC_MODULATION_TRIGGER, /*EN< AISAC Modulation Trigger */ + + /* enum size is 4bytes */ + CRIATOMEX_REACT_TYPE_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomExReactType; + +/*EN + * \brief Target of Ducking by REACT + * \ingroup ATOMEXLIB_CATEGORY + * \par Description: + * Target type of ducking by REACT. + * \sa CriAtomExReactParameter, criAtomExCategory_SetReactParameter, criAtomExCategory_GetReactParameter + */ +typedef enum CriAtomExReactDuckerTargetTypeTag { + CRIATOMEX_REACT_DUCKER_TARGET_TYPE_VOLUME = 0, /*EN< Ducker of Volume */ + CRIATOMEX_REACT_DUCKER_TARGET_TYPE_AISAC_CONTROL_VALUE, /*EN< Ducker of AISAC Control Value */ + + /* enum size is 4bytes */ + CRIATOMEX_REACT_DUCKER_TARGET_TYPE_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomExReactDuckerTargetType; + +/*EN + * \brief Curve Type of Ducking by REACT + * \ingroup ATOMEXLIB_CATEGORY + * \par Description: + * Curve Type of Ducking by REACT. + * \sa CriAtomExReactParameter, criAtomExCategory_SetReactParameter, criAtomExCategory_GetReactParameter + */ +typedef enum CriAtomExReactDuckerCurveTypeTag { + CRIATOMEX_REACT_DUCKER_CURVE_TYPE_LINEAR = 0, /*EN< Linear */ + CRIATOMEX_REACT_DUCKER_CURVE_TYPE_SQUARE, /*EN< Slow change */ + CRIATOMEX_REACT_DUCKER_CURVE_TYPE_SQUARE_REVERSE, /*EN< Fast change */ + CRIATOMEX_REACT_DUCKER_CURVE_TYPE_S, /*EN< S-curve */ + CRIATOMEX_REACT_DUCKER_CURVE_TYPE_FLAT_AT_HALF, /*EN< Inverted S-curve */ + + /* enum size is 4bytes */ + CRIATOMEX_REACT_DUCKER_CURVE_TYPE_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomExReactDuckerCurveType; + +/*EN + * \brief REACT fade parameter structure + * \ingroup ATOMEXLIB_CATEGORY + * \par Description: + * This is a structure for getting and setting fade drive parameter information of REACT.
+ * \sa CriAtomExReactParameter, criAtomExCategory_SetReactParameter, criAtomExCategory_GetReactParameter + */ +typedef struct CriAtomExReactFadeParameterTag { + CriAtomExReactDuckerCurveType curve_type; /*EN< Curve Type */ + CriFloat32 curve_strength; /*EN< Strength of change curve (0.0f - 2.0f) */ + CriUint16 fade_time_ms; /*EN< Fade Time (msec) */ +} CriAtomExReactFadeParameter; + +/*EN + * \brief REACT Hold Type + * \ingroup ATOMEXLIB_CATEGORY + * \par Description: + * REACT hold (Attenuation time maintenance) type.
+ * \sa CriAtomExReactParameter, criAtomExCategory_SetReactParameter, criAtomExCategory_GetReactParameter + */ +typedef enum CriAtomExReactHoldTypeTag { + CRIATOMEX_REACT_HOLD_TYPE_WHILE_PLAYING, /*EN< Hold during playback */ + CRIATOMEX_REACT_HOLD_TYPE_FIXED_TIME, /*EN< Hold at a fixed time */ + + /* enum size is 4bytes */ + CRIATOMEX_REACT_HOLD_TYPE_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomExReactHoldType; + +/*EN + * \brief REACT ducker parameter structure + * \ingroup ATOMEXLIB_CATEGORY + * \par Description: + * This is a structure for getting and setting drive parameter information of ducker by REACT. + * \sa CriAtomExReactParameter, criAtomExCategory_SetReactParameter, criAtomExCategory_GetReactParameter + */ +typedef struct CriAtomExReactDuckerParameterTag { + union { + struct { + CriFloat32 level; /*EN< Decay volume level */ + } volume; + struct { + CriUint16 control_id; /*EN< AISAC Control ID */ + CriFloat32 control_value; /*EN< AISAC Control Value */ + } aisac_control_value; + } target; + CriAtomExReactDuckerTargetType target_type; /*EN< Target Type of Ducker */ + CriAtomExReactFadeParameter entry; /*EN< Start of change fade parameter */ + CriAtomExReactFadeParameter exit; /*EN< End of change fade parameter */ + CriAtomExReactHoldType hold_type; /*EN< Hold Type */ + CriUint16 hold_time_ms; /*EN< Hold Time (msec) */ +} CriAtomExReactDuckerParameter; + +/*EN + * \brief AISAC modulation trigger parameter structure + * \ingroup ATOMEXLIB_CATEGORY + * \par Description: + * This is a structure for getting and setting drive parameter information of AISAC modulation trigger. + * \sa CriAtomExReactParameter, criAtomExCategory_SetReactParameter, criAtomExCategory_GetReactParameter + */ +typedef struct CriAtomExReactAisacModulationParameterTag { + CriBool enable_decrement_aisac_modulation_key; /*EN< Decrement AISAC modulation key is valid or not */ + CriUint32 decrement_aisac_modulation_key; /*EN< Decrement AISAC modulation key */ + CriBool enable_increment_aisac_modulation_key; /*EN< Increment AISAC modulation key is valid or not */ + CriUint32 increment_aisac_modulation_key; /*EN< Increment AISAC modulation key */ +} CriAtomExReactAisacModulationParameter; + +/*EN + * \brief REACT drive parameter structure + * \ingroup ATOMEXLIB_CATEGORY + * \par Description: + * This is a structure for getting and setting drive parameter information of REACT.
+ * Pass it as an argument to the ::criAtomExCategory_SetReactParameter function or the ::criAtomExCategory_GetReactParameter function.
+ * \sa criAtomExCategory_SetReactParameter, criAtomExCategory_GetReactParameter + */ +typedef struct CriAtomExReactParameterTag { + union { + CriAtomExReactDuckerParameter ducker; /*EN< Ducker parameter */ + CriAtomExReactAisacModulationParameter aisac_modulation; /*EN< AISAC modulation trigger parameter */ + } parameter; + CriAtomExReactType type; /*EN< REACT Type */ + CriBool enable_pausing_cue; /*EN< Whether paused cue applies */ +} CriAtomExReactParameter; + +/*========================================================================== + * CRI AtomEx ACB API + *=========================================================================*/ +struct CriAtomExAcbTag; +typedef struct CriAtomExAcbTag CriAtomExAcbObj; +/*EN + * \brief ACB handle + * \ingroup ATOMEXLIB_ACB + * \par Description: + * Handle used to manage CueSheet information.
+ * To play back the audio data from a CueSheet file (loaded by using the ::criAtomExAcb_LoadAcbFile function) + * specify this handle and a Cue ID to a player.
+ * \sa criAtomExAcb_LoadAcbFile, criAtomExPlayer_SetCueId + */ +typedef CriAtomExAcbObj *CriAtomExAcbHn; + +/*EN + * \brief Cue ID + * \ingroup ATOMEXLIB_ACB + * \par Description: + * A unique ID assigned to a Cue by the user in an authoring tool.
+ * It is used to reference a specifc Cue across the application.
+ * \sa criAtomExPlayer_SetCueId + */ +typedef CriSint32 CriAtomExCueId; + +/*EN + * \brief Cue index + * \ingroup ATOMEXLIB_ACB + * \par Description: + * A number indicating the position of the Cue in the ACB file.
+ * (The index is 0-based and the values are assigned sequentially: the first Cue is at index 0, the second Cue at index 1, and so on...)
+ * The index can be used to reference a specifc Cue of an ACB file across the application.
+ * \sa criAtomExPlayer_SetCueIndex + */ +typedef CriSint32 CriAtomExCueIndex; + +/*EN + * \brief ACB information + * \ingroup ATOMEXLIB_ACB + * \par Description: + * ACB data information.
+ * \sa criAtomExAcb_GetAcbInfo + */ +typedef struct CriAtomExAcbInfoTag { + const CriChar8* name; /*EN< Name */ + CriUint32 size; /*EN< Size */ + CriUint32 version; /*EN< ACB version */ + CriAtomExCharacterEncoding character_encoding; /*EN< Character code */ + CriFloat32 volume; /*EN< CueSheet volume */ + CriSint32 num_cues; /*EN< Number of Cues */ +} CriAtomExAcbInfo; + +/*EN + * \brief Audio waveform information + * \ingroup ATOMEXLIB_ACB + * \par Description: + * Detailed information about an audio waveform played back in a Cue.
+ * \sa criAtomExAcb_GetWaveformInfoById, criAtomExAcb_GetWaveformInfoByName + */ +/* Waveform information */ +typedef struct CriAtomExWaveformInfoTag { + CriAtomExWaveId wave_id; /*EN< Waveform data ID */ + CriAtomExFormat format; /*EN< Format type */ + CriSint32 sampling_rate; /*EN< Sampling frequency */ + CriSint32 num_channels; /*EN< Number of channels */ + CriSint64 num_samples; /*EN< Total number of samples */ + CriBool streaming_flag; /*EN< Streaming flag */ +} CriAtomExWaveformInfo; + +/*EN + * \brief Cue type + * \ingroup ATOMEXLIB_ACB + * \sa CriAtomExCueInfo + */ +typedef enum CriAtomExAcbCueTypeTag { + CRIATOMEXACB_CUE_TYPE_POLYPHONIC = (0), /*EN< Polyphonic */ + CRIATOMEXACB_CUE_TYPE_SEQUENTIAL, /*EN< Sequential */ + CRIATOMEXACB_CUE_TYPE_SHUFFLE, /*EN< Shuffle */ + CRIATOMEXACB_CUE_TYPE_RANDOM, /*EN< Random */ + CRIATOMEXACB_CUE_TYPE_RANDOM_NO_REPEAT, /*EN< Random without repetition (play sounds randomly but not the same twice in a row) */ + CRIATOMEXACB_CUE_TYPE_SWITCH_GAME_VARIABLE, /*EN< Switch playback (the value of a game variable determines what track to play) */ + CRIATOMEXACB_CUE_TYPE_COMBO_SEQUENTIAL, /*EN< Play the tracks sequentially if the Cue is triggered within the combo interval */ + CRIATOMEXACB_CUE_TYPE_SWITCH_SELECTOR, /*EN< Switch playback (the value of a selector determines what track to play) */ + CRIATOMEXACB_CUE_TYPE_TRACK_TRANSITION_BY_SELECTOR, /*EN< Track transition playback (reference a selector to change the track to play) */ + /* 4-byte enum */ + CRIATOMEXACB_CUE_TYPE_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomExAcbCueType; + +/*EN + * \brief Cue 3D information + * \ingroup ATOMEXLIB_ACB + * \par Description: + * Detailed 3D information associated to a Cue.
+ * \sa CriAtomExCueInfo + */ +typedef struct CriAtomExCuePos3dInfoTag { + CriFloat32 cone_inside_angle; /*EN< Cone interior angle */ + CriFloat32 cone_outside_angle; /*EN< Cone exterior angle */ + CriFloat32 min_distance; /*EN< Minimum distance attenuation */ + CriFloat32 max_distance; /*EN< Maximum distance attenuation */ + CriFloat32 source_radius; /*EN< Radius of audio source without the interior panning */ + CriFloat32 interior_distance; /*EN< Distance applied for interior panning */ + CriFloat32 doppler_factor; /*EN< Doppler factor */ + CriUint16 distance_aisac_control; /*EN< Distance attenuation AISAC control */ + CriUint16 listener_base_angle_aisac_control; /*EN< Listener reference angle AISAC control */ + CriUint16 source_base_angle_aisac_control; /*EN< Sound source reference angle AISAC control */ + CriUint16 reserved[1]; /*EN< Reserved area */ +} CriAtomExCuePos3dInfo; + +/*EN + * \brief Cue information + * \ingroup ATOMEXLIB_ACB + * \par Description: + * Detailed Cue information.
+ * \sa criAtomExAcb_GetCueInfoByName, criAtomExAcb_GetCueInfoById, criAtomExAcb_GetCueInfoByIndex + */ +typedef struct CriAtomExCueInfoTag { + CriAtomExCueId id; /*EN< Cue ID */ + CriAtomExAcbCueType type; /*EN< Type */ + const CriChar8* name; /*EN< Cue name */ + const CriChar8* user_data; /*EN< User data */ + CriSint64 length; /*EN< Length (msec) */ + CriUint16 categories[CRIATOMEXCATEGORY_MAX_CATEGORIES_PER_PLAYBACK]; /*EN< Category index */ + CriSint16 num_limits; /*EN< Cue limits */ + CriUint16 num_blocks; /*EN< Number of blocks */ + CriUint16 num_tracks; /*EN< Number of tracks */ + CriUint16 reserved[1]; /*EN< Reserved Area */ + CriUint8 priority; /*EN< Priority */ + CriUint8 header_visibility; /*EN< Header public flag */ + CriUint8 ignore_player_parameter; /*EN< Player parameters disable flag */ + CriUint8 probability; /*EN< Playback probability */ + CriAtomExCuePos3dInfo pos3d_info; /*EN< 3D information */ + CriAtomExGameVariableInfo game_variable_info; /*EN< Information about game variable */ +} CriAtomExCueInfo; + +/*EN + * \brief Type of the ACB handle callback function + * \ingroup ATOMEXLIB_ACB + * \param[in] obj User-specified object + * \param[in] acb_hn ACB handle + * \return CriBool Continue enumeration (CRI_TRUE: Continue, CRI_FALSE: Stop) + * \par Description: + * The type of the callback function used to get ACB handle notifications.
+ * You can register a callback function of this type by calling ::criAtomExAcb_EnumerateHandles. + * It will allow you to receive the ACB handles via callback.
+ * \attention + * Do not destroy an ACB handle inside the callback function.
+ * \sa criAtomExAcb_EnumerateHandles, CriAtomExAcbHn + */ +typedef CriBool (CRIAPI *CriAtomExAcbHandleCbFunc)(void *obj, CriAtomExAcbHn acb_hn); + +/*EN + * \brief Type of the callback function used to notify of in-game preview data loading + * \ingroup ATOMEXLIB_ACB + * \par Description: + * \param[in] obj User-specified object + * \param[in] acb_name ACB name + * \return None + * \par Description: + * This callback function is called whenever the loading of in-game preview data is detected.
+ * Use this to determine whether in-game preview data is being used or not.
+ *
+ * Call ::criAtomExAcb_SetDetectionInGamePreviewDataCallback to register the callback function.
+ * The registered callback function is executed whenever the ACB content is parsed in an ACB load function.
+ * \attention + * Generally, you should not use Atom library APIs within a callback function.
+ * Note that if process is blocked in a callback function for a long time, + * problems -such as the audio breaking up- may occur.
+ * \sa criAtomExAcb_SetDetectionInGamePreviewDataCallback + */ +typedef void (CRIAPI *CriAtomExAcbDetectionInGamePreviewDataCbFunc)( + void *obj, const CriChar8* acb_name); + +/*========================================================================== + * CRI AtomEx Voice Pool API + *=========================================================================*/ +struct CriAtomExVoicePoolTag; +typedef struct CriAtomExVoicePoolTag CriAtomExVoicePoolObj; +/*EN + * \brief Voice Pool handle + * \ingroup ATOMEXLIB_VOICE_POOL + * \par Description: + * Handle used to control a Voice Pool.
+ * When a Voice Pool is created by using a function such as ::criAtomExVoicePool_AllocateStandardVoicePool, + * a handle if this type is returned.
+ * The Voice Pool handle can then be used to get information about the Voice Pool or + * to release it. + * \sa criAtomExVoicePool_AllocateStandardVoicePool, criAtomExVoicePool_Free + */ +typedef struct CriAtomExVoicePoolTag *CriAtomExVoicePoolHn; + +/*EN + * \brief Voice Pool identifier + * \ingroup ATOMEXLIB_VOICE_POOL + * \par Description: + * An unique ID identifying a Voice Pool.
+ * To reference a specific Voice Pool across the application + * it is necessary to use an identifier of this type.
+ * \par Remarks: + * A Voice Pool identifier must be specified when dealing with:
+ * - a Voice Pool (the ID is specified in the configuration structure used to create the Voice Pool) + * - a Player (the ID is passed to the PLayer by using the criAtomExPlayer_SetVoicePoolIdentifier function) + * By setting the identifier for both the Voice Pool and the Player, + * the Player can then acquire voices from the relevant Voice Pool.
+ *
+ * A single Voice Pool identifier can be specified for multiple Voice Pools.
+ * \sa CriAtomExStandardVoicePoolConfig, criAtomExPlayer_SetVoicePoolIdentifier + */ +typedef CriUint32 CriAtomExVoicePoolIdentifier; + +/*EN + * \brief Configuration structure used when creating a standard Voice Pool + * \ingroup ATOMEXLIB_VOICE_POOL + * \par Description: + * Structure used to configure a standard Voice Pool.
+ * It is passed to the ::criAtomExVoicePool_AllocateStandardVoicePool function.
+ * \attention + * More members will be added in the future, so if you are not using the ::criAtomExVoicePool_SetDefaultConfigForStandardVoicePool + * macro, make sure to initialize the whole structure to zero before using it.
+ * (Make sure that no member of the structure has an undefined value.) + * \sa criAtomExVoicePool_AllocateStandardVoicePool, criAtomExVoicePool_SetDefaultConfigForStandardVoicePool + */ +typedef struct CriAtomExStandardVoicePoolConfigTag { + CriAtomExVoicePoolIdentifier identifier; /*EN< Voice pool ID */ + CriSint32 num_voices; /*EN< Number of voices */ + CriAtomStandardPlayerConfig player_config; /*EN< Specifications of the voices */ +} CriAtomExStandardVoicePoolConfig; + +/*EN + * \brief Configuration structure used when creating an ADX Voice Pool + * \ingroup ATOMEXLIB_VOICE_POOL + * \par Description: + * Structure used to configure an ADX Voice Pool.
+ * It is passed to the ::criAtomExVoicePool_AllocateAdxVoicePool function.
+ * \attention + * More members will be added in the future, so if you are not using the ::criAtomExVoicePool_SetDefaultConfigForAdxVoicePool + * macro, make sure to initialize the whole structure to zero before using it.
+ * (Make sure that no member of the structure has an undefined value.) + * \sa criAtomExVoicePool_AllocateAdxVoicePool, criAtomExVoicePool_SetDefaultConfigForAdxVoicePool + */ +typedef struct CriAtomExAdxVoicePoolConfigTag { + CriAtomExVoicePoolIdentifier identifier; /*EN< Voice pool ID */ + CriSint32 num_voices; /*EN< Number of voices */ + CriAtomAdxPlayerConfig player_config; /*EN< Specifications of the voices */ +} CriAtomExAdxVoicePoolConfig; + +/*EN + * \brief Configuration structure used when creating a HCA Voice Pool + * \ingroup ATOMEXLIB_VOICE_POOL + * \par Description: + * Structure used to configure an HCA Voice Pool.
+ * It is passed to the ::criAtomExVoicePool_AllocateHcaVoicePool function.
+ * \attention + * More members will be added in the future, so if you are not using the ::criAtomExVoicePool_SetDefaultConfigForHcaVoicePool + * macro, make sure to initialize the whole structure to zero before using it.
+ * (Make sure that no member of the structure has an undefined value.) + * \sa criAtomExVoicePool_AllocateHcaVoicePool, criAtomExVoicePool_SetDefaultConfigForHcaVoicePool + */ +typedef struct CriAtomExHcaVoicePoolConfigTag { + CriAtomExVoicePoolIdentifier identifier; /*EN< Voice Pool ID */ + CriSint32 num_voices; /*EN< Number of voices */ + CriAtomHcaPlayerConfig player_config; /*EN< Specifications of the voices */ +} CriAtomExHcaVoicePoolConfig; + +/*EN + * \brief Configuration structure used when creating a HCA-MX Voice Pool + * \ingroup ATOMEXLIB_VOICE_POOL + * \par Description: + * Structure used to configure a HCA-MX Voice Pool.
+ * It is passed to the ::criAtomExVoicePool_AllocateHcaMxVoicePool function.
+ * \attention + * More members will be added in the future, so if you are not using the ::criAtomExVoicePool_SetDefaultConfigForHcaMxVoicePool + * macro, make sure to initialize the whole structure to zero before using it.
+ * (Make sure that no member of the structure has an undefined value.) + * \sa criAtomExVoicePool_AllocateHcaMxVoicePool, criAtomExVoicePool_SetDefaultConfigForHcaMxVoicePool + */ +typedef struct CriAtomExHcaMxVoicePoolConfigTag { + CriAtomExVoicePoolIdentifier identifier; /*EN< Voice Pool ID */ + CriSint32 num_voices; /*EN< Number of voices */ + CriAtomHcaMxPlayerConfig player_config; /*EN< Specifications of the voices */ +} CriAtomExHcaMxVoicePoolConfig; + +/*EN + * \brief Configuration structure used when creating a Wave Voice Pool + * \ingroup ATOMEXLIB_VOICE_POOL + * \par Description: + * Structure used to configure a Wave Voice Pool.
+ * It is passed to the ::criAtomExVoicePool_AllocateWaveVoicePool function.
+ * \attention + * More members will be added in the future, so if you are not using the ::criAtomExVoicePool_SetDefaultConfigForWaveVoicePool + * macro, make sure to initialize the whole structure to zero before using it.
+ * (Make sure that no member of the structure has an undefined value.) + * \sa criAtomExVoicePool_AllocateWaveVoicePool, criAtomExVoicePool_SetDefaultConfigForWaveVoicePool + */ +typedef struct CriAtomExWaveVoicePoolConfigTag { + CriAtomExVoicePoolIdentifier identifier; /*EN< Voice Pool ID */ + CriSint32 num_voices; /*EN< Number of voices */ + CriAtomWavePlayerConfig player_config; /*EN< Specifications of the voices */ +} CriAtomExWaveVoicePoolConfig; + +/*EN + * \brief Configuration structure used when creating an AIFF Voice Pool + * \ingroup ATOMEXLIB_VOICE_POOL + * \par Description: + * Structure used to configure an AIFF Voice Pool.
+ * It is passed to the ::criAtomExVoicePool_AllocateAiffVoicePool function.
+ * \attention + * More members will be added in the future, so if you are not using the ::criAtomExVoicePool_SetDefaultConfigForAiffVoicePool macro, + * make sure to initialize the whole structure to zero before using it.
+ * (Make sure that no member of the structure has an undefined value.) + * \sa criAtomExVoicePool_AllocateAiffVoicePool, criAtomExVoicePool_SetDefaultConfigForAiffVoicePool + */ +typedef struct CriAtomExAiffVoicePoolConfigTag { + CriAtomExVoicePoolIdentifier identifier; /*EN< Voice Pool ID */ + CriSint32 num_voices; /*EN< Number of voices */ + CriAtomAiffPlayerConfig player_config; /*EN< Specifications of the voices */ +} CriAtomExAiffVoicePoolConfig; + +/*EN + * \brief Configuration structure used when creating a raw PCM Voice Pool + * \ingroup ATOMEXLIB_VOICE_POOL + * \par Description: + * Structure used to configure a raw PCM Voice Pool.
+ * It is passed to the ::criAtomExVoicePool_AllocateRawPcmVoicePool function.
+ * \attention + * More members will be added in the future, so if you are not using the ::criAtomExVoicePool_SetDefaultConfigForRawPcmVoicePool + * macro, make sure to initialize the whole structure to zero before using it.
+ * (Make sure that no member of the structure has an undefined value.) + * \sa criAtomExVoicePool_AllocateRawPcmVoicePool, criAtomExVoicePool_SetDefaultConfigForRawPcmVoicePool + */ +typedef struct CriAtomExRawPcmVoicePoolConfigTag { + CriAtomExVoicePoolIdentifier identifier; /*EN< Voice Pool ID */ + CriSint32 num_voices; /*EN< Number of voices */ + CriAtomRawPcmPlayerConfig player_config; /*EN< Specifications of the voices */ +} CriAtomExRawPcmVoicePoolConfig; + +/*========================================================================== + * CRI AtomEx Player API + *=========================================================================*/ +/*EN + * \brief Voice allocation method + * \ingroup ATOMEXLIB_PLAYER + * \par Description: + * Data type used to specify how an AtomEx Player allocates voices.
+ * The voice allocation method is set in the ::CriAtomExPlayerConfig structure used when creating an AtomEx Player.
+ * \sa CriAtomExPlayerConfig, criAtomExPlayer_Create + */ +typedef enum CriAtomExVoiceAllocationMethodTag { + CRIATOMEX_ALLOCATE_VOICE_ONCE = 0, /*EN< Voice allocation is performed only once */ + CRIATOMEX_RETRY_VOICE_ALLOCATION, /*EN< Voice allocation is performed repeatedly */ + CRIATOMEX_VOICE_ALLOCATION_METHOD_IS_4BYTE = 0x7FFFFFFF +} CriAtomExVoiceAllocationMethod; + +/*EN + * \brief Configuration structure used when creating a player + * \ingroup ATOMEXLIB_PLAYER + * \par Description: + * Configuration structure used when creating an AtomEx Player.
+ * It is passed to the ::criAtomExPlayer_Create function.
+ *
+ * When the player is created, internal resources are allocated based on the values + * of the parameters in this configuration structure.
+ * In particular, the size of the work buffer needed for the player depends on the parameters set in the structure. + * \attention + * More members will be added in the future, so if you are not using the ::criAtomExPlayer_SetDefaultConfig + * macro, make sure to initialize the whole structure to zero before using it.
+ * (Make sure that no member of the structure has an undefined value.) + * \sa criAtomExPlayer_Create, criAtomExPlayer_SetDefaultConfig + */ +typedef struct CriAtomExPlayerConfigTag { + /*EN + \brief Voice allocation method + \par Description: + Specifies the method used when an AtomEx Player allocates voices.
+
+ If CRIATOMEX_ALLOCATE_VOICE_ONCE is set in voice_allocation_method, + the AtomEx Player allocates a voice when the audio playback starts.
+ If the voice cannot be allocated at that time, + or if the voice is recycled due to a lower priority during playback, + the voice-related resources are released and the voice playback stops.
+ (Waveform data that has not started to play yet or that was stopped during playback + cannot be resumed later.)
+
+ On the other hand, if CRIATOMEX_RETRY_VOICE_ALLOCATION is set in voice_allocation_method, + the AtomEx Player tries to allocate a voice as many times as needed.
+ Even if the voice cannot be allocated or the voice is recycled, the + resources (virtual voice) used to manage the voice are not released, + and when a voice becomes available again, the audio playback process is resumed.
+ \par Remarks: + When CRIATOMEX_RETRY_VOICE_ALLOCATION is specified, in addition to the normal process of voices being played back, + a voice reacquisition process is performed for virtual voices and therefore the load may be a bit higher than when + CRIATOMEX_ALLOCATE_VOICE_ONCE is specified.
+
+ If the reallocation of voices is successful, the waveform data is played back from a position based on the playback time.
+ \attention + Note that when the CRIATOMEX_RETRY_VOICE_ALLOCATION mode is selected, + if there are more playback requests than max_virtual_voices, the audio playback cannot be resumed.
+ (A warning is returned to the error callback function and virtual voices are deleted.)
+ Therefore, if you use the CRIATOMEX_RETRY_VOICE_ALLOCATION mode, + allocate enough virtual voices at initialization.
+ (Specify a large value for max_virtual_voices.)
+
+ Also, when specifying the CRIATOMEX_RETRY_VOICE_ALLOCATION mode, + it is not possible to strictly control what waveform data will start to play again and when.
+ (The result may be different depending on the timing.)
+ */ + CriAtomExVoiceAllocationMethod voice_allocation_method; + + /*EN + \brief Maximum number of path strings + \par Description: + Specifies the maximum number of path strings that can be stored in an AtomEx Player.
+ \par Remarks: + This parameter only needs to be set if you want to specify a filename to play an unpacked audio file.
+ When the ::criAtomExPlayer_SetFile function is executed, + the path of the file is stored in the AtomEx Player.
+ The default settings allow an AtomEx Player to store only a single path.
+ (This is done to minimize memory consumption.)
+ By specifying a larger number in max_path_strings when an AtomEx player is created, + it is possible to store more paths.
+ By specifying a value greater than or equal to 2 for max_path_strings, + a single player can play back multiple files simultaneously.
+ (Note, however, that the size of the work buffer increases accordingly to the value of max_path_strings.)
+ (Storing the paths requires max_path_strings * max_path bytes of memory.)
+ \sa criAtomExPlayer_SetDefaultConfig, criAtomExPlayer_SetFile + */ + CriSint32 max_path_strings; + + /*EN + \brief Maximum path length + \par Description: + Specifies the maximum length of a path that can be specified for an AtomEx Player.
+ If you think you will pass a file name directly for audio playback, + then you must specify the maximum path length in max_path.
+ \par Remarks: + When you specify a Cue ID or waveform data ID for playback instead of specifying a file name, + you can set max_path to 0.
+ \attention + When the ::criAtomExPlayer_SetDefaultConfig macro is used to set the default values to the CriAtomExPlayerConfig structure, + max_path is set to 0.
+ When you specify a file name for playback, do not use the ::criAtomExPlayer_SetDefaultConfig + macro, or, after calling it, change the maximum path length.
+ \sa criAtomExPlayer_SetDefaultConfig, criAtomExPlayer_SetFile + */ + CriSint32 max_path; + + /*EN + \brief Maximum number of AISACs + \par Description: + The maximum number of AISAC to use in the application.
+ The Atom library reserves resources that can refer to the number of AISACs specified by max_aisacs at initialization.
+ The maximum value that can be specified is ::CRIATOMPARAMETER2_MAX_NUM_AISACS. + */ + CriUint8 max_aisacs; + + /*EN + \brief Time update setting + \par Description: + Specifies whether an AtomEx Player performs the playback time updating process.
+ \par Remarks: + If updates_time is set to CRI_FALSE, + the AtomEx Player will not update the playback time.
+ As a result, the ::criAtomExPlayer_GetTime function will not be able to get the playback time. + The advantage is a slightly reduced processing load.
+ \sa criAtomExPlayer_GetTime + */ + CriBool updates_time; + + /*EN + \brief Enabling/disabling the update of time in sync with sound + \par Description: + Specifies whether the AtomEx player updates time in sync with playback sound.
+ \par Note: + If enable_audio_synced_timer is set to CRI_TRUE, + for the sound played by the created AtomEx player, + playback time is adjusted in sync with the number of played samples.
+ You can use the ::criAtomExPlayback_GetTimeSyncedWithAudio function to acquire the adjusted playback time.
+ Because the processing load increases during sound playback, + specify CRI_TRUE only when you create a player for which you want accurate playback time in sync with sound.
+ \attention + */ + CriBool enable_audio_synced_timer; +} CriAtomExPlayerConfig; + +struct CriAtomExPlayerTag; +typedef struct CriAtomExPlayerTag CriAtomExPlayerObj; + +/*EN + * \brief Player handle + * \ingroup ATOMEXLIB_PLAYER + * \par Description: + * Handle used to reference a player created for audio playback across the application.
+ * When the ::criAtomExPlayer_Create function is called, it returns as AtomEx player handle. + *
+ * All playback-related operations (such as setting the audio data to play, starting playing and acquiring the status of the playback) are performed + * through an AtomEx player handle.
+ * \sa criAtomExPlayer_Create + */ +typedef CriAtomExPlayerObj *CriAtomExPlayerHn; + +/*EN + * \brief Player status + * \ingroup ATOMEXLIB_PLAYER + * \par Description: + * This enumeration defines the various playback statuses of an AtomEx Player.
+ * The playback status can be acquired by using the ::criAtomExPlayer_GetStatus function.
+ *
+ * Usually, the playback status of an AtomEx Player changes in the following order.
+ * -# CRIATOMEXPLAYER_STATUS_STOP + * -# CRIATOMEXPLAYER_STATUS_PREP + * -# CRIATOMEXPLAYER_STATUS_PLAYING + * -# CRIATOMEXPLAYER_STATUS_PLAYEND + * . + * Immediately after an AtomEx Player is created, it is set to the stop status (CRIATOMEXPLAYER_STATUS_STOP).
+ * By setting the data to play using a function such as ::criAtomExPlayer_SetData and calling ::criAtomExPlayer_Start, + * the player's status changes to (CRIATOMEXPLAYER_STATUS_PREP) and starts preparing for the playback.
+ * Once a sufficient amount of data has been provided and the playback is ready, the player status changes to (CRIATOMEXPLAYER_STATUS_PLAYING) + * and the audio playback starts.
+ * When all the audio data has been played, the player status changes to (CRIATOMEXPLAYER_STATUS_PLAYEND). + * \par Remarks: + * Unlike an Atom Player, a single AtomEx Player can play back multiple sounds.
+ * Therefore, by executing the ::criAtomExPlayer_Start function on a currently used AtomEx Player, + * two sounds are played back overlapping each other.
+ * When the ::criAtomExPlayer_Stop function is executed during playback, all sounds being played back on the AtomEx Player are stopped, + * and the status returns to CRIATOMEXPLAYER_STATUS_STOP.
+ * (Depending on when the ::criAtomExPlayer_Stop function was called, it may take time + * to change the status to CRIATOMEXPLAYER_STATUS_STOP.)
+ *
+ * When the ::criAtomExPlayer_Start function is executed multiple times on a single AtomEx Player, + * if any sound is in preparation for the playback, the status becomes CRIATOMEXPLAYER_STATUS_PREP.
+ * (Only after all sounds have started to play is the status changed to + * CRIATOMEXPLAYER_STATUS_PLAYING.)
+ * Also, when the status of the player is CRIATOMEXPLAYER_STATUS_PLAYING and the ::criAtomExPlayer_Start + * function is executed again, the status temporarily returns to CRIATOMEXPLAYER_STATUS_PREP.
+ *
+ * During playback, if invalid audio data is read or the file access has failed, + * the status is changed to CRIATOMEXPLAYER_STATUS_ERROR.
+ * While multiple sounds are being played back, if an error occurs on a sound, + * the status of the player is changed to CRIATOMEXPLAYER_STATUS_ERROR, regardless of the status of the other sounds.
+ * \sa criAtomExPlayer_GetStatus, criAtomExPlayer_SetData, criAtomExPlayer_Start, criAtomExPlayer_Stop + */ +typedef enum CriAtomExPlayerStatusTag { + CRIATOMEXPLAYER_STATUS_STOP = 0, /*EN< Stopped */ + CRIATOMEXPLAYER_STATUS_PREP, /*EN< In preparation for playback */ + CRIATOMEXPLAYER_STATUS_PLAYING, /*EN< In playback */ + CRIATOMEXPLAYER_STATUS_PLAYEND, /*EN< Playback complete */ + CRIATOMEXPLAYER_STATUS_ERROR, /*EN< An error occurred */ + CRIATOMEXPLAYER_STATUS_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomExPlayerStatus; + +/*EN + * \brief Voice playback control method + * \ingroup ATOMEXLIB_PLAYER + * \par Description: + * This enumeration defines the various types of voice control available for an AtomEx Player.
+ * The control method is passed to the ::criAtomExPlayer_SetVoiceControlMethod function.
+ * \sa criAtomExPlayer_SetVoiceControlMethod + */ +typedef enum CriAtomExVoiceControlMethodTag { + CRIATOMEX_PREFER_LAST = 0, /*EN< Last-come, first-served */ + CRIATOMEX_PREFER_FIRST = 1, /*EN< First-come, first-served */ + CRIATOMEX_PREFER_DATA = 2, /*EN< Setting in data preferred */ + CRIATOMEX_CONTROL_METHOD_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomExVoiceControlMethod; + +/*EN + * \brief Speaker ID + * \ingroup ATOMEXLIB_PLAYER + * \par Description: + * This enumeration defines the various speakers available for the audio output.
+ * A speaker can be passed to the ::criAtomExPlayer_SetSendLevel function. + * \sa criAtomExPlayer_SetSendLevel + */ +typedef enum CriAtomExSpeakerIdTag { + CRIATOMEX_SPEAKER_FRONT_LEFT = 0, /*EN + * It can be used when you want to change the parameters or acquire the playing status of + * a single voice being played back (and not of the whole Player).
+ * An invalid playback ID is represented by ::CRIATOMEX_INVALID_PLAYBACK_ID. + * \sa criAtomExPlayer_Start, criAtomExPlayback_GetStatus, CRIATOMEX_INVALID_PLAYBACK_ID + */ +typedef CriUint32 CriAtomExPlaybackId; + +/*EN + * \brief Player callback function type + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] obj User specified object + * \param[in] player AtomEx player + * \par Description: + * This is the type of the callback function that is used to enumerate players.
+ * By registering a callback function of this function type for the ::criAtomExPlayer_EnumeratePlayers function, + * you can receive a player that was created in the application in a callback.
+ * \attention + * Do not destroy the AtomEx player passed as an argument.
+ * (Serious problems, such as an access violation and hang-up may occur.)
+ *
+ * Note that if processes are blocked in the callback function for a long time, some problems, such as a playback interruption + * may occur.
+ * \sa criAtomExPlayer_EnumeratePlayers + */ +typedef void (CRIAPI *CriAtomExPlayerCbFunc)(void *obj, CriAtomExPlayerHn player); + +/*EN + * \brief Data request callback function + * \ingroup ATOMEXLIB_PLAYER + * \par Description: + * \param[in] obj user-specified object + * \param[in] id playback ID + * \param[in] player Atom player handle + * \return none + * \par Description: + * This callback function is used to specify the next block of data to be played back.
+ * It is used for seamless playback of multiple audio buffers.
+ *
+ * Use the ::criAtomExPlayer_SetDataRequestCallback function to register this callback function.
+ * The registered callback function is executed + * when data for seamless playback is requested by an Atom Player (used internally by a voice).
+ * (The callback function is executed when the previous buffer has been completely loaded and the next buffer to be played + * is requested.) + *
+ * When a function such as ::criAtomPlayer_SetData is used to set data to an Atom player within a callback function, + * that data can be played back seamlessly after the data currently being played .
/ + * Furthermore, executing the ::criAtomPlayer_SetPreviousDataAgain function within this function + * will allow the same data to be played back repeatedly. + * \par Remarks: + * If no data is specified in this function, when the playback of the current data is complete, + * the status of the AtomEx Player is switched to ::CRIATOMEXPLAYER_STATUS_PLAYEND.
+ *
+ * When you cannot specify data due to a problem of timing + * but you do not want to switch the status to ::CRIATOMEXPLAYER_STATUS_PLAYEND, + * execute the ::criAtomPlayer_DeferCallback function in the callback function.
+ * By executing the ::criAtomPlayer_DeferCallback function, + * the data request callback function is invoked again about 1V later. (The callback process can be retried.)
+ * However, if the ::criAtomPlayer_DeferCallback function is executed, + * audio breakup may occur during playback (i.e. the playback is silent for a certain time bewteen the two audio buffers).
+ * \attention + * Note that the third argument (player) in this callback is not an AtomEx Player, + * but an Atom Player from the lower layer.
+ * (If it is casted to an AtomExPlayerHn, serious problems such as an access violation will occur.)
+ *
+ * If a Cue containing multiple waveforms is being played back, + * the callback function is executed for the first waveform whose data has finished to play.
+ * Therefore, if concatenated playback is performed for a Cue containing multiple waveforms, + * an unintended combination of audio buffers may happen during the concatenation.
+ * When you use this feature, play back Cues containing a single waveform (or play files or in-memory data instead).
+ *
+ * Currently, callbacks are only allocated to voices that have begun waveform data playback.
+ * Therefore, the callback will not be executed if a voice is virtualized.
+ * (When the end of the data is reached, the callback will not be executed and the status will be change to PLAYEND.)
+ *
+ * Do not perform anything else than seamless concatenated playback within this callback function.
+ * The callback function is executed from the server process in the Atom library.
+ * Therefore, if an API that does not take into account the interrupts to the server process is executed, + * an error or deadlock may occur.
+ *
+ * The APIs that can be executed in a callback function are:
+ * - criAtomExAcb_GetWaveformInfoById (NULL cannot be specified for the argument) + * - criAtomExAcb_GetWaveformInfoByName (NULL cannot be specified for the argument) + * - criAtomExAcb_GetOnMemoryAwbHandle + * - criAtomExAcb_GetStreamingAwbHandle + * - criAtomPlayer_SetData + * - criAtomPlayer_SetFile + * - criAtomPlayer_SetContentId + * - criAtomPlayer_SetWaveId + * - criAtomPlayer_SetPreviousDataAgain + * - criAtomPlayer_DeferCallback + * . + *
+ * Note that if the process is blocked in the callback function for a long time, + * problems -such as the audio breaking up- may occur.
+ * \sa criAtomExPlayer_SetDataRequestCallback, criAtomPlayer_SetData, + * criAtomPlayer_SetPreviousDataAgain, criAtomPlayer_DeferCallback + */ +typedef void (CRIAPI *CriAtomExPlayerDataRequestCbFunc)( + void *obj, CriAtomExPlaybackId id, CriAtomPlayerHn player); + +/*EN + * \brief Waveform filter callback function + * \ingroup ATOMEXLIB_PLAYER + * \par Description: + * \param[in] obj user-specified object + * \param[in] id playback ID + * \param[in] format format of PCM + * \param[in] num_channels number of channels + * \param[in] num_samples number of samples + * \param[in/out] data channel array for PCM data + * \return NONE + * \par Description: + * Callback function to receive decoded PCM data.
+ *
+ * Call ::criAtomExPlayer_SetFilterCallback to register this callback function.
+ * Then, every time a voice will decode audio data, this callback function will be executed.
+ *
+ * The format and number of channels of PCM data, + * the number of samples that can be referenced, as well as the address of the buffer in which the PCM data is stored are all passed to the filter callback function.
+ * In the callback function, the PCM data can be referenced directly. + * Therefore, it can be used to check the amplitude of a sound being played back.
+ *
+ * Also, any modification of the PCM data in the callback function is reflected in the sound playback, + * making it possible to apply user effects to the PCM data.
+ * (However, modifications such as time-stretching that change the amount of data cannot be performed.)
+ * \par Remarks: + * The PCM data is separated by channel (i.e the data is not interleaved.)
+ * In the sixth argument (data array), the first address of PCM data array for each channel is stored.
+ * (It is not the first address of a two-dimensional array, but a one-dimensional pointer array that stores + * the first address of the PCM data array for each channel.)
+ *
+ * The format of the PCM data depends on the platform.
+ * It can be identified by the third argument (format).
+ * If a sample is coded on a 16-bit integer, the PCM data format is CRIATOM_PCM_FORMAT_SINT16. + * If a sample is coded on a 32-bit float, the PCM data format is CRIATOM_PCM_FORMAT_FLOAT32.
+ * Note that the range of the valid values depends on the format:
+ * - For CRIATOM_PCM_FORMAT_SINT16, the range is -32768 to +32767 + * - For CRIATOM_PCM_FORMAT_FLOAT32, the range is -1.0f to +1.0f + * . + * (Since clipping is not performed during the decoding, when the format is CRIATOM_PCM_FORMAT_FLOAT32, + * a value that slightly exceeds the range may be generated.)
+ * \attention + *
+ * Do not execute any Atom library APIs within this callback function.
+ * The callback function is executed from the server process in the Atom library.
+ * Therefore, if an API that does not take into account the interrupts to the server process is executed, + * an error or deadlock may occur.
+ *
+ * Note that if the process is blocked in the callback function for a long time, + * problems -such as the audio breaking up- may occur.
+ * \sa criAtomExPlayer_SetFilterCallback + */ +typedef void (CRIAPI *CriAtomExPlayerFilterCbFunc)( + void *obj, CriAtomExPlaybackId id, CriAtomPcmFormat format, + CriSint32 num_channels, CriSint32 num_samples, void *data[]); + +/*EN + * \brief Block transition callback function + * \ingroup ATOMEXLIB_PLAYER + * \param[in] obj user-specified object + * \param[in] id playback ID + * \param[in] index block index within a Cue + * \return none + * \par Description: + * Callback function that is called when a block transition occurs during the playback of a block sequence.
+ *
+ * Call ::criAtomExPlayer_SetBlockTransitionCallback to register the callback function.
+ * After registering the callback function, each time a block transition occurs, the callback function is executed.
+ *
+ * \attention + * Do not execute any Atom library APIs within this callback function.
+ * The callback function is executed from the server process in the Atom library.
+ * Therefore, if an API that does not take into account the interrupts to the server process is executed, + * an error or deadlock may occur.
+ *
+ * Note that if the process is blocked in the callback function for a long time, + * problems -such as the audio breaking up- may occur.
+ * \sa criAtomExPlayer_SetBlockTransitionCallback + */ +typedef void (CRIAPI *CriAtomExPlayerBlockTransitionCbFunc)( + void *obj, CriAtomExPlaybackId id, CriAtomExBlockIndex index); + +/*EN + * \brief Info structure for playback track information + * \ingroup ATOMEXLIB_PLAYER + */ +typedef struct CriAtomExPlaybackTrackInfoTag { + CriAtomExPlaybackId id; /*EN< Playback ID */ + CriAtomExAcbCueType sequence_type; /*EN< Parent Sequence Type */ + CriAtomExPlayerHn player; /*EN< Player handle */ + CriUint16 track_no; /*EN< Track number */ + CriUint16 reserved[1]; /*EN< Reserved area */ +} CriAtomExPlaybackTrackInfo; + +/*EN + * \brief Playback track information acquisition call back function + * \ingroup ATOMEXLIB_PLAYER + * \param[in] obj User specified object + * \param[in] index Playback track information + * \par Description: + * This is a callback function that notifies track information played back when playing a cue other than polyphonic type.
+ *
+ * Use the ::criAtomExPlayer_SetPlaybackTrackInfoNotificationCallback function to register the callback function.
+ *
+ * \attention + *
+ * Do not execute the Atom library APIs within this callback function.
+ * The callback function is executed from the server process in the Atom library.
+ * Therefore, if you execute an API that does not consider interrupts to server processing, errors may occur or deadlock may occur.
+ *
+ * If block long processing within the callback function, problems such as out of sound may occur.
+ * \sa criAtomExPlayer_SetPlaybackTrackInfoNotificationCallback + */ +typedef void (CRIAPI *CriAtomExPlayerPlaybackTrackInfoNotificationCbFunc)( + void *obj, const CriAtomExPlaybackTrackInfo* info); + +/*EN + * \brief Parameter ID + * \ingroup ATOMEXLIB_PLAYER + * \par Description: + * ID used to specify a parameter.
+ * This is used for instance by the ::criAtomExPlayer_GetParameterFloat32 function. + * \sa criAtomExPlayer_GetParameterFloat32, criAtomExPlayer_GetParameterSint32, + * criAtomExPlayer_GetParameterUint32 + */ +typedef enum CriAtomExParameterIdTag { + CRIATOMEX_PARAMETER_ID_VOLUME = 0, /*EN< Volume */ + CRIATOMEX_PARAMETER_ID_PITCH = 1, /*EN< Pitch */ + CRIATOMEX_PARAMETER_ID_PAN3D_ANGLE = 2, /*EN< Panning 3D angle */ + CRIATOMEX_PARAMETER_ID_PAN3D_DISTANCE = 3, /*EN< Panning 3D distance */ + CRIATOMEX_PARAMETER_ID_PAN3D_VOLUME = 4, /*EN< Panning 3D volume */ + CRIATOMEX_PARAMETER_ID_PAN_TYPE = 5, /*EN< Pan type */ + CRIATOMEX_PARAMETER_ID_PAN_SPEAKER_TYPE = 6, /*EN< Pan speaker type */ + CRIATOMEX_PARAMETER_ID_PAN_CH0 = 7, /*EN< 2D panning (channel 0) */ + CRIATOMEX_PARAMETER_ID_PAN_CH1 = 8, /*EN< 2D panning (channel 1) */ + CRIATOMEX_PARAMETER_ID_BUS_SEND_LEVEL_0 = 9, /*EN< Bus send level 0 */ + CRIATOMEX_PARAMETER_ID_BUS_SEND_LEVEL_1 = 10, /*EN< Bus send level 1 */ + CRIATOMEX_PARAMETER_ID_BUS_SEND_LEVEL_2 = 11, /*EN< Bus send level 2 */ + CRIATOMEX_PARAMETER_ID_BUS_SEND_LEVEL_3 = 12, /*EN< Bus send level 3 */ + CRIATOMEX_PARAMETER_ID_BUS_SEND_LEVEL_4 = 13, /*EN< Bus send level 4 */ + CRIATOMEX_PARAMETER_ID_BUS_SEND_LEVEL_5 = 14, /*EN< Bus send level 5 */ + CRIATOMEX_PARAMETER_ID_BUS_SEND_LEVEL_6 = 15, /*EN< Bus send level 6 */ + CRIATOMEX_PARAMETER_ID_BUS_SEND_LEVEL_7 = 16, /*EN< Bus send level 7 */ + CRIATOMEX_PARAMETER_ID_BANDPASS_FILTER_COF_LOW = 17, /*EN< Low cutoff frequency for a band pass filter */ + CRIATOMEX_PARAMETER_ID_BANDPASS_FILTER_COF_HIGH = 18, /*EN< High cutoff frequency for a band pass filter */ + CRIATOMEX_PARAMETER_ID_BIQUAD_FILTER_TYPE = 19, /*EN< Filter type of a biquad filter */ + CRIATOMEX_PARAMETER_ID_BIQUAD_FILTER_FREQ = 20, /*EN< Frequency for a biquad filter */ + CRIATOMEX_PARAMETER_ID_BIQUAD_FILTER_Q = 21, /*EN< Q value for a biquad filter */ + CRIATOMEX_PARAMETER_ID_BIQUAD_FILTER_GAIN = 22, /*EN< Gain of a biquad filter */ + CRIATOMEX_PARAMETER_ID_ENVELOPE_ATTACK_TIME = 23, /*EN< Attack time for an envelope */ + CRIATOMEX_PARAMETER_ID_ENVELOPE_HOLD_TIME = 24, /*EN< Hold time for an envelope */ + CRIATOMEX_PARAMETER_ID_ENVELOPE_DECAY_TIME = 25, /*EN< Decay time for an envelope */ + CRIATOMEX_PARAMETER_ID_ENVELOPE_RELEASE_TIME = 26, /*EN< Release time for an envelope */ + CRIATOMEX_PARAMETER_ID_ENVELOPE_SUSTAIN_LEVEL = 27, /*EN< Sustain level for an envelope */ + CRIATOMEX_PARAMETER_ID_START_TIME = 28, /*EN< Playback start position */ + CRIATOMEX_PARAMETER_ID_PRIORITY = 31, /*EN< Voice priority */ + CRIATOMEX_PARAMETER_ID_SILENT_MODE = 32, /*EN< Silent mode */ + CRIATOMEX_PARAMETER_ID_DSP_PARAMETER_0 = 33, /*EN< Parameter 0 of a DSP effect*/ + CRIATOMEX_PARAMETER_ID_DSP_PARAMETER_1 = 34, /*EN< Parameter 1 of a DSP effect*/ + CRIATOMEX_PARAMETER_ID_DSP_PARAMETER_2 = 35, /*EN< Parameter 2 of a DSP effect*/ + CRIATOMEX_PARAMETER_ID_DSP_PARAMETER_3 = 36, /*EN< Parameter 3 of a DSP effect*/ + CRIATOMEX_PARAMETER_ID_DSP_PARAMETER_4 = 37, /*EN< Parameter 4 of a DSP effect*/ + CRIATOMEX_PARAMETER_ID_DSP_PARAMETER_5 = 38, /*EN< Parameter 5 of a DSP effect*/ + CRIATOMEX_PARAMETER_ID_DSP_PARAMETER_6 = 39, /*EN< Parameter 6 of a DSP effect*/ + CRIATOMEX_PARAMETER_ID_DSP_PARAMETER_7 = 40, /*EN< Parameter 7 of a DSP effect*/ + + /* 4-byte enum */ + CRIATOMEX_PARAMETER_ID_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomExParameterId; + +/*========================================================================== + * CRI AtomEx Sequencer API + *=========================================================================*/ +/*EN + * \brief Type of sequence event callback + * \ingroup ATOMEXLIB_SEQUENCER + * \par Description: + * Type of sequence event callback for the AtomEx library.
+ * \sa CriAtomExSequenceEventInfo + */ +typedef enum CriAtomExSequecneEventTypeTag { + /*EN + * \brief Sequence callback + * \par Description: + * Callback event information embedded in a sequence data. + */ + CRIATOMEX_SEQUENCE_EVENT_TYPE_CALLBACK = 0, + + /* 4-byte enum */ + CRIATOMEX_SEQUENCE_EVENT_TYPE_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomExSequecneEventType; + +/*EN + * \brief Information structure used for sequence callback event + * \ingroup ATOMEXLIB_SEQUENCER + */ +typedef struct CriAtomExSequenceEventInfoTag { + CriUint64 position; /*EN< Event position */ + CriAtomExPlayerHn player; /*EN< Player handle */ + const CriChar8* string; /*EN< String embedded in the data */ + CriAtomExPlaybackId id; /*EN< Playback ID */ + CriAtomExSequecneEventType type; /*EN< Event type */ + CriUint32 value; /*EN< Value embedded in the data */ + CriUint32 reserved[1]; /*EN< Reserved area */ +} CriAtomExSequenceEventInfo; + +/*EN + * \brief Sequence callback + * \ingroup ATOMEXLIB_SEQUENCER + * \par Description: + * \param[in] obj User-specified object + * \param[in] info Sequence event information + * \return Not used + * Type of the sequence callback function.
+ * Call ::criAtomExSequencer_SetEventCallback to register the callback function.
+ * Do not execute any Atom library APIs within this callback function.
+ * The callback function is executed from the server process in the Atom library.
+ * Therefore, if an API that does not take into account the interrupts to the server process is executed, + * an error or deadlock may occur.
+ *
+ * Note that if the process is blocked in the callback function for a long time, + * problems -such as the audio breaking up- may occur.
+ * \sa criAtomExSequencer_SetEventCallback + */ +typedef CriSint32 (CRIAPI *CriAtomExSequencerEventCbFunc)(void* obj, const CriAtomExSequenceEventInfo* info); + +/*========================================================================== + * CRI AtomEx Beat Sync API + *=========================================================================*/ +/*EN + * \brief Structure for beat synchronization position detection callback + * \ingroup ATOMEXLIB_BEATSYNC + */ +typedef struct CriAtomExBeatSyncInfoTag { + CriAtomExPlayerHn player; /*EN< Player handle */ + CriAtomExPlaybackId playback_id; /*EN< Playback ID */ + CriUint32 bar_count; /*EN< Number of measures */ + CriUint32 beat_count; /*EN< Number of beats */ + CriFloat32 beat_progress; /*EN< Beat progress(0.0f-1.0f) */ + CriFloat32 bpm; /*EN< Tempo (Beat/minutes) */ +} CriAtomExBeatSyncInfo; + +/*EN + * \brief Beat synchronization position detection callback + * \ingroup ATOMEXLIB_BEATSYNC + * \par Description: + * \param[in] obj User specified object + * \param[in] info Beat synchronization position detection information + * \return Not used + * The beat synchronization position detection callback function type of the AtomEx library.
+ * To register the callback function, use the ::criAtomExBeatSync_SetCallback function.
+ * The registered callback function is executed when beat synchronization position detection is processed within the server function.
+ * Therefore, if you execute an API that does not consider interrupts to server processing, + * errors may occur or deadlock may occur.
+ * Do not use the Atom library API within the callback function.
+ * If block long processing within this callback function, problems such as out of sound will occur.
+ * \sa criAtomExBeatSync_SetCallback + */ +typedef CriSint32 (CRIAPI *CriAtomExBeatSyncCbFunc)(void* obj, const CriAtomExBeatSyncInfo* info); + +/*========================================================================== + * CRI AtomEx Playback API + *=========================================================================*/ +/*EN + * \brief Playback status + * \ingroup ATOMEXLIB_PLAYBACK + * \par Description: + * This enumeration defines the different statuses of a voice being played back by an AtomEx Player.
+ * Call the ::criAtomExPlayback_GetStatus function to get the status.
+ *
+ * Usually, the playback status changes in the following order:
+ * -# CRIATOMEXPLAYBACK_STATUS_PREP + * -# CRIATOMEXPLAYBACK_STATUS_PLAYING + * -# CRIATOMEXPLAYBACK_STATUS_REMOVED + * . + * \par Remarks: + * CriAtomExPlaybackStatus is not the status of an AtomEx Player, + * but the status of a single voice being played back on the player (i.e. a voice for which the ::criAtomExPlayer_Start function + * was executed).
+ *
+ * The audio resources allocated for the playback are destroyed when it is stopped.
+ * Therefore, the status of the playback voice is switched to + * CRIATOMEXPLAYBACK_STATUS_REMOVED in the following cases:
+ * - When the playback is complete. + * - When the playback is stopped by calling the criAtomExPlayback_Stop function. + * - When a higher-priority request steals the voice currently being played. + * - When an error occurs during the playback. + * . + * \sa criAtomExPlayer_Start, criAtomExPlayback_GetStatus, criAtomExPlayback_Stop + */ +typedef enum CriAtomExPlaybackStatusTag { + CRIATOMEXPLAYBACK_STATUS_PREP = 1, /*EN< In preparation for playback */ + CRIATOMEXPLAYBACK_STATUS_PLAYING, /*EN< In playback */ + CRIATOMEXPLAYBACK_STATUS_REMOVED, /*EN< Removed */ + CRIATOMEXPLAYBACK_STATUS_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomExPlaybackStatus; + +/*EN + * \brief Playback source type + * \ingroup ATOMEXLIB_PLAYBACK + * \par Description: + * Type of the source of a voice played by the AtomEx Player.
+ * \sa CriAtomExSourceInfo + */ +typedef enum CriAtomExSourceTypeTag { + CRIATOMEX_SOURCE_TYPE_NONE = 0, /*EN< Not set */ + CRIATOMEX_SOURCE_TYPE_CUE_ID, /*EN< Cue ID */ + CRIATOMEX_SOURCE_TYPE_CUE_NAME, /*EN< Cue name */ + CRIATOMEX_SOURCE_TYPE_CUE_INDEX, /*EN< Cue index */ + CRIATOMEX_SOURCE_TYPE_DATA, /*EN< In-memory data */ + CRIATOMEX_SOURCE_TYPE_FILE, /*EN< File name */ + CRIATOMEX_SOURCE_TYPE_CONTENT_ID, /*EN< CPK content ID */ + CRIATOMEX_SOURCE_TYPE_WAVE_ID, /*EN< Audio data ID */ + CRIATOMEX_SOURCE_TYPE_VIBRATION_ID, /*EN< Vibration ID */ + CRIATOMEX_SOURCE_TYPE_SOUND_GENERATOR_ID, /*EN< Sound generator ID */ + CRIATOMEX_SOURCE_TYPE_RAW_PCM_FLOAT_ID, /*EN< RawPcmFloatID */ + CRIATOMEX_SOURCE_TYPE_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomExSourceType; + +/*EN + * \brief Playback source information + * \ingroup ATOMEXLIB_PLAYBACK + * \par Description: + * Structure that contains information about the source of a voice being played back by an AtomEx Player.
+ * It can be acquired by calling the ::criAtomExPlayback_GetSource function.
+ * Further details may be retrieved by passing the acquired information to + * functions such as ::criAtomExAcb_GetCueInfoByIndex. + * \par Remarks: + * The information that can be retrieved depends on the source type.
+ * Check "type" and select which structure is relevant in the union "source" to access the data.
+ * \code + * CriAtomExSourceInfo source; + * criAtomExPlayback_GetSource(playback_id, &source); + * + * switch (source.type) { + * case CRIATOMEXPLAYBACK_SOURCE_TYPE_CUE_ID: + * { + * CriAtomExCueInfo cue_info; + * criAtomExAcb_GetCueInfoById(source.info.cue_id.acb, source.info.cue_id.id, &cue_info); + * : + * } + * break; + * : + * } + * \endcode + * \sa criAtomExPlayback_GetSource, criAtomExAcb_GetCueInfoByIndex + */ +typedef struct CriAtomExSourceInfoTag { + /*EN playback source type */ + CriAtomExSourceType type; + + /*EN playback source information union */ + union CriAtomExSourceInfoInfoTag { + /*EN Cue ID information */ + struct CriAtomExSourceInfoCueIdTag { + /*EN ACB handle */ + CriAtomExAcbHn acb; + /*EN Cue ID */ + CriAtomExCueId id; + } cue_id; + /*EN Cue name information */ + struct CriAtomExSourceInfoCueNameTag { + /*EN ACB handle */ + CriAtomExAcbHn acb; + /*EN Cue name */ + const CriChar8 *name; + } cue_name; + /*EN Cue index information */ + struct CriAtomExSourceInfoCueIndexTag { + /*EN ACB handle */ + CriAtomExAcbHn acb; + /*EN Cue index */ + CriAtomExCueIndex index; + } cue_index; + /*EN in-memory data information */ + struct CriAtomExSourceInfoDataTag { + /*EN memory address */ + void *buffer; + /*EN size */ + CriSint32 size; + } data; + /*EN file information */ + struct CriAtomExSourceInfoFileTag { + /*EN binder handle */ + CriFsBinderHn binder; + /*EN file path */ + const CriChar8 *path; + } file; + /*EN CPK content ID information */ + struct CriAtomExSourceInfoContentIdTag { + /*EN binder handle */ + CriFsBinderHn binder; + /*EN content ID */ + CriSint32 id; + } content_id; + /*EN waveform data ID information */ + struct CriAtomExSourceInfoWaveIdTag { + /*EN AWB handle */ + CriAtomAwbHn awb; + /*EN waveform data ID */ + CriAtomExWaveId id; + } wave_id; + /*EN Vibration ID info */ + struct CriAtomExSourceInfoVibrationIdTag { + /*EN Vibration ID */ + CriAtomExVibrationId id; + } vibration_id; + struct CriAtomExSourceInfoVibrationNameTag { + /*EN Vibration data name */ + const CriChar8 *name; + } vibration_name; + /* Sound generator ID info */ + struct CriAtomExSourceInfoSoundGeneratorParameterTag { + /*EN Frequency */ + CriFloat32 frequency; + /*EN Wave type */ + CriAtomWaveType wave_type; + } sound_generator_parameter; + /* RawPCM FloatID info */ + struct CriAtomExSourceInfoRawPcmFloatParameterTag { + /*EN data address */ + CriFloat32 *data; + /*EN total number of samples */ + CriUint32 total_samples; + } raw_pcm_float_parameter; + } info; +} CriAtomExSourceInfo; + +/*EN + * \brief Playback Event + * \ingroup ATOMEXLIB_PLAYBACK + * \par Description: + * A value indicating the type of playback event.
+ * Passed as an argument to the playback event callback.
+ * \sa CriAtomExPlaybackEventCbFunc, criAtomExPlayer_SetPlaybackEventCallback + */ +typedef enum CriAtomExPlaybackEventTag { + /*EN + * \brief Allocating new playback resources + * \par Description: + * This value indicates that the resources required for cue playback have been secured.
+ * At the time of allocating the resource, no voice assignment has been made and no sound has been generated (it is created in a virtualized state). + */ + CRIATOMEX_PLAYBACK_EVENT_ALLOCATE = 0, + + /*EN + * \brief Voice assignment + * \par Description: + * This value indicates that a voice has been assigned to the virtual state playback resource.
+ * When a voice is assigned, the cue will be playbacked. + * \par Note: + * If the cue contains multiple waveform data, this event occurs when one of the waveform data is played back.
+ * (This event occurs when the number of voices related to cue playback changes from 0 to 1)
+ * This event does not occur at the timing when additional voices are assigned while voices have already been assigned. + */ + CRIATOMEX_PLAYBACK_EVENT_FROM_VIRTUAL_TO_NORMAL, + + /*EN + * \brief Virtualization + * \par Description: + * A value indicating that cue playback has been virtualized.
+ * Raised when a voice is disconnected from the currently playing cue due to any of the following factors.
+ * - The voice is no longer needed because the waveform data contained in the cue has been played back to the end + * - The waveform data being played back was stopped by calling the ::criAtomExPlayer_Stop function etc. + * - Priority control stops waveform data being played back and voices are stolen + * . + * \par Note: + * This event indicates that the "waveform data" included in the cue is no longer played back.
+ * Cue playback has not ended at the time of this event.
+ * (the ::CRIATOMEX_PLAYBACK_EVENT_REMOVE event will occur when cue playback is complete.)
+ *
+ * If the cue contains multiple waveform data, this event occurs when all waveform data is not reproduced.
+ * (This event occurs when the number of voices related to cue playback changes from 1 to 0)
+ * This event does not occur if one of the voices is assigned and one of them is stopped. + */ + CRIATOMEX_PLAYBACK_EVENT_FROM_NORMAL_TO_VIRTUAL, + + /*EN + * \brief Releasing playback resources + * \par Description: + * This value indicates that the playback resource has been released.
+ * This event occurs when playback of the cue is completed, or when the cue is stopped due to a stop playback request. + * \par Note: + * If waveform data included in the cue is being played back, + * the :CRIATOMEX_PLAYBACK_EVENT_FROM_NORMAL_TO_VIRTUAL event always occurs before this event occurs. + */ + CRIATOMEX_PLAYBACK_EVENT_REMOVE, + + CRIATOMEX_PLAYBACK_EVENT_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomExPlaybackEvent; + +/*EN + * \brief Playback information details + * \ingroup ATOMEXLIB_PLAYBACK + * \par Description: + * It is a structure to notify detailed information about the playback when the playback event occurs.
+ * Passed as an argument to the playback event callback.
+ * \sa CriAtomExPlaybackEventCbFunc, criAtomExPlayer_SetPlaybackEventCallback + */ +typedef struct CriAtomExPlaybackInfoDetailTag { + CriAtomExPlayerHn player; /*En< Player */ + CriAtomExPlaybackId id; /*En< Playback ID */ +} CriAtomExPlaybackInfoDetail; + +/*EN + * \brief Replay event callback function type + * \ingroup ATOMEXLIB_PLAYBACK + * \param[in] obj User specified object + * \param[in] playback_event Playback Event + * \param[in] info Information + * \par Description: + * The type of callback function used to notify of playback events.
+ * By registering a callback function of this function type in the ::criAtomExPlayer_SetPlaybackEventCallback function, + * it is possible to receive a callback when a playback event occurs.
+ * \attention + * If you block processing for a long time in this callback function, + * problems such as sound disconnection may occur.
+ * \sa criAtomExPlayer_SetPlaybackEventCallback, CriAtomExPlaybackEvent, CriAtomExPlaybackInfoDetail + */ +typedef void (CRIAPI *CriAtomExPlaybackEventCbFunc)(void *obj, + CriAtomExPlaybackEvent playback_event, const CriAtomExPlaybackInfoDetail *info); + + +/*========================================================================== + * CRI AtomEx Fader API + *=========================================================================*/ +/*EN + * \brief Configuration structure used to attach a fader + * \ingroup ATOMEXLIB_FADER + * \par Description: + * Configuration structure used to attach a fader. It is passed to the ::criAtomExPlayer_AttachFader function.
+ * \attention + * While no parameters can be specified at this time, some may be added in the future. + * Therefore, when using this structure, it is recommended to call the ::criAtomExFader_SetDefaultConfig macro + * to initialize it. + * \sa criAtomExFader_SetDefaultConfig, criAtomExPlayer_CalculateWorkSizeForFader, criAtomExPlayer_AttachFader + */ +typedef struct CriAtomExFaderConfigTag { + CriSint32 reserved; /*EN< Reserved value (specify 0) */ +} CriAtomExFaderConfig; + +/*========================================================================== + * CRI AtomEx D-BAS API + *=========================================================================*/ +/*EN + * \brief AtomEx D-BAS ID + * \ingroup ATOMEXLIB_DBAS + * \par Description: + * ID used to reference a D-BAS.
+ * This ID is returned when creating a D-BAS using the ::criAtomExDbas_Create function. + *
+ * Applications only need the D-BAS ID to destroy the corresponding D-BAS when it is not needed anymore. + * \sa criAtomExDbas_Create, criAtomExDbas_Destroy + */ +typedef CriAtomDbasId CriAtomExDbasId; + +/*EN + * \brief Configuration structure used when creating a D-BAS + * \ingroup ATOMEXLIB_DBAS + * \par Description: + * Configuration structure used to create a D-BAS. It is passed to the ::criAtomExDbas_Create function.
+ * \attention + * More members will be added in the future, so if you are not using the ::criAtomExDbas_SetDefaultConfig macro, + * make sure to initialize the whole structure to zero before using it.
+ * (Make sure that no member of the structure has an undefined value.) + * \sa criAtomExDbas_Create, criAtomExDbas_CalculateWorkSize, criAtomExDbas_SetDefaultConfig + */ +typedef CriAtomDbasConfig CriAtomExDbasConfig; + +/* ========================================================================*/ +/* CRI AtomEx Streaming Cache API */ +/* ========================================================================*/ +/*EN + * \brief Streaming cache ID + * \ingroup ATOMEXLIB_STREAMING_CACHE + * \par Description: + * ID used to reference a streaming cache across the application.
+ * It is returned by the ::criAtomExStreamingCache_Create function.
+ * \sa criAtomExStreamingCache_Create + */ +typedef CriAtomStreamingCacheId CriAtomExStreamingCacheId; + +/*EN + * \brief Configuration structure used when creating a streaming cache + * \ingroup ATOMEXLIB_STREAMING_CACHE + * \par Description: + * This structure is used to specify the parameters of the streaming cache (such as the size of the files that can be cached) + * when it is created.
+ * It is passed to the ::criAtomExStreamingCache_CalculateWorkSize + * and ::criAtomExStreamingCache_Create functions.
+ *
+ * \attention + * More members will be added in the future, so make sure to initialize the whole structure to zero before using it.
+ * (Make sure that no member of the structure has an undefined value.) + * \sa criAtomStreamingCache_CalculateWorkSize, criAtomStreamingCache_Create + */ +typedef CriAtomStreamingCacheConfig CriAtomExStreamingCacheConfig; + +/*========================================================================== + * CRI AtomEx 3D API + *=========================================================================*/ +/*EN + * \brief 3D vector structure + * \ingroup ATOMEXLIB_3D + * \par Description: + * Structure used to handle three-dimensional vectors.
+ * \sa CriAtomEx3dListener, CriAtomEx3dSource + */ +typedef struct CriAtomExVectorTag { + CriFloat32 x; /*EN< X-axis component */ + CriFloat32 y; /*EN< Y-axis component */ + CriFloat32 z; /*EN< Z-axis component */ +} CriAtomExVector; + +/*EN + * \brief Configuration structure used to create a 3D sound source + * \ingroup ATOMEXLIB_3D + * \par Description: + * Structure used to create a 3D sound source.
+ * While no parameters can be specified at this time, some may be added in the future. + * Therefore, when using this structure, it is recommended to use the ::criAtomEx3dSource_SetDefaultConfig macro + * to initialize it. + * \sa criAtomEx3dSource_SetDefaultConfig, criAtomEx3dSource_CalculateWorkSize, criAtomEx3dSource_Create + */ +typedef struct CriAtomEx3dSourceConfigTag { + /*EN + \brief Enable Voice Priority Attenuation by Distance + \par Description: + Sets whether to enable priority attenuation by distance.
+ When this parameter is set to CRI_TRUE and a 3D sound source handle is created, + the voice priority of the 3D sound sounded by the 3D sound source handle will be attenuated by the distance to the listener.
+ The attenuation value of the voice priority is 0 for the minimum distance set for the voice and -255 for the maximum distance.
+ \par Remarks: + Voice priority attenuation by distance is applied with addition to other voice priority settings.
+ In other words, the final voice priority is the sum of each of the following.
+ - Value set in data + - Set value by ::criAtomExPlayer_SetVoicePriority function + - Voice priority attenuation value by distance + . + The default value of this parameter is CRI_FALSE (Voice priority by distance is invalid). + \sa criAtomExPlayer_SetVoicePriority + */ + CriBool enable_voice_priority_decay; +} CriAtomEx3dSourceConfig; + +/*EN + * \brief Configuration structure used to create a 3D sound source list + * \ingroup ATOMEXLIB_3D + * \par Description: + * Structure used to create a 3D sound source list.
+ * While no parameters can be specified at this time, some may be added in the future. + * Therefore, when using this structure, it is recommended to call the ::criAtomEx3dSourceList_SetDefaultConfig macro + * to initialize it. + * \sa criAtomEx3dSourceList_SetDefaultConfig, criAtomEx3dSourceList_CalculateWorkSize, criAtomEx3dSourceList_Create + */ +typedef struct CriAtomEx3dSourceListConfigTag { + CriSint32 reserved; +} CriAtomEx3dSourceListConfig; + +/*EN + * \brief Configuration structure used to create a 3D listener + * \ingroup ATOMEXLIB_3D + * \par Description: + * Structure used to create a 3D listener.
+ * While no parameters can be specified at this time, some may be added in the future. + * Therefore, when using this structure, it is recommended to use the ::criAtomEx3dListener_SetDefaultConfig macro + * to initialize it. + * \sa criAtomEx3dListener_SetDefaultConfig, criAtomEx3dListener_CalculateWorkSize, criAtomEx3dListener_Create + */ +typedef struct CriAtomEx3dListenerConfigTag { + CriSint32 reserved; +} CriAtomEx3dListenerConfig; + +struct CriAtomEx3dSourceObjTag; +typedef struct CriAtomEx3dSourceObjTag CriAtomEx3dSourceObj; + +/*EN + * \brief 3D sound source handle + * \ingroup ATOMEXLIB_3D + * \par Description: + * Handle for a 3D sound source.
+ * It is used by the 3D positioning functions.
+ *
+ * The parameters and position of a 3D sound source are set through this type of handle. + * \sa criAtomEx3dSource_Create + */ +typedef CriAtomEx3dSourceObj *CriAtomEx3dSourceHn; + +struct CriAtomEx3dSourceListObjTag; +typedef struct CriAtomEx3dSourceListObjTag CriAtomEx3dSourceListObj; + +/*EN + * \brief 3D sound source handle list + * \ingroup ATOMEXLIB_3D + * \par Description: + * Handle list for a 3D sound source.
+ * It is used by the 3D positioning functions.
+ * \sa criAtomEx3dSourceList_Create + */ +typedef CriAtomEx3dSourceListObj *CriAtomEx3dSourceListHn; + +struct CriAtomEx3dListenerObjTag; +typedef struct CriAtomEx3dListenerObjTag CriAtomEx3dListenerObj; + +/*EN + * \brief 3D listener handle + * \ingroup ATOMEXLIB_3D + * \par Description: + * Handle for a 3D listener.
+ * It is used by the 3D positioning functions.
+ *
+ * The parameters and position of a 3D listener are set through this type of handle. + * \sa criAtomEx3dListener_Create + */ +typedef CriAtomEx3dListenerObj *CriAtomEx3dListenerHn; + +/*========================================================================== + * CRI AtomEx DSP API + *=========================================================================*/ + +/*EN + * \brief Configuration structure used to attach a pitch shifter effect + * \ingroup ATOMEXLIB_DSP + * \par Description: + * Structure used to attach a pitch shifter to a Voice Pool.
+ * \attention + * More members will be added in the future, so if you are not using the ::criAtomExVoicePool_SetDefaultConfigForDspPitchShifter + * macro, make sure to initialize the whole structure to zero before using it.
+ * (Make sure that no member of the structure has an undefined value.) + * \sa criAtomExVoicePool_AttachDspPitchShifter, criAtomExVoicePool_CalculateWorkSizeForDspPitchShifter, criAtomExVoicePool_SetDefaultConfigForDspPitchShifter + */ +typedef struct CriAtomExDspPitchShifterConfigTag { + /*EN + \brief Number of DSPs created + \par Description: + Specify the same value here as the number of voices in the attached destination.
+ */ + CriSint32 num_dsp; + + /*EN + \brief Maximum number of channels for DSP + \par Description: + Specifies the maximum number of channels that can be processed by a DSP.
+ Specify the same value here as the maximum number of channels (max_channels) in the player settings of a Voice Pool for the attached destination.
+ */ + CriSint32 max_channels; + + /*EN + \brief Maximum sampling rate used for DSP + \par Description: + Specifies the maximum sampling rate that can be processed by a DSP.
+ Specify the same value here as the maximum sampling rate (max_sampling_rate) in the player settings of a Voice Pool for the attached destination.
+ */ + CriSint32 max_sampling_rate; + + /*EN + \brief Structure for DSP-specific settings + \par Description: + Structure used for DSP-specific configuration settings.
+ For details, see ::CriAtomDspPitchShifterConfig .
+ */ + CriAtomDspPitchShifterConfig specific; +} CriAtomExDspPitchShifterConfig; + +/*EN + * \brief Configuration structure used to attach a time-stretching effect + * \ingroup ATOMEXLIB_DSP + * \par Description: + * Structure used to attach a time-stretching effect to a Voice Pool.
+ * \attention + * More members will be added in the future, so if you are not using the ::criAtomExVoicePool_SetDefaultConfigForDspTimeStretch + * macro, make sure to initialize the whole structure to zero before using it.
+ * (Make sure that no member of the structure has an undefined value.) + * \sa criAtomExVoicePool_AttachDspTimeStretch, criAtomExVoicePool_CalculateWorkSizeForDspTimeStretch, criAtomExVoicePool_SetDefaultConfigForDspTimeStretch + */ +typedef struct CriAtomExDspTimeStretchConfigTag { + /*EN + \brief Number of DSPs created + \par Description: + Specify the same value here as the number of voices in the attached destination.
+ */ + CriSint32 num_dsp; + + /*EN + \brief Maximum number of channels for DSP + \par Description: + Specifies the maximum number of channels that can be processed by a DSP.
+ Specify the same value here as the maximum number of channels (max_channels) in the player settings of a Voice Pool for the attached destination.
+ */ + CriSint32 max_channels; + + /*EN + \brief Maximum sampling rate used for DSP + \par Description: + Specifies the maximum sampling rate that can be processed by a DSP.
+ Specify the same value here as the maximum sampling rate (max_sampling_rate) in the player settings of a Voice Pool for the attached destination.
+ */ + CriSint32 max_sampling_rate; + + /*EN + \brief Structure for DSP-specific settings + \par Description: + Structure used for DSP-specific configuration settings.
+ For details, see ::CriAtomDspTimeStretchConfig .
+ */ + CriAtomDspTimeStretchConfig specific; +} CriAtomExDspTimeStretchConfig; + +/*========================================================================== + * CRI AtomEx Tween API + *=========================================================================*/ +/*EN + * \brief Parameter type for a Tween + * \ingroup ATOMEXLIB_TWEEN + * \par Description: + * Type of parameter controlled by a Tween.
+ * \sa CriAtomExTweenConfig + */ +typedef enum CriAtomExTweenParameterTypeTag { + /*EN + \brief Basic parameters + \par Description: + Use this type to control volume, pitch, and other parameters specified by CriAtomExParameterId. + */ + CRIATOMEX_PARAMETER_TYPE_BASIC, + + /*EN + \brief AISAC control value + \par Description: + Use this type to control AISAC control values. + */ + CRIATOMEX_PARAMETER_TYPE_AISAC, + + /* 4-byte enum */ + CRIATOMEX_PARAMETER_TYPE_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomExTweenParameterType; + +/*EN + * \brief Configuration structure used to create a Tween + * \ingroup ATOMEXLIB_TWEEN + * \par Description: + * Configuration structure used when creating a Tween.
+ * It is passed to the ::criAtomExTween_Create function.
+ * Before using this structure, call the ::criAtomExTween_SetDefaultConfig macro + * to initialize it. + * \sa criAtomExTween_SetDefaultConfig, criAtomExTween_CalculateWorkSize, criAtomExTween_Create + */ +typedef struct CriAtomExTweenConfigTag { + /*EN + \brief Union for ID specification + \par Description: + Specifies a parameter ID or an AISAC control ID, depending on the parameter type. + */ + union CriAtomExTweenConfigParameterIdTag { + /*EN + \brief Parameter ID + \par Description: + Specifies the parameter ID when the parameter type is set to ::CRIATOMEX_PARAMETER_TYPE_BASIC. + */ + CriAtomExParameterId parameter_id; + + /*EN + \brief AISAC control ID + \par Description: + Specifies the AISAC control ID when the paramter type is set to ::CRIATOMEX_PARAMETER_TYPE_AISAC. + */ + CriAtomExAisacControlId aisac_control_id; + } id; + + /*EN + \brief Parameter type + \par Description: + Specifies the parameter type. + */ + CriAtomExTweenParameterType parameter_type; +} CriAtomExTweenConfig; + +/*EN + * \brief Tween handle + * \ingroup ATOMEXLIB_TWEEN + * \par Description: + * Handle to use a Tween.
+ * A Tween offers a simple way to change parameters over time. + * When the ::criAtomExTween_Create function is used to create a Tween, it returns a Tween handle. + *
+ * The functions involving a Tween (such as starting the variation of a parameter) + * are all performed through a Tween handle.
+ * The handle is also used to associate the Tween with an AtomEx Player. + * \sa criAtomExTween_Create, criAtomExPlayer_AttachTween + */ +typedef struct CriAtomExTweenTag *CriAtomExTweenHn; + +/*========================================================================== + * CRI AtomEx Voice Event API + *=========================================================================*/ +/*EN + * \brief Voice event + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * Voice event type.
+ * It is passed to the voice event callback.
+ * \sa CriAtomExVoiceEventCbFunc, criAtomEx_SetVoiceEventCallback + */ +typedef enum CriAtomExVoiceEventTag { + /*EN + * \brief Allocate a voice + * \par Description: + * Occurs when a free voice is allocated from a voice pool and that a new playback is started.
+ */ + CRIATOMEX_VOICE_EVENT_ALLOCATE = 0, + + /*EN + * \brief Steal a voice + * \par Description: + * Occurs when a playing voice is stolen.
+ * One of the playing voices is stopped and it is reused to allow another voice to play.
+ * The waveform that is being stopped and the waveform for the new playback belong to different voice limit groups.
+ * Even if both or either of the waveforms do (does) not belong to any voice limit group, + * this event will occur.
+ */ + CRIATOMEX_VOICE_EVENT_ALLOCATE_AND_REMOVE, + + /*EN + * \brief Steal a voice from the same voice limit group + * \par Description: + * Occurs when a playing voice is stolen.
+ * One of the playing voices is stopped and it is reused to allow another voice to play.
+ * Unlike ::CRIATOMEX_VOICE_EVENT_ALLOCATE_AND_REMOVE, this event occurs + * when the waveform that is being stopped and the waveform for the new playback belong to the same voice limit group.
+ */ + CRIATOMEX_VOICE_EVENT_ALLOCATE_AND_REMOVE_IN_GROUP, + + /*EN + * \brief Steal a voice and adjust the number of voices + * \par Description: + * Occurs when a playing voice is stolen and the number of voices is adjusted.
+ * Two of the playing voices are stopped, and one of them is reused to allow another voice to play.
+ * (One of the stopped voices is returned to a voice pool as a free voice.)
+ * When stealing a voice that meets the playback conditions of the audio data, + * the number of voices overflows. After adjusting the number of voices in the group, + * this event occurs.
+ * \par Remarks: + * When playing as much HCA data as allowed by the voice limit group, + * if ADX data belonging to the same voice limit group is played, this case will happen.
+ * By stopping the ADX voice belonging to another group in order to play the ADX data, + * if the sum of the voices used for HCA data and ADX data exceeds the voice limit group, + * an additional voice for HCA data with a low priority will be stopped.
+ * (In that case, one playback request actually stops two voices.)
+ */ + CRIATOMEX_VOICE_EVENT_ALOOCATE_AND_REMOVE_TWO, + + /*EN + * \brief Reject a playback request + * \par Description: + * Occurs when the priority of the waveform data to be played is the lowest among all the voices. + * (It was not possible to steal a voice).
+ */ + CRIATOMEX_VOICE_EVENT_REJECT, + + /*EN + * \brief Reject a playback request in the same group + * \par Description: + * Occurs when the priority of the waveform data to be played is the lowest among all the voices from the same group. + * (It was not possible to steal a voice from that group).
+ */ + CRIATOMEX_VOICE_EVENT_REJECT_BY_GROUP_LIMIT, + + /*EN + * \brief Stop voice + * \par Description: + * Occurs if a voice is stopped by a playback completion or by a playback stop request.
+ * The stopped voice is returned to the voice pool as a free voice.
+ */ + CRIATOMEX_VOICE_EVENT_REMOVE, + + CRIATOMEX_VOICE_EVENT_ENUM_IS_4BYTE = 0x7FFFFFFF +} CriAtomExVoiceEvent; + +/*EN + * \brief Detailed information about a voice + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * Structure that stores detailed information about the voice at the time an event occurred.
+ * It is passed to the voice event callback.
+ * \sa CriAtomExVoiceEventCbFunc, criAtomEx_SetVoiceEventCallback + */ +typedef struct CriAtomExVoiceInfoDetailTag { + CriAtomExPlaybackId playback_id; /*EN< Playback ID */ + CriAtomExSourceInfo cue_info; /*EN< Cue information */ + CriAtomExSourceInfo wave_info; /*EN< Waveform information */ + CriSint32 group_no; /*EN< Group number */ + CriSint32 priority; /*EN< Priority */ + CriAtomExVoiceControlMethod control_method; /*EN< Voice control method */ + CriAtomExVoiceAllocationMethod allocation_method; /*EN< Voice allocation method */ + CriUint32 identifier; /*EN< Voice pool identifier */ + CriAtomExFormat format; /*EN< Format type */ + CriSint32 sampling_rate; /*EN< Sampling frequency */ + CriSint32 num_channels; /*EN< Number of channels */ + CriBool streaming_flag; /*EN< Streaming playback flag */ + CriAtomPlayerHn atom_player; /*EN< Player to be used for audio playback */ +} CriAtomExVoiceInfoDetail; + +/*EN + * \brief Type definition of the Voice event callback + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] obj user-specified object + * \param[in] voice_event event that occurred + * \param[in] request detailed informaton about the playback request + * \param[in] removed detailed information about the stopped voice + * \param[in] removed_in_group detailed information about the stopped voice in the group + * \par Description: + * The type of the callback function that notifies when a voice event occurs.
+ * It is registered by calling the ::criAtomEx_SetVoiceEventCallback function.
+ *
+ * The contents of the third to fifth arguments of the callback function + * (request, removed, removed_in_group) change depending on the voice event type + * (i.e. voice_event) as shown below:
+ *
+ * (1) CRIATOMEX_VOICE_EVENT_ALLOCATE
+ * The third argument (request) contains the information about the playback request that acquires a voice.
+ * The fourth and the fifth arguments are NULL.
+ *
+ * (2) CRIATOMEX_VOICE_EVENT_ALLOCATE_AND_REMOVE
+ * The third argument (request) contains the information about the playback request that acquires a voice.
+ * The fourth argument (removed) contains the information about the voice that is removed and whose playback is stopped.
+ * The fifth argument is NULL.
+ *
+ * (3) CRIATOMEX_VOICE_EVENT_ALLOCATE_AND_REMOVE_IN_GROUP
+ * The third argument (request) contains the information about the playback request that acquires a voice.
+ * The fourth argument is NULL.
+ * The fifth argument (removed_in_group) contains the information about the voice that is removed and whose playback is stopped.
+ *
+ * (4) CRIATOMEX_VOICE_EVENT_ALLOCATE_AND_REMOVE_TWO
+ * The third argument (request) contains the information about the playback request that acquires a voice.
+ * The fourth argument (removed) contains the information about the voice that is removed and whose playback is stopped.
+ * The fifth argument (removed_in_group) contains the information about the voice that is stopped by adjusting the playback control in the group.
+ *
+ * (5) CRIATOMEX_VOICE_EVENT_REJECT
+ * The third argument (request) contains the information about the voice request that is rejected.
+ * The fourth and the fifth arguments are NULL.
+ *
+ * (6) CRIATOMEX_VOICE_EVENT_REJECT_BY_GROUP_LIMIT
+ * The third argument (request) contains the information about the voice request that is rejected.
+ * The fourth and the fifth arguments are NULL.
+ *
+ * (7) CRIATOMEX_VOICE_EVENT_REMOVE
+ * The fourth argument (removed) contains the information about the voice whose playback has either completed or been stopped.
+ * The third and the fifth arguments are NULL.
+ * \attention + * In this callback, only the information related to the limit control at the the voice level can be retrieved + * (i.e. the priority control on the waveforms based on the voice priority)
+ * If playback is stopped due to the Cue limit control before acquiring a Voice, + * information such as CRIATOMEX_VOICE_EVENT_REJECT is not returned to this callback.
+ * (At this time, the information about the limit control by the category Cue priority cannot be retrieved.)
+ *
+ * At the time when a voice event callback is triggered, the audio data for the + * playback has not yet been set to request->atom_player.
+ * Therefore, use the member values of the ::CriAtomExVoiceInfoDetail structure + * to look up information about the audio data for the playback, instead of checking the atom_player.
+ *
+ * Note that if processes are blocked in the callback function for a long time, some problems, such as a playback interruption + * may occur.
+ * \sa criAtomEx_SetVoiceEventCallback, CriAtomExVoiceEvent, CriAtomExVoiceInfoDetail + */ +typedef void (*CriAtomExVoiceEventCbFunc)( + void *obj, CriAtomExVoiceEvent voice_event, + const CriAtomExVoiceInfoDetail *request, + const CriAtomExVoiceInfoDetail *removed, + const CriAtomExVoiceInfoDetail *removed_in_group); + +/*EN + * \brief Type definition of the Voice information callback + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] obj User-specified object + * \param[in] voice_info Voice information + * \par Description: + * This is the type of the callback function used to send voice information.
+ * You can register it by calling the ::criAtomExAcb_EnumerateVoiceInfos function.
+ *
+ * Note that if processes are blocked in the callback function for a long time, some problems, such as a playback interruption + * may occur.
+ * \sa criAtomEx_EnumerateVoiceInfos, CriAtomExVoiceInfoDetail + */ +typedef void (CRIAPI *CriAtomExVoiceInfoCbFunc)( + void *obj, const CriAtomExVoiceInfoDetail *voice_info); + +/*EN + * \brief Structure for acquiring voice stop information + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * This structure is used for acquiring voice stop information.
+ * It is passed as an argument for the ::CriAtomExMonitoringVoiceStopCbFunc function type.
+ * \sa CriAtomExMonitoringVoiceStopCbFunc + */ +typedef struct CriAtomExMonitoringVoiceStopInfoTag { + CriAtomExPlaybackId playback_id; /*EN< Playback ID */ + CriAtomVoiceStopReason reason; /*EN< Stop reason */ + CriAtomPlayerHn atom_player; /*EN< Stopped AtomPlayer */ +} CriAtomExMonitoringVoiceStopInfo; + +/*EN + * \brief Callback function type for monitoring a voice stop + * \ingroup ATOMEXLIB_ACB + * \param[in] obj User specified object + * \param[in] voice_stop Details of the voice stop + * \par Description: + * This callback function type is used when a played voice is stopped in the monitored playback ID.
+ * \attention + * Basically, do not use Atom library APIs in a callback function.
+ * Note that if processes are blocked in the callback function for a long time, some problems, such as a playback interruption + * may occur.
+ * \sa criAtomEx_SetMonitoringVoiceStopCallback + */ +typedef void (CRIAPI *CriAtomExMonitoringVoiceStopCbFunc)(void *obj, CriAtomExMonitoringVoiceStopInfo*voice_stop); + +/*========================================================================== + * CRI AtomEx Cue Link Callback API + *=========================================================================*/ +/*EN + * \brief CueLink callback type + * \ingroup ATOMEXLIB_GLOBAL + */ +typedef enum CriAtomExCueLinkTypeTag { + CRIATOMEX_CUELINK_TYPE_STATIC = 0, /*EN< Static link */ + CRIATOMEX_CUELINK_TYPE_DYNAMIC = 1, /*EN< Dynamic link */ + + /* enum size is 4bytes */ + CRIATOMEX_CUELINK_TYPE_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomExCueLinkType; + +/*EN + * \brief Info structure for the CueLink callback type + * \ingroup ATOMEXLIB_GLOBAL + */ +typedef struct CriAtomExCueLinkInfoTag { + CriAtomExPlayerHn player; /*EN< Player handle */ + CriAtomExPlaybackId base_id; /*EN< Source playback ID */ + CriAtomExSourceInfo base_cue; /*EN< Source cue */ + CriAtomExPlaybackId target_id; /*EN< Target playback ID */ + CriAtomExSourceInfo target_cue; /*EN< Target cue */ + CriAtomExCueLinkType link_type; /*EN< Link type */ +} CriAtomExCueLinkInfo; + +/*EN + * \brief CueLink callback + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * \param[in] obj User specified object + * \param[in] info CueLink information + * \return Unused + * CueLink callback function type for the AtomEx library.
+ * Use the ::criAtomEx_SetCueLinkCallback function to register a callback function.
+ * The registered callback function is executed when a CueLink is processed in the library.
+ * Therefore, if an API that doesn't appropriately handle an interrupt to the server processing is called, + * a problem such as error or deadlock may occur.
+ * Basically, do not use Atom library APIs in a callback function.
+ * Note that if audio processing is blocked in the callback function for a long time, some problems such as a playback interruption + * may occur.
+ * \sa criAtomEx_SetCueLinkCallback + */ +typedef CriSint32 (CRIAPI *CriAtomExCueLinkCbFunc)(void* obj, const CriAtomExCueLinkInfo* info); + +/*========================================================================== + * CRI AtomEx Playback Cancel Callback API + *=========================================================================*/ +/*EN + * \brief Playback cancel type + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * This value indicates the type of a playback cancel.
+ * \sa CriAtomExPlaybackCancelInfo, criAtomEx_SetPlaybackCancelCallback + */ +typedef enum CriAtomExPlaybackCancelTypeTag { + /*EN + * \brief Cue limit + * \par Description: + * Playback cancel by a cue limit.
+ */ + CRIATOMEX_PLAYBACK_CANCEL_TYPE_CUE_LIMIT = 0, + + /*EN + * \brief Category cue limit + * \par Description: + * Playback cancel by a category cue limit.
+ */ + CRIATOMEX_PLAYBACK_CANCEL_TYPE_CATEGORY_CUE_LIMIT, + + /*EN + * \brief Priority + * \par Description: + * Playback cancel by a priority.
+ */ + CRIATOMEX_PLAYBACK_CANCEL_TYPE_PROBABILITY, + + /*EN + * \brief Cue limit + * \par Description: + * Playback stop by a cue limit.
+ */ + CRIATOMEX_PLAYBACK_CANCEL_TYPE_STOP_BY_CUE_LIMIT, + + /*EN + * \brief Switch + * \par Description: + * Playback cancel by a switch.
+ */ + CRIATOMEX_PLAYBACK_CANCEL_TYPE_SWITCH, + + CRIATOMEX_PLAYBACK_CANCEL_TYPE_ENUM_IS_4BYTE = 0x7FFFFFFF +} CriAtomExPlaybackCancelType; + +/*EN + * \brief Info structure for playback cancel callbacks + * \ingroup ATOMEXLIB_GLOBAL + */ +typedef struct CriAtomExPlaybackCancelInfoTag { + CriAtomExPlaybackCancelType type; /*EN< Cancel type */ + CriAtomExPlayerHn player; /*EN< Player handle */ + CriAtomExPlaybackId id; /*EN< Playback ID */ +} CriAtomExPlaybackCancelInfo; + +/*EN + * \brief Playback cancel callback + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * \param[in] obj User specified object + * \param[in] info Playback cancel information + * \return Unused + * Playback cancel callback function type for the AtomEx library.
+ * Use the ::criAtomEx_SetPlaybackCancelCallback function to register a callback function.
+ * The registered callback function is executed when playback start is canceled in the library.
+ * Therefore, if an API that doesn't appropriately handle an interrupt to the server processing is called, + * a problem such as error or deadlock may occur.
+ * Basically, do not use Atom library APIs in a callback function.
+ * Note that if audio processing is blocked in the callback function for a long time, some problems such as a playback interruption + * may occur.
+ * \sa criAtomEx_SetPlaybackCancelCallback + */ +typedef void (CRIAPI *CriAtomExPlaybackCancelCbFunc)(void *obj, const CriAtomExPlaybackCancelInfo* info); + +/*========================================================================== + * CRI AtomEx Track Transition Callback API + *=========================================================================*/ +/*EN + * \brief Info structure for track transition by selector callbacks + * \ingroup ATOMEXLIB_GLOBAL + */ +typedef struct CriAtomExTrackTransitionBySelectorInfoTag { + CriAtomExPlayerHn player; /*EN< Player handle */ + CriAtomExPlaybackId id; /*EN< Playback ID */ + const CriChar8* selector; /*EN< Selector name */ + const CriChar8* label; /*EN< Label name */ +} CriAtomExTrackTransitionBySelectorInfo; + +/*EN + * \brief Track transition by selector callback + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * \param[in] obj User specified object + * \param[in] info Information about the track transition by selector callback + * \return Unused + * Track transition by selector callback function type for the AtomEx library.
+ * Use the ::criAtomEx_SetTrackTransitionBySelectorCallback function to register a callback function.
+ * The registered callback function is executed when transition is started in the library.
+ * Therefore, if an API that doesn't appropriately handle an interrupt to the server processing is called, + * a problem such as an error or deadlock may occur.
+ * Basically, do not use Atom library APIs in a callback function.
+ * Note that if audio processing is blocked in the callback function for a long time, some problems such as a playback interruption + * may occur.
+ * \sa criAtomEx_SetTrackTransitionBySelectorCallback + */ +typedef void (CRIAPI *CriAtomExTrackTransitionBySelectorCbFunc)(void *obj, const CriAtomExTrackTransitionBySelectorInfo* info); + +/*========================================================================== + * CRI AtomEx Sound Object API + *=========================================================================*/ +/*EN + * \brief Configuration structure used to create sound objects + * \ingroup ATOMEXLIB_SOUND_OBJECT + * \par Description + * Configuration structure used when creating a sound object.
+ * It is passed to the ::criAtomExSoundObject_Create function.
+ *
+ * Internal resources will be allocated for the sound object based on the value of the parameters of this structure.
+ * In particular, the size of the work buffer required for the sound object depends on these parameters. + * \attention + * More members will be added in the future. Use the + * ::criAtomExSoundObject_SetDefaultConfig macro to set the default values before setting each member.
+ * (Make sure that no member of the structure has an undefined value.) + * \sa criAtomExSoundObject_Create, criAtomExSoundObject_SetDefaultConfig + */ +typedef struct CriAtomExSoundObjectConfigTag { + /*EN + * \brief Enable voice limit scope + * \par Description: + * Specifies whether to limit the number of playing voices by voice limit group independently with this sound object.
+ * If CRI_TRUE is specified, the number of voices played back by AtomEx players
+ * are counted only within this sound object and the number of voices is limited by voice limit groups.
+ * If CRI_FALSE is specified, the number of voices is not limited by voice limit groups
+ * and instead the number of voices is limited through the entire CRI Atom library. + * \par Remarks: + * The default value is CRI_FALSE (do not perform voice limiting by sound object). + */ + CriBool enable_voice_limit_scope; + /*EN + * \brief Enable category Cue limit scope + * \par Description: + * Specifies whether to limit the number of Cues for playback by category independently with this sound object.
+ * If CRI_TRUE is specified, the number of Cue categories played back by AtomEx players
+ * are counted only within this sound object and the number for playback is limited.
+ * If CRI_FALSE is specified, the number of Cues for playback is not limited by category
+ * and instead the number of voices is limited by category for the entire CRI Atom library. + * \par Remarks: + * The default value is CRI_FALSE (do not perform category Cue limiting by sound object). + */ + CriBool enable_category_cue_limit_scope; +} CriAtomExSoundObjectConfig; + +struct CriAtomExSoundObjectTag; +typedef struct CriAtomExSoundObjectTag CriAtomExSoundObjectObj; +/*EN + * \brief Sound object handle + * \ingroup ATOMEXLIB_SOUND_OBJECT + * \par Description: + * CriAtomExSoundObjectHn is a handle used to manipulate sound objects.
+ *
+ * When a sound object is created with the ::criAtomExSoundObject_Create function, + * a sound object handle is returned. + *
+ * All the operations performed on a sound object are done through this sound object handle. + * \par Remarks: + * A sound object is an abstract concept that represents an object, space, or a condition in which multiple sounds are played.
+ *
+ * You can use sound objects to perform more natural sound control.
+ * For example, if you create a sound object for a certain character, + * you can easily limit the number of voices per character, stop all sound playback + * for that character when it is gone, etc.
+ *
+ * Sound objects by themselves do not have any functionality for sound playback. + * Playback and individual control are performed by the AtomEx player associated with the sound object. + * \sa criAtomExSoundObject_Create + */ +typedef CriAtomExSoundObjectObj *CriAtomExSoundObjectHn; + +/*************************************************************************** + * Prototype Variables + ***************************************************************************/ + +/*************************************************************************** + * Prototype Functions + ***************************************************************************/ +#ifdef __cplusplus +extern "C" { +#endif + +/*========================================================================== + * CRI AtomEx API + *=========================================================================*/ +/*EN + * \brief Calculate the size of the work buffer required to initialize the library + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] config configuration structure used to initialize the library + * \return CriSint32 size of the work buffer + * \retval >= 0 successfully completed + * \retval -1 error occurred + * \par Description: + * Calculates the size of the work buffer required to initialize the library.
+ *
+ * If this function fails to calculate the size of the work buffer, it will return -1.
+ * To know the reason of the failure, refer to the error callback message.
+ * \par Remarks: + * The size of the work buffer needed for the library depends + * on the value of the parameters in the configuration structure ( ::CriAtomExConfig ).
+ *
+ * When NULL is specified for the structure, the default settings + * (the same than the ones set by the ::criAtomEx_SetDefaultConfig macro) are used + * to calculate the size of the work buffer. + *
+ * The information in the configuration structure is only used during the initialization and is + * not referenced after that. Therefore, it is safe to release it once the function has returned. + * \attention + * If a value is set to the acf_info member of the ::CriAtomExConfig structure, this function fails and -1 is returned.
+ * When registering ACF data in initialization processing, it is necessary to allocate memory using the memory allocator by the ADX 2 system, + * not by securing memory using this function value. + * \sa CriAtomExConfig, criAtomEx_Initialize + */ +CriSint32 CRIAPI criAtomEx_CalculateWorkSize(const CriAtomExConfig *config); + +/*EN + * \brief Initialize the library + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] config configuration structure used to initialize the library + * \param[in] work work buffer + * \param[in] work_size size of the work buffer + * \return CriBool Whether it was initialized (initialized : CRI_TRUE / uninitialized : CRI_FALSE) + * \par Description: + * Initializes the library.
+ * In order to be able to use the features of the library, you must first call this function.
+ * (Once this function is called, the features of the library are available until the ::criAtomEx_Finalize function + * is called.)
+ *
+ * To initialize the library, you must allocate a memory area (work buffer) + * that will be used internally by the library.
+ * There are two methods to allocate the work buffer.
+ * (a) User Allocator method: This method calls a user-provided function to allocate/deallocate the memory.
+ * (b) Fixed Memory method: This method passes the necessary memory buffer directly to the library.
+ *
+ * You can register ACF data in the initialization process by using the acf_info member of the ::CriAtomExConfig structure.
+ * When registering ACF data in initialization processing, it is necessary to allocate a memory area using the User Allocator method.
+ *
+ * When using the User Allocator method, the user must register a memory allocation function with the library.
+ * If you specify NULL for work and 0 for work_size when calling this function, + * the library will use the registered memory allocation function to automatically allocate the required amount of memory.
+ * In that case, the user does not need to prepare the work buffer.
+ * The memory allocated at the initialization will be released when the library is finalized (by calling ::criAtomEx_Finalize).
+ *
+ * When using the Fixed Memory method, the user must pass a pre-allocated memory buffer to this function.
+ * The size of the work buffer needed can be calculated by calling the ::criAtomEx_CalculateWorkSize function.
+ * Before the initialization, allocate a memory buffer of the size returned by the ::criAtomEx_CalculateWorkSize function, + * and then pass it to this function.
+ * When the Fixed Memory method is used, the library uses the work buffer until the library is finalized (by calling the ::criAtomEx_Finalize + * function).
+ * Do not release the memory of the work buffer before the library is finalized.
+ * \par Example: + * [Initialization of the library using the User Allocator method]
+ * The following lines show the procedure to initialize/finalize the library when the User Allocator method is used.
+ * -# Before initializing the library, use the ::criAtomEx_SetUserAllocator function to register the memory allocation/deallocation functions.
+ * -# Specify the parameters of the configuration structure for the initialization.
+ * -# Execute the ::criAtomEx_Initialize function to initialize the library.
+ * (Specify NULL for work and 0 for work_size.)
+ * -# When exiting the application, execute the ::criAtomEx_Finalize function to finalize the library.
+ * . + *
A code example is shown below.
+ * \code + * // User-provided memory allocation function + * void *user_malloc(void *obj, CriUint32 size) + * { + * void *mem; + * + * // Allocate memory + * mem = malloc(size); + * + * return (mem); + * } + * + * // User-provided memory deallocation function + * void user_free(void *obj, void *mem) + * { + * // Release the memory + * free(mem); + * + * return; + * } + * + * main() + * { + * CriAtomExConfig config; // Configuration structure used to initialize the library + * : + * // // Register the user allocator + * criAtomEx_SetUserAllocator(user_malloc, user_free, NULL); + * + * // Set the default values in the configuration structure used to initialize the library + * criAtomEx_SetDefaultConfig(&config); + * + * // Initialize the library + * // Specify NULL and 0 for the work buffer and its size. + * // -> The required memory is allocated using the registered memory allocation function. + * criAtomEx_Initialize(&config, NULL, 0); + * : + * // Application's main routine + * : + * // Finalize the library when exiting the application + * // -> The memory allocated during the initialization is released using the registered memory deallocation function. + * criAtomEx_Finalize(); + * : + * } + * \endcode + *
+ * [Initialization of the library using the Fixed Memory method]
+ * The following lines show the procedure to initialize/finalize the library when the Fixed Memory method is used.
+ * -# Specify the parameters of the configuration structure used for the initialization.
+ * -# Use the ::criAtomEx_CalculateWorkSize function to calculate the size of the work buffer + * required to initialize the library.
+ * -# Allocate the same amount of memory.
+ * -# Call the ::criAtomEx_Initialize function to initialize the library.
+ * (Specify the address of the allocated memory for work and the size of the work buffer for work_size.)
+ * -# When exiting the application, call the ::criAtomEx_Finalize function to finalize the library.
+ * -# Release the memory of the work buffer.
+ * . + *
A code example is shown below.
+ * \code + * main() + * { + * CriAtomExConfig config; // Configuration structure used to initialize the library + * void *work; // Address of the work buffer + * CriSint32 work_size; // Size of the work buffer + * : + * // Set the default values to the configuration structure + * criAtomEx_SetDefaultConfig(&config); + * + * // Calculate the size of the work buffer required to initialize the library + * work_size = criAtomEx_CalculateWorkSize(&config); + * + * // Allocate the memory for the work buffer + * work = malloc((size_t)work_size); + * + * // Initialize the library + * // -> Specify the work buffer that was allocated + * criAtomEx_Initialize(&config, NULL, 0); + * : + * // Application's main routine + * // -> The allocated memory must not be released + * : + * // Finalize the library when exiting the application + * criAtomEx_Finalize(); + * + * // Release the work buffer which is no longer necessary + * free(work); + * : + * } + * \endcode + * \par Remarks: + * The size of the work buffer required for the library depends on the value of the parameters in the configuration structure + * used for the initialization.
+ * In addition, it also depends on the platform. + *
+ * The information in the configuration structure is only used during the initialization and is + * not referenced after that. Therefore, it is safe to release it once the function has returned. + * \attention + * At present, regardless of whether streaming playback is performed or not, the Atom library always uses + * the features of the CRI File System library.
+ * Therefore, if the CRI File System library has not been initialized, + * when the Atom library is initialized, the CRI File System library will be internally initialized at the same time.
+ *
+ * When the Atom library internally initializes the CRI File System library, + * it uses the parameters pointed by the fs_config pointer of the ::CriAtomExConfig structure.
+ * If fs_config is NULL, the Atom library uses the default parameters + * (i.e. the same values that would be set by using the ::criFs_SetDefaultConfig macro).
+ *
+ * If the CRI File System library has already been initialized, this function does not + * initialize it again.
+ *
+ * If you call this function, you must always call the ::criAtomEx_Finalize function later.
+ * Do not call this function again until you have called the ::criAtomEx_Finalize function.
+ * \sa CriAtomExConfig, criAtomEx_Finalize, criAtomEx_SetUserAllocator, criAtomEx_CalculateWorkSize + */ +CriBool CRIAPI criAtomEx_Initialize( + const CriAtomExConfig *config, void *work, CriSint32 work_size); + +/*EN + * \brief Finalize the library + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * Finalizes the library.
+ * \attention + * This function cannot be called before the ::criAtomEx_Initialize function is executed.
+ * \sa criAtomEx_Initialize + */ +void CRIAPI criAtomEx_Finalize(void); + +/*EN + * \brief Check the library initialization status + * \ingroup ATOMEXLIB_GLOBAL + * \return CriBool whether or not the library has been initialized + * \retval CRI_FALSE uninitialized + * \retval CRI_TRUE initialized + * \par Description: + * Checks whether the library has been initialized or not.
+ * \sa criAtomEx_Initialize, criAtomEx_Finalize + */ +CriBool CRIAPI criAtomEx_IsInitialized(void); + +/*EN + * \brief Execute the server processing + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * Updates the internal status of the CRI Atom library.
+ * The application must execute this function regularly.
+ *
+ * The fequency at which this function must be called depends on the parameters specified at the initialization of the library.
+ * If the threading model is set to ::CRIATOMEX_THREAD_MODEL_MULTI at the initialization of the library, + * all processes that must be executed in real-time are executed regularly and automatically within the CRI Atom library. + * And therefore, even if the calling frequency of this function is low, no problem will occur.
+ * (If this function is executed at least once per second, it should prevent any problem such as audio breakup to occur.)
+ * If the threading model is set to ::CRIATOMEX_THREAD_MODEL_SINGLE or ::CRIATOMEX_THREAD_MODEL_USER_MULTI at the initialization of the library, + * this function performs almost all processes required for audio playback, such as file-reading management, data decoding, and audio output.
+ * Also, this function performs the file access and data decoding processes of the CRI File System library while synchronizing with the audio playback.
+ * Therefore, if this function is executed less frequently than the execution frequency of the server processing (server_frequency in the ::CriAtomExConfig structure) + * that was specified when the library was initialized, or if a large or compressed file is read, some problems such as audio breakups may occur.
+ * \par Remarks: + * When the threading model is set to ::CRIATOMEX_THREAD_MODEL_MULTI at the initialization of the library, + * this function must also be executed.
+ * (If the threading model is set to ::CRIATOMEX_THREAD_MODEL_MULTI, only some processes such as status updates are + * executed, therefore processes are not blocked for a long time in this function.) + *
+ * The server processing of the CRI File System library is executed internally from within the CRI Atom library.
+ * It means that if this function has been executed, the application does not need to call the + * server processing of the CRI File System library.
+ */ +void CRIAPI criAtomEx_ExecuteMain(void); + +/*EN + * \brief Execute the server processing for user multithreading. + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * Updates only the CRI Atom library.
+ * When the threading model is ::CRIATOMEX_THREAD_MODEL_USER_MULTI, + * the application must execute this function regularly.
+ * + *
+ * This function performs almost all the processes required for audio playback, + * such as file-reading management, data decoding and audio output.
+ * Therefore, if this function is executed less frequently than the frequency of the server processing (server_frequency in the ::CriAtomExConfig structure), + * some problems such as audio playback breakups may occur.
+ * In addition, unlike the ::criAtomEx_ExecuteMain function, this function does not execute the server processing of the CRI File System library.
+ * The application must execute the necessary server processings in the correct order.
+ * \par Remarks: + * When ::CRIATOMEX_THREAD_MODEL_SINGLE is selected, exclusive control over the server processing is not garanteed, + * so you must not call this function from multiple threads.
+ * \sa criAtomEx_ExecuteMain + */ +void CRIAPI criAtomEx_ExecuteAudioProcess(void); + +/*EN + * \brief Prevent the server process interrupts + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * Suppresses the server process interrupts.
+ * Once this function is executed, the server process operations are suppressed until the ::criAtomEx_Unlock function is executed.
+ * When you want to execute multiple APIs in the same audio frame, use this function to prevent the server process to interrupt + * and then execute those functions. + * \par Example: + * \code + * : + * // Prevent server process interrupts + * criAtomEx_Lock(); + * + * // Start playing back multiple voices + * criAtomExPlayer_Start(player1); + * criAtomExPlayer_Start(player2); + * criAtomExPlayer_Start(player3); + * criAtomExPlayer_Start(player4); + * + * // Cancel the server process interrupt prevention + * criAtomEx_Unlock(); + * : + * \endcode + * \attention + * Even if the playback is started on multiple players simultaneously as in the example above, + * voices do not always start simultaneously when using streaming playback.
+ * (Because there is a playback delay due to buffering.)
+ *
+ * After this function is executed, if the ::criAtomEx_Unlock function is not called for a long time, an audio playback breakup may occur.
+ * The duration for which the server process interrupts are suppressed must be as short as possible. + * \sa criAtomEx_Unlock + */ +void CRIAPI criAtomEx_Lock(void); + +/*EN + * \brief Cancel the server process interrupt prevention + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * Cancels the server process interrupts prevention started by the ::criAtomEx_Lock function. + * \sa criAtomEx_Lock + */ +void CRIAPI criAtomEx_Unlock(void); + +/*EN + * \brief Get the time + * \ingroup ATOMEXLIB_GLOBAL + * \return CriUint64 time (in microseconds) + * \par Description: + * Gets the time from the master timer of the Atom library. + * \sa criAtomEx_ResetTimer + */ +CriUint64 CRIAPI criAtomEx_GetTimeMicro(void); + +/*EN + * \brief Reset the timer + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * Resets the time of the master timer of the Atom library.
+ * \par Remarks: + * This function only affects the value returned by the ::criAtomEx_GetTimeMicro function.
+ * The playback time of the AtomEx Players will not be cleared.
+ * \sa criAtomEx_ResetTimer + */ +void CRIAPI criAtomEx_ResetTimer(void); + +/*EN + * \brief Pause the timer + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] sw CRI_TRUE = Pause timer, CRI_FALSE = Resume timer + * \par Description: + * Pauses or resumes the master timer of the Atom library.
+ * When the master timer is paused, the sequence time no longer progresses.
+ * \par Remarks: + * This function is intended to be used on platforms where the timer continues to count
+ * even when the application is paused or suspended.
+ * Call this function before transitioning into the paused or suspended state
+ * to prevent the sequence from progressing while suspended.
+ * \attention + * This function only stops the internal Atom library master timer.
+ * This function cannot be used to stop any currently playing voices, etc. + * The pause flag set via this function will be applied when the CRI Atom server process is executed.
+ * If instantaneous synchronization is required, call the ::criAtomEx_ExecuteAudioProcess function to synchronize manually.
+ * However, ::criAtomEx_ExecuteAudioProcess will execute the audio processing on the thread in which + * it was called. So make sure that the CPU can handle the load before calling the function.
+ * \sa criAtomEx_ResetTimer + */ +void CRIAPI criAtomEx_PauseTimer(CriBool sw); + +/*EN + * \brief Set the configuration structure used for the calculation of the work buffer sizes + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] config Configuration structure + * \par Description: + * Tentatively registers a configuration structure + * ( ::CriAtomExConfig structure) to calculate the work buffer size.
+ *
+ * The size of the work buffer required for an ACF file registration or a Voice Pool creation + * depends on the value of the parameters of the structure specified during the library initialization (i.e., when the ::criAtomEx_Initialize function + * is executed).
+ * Thus, in general, the library must be initialized + * before calculating the size of the work buffer that is needed.
+ * However, this function can be used to calculate the size of the work buffer required + * without initializing the library.
+ *
+ * By executing this function, the following can be done without initializing the library:
+ * - Calcluation of the size of the work buffer required for the registration of an ACF file + * (::criAtomEx_CalculateWorkSizeForRegisterAcfData function) + * - Calculation of the size of the work buffer required for creation of a Voice Pool
+ * ( ::criAtomExVoicePool_SetDefaultConfigForStandardVoicePool function, etc.) + * . + * \par Remarks: + * When NULL is specified for the argument (config), the default settings will be used to calculate the size of the working buffer + * (i.e. the same parameters than when ::criAtomEx_SetDefaultConfig is used)
+ *
+ * This function currently cannot be undone. + * Once executed, there is no way to restore the previous state + * (in which the library has not been initialized and the calculation of the size of the work buffer results in an error).
+ * (It is still possible to overwrite the parameters by executing the function again.)
+ * \attention + * The configuration structure registered by this function + * is only used to calculate the size of the work buffer when the library has not been initialized.
+ * Once the library is initialized, instead of the parameters of this configuration structure, + * the parameters specified during the initialization will be taken into account to calculate the size of the work buffer.
+ * (If the parameters of the structure registered by this function + * differ from the parameters of the structure used for the library's initialization, + * the handle creation may fail due to an insufficient work buffer size.)
+ *
+ * Some functions, such as ::criAtomEx_RegisterAcfFile and ::criAtomExAcb_LoadAcbFile, + * require file access during the calculation of the size of the work buffer. + * Therefore, the size of their work buffer cannot be calculated before the library is initialized, even by calling this function.
+ * (The library must be initialized before calculating the size of the work buffer.)
+ * \par Example: + * \code + * CriAtomExConfig atomex_config; + * + * // Assign default values to the configuration structure. + * criAtomEx_SetDefaultConfig(&atomex_config); + * + * // Calculate the size of the work buffer. + * lib_work_size = criAtomEx_CalculateWorkSize(&atomex_config); + * + * // Tentatively register parameters to calculate the size of the work buffer for the sub-modules. + * criAtomEx_SetConfigForWorkSizeCalculation(&atomex_config); + * + * // Calculate the size of the work buffer for the sub-modules. + * acf_work_size = criAtomEx_CalculateWorkSizeForRegisterAcfData(acf_data, acf_data_size); + * vp_work_size = criAtomExVoicePool_CalculateWorkSizeForStandardVoicePool(NULL); + * : + * \endcode + * \sa criAtomEx_CalculateWorkSizeForRegisterAcfData, criAtomExVoicePool_SetDefaultConfigForStandardVoicePool + */ +void CRIAPI criAtomEx_SetConfigForWorkSizeCalculation(const CriAtomExConfig *config); + +/*EN + * \brief Calculate the size of the work buffer required to register in-memory ACF data + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] acf_data ACF data address + * \param[in] acf_data_size ACF data size + * \return CriSint32 work buffer size + * \retval >= 0 successfully completed + * \retval -1 error occurred + * \par Description: + * Calculates the size of the work buffer required to execute the ::criAtomEx_RegisterAcfData function.
+ * When the ::criAtomEx_RegisterAcfData function is called and no user allocator was registered (using the ::criAtomEx_SetUserAllocator macro), + * a memory buffer of the size returned by this function must be passed to ::criAtomEx_RegisterAcfData.
+ *
+ * If this function fails to calculate the size, it returns -1.
+ * To know the reason of the failure, refer to the error callback message.
+ * \attention + * The size of the work buffer depends on the value of the parameters specified when the library was initialized (by calling the ::criAtomEx_Initialize + * function).
+ * Therefore, the library must be initialized before this function is called.
+ * \sa criAtomEx_RegisterAcfData + */ +CriSint32 CRIAPI criAtomEx_CalculateWorkSizeForRegisterAcfData( + void *acf_data, CriSint32 acf_data_size); + +/*EN + * \brief Register in-memory ACF data + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] acf_data ACF data address + * \param[in] acf_data_size ACF data size + * \param[in] work work buffer + * \param[in] work_size work buffer size + * \par Description: + * Registers the in-memory ACF data with the library.
+ * The size of the work buffer required to register the ACF information + * is calculated by the ::criAtomEx_CalculateWorkSizeForRegisterAcfData function.
+ * \par Remarks: + * If an allocator has already been registered by using the ::criAtomEx_SetUserAllocator macro, + * it is not necessary to pass a work buffer to this function.
+ * (By passing NULL for work and 0 for work_size, the amount of memory required will be allocated + * by the user allocator.) + * \attention + * The library must be initialized before this function is called.
+ *
+ * This function stops all the sound being played when the function is executed. + * Both the ACF data buffer and the work buffer that are passed to this function must be maintained + * by the application until the ::criAtomEx_UnregisterAcf function is executed.
+ * (Do not release the memory for the work buffer before calling the ::criAtomEx_UnregisterAcf function.) + * A part of the ACF data buffer is also used as a work buffer.
+ * \sa criAtomEx_UnregisterAcf + */ +void CRIAPI criAtomEx_RegisterAcfData( + void *acf_data, CriSint32 acf_data_size, void *work, CriSint32 work_size); + +/*EN + * \brief Calculate the size of the work buffer required to register an ACF file + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] binder binder handle + * \param[in] path file path + * \return CriSint32 work buffer size + * \retval >= 0 successfully completed + * \retval -1 error occurred + * \par Description: + * Calculates the size of the work buffer required to execute the ::criAtomEx_RegisterAcfFile function.
+ * When the ::criAtomEx_RegisterAcfFile function is called and no user allocator was registered (using the ::criAtomEx_SetUserAllocator macro), + * a memory buffer of the size returned by this function must be passed to ::criAtomEx_RegisterAcfData.
+ *
+ * If this function fails to calculate the size, it returns -1.
+ * To know the reason of the failure, refer to the error callback message.
+ * \par Note: + * Specify NULL when the data is not packed to CPK.
+ * \attention + * The size of the work buffer depends on the value of the parameters specified when the library was initialized (by calling the ::criAtomEx_Initialize + * function).
+ * Therefore, the library must be initialized before this function is called.
+ * \sa criAtomEx_RegisterAcfFile + */ +CriSint32 CRIAPI criAtomEx_CalculateWorkSizeForRegisterAcfFile( + CriFsBinderHn binder, const CriChar8 *path); + +/*EN + * \brief Calculate the size of the work buffer required to register an ACF file (specifying a CPK content ID) + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] binder binder handle + * \param[in] id CPK content ID + * \return CriSint32 work buffer size + * \retval >= 0 successfully completed + * \retval -1 error occurred + * \par Description: + * Calculates the size of the work buffer required to execute the ::criAtomEx_RegisterAcfFileById function.
+ * Beside the fact that a CPK content ID is specified instead of a file path, + * this function works in the same way as the ::criAtomEx_CalculateWorkSizeForRegisterAcfFile function.
+ * \par Note: + * Specify NULL when the data is not packed to CPK.
+ * \sa criAtomEx_CalculateWorkSizeForRegisterAcfFile, criAtomEx_RegisterAcfFileById + */ +CriSint32 CRIAPI criAtomEx_CalculateWorkSizeForRegisterAcfFileById( + CriFsBinderHn binder, CriUint16 id); + +/*EN + * \brief Register an ACF file + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] binder binder handle + * \param[in] path file path + * \param[in] work work buffer + * \param[in] work_size work buffer size + * \return CriBool result of the file reading + * \par Description: + * Loads an ACF file and registers it with the library.
+ * The size of the work buffer required to register the ACF information + * is calculated by the ::criAtomEx_CalculateWorkSizeForRegisterAcfFile function.
+ *
+ * When this function registers an ACF file successfully, it returns CRI_TRUE.
+ * If it fails to register the ACF file, for example due to a reading error, it returns + * CRI_FALSE.
+ * \par Remarks: + * If an allocator has already been registered by using the ::criAtomEx_SetUserAllocator macro, + * it is not necessary to pass a work buffer to this function.
+ * (By passing NULL for work and 0 for work_size, the amount of memory required will be allocated + * by the user allocator.) + *
+ * Specify NULL when the data is not packed to CPK.
+ * \attention + *
+ * This function stops all the sound being played when the function is executed.
+ * This function allocates a loader with the criFsLoader_Create function when it begins its execution + * and destroys the loader with the criFsLoader_Destroy function when it finishes its execution.
+ * Before calling this function, make sure to adjust the number of loaders so that there is at least + * one free load handle.
+ *
+ * The work buffer that is passed to this function must be maintained + * by the application until the ::criAtomEx_UnregisterAcf function is executed.
+ * (Do not release the memory for the work buffer before calling the ::criAtomEx_UnregisterAcf function.) + + * \sa criAtomEx_UnregisterAcf + */ +CriBool CRIAPI criAtomEx_RegisterAcfFile( + CriFsBinderHn binder, const CriChar8 *path, void *work, CriSint32 work_size); + +/*EN + * \brief Register an ACF file (specifying a CPK content ID) + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] binder binder handle + * \param[in] id CPK content ID + * \param[in] work work buffer + * \param[in] work_size work buffer size + * \return CriBool result of the file reading + * \par Description: + * Loads an ACF file and registers it with the library.
+ * Beside the fact that a CPK content ID is specified instead of a file path, + * this function works in the same way as the ::criAtomEx_RegisterAcfFile function.
+ * \par Note: + * Specify NULL when the data is not packed to CPK.
+ * \sa criAtomEx_RegisterAcfFile + * \attention + * This function stops all the sound being played when the function is executed. + */ +CriBool CRIAPI criAtomEx_RegisterAcfFileById( + CriFsBinderHn binder, CriUint16 id, void *work, CriSint32 work_size); + +/*EN + * \brief Unregister an ACF file + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * Unregisters ACF information.
+ * \attention + * This function stops all the sound being played when the function is executed.
+ * This function cannot be executed before the ::criAtomEx_RegisterAcfFile function has been called.
+ * \sa criAtomEx_RegisterAcfConfig, criAtomEx_RegisterAcfData, criAtomEx_RegisterAcfFile + */ +void CRIAPI criAtomEx_UnregisterAcf(void); + +/*EN + * \brief Get the version of an in-memory ACF + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] acf_data ACF data address + * \param[in] acf_data_size ACF data size + * \param[out] flag flag that indicates whether the ACF can be registered or not + * \return CriUint32 ACF format version + * \par Description: + * Gets the version of the format of the ACF data present in memory.
+ * The flag argument indicates whether the data for this version can be registered.
+ */ +CriUint32 CRIAPI criAtomEx_GetAcfVersion( + void *acf_data, CriSint32 acf_data_size, CriBool *flag); + +/*EN + * \brief Get the version of an ACF file + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] binder binder handle + * \param[in] path file path + * \param[in] work work buffer + * \param[in] work_size work buffer size + * \param[out] flag flag that indicates whether the ACF can be registered or not + * \return CriUint2 ACF format version + * \par Description: + * Loads an ACF file and gets the version of the ACF data.
+ * The size of the work buffer required to register the ACF information + * is calculated by the ::criAtomEx_CalculateWorkSizeForRegisterAcfFile function.
+ *
+ * The flag argument indicates whether the data for this version can be registered.
+ * \par Remarks: + * If an allocator has already been registered by using the ::criAtomEx_SetUserAllocator macro, + * it is not necessary to pass a work buffer to this function.
+ * (By passing NULL for work and 0 for work_size, the amount of memory required will be allocated + * by the user allocator.) + *
+ * \par Note: + * Specify NULL when the data is not packed to CPK.
+ * \attention + * This function allocates a loader with the criFsLoader_Create function when it begins its execution + * and destroys the loader with the criFsLoader_Destroy function when it finishes its execution.
+ * Before calling this function, make sure to adjust the number of loaders so that there is at least + * one free load handle.
+ *
+ * The application does not need to maintain the work buffer set in this function.
+ * (When the function is finished, the data loaded is released.) + */ +CriUint32 CRIAPI criAtomEx_GetAcfVersionFromFile( + CriFsBinderHn binder, const CriChar8 *path, void *work, CriSint32 work_size, CriBool *flag); + +/*EN + * \brief Get the version of an ACF file (specifying CPK content ID) + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] binder binder handle + * \param[in] id CPK content ID + * \param[in] work work buffer + * \param[in] work_size work buffer size + * \param[out] flag flag that indicates whether the ACF can be registered or not + * \return CriUint2 ACF format version + * \par Description: + * Loads an ACF file and get the version of the format of the ACF data.
+ * Beside the fact that a CPK content ID is specified instead of a file path, + * this function works in the same way as the ::criAtomEx_GetAcfVersionFromFile function.
+ * \par Note: + * Specify NULL when the data is not packed to CPK.
+ * \sa criAtomEx_GetAcfVersionFromFile + */ +CriUint32 CRIAPI criAtomEx_GetAcfVersionFromFileById( + CriFsBinderHn binder, CriUint16 id, void *work, CriSint32 work_size, CriBool *flag); + +/*EN + * \brief Get what versions of an ACF file can be registered + * \ingroup ATOMEXLIB_GLOBAL + * \param[out] version_low lowest version that can be registered + * \param[out] version_high highest version that can be registered + * \par Description: + * Get what versions of an ACF file can be registered (i.e. are supported by the current version).
+ * Since version_high corresponds to the version when the library was built, + * an ACF with a version higher than this value may be registrable.
+ */ +void CRIAPI criAtomEx_GetSupportedAcfVersion( + CriUint32 *version_low, CriUint32 *version_high); + +/*EN + * \brief Analyze audio header + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] buffer buffer that stores the audio data + * \param[in] buffer_size size of the buffer that stores the audio data + * \param[out] info format information + * \return CriBool whether the format acquisition has succeeded or failed (If succeeded: CRI_TRUE/if failed: CRI_FALSE) + * \par Description: + * Analyzes the format of the audio data loaded in memory.
+ * If the analysis has succeeded, this function returns CRI_TRUE and stores the format information of the audio data + * in the third argument (info).
+ * If the analysis has failed, this function returns CRI_FALSE.
+ * \par Remarks: + * In the first argument (buffer), the header area of the audio data must be stored + * (i.e. the first part of the audio data that is loaded in memory).
+ * If a part other than the header of the audio data is set, if unnecessary data is added before the header + * or if only a part of the header is stored, the format analysis will fail.
+ * For the ADX data or the HCA data, if the first 2048 bytes of the audio file is passed, + * this function will not fail the format analysis.
+ * \attention + * At present, this function only supports the analysis of ADX data and HCA data.
+ * While this function can analyze HCA-MX data, it is not possible to identify + * whether the data is actually HCA data or HCA-MX data just by checking the header information, + * and therefore this function will return CRIATOMEX_FORMAT_HCA as the format type.
+ */ +CriBool CRIAPI criAtomEx_AnalyzeAudioHeader( + const void *buffer, CriSint32 buffer_size, CriAtomExFormatInfo *info); + +/*EN + * \brief Set a random seed + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] seed random seed + * \par Description: + * Specifies a random seed for a Random Number Generator shared by the entire CRI Atom library.
+ * By setting a random seed, various random playback processes can be reproduced.
+ * If you want to make them reproducible at the AtomEx Player level, use the ::criAtomExPlayer_SetRandomSeed function instead. + *
+ * \sa criAtomExPlayer_SetRandomSeed + */ +void CRIAPI criAtomEx_SetRandomSeed(CriUint32 seed); + +/*EN + * \brief Check whether the ACB handle can be released immediately + * \ingroup ATOMLIBEX_ACB + * \param[in] buffer Buffer + * \param[in] size Buffer size + * \return CriBool Whether it is during audio playback or not (CRI_TRUE = There is a player that is playing , CRI_FALSE = There is not a player that is playing) + * \par Description: + * Check whether the buffer area set by ::criAtomExPlayer_SetData function can be freed.
+ * \par Remarks: + * Even if all the AtomEx players are stopped, + * there is still a possibility that a voice referencing data in the memory area exists in the library.
+ * \attention + * When this function is executed, the Atom player referring to the specified data area + * does not exist or search processing is performed in the library.
+ * Therefore, creating / destroying Atom player from another thread while + * this function is executing may cause serious trouble such as an access violation or a deadlock.
+ * If you need to create / destroy an Atom player with another thread while this function is being executed, + * please lock the creation / destruction of the Atom player with the ::criAtomEx_Lock function.
+ *
+ * When releasing the buffer set with the ::criAtomExPlayer_SetData function, + * it is necessary to wait until this function returns CRI_FALSE (after + * stopping the processing of the player for which the data was set)
+ * If the buffer area is freed even though this function returns CRI_TRUE, + * a fatal error such as an access violation may occur.
+ * \sa criAtomExPlayer_SetData + */ +CriBool CRIAPI criAtomEx_IsDataPlaying(void *buffer, CriSint32 size); + +/*EN + * \brief Acquiring streaming information + * \ingroup ATOMEXLIB_GLOBAL + * \param[out] streaming_info Pointer to the location where streaming information is stored + * \retval CRI_TRUE Succeeded in acquiring the value + * \retval CRI_FALSE Failed in acquiring the value + * \par Description: + * Acquires streaming information from the streaming management module in the CRI Atom library.
+ * This function stores the streaming information when it is called at streaming_info.
+ * \attention + * Because this function and some processes in the Atom server are exclusively controlled, + * do not stop the Atom server due to priority inversion.
+ * Streaming information is not available on some platforms.
+ * Check the return value of this function.
+ * If streaming information cannot be acquired because of an error,
+ * check whether an error callback occurred. + * \sa CriExAtomStreamingInfo + */ +#define criAtomEx_GetStreamingInfo(streaming_info) \ + criAtom_GetStreamingInfo(streaming_info) + +/*EN + * \brief Enable or disable the loading of streams when there is free time during file I/O + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] flag CRI_TRUE = Use free time during file I/O to perform streaming + * \retval CRI_TRUE The process finished normally. + * \retval CRI_FALSE An error occurred. + * \par Description: + * This setting tells the CRI Atom library streaming management module whether or not to perform
+ * streaming when there is free time during file I/O operations.
+ * When set to CRI_TRUE, the CRI Atom library streaming management module + * uses any free time during file I/O to load extra data into an empty buffer.
+ * When set to CRI_FALSE, the CRI Atom library streaming management module + * does not use the free time during file I/O to load extra data.
+ * The default setting is CRI_TRUE.
+ * \par Remarks: + * By using the free time between file I/O operations to load extra data into an empty buffer, + * you can reduce the frequency of seek playback and improve the overall efficiency of file I/O.
+ * However, normal file load processing has a lower priority than streaming, + * so if the empty buffer is too large, normal file load processing will be greatly delayed.
+ * \attention + * Note that some exclusive access control is performed with the Atom server internal processing, + * so be sure not to stop the Atom server due to reversed priorities. + */ +#define criAtomEx_SetFreeTimeBufferingFlagForDefaultDevice(flag) \ + criAtom_SetFreeTimeBufferingFlagForDefaultDevice(flag) + +/*EN + * \brief Specify a key to decrypt encrypted TADX1 data + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] key_string character string for decrypting encrypted ADX1 data + * \par Description: + * Specifies a key (character string) to decrypt encrypted ADX data for ADX1.
+ * \par Remarks: + * This function corresponds to the ADXT_SetDefKeyString function of the ADX1 library.
+ * \attention + * This function is used to play back ADX data encrypted for ADX1 with the ADX2 runtime library.
+ * To decrypt audio data encrypted by the tools of the ADX2 SDK (CRI Atom Craft or CRI Atom Encoder), + * do use not this function but the decrypter API (::criAtomExDecrypter_Creat, etc.).
+ *
+ * The decryption key specified by this function is not used for non-encrypted ADX data.
+ * (The behavior is different from when ADX1 was used.)
+ * To put noises into non-encrypted ADX data, use this function and the decrypter API together.
+ *
+ * This function is provided only for compatibility purposes, to be able to reuse old data.
+ * When creating new ADX data, use the tools of the ADX2 SDK for encryption.
+ * \sa criAtomExDecrypter_Create + */ +#define criAtomEx_SetAdx1KeyString(key_string) \ + criAtom_SetAdx1KeyString(key_string) + +/*EN + * \brief Calculate the size of the work buffer required to attach a DSP bus setting + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] setting name of the DSP bus setting + * \return CriSint32 work buffer size + * \retval >= 0 successfully completed + * \retval -1 error occurred + * \par Description: + * Calculates the size of the work buffer required to build a DSP bus from the DSP bus setting.
+ * Before executing this function, call the ::criAtomEx_RegisterAcfConfig function + * to register the ACF information.
+ *
+ * If this function fails to calculate the size, it returns -1.
+ * To know the reason of the failure, refer to the error callback message.
+ * \par Remarks: + * The size of the work buffer required to attach a DSP bus setting + * depends on the contents of the DSP bus setting, as created in CRI Atom Craft.
+ * \sa criAtomEx_AttachDspBusSetting, criAtomEx_RegisterAcfConfig + */ +CriSint32 CRIAPI criAtomEx_CalculateWorkSizeForDspBusSetting( + const CriChar8 *setting); + +/*EN + * \brief Calculate the size of the work buffer required to attach a DSP bus setting + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] acf_data ACF data + * \param[in] acf_buffer_size ACF data size + * \param[in] setting_name name of the DSP bus setting + * \return CriSint32 work buffer size + * \par Description: + * Calculates the size of the work buffer required to build a DSP bus from a DSP bus setting.
+ * Unlike the ::criAtomExAsr_CalculateWorkSizeForDspBusSetting function, this function + * can be executed before calling ::criAtomEx_RegisterAcfConfig.
+ * (In this case, load the ACF data in advance and register the configuration structure + * for the ASR initialization tentatively.)
+ *
+ * If the calculation of the size fails, this function returns -1.
+ * To know the reason of the failure, refer to the error callback message.
+ * \par Remarks: + * The size of the work buffer required to attach a DSP bus setting + * depends on the contents of the DSP bus setting, as created in CRI Atom Craft.
+ * \attention + * This function may not be able to get the size of the work buffer on platforms that use + * hardware DSP (i.e., platforms that do not use the ASR.)
+ * (In this case, an error callback may be triggered or a negative value may be returned when this function is executed.)
+ * On platforms where this function cannot be used, + * call the ::criAtomEx_CalculateWorkSizeForDspBusSetting function + * to calculate the size of the work buffer after initializing the library.
+ * \sa criAtomExAsr_AttachDspBusSetting, criAtomEx_RegisterAcfConfig, + * criAtomExAsr_SetConfigForWorkSizeCalculation, + * criAtomEx_CalculateWorkSizeForDspBusSetting + */ +CriSint32 CRIAPI criAtomEx_CalculateWorkSizeForDspBusSettingFromAcfData( + void *acf_data, CriSint32 acf_buffer_size, const CriChar8 *setting_name); + +/*EN + * \brief Attach a DSP bus setting + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] setting name of the DSP bus setting + * \param[in] work work buffer + * \param[in] work_size work buffer size + * \par Description: + * Builds a DSP bus from a DSP bus setting and attaches it to the sound renderer.
+ * Before executing this function, call ::criAtomEx_RegisterAcfConfig + * to register the ACF information.
+ * \code + * : + * // Load and register an ACF file + * criAtomEx_RegisterAcfFile(NULL, "Sample.acf", NULL, 0); + * + * // Apply a DSP bus setting + * criAtomEx_AttachDspBusSetting("DspBusSetting_0", NULL, 0); + * : + * \endcode + * \par Remarks: + * The size of the work buffer required to attach a DSP bus setting + * depends on the contents of the DSP bus setting, as created in CRI Atom Craft.
+ * \attention + * This is a blocking function.
+ * Executing this function blocks the server processing of the Atom library for a while.
+ * Threfore, if this function is executed during audio playback, problems such as audio breakups may occur. + * Call this function only when a fluctuation in load is acceptable, for example when loading a new level. + * \sa criAtomEx_DetachDspBusSetting, criAtomEx_RegisterAcfConfig + */ +void CRIAPI criAtomEx_AttachDspBusSetting( + const CriChar8 *setting, void *work, CriSint32 work_size); + +/*EN + * \brief Detach a DSP bus setting + * \ingroup ATOMEXLIB_GLOBAL + * \par Description: + * Detaches a DSP bus setting.
+ * If an allocator has been registered by using the ::criAtomEx_SetUserAllocator macro, + * the memory allocated when the DSP bus setting was attached is released.
+ * (If you passed a work buffer when attaching the DSP bus setting, it can be released + * after this function is executed.)
+ * \attention + * This is a blocking function.
+ * Executing this function blocks the server processing of the Atom library for a while.
+ * Threfore, if this function is executed during audio playback, problems such as sound breakups may occur. + * Call this function only when a fluctuation in load is acceptable, for example when loading a new level. + * \sa criAtomEx_AttachDspBusSetting + */ +void CRIAPI criAtomEx_DetachDspBusSetting(void); + +/*EN + * \brief Applying a DSP bus snapshot + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] snapshot_name Name of the snapshot + * \param[in] time_ms Time (milliseconds) + * \par Description: + * Applies the DSP bus snapshot.
+ * When this function is called, the parameters will change to those specified for the snapshot over the time of time_ms.
+ * \sa criAtomEx_AttachDspBusSetting + */ +void CRIAPI criAtomEx_ApplyDspBusSnapshot(const CriChar8 *snapshot_name, CriSint32 time_ms); + +/*EN + * \brief Get the name of the snapshot applied to a DSP bus + * \ingroup ATOMEXLIB_GLOBAL + * \return const CriChar8* Pointer to the string containing snapshot name + * \par Description: + * Get the name of the snapshot applied to a DSP bus.
+ * If no snapshot is applied, the function returns CRI_NULL. + * \sa criAtomEx_ApplyDspBusSnapshot + */ +const CriChar8* CRIAPI criAtomEx_GetAppliedDspBusSnapshotName(void); + +/*EN + * \brief Registering a CueLink callback function + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] func CueLink callback function + * \param[in] obj User specified object + * \par Description: + * Registers a callback function to receive CueLink information when a CueLink is processed during cue playback.
+ * \attention + * The registered callback function is executed when a CueLink is processed in the library.
+ * Therefore, if an API that doesn't appropriately handle an interrupt to the server processing is called, + * a problem such as error or deadlock may occur.
+ * Basically, do not use Atom library APIs in a callback function.
+ * Note that if audio processing is blocked in the callback function for a long time, some problems such as a playback interruption + *may occur.
+ *
+ * You can register only one callback function.
+ * When you register a callback function again, + * the registered callback function is overwritten with the new callback function.
+ *
+ * By specifying NULL for func, you can unregister the registered function.
+ * \sa CriAtomExCueLinkCbFunc + */ +void CRIAPI criAtomEx_SetCueLinkCallback(CriAtomExCueLinkCbFunc func, void* obj); + +/*EN + *\brief Setting 5.1-ch speaker angles + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] angle_l Angle of the front left speaker + * \param[in] angle_r Angle of the front right speaker + * \param[in] angle_sl Angle of the surround left speaker + * \param[in] angle_sr Angle of the surround right speaker + * \par Description: + * Sets the angles (arrangement) of the output speakers. The angles are used to calculate pan 3D and 3D positioning.
+ * Angles must be between -180 degrees and 180 degrees. 0 degrees indicate the front direction. + * \attention + * This function influences only a panning speaker type for 5.1 ch (4 ch or 5 ch).
+ * To change the speaker angles of a panning speaker type for 7.1 ch (6 ch or 7 ch), use the ::criAtomEx_SetSpeakerAngleArray function.
+ *
+ * The specified speaker angles must be angle_sl < angle_l < angle_r < angle_sr.
+ * Example: +* \code + * criAtomEx_SetSpeakerAngles(-45.0f, 45.0f, -135.0f, 135.0f); + * \endcode + * \sa criAtomEx_SetSpeakerAngleArray + */ +void CRIAPI criAtomEx_SetSpeakerAngles(CriFloat32 angle_l, CriFloat32 angle_r, CriFloat32 angle_sl, CriFloat32 angle_sr); + +/*EN + * \brief Setting the speaker angles + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] speaker_system Order of output speakers + * \param[in] angle_array Angles of output speakers + * \par Description: + * Sets the angles (arrangement) of the output speakers. The angles are used to calculate pan 3D and 3D positioning.
+ * Angles must be between -180 degrees and 180 degrees. 0 degrees indicate the front direction.
+ * The angle array must have more elements than the number of the output speakers.
+ * If NULL is specified as the angle array, the default angles are set based on the order of the output speakers.
+ * \attention + * If you reverse FRONT LEFT and FRONT RIGHT, unexpected behaviors may occur. + * \par Additional information: + * Changing the angle of LOW FREQUENCY does not influence the calculation results of pan 3D or 3D positioning.
+ * The angles are specified independently for each speaker system. + * \par Example: + * \code + * CriFloat32 angle_array[8] = {-30.0f, 30.0f, 0.0f, 0.0f, -90.0f, 90.0f, -150.0f, 150.0f} + * criAtomEx_SetSpeakerAngleArray(CRIATOMEX_SPEAKER_SYSTEM_SURROUND_7_1, angle_array); + * \endcode + * \sa criAtomEx_SetSpeakerAngles + */ +void CRIAPI criAtomEx_SetSpeakerAngleArray(CriAtomExSpeakerSystem speaker_system, const CriFloat32 *angle_array); + +/*EN + * \brief Set the virtual speaker angle + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] speaker_system Order of virtual speakers + * \param[in] angle_array Angles of virtual speakers + * \par Description: + * Sets the angles (arrangement) of the virtual speakers. The angles are used to calculate pan 3D and 3D positioning.
+ * The operation of this function is similar to the ::criAtomEx_SetSpeakerAngleArray function, so please refer to it for the basic explanation.
+ * \attention + * The settings passed to this function are not reflected in the pan 3D or 3D positioning calculations unless + * the virtual speaker settings are enabled with the ::criAtomEx_ControlVirtualSpeakerSetting function. + * \sa criAtomEx_SetSpeakerAngleArray, criAtomEx_ControlVirtualSpeakerSetting + */ +void CRIAPI criAtomEx_SetVirtualSpeakerAngleArray(CriAtomExSpeakerSystem speaker_system, const CriFloat32 *angle_array); + +/*EN + * \brief Enable / Disable the virtual speakers settings + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] sw Switch (CRI_FALSE = disable, CRI_TRUE = enable) + * \par Description: + * Enable or disable the function that uses the virtual speaker settings when calculating Pan 3D or 3D Positioning.
+ * When it is enabled, multichannel sounds are played back from the virtual speaker angle set with + * the ::criAtomEx_SetVirtualSpeakerAngleArray function. + * \attention + * The default state is disabled.
+ * If you select "Enable" while playing a voice, it will not be immediately reflected in the calculation of the Pan 3D or 3D Positioning. + * It will be reflected from the next voice playback. + * \sa criAtomEx_SetVirtualSpeakerAngleArray + */ +void CRIAPI criAtomEx_ControlVirtualSpeakerSetting(CriBool sw); + +/*EN + * \brief Acquiring the total number of game variables + * \ingroup ATOMEXLIB_GLOBAL + * \return CriSint32 Total number of game variables + * \par Description: + * Acquires the total number of game variables that are registered in the ACF file.
+ * \attention + * The ACF file must be registered before executing this function.
+ * If an ACF file is not registered, the function returns -1. + * \sa CriAtomExGameVariableInfo + */ +CriSint32 CRIAPI criAtomEx_GetNumGameVariables(void); + +/*EN + * \brief Acquiring game variable information (by specifying an index) + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] index Game variable index + * \param[out] info Game variable information + * \return CriBool Whether information is acquired or not. (Acquired: CRI_TRUE/not acquired: CRI_FALSE) + * \par Description: + * Acquires game variable information based on the game variable index.
+ * If a game variable for the specified index does not exist, the function returns CRI_FALSE. + * \sa CriAtomExGameVariableInfo + */ +CriBool CRIAPI criAtomEx_GetGameVariableInfo(CriUint16 index, CriAtomExGameVariableInfo* info); + +/*EN + * \brief Acquiring a game variable + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] id Game variable ID + * \return CriFloat32 Game variable value + * \par Description: + * Acquires the game variable value registered in the ACF file.
+ * \attention + * The ACF file must be registered before executing this function.
+ */ +CriFloat32 CRIAPI criAtomEx_GetGameVariableById(CriAtomExGameVariableId id); + +/*EN + * \brief Acquiring a game variable + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] name Game variable name + * \return CriFloat32 Game variable value + * \par Description: + * Acquires the game variable registered in the ACF file.
+ * \attention + * The ACF file must be registered before executing this function.
+ */ +CriFloat32 CRIAPI criAtomEx_GetGameVariableByName(const CriChar8* name); + +/*EN + * \brief Setting a game variable + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] id Game variable ID + * \param[in] value Game variable value + * \par Description: + * Sets a value for the game variable registered in the ACF file.
+ * You can set a value between 0.0f and 1.0f. + * \attention + * The ACF file must be registered before executing this function.
+ */ +void CRIAPI criAtomEx_SetGameVariableById(CriAtomExGameVariableId id, CriFloat32 value); + +/*EN + * \brief Setting a game variable + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] name Game variable name + * \param[in] value Game variable value + * \par Description: + * Sets a value for the game variable registered in the ACF file.
+ * You can set a value between 0.0f and 1.0f. + * \attention + * The ACF file must be registered before executing this function.
+ */ +void CRIAPI criAtomEx_SetGameVariableByName(const CriChar8* name, CriFloat32 value); + +/*EN + * \brief Registering a playback cancel callback function + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] func Playback cancel callback function + * \param[in] obj User specified object + * \par Description: + * Registers a callback function that receives playback cancel information when playback start is canceled at cue playback.
+ * \attention + * The registered callback function is executed when playback start is canceled in the library.
+ * Therefore, when APIs that cannot consider interrupt to the library processing are called, + * a problem such as error or deadlock may occur.
+ * Basically, do not use Atom library APIs in a callback function.
+ * Note that if audio processing is blocked in the callback function for a long time, some problems such as a playback interruption + * may occur.
+ *
+ * You can register only one callback function.
+ * When you register a callback function again, + * the registered callback function is overwritten with the new callback function.
+ *
+ * By specifying NULL for func, you can unregister the registered function.
+* \sa CriAtomExPlaybackCancelCbFunc + */ +void CRIAPI criAtomEx_SetPlaybackCancelCallback(CriAtomExPlaybackCancelCbFunc func, void* obj); + +/*EN + * \brief ACF consistency check function ON/OFF + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] sw Switch (CRI_FALSE = Check disabled, CRI_TRUE = Check enabled) + * \par Description: + * Turns the ACF consistency check ON or OFF when loading the ACB data.
+ * \attention + * The default setting is "check enabled". If this check is disabled, + * and inconsistent data is used, you may not obtain the results intended when using the ACF.
+ * A separate error callback will be triggered if an ACF item referenced from the ACB + * cannot be found when executing sound processing even when this check is disabled.
+ */ +void CRIAPI criAtomEx_ControlAcfConsistencyCheck(CriBool sw); + +/*EN + * \brief ACF consistency check error level setting + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] level Error level + * \par Description: + * Sets the notification level for the errors that occur when checking for ACF consistency when loading the ACB data.
+ * The default notification level is CRIERR_LEVEL_WARNING. + */ +void CRIAPI criAtomEx_SetAcfConsistencyCheckErrorLevel(CriErrorLevel level); + +/*EN + * \brief Registering a track transition by selector callback function + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] func Track transition by selector callback function + * \param[in] obj User specified object + * \par Description: + * Registers a callback function that receives information about transition when a track transition by selector cue is played.
+ * \attention + * The registered callback function is executed when transition is started in the library.
+ * Therefore, if an API that doesn't appropriately handle an interrupt to the server processing is called, + * a problem such as an error or deadlock may occur.
+ * Basically, do not use Atom library APIs in a callback function.
+ * Note that if audio processing is blocked in the callback function for a long time, some problems such as a playback interruption + * may occur.
+ *
+ * You can register only one callback function.
+ * When you register a callback function again, + * the registered callback function is overwritten with the new callback function.
+ *
+ * By specifying NULL for func, you can unregister the registered function.
+ * \sa CriAtomExTrackTransitionBySelectorCbFunc + */ +void CRIAPI criAtomEx_SetTrackTransitionBySelectorCallback(CriAtomExTrackTransitionBySelectorCbFunc func, void* obj); + +/*========================================================================== + * CRI AtomEx Debug API + *=========================================================================*/ +/*EN + * \brief get the status of CriAtomEx internal resources + * \ingroup ATOMEXLIB_GLOBAL_DEBUG + * \param[out] resources_info Status of CriAtomEx internal resources + * \par Description: + * Get the status of various resources within CriAtomEx.
+ * \attention + * Development support debugging function. Please use it only when developing applications. + * \sa CriAtomExDebugResourcesInfo + */ +void CRIAPI criAtomExDebug_GetResourcesInfo(CriAtomExDebugResourcesInfo *resources_info); + +/*========================================================================== + * CRI AtomEx HCA-MX API + *=========================================================================*/ +/*EN + * \brief Calculate the size of the work buffer required to initialize HCA-MX + * \ingroup ATOMEXLIB_HCA_MX + * \param[in] config configuration structure used to initialize HCA-MX + * \return CriSint32 work buffer size + * \retval >= 0 successfully completed + * \retval -1 error occurred + * \par Description: + * Calculates the size of the work buffer required to initialize HCA-MX.
+ * When ::criAtomExHcaMx_Initialize is called to initialize HCA-MX + * and no user allocator has been registered using the ::criAtomEx_SetUserAllocator macro, + * a memory buffer of the size returned by this function must be passed.
+ *
+ * If this function fails to calculate the size, it returns -1.
+ * To know the reason of the failure, refer to the error callback message.
+ * \par Remarks: + * The size of the working buffer required to initialize HCA-MX depends on + * the value of the parameters of the configuration structure ( ::CriAtomExHcaMxConfig ).
+ *
+ * If NULL is passed for config, the default settings are used to calculate the size of the work buffer + * (i.e. the same parameters than when ::criAtomExHcaMx_SetDefaultConfig is used). + *
+ * The information in the configuration structure is only used during the initialization and is + * not referenced after that. Therefore, it is safe to release it once the function has returned. + * \sa criAtomEx_SetUserAllocator, criAtomExHcaMx_Initialize + */ +CriSint32 CRIAPI criAtomExHcaMx_CalculateWorkSize(const CriAtomExHcaMxConfig *config); + +/*EN + * \brief Set the configuration structure used to calculate the size of the work buffer + * \ingroup ATOMEXLIB_HCA_MX + * \param[in] config Configuration structure for the HCA-MX initialization + * \par Description: + * Tentatively registers a configuration structure + * ( ::CriAtomExHcaMxConfig structure) to calculate the size of the work buffer needed.
+ *
+ * The size of the work buffer required to create a HCA-MX player + * depends on the value of the parameters in the configuration structure + * (i.e. when the ::criAtomExHcaMx_Initialize function is executed).
+ * Therefore, the library must usually be initialized before being able to calculate + * the size of the work buffer required.
+ * However, when this function is called to register a configuration structure for the + * HCA-MX initialization, the ::criAtomExVoicePool_CalculateWorkSizeForHcaMxVoicePool + * function can be used without initializing the library.
+ * \par Remarks: + * When NULL is specified for the argument (config), the default settings + * (the same parameters than when ::criAtomExVoicePool_SetDefaultConfigForHcaMxVoicePool is called) + * will be used to calculate the size of the work buffer.
+ *
+ * This function currently cannot be undone. + * Once executed, there is no way to restore the previous state + * (in which the library has not been initialized and the calculation of the size of the work buffer results in an error).
+ * (It is still possible to overwrite the parameters by executing the function again.)
+ * \attention + * The configuration structure registered by this function + * is only used to calculate the size of the work buffer when the HCA-MX library has not been initialized.
+ * Once the library is initialized, instead of the parameters of this configuration structure, + * the parameters specified during the initialization will be taken into account to calculate the size of the work buffer.
+ * (If the parameters of the structure registered by this function + * differ from the parameters of the structure used for the library's initialization, + * the handle creation may fail due to an insufficient work buffer size.)
+ * \par Example: + * \code + * CriAtomExHcaMxConfig hca_mx_config; + * + * // Tentatively register HCA-MX initialization parameters to calculate the size of the work buffer + * criAtomExHcaMx_SetDefaultConfig(&hca_mx_config); + * criAtomExHcaMx_SetConfigForWorkSizeCalculation(&hca_mx_config); + * + * // Calculate the size of the work buffer needed to create a HCA-MX player + * hca_mx_vp_work_size = criAtomExVoicePool_CalculateWorkSizeForHcaMxVoicePool(NULL); + * + * \endcode + * \sa criAtomExVoicePool_CalculateWorkSizeForHcaMxVoicePool, criAtomExVoicePool_SetDefaultConfigForHcaMxVoicePool + */ +void CRIAPI criAtomExHcaMx_SetConfigForWorkSizeCalculation(const CriAtomExHcaMxConfig *config); + +/*EN + * \brief Initialize HCA-MX + * \ingroup ATOMEXLIB_HCA_MX + * \param[in] config configuration structure to initializing HCA-MX + * \param[in] work work buffer + * \param[in] work_size work buffer size + * \par Description: + * Initializes HCA-MX.
+ * By executing this function, it becomes possible to output HCA-MX data.
+ * \par Remarks: + * The size of the working buffer required to initialize HCA-MX depends on + * the values of the parameters of the configuration structure ( ::CriAtomExHcaMxConfig ).
+ *
+ * When NULL is specified for the argument, the default settings are used for the initialization + * (i.e. the same parameters than when the ::criAtomExHcaMx_SetDefaultConfig macro is called).
+ *
+ * The information in the configuration structure is only used during the initialization and is + * not referenced after that. Therefore, it is safe to release it once the function has returned. + * \attention + * The library must be initialized before this function is executed.
+ *
+ * This is a blocking function.
+ * Executing this function blocks the server processing of the Atom library for a while.
+ * If this function is executed during audio playback, problems such as audio breakups may occur. + * Call this function only when a fluctuation in the load is acceptable, for example when loading a new level. + *
+ * If you call this function, you must always call the ::criAtomExHcaMx_Finalize function later.
+ * Do not call this function again until you have called the ::criAtomExHcaMx_Finalize function.
+ * \sa criAtomEx_SetUserAllocator, criAtomExHcaMx_CalculateWorkSize + */ +void CRIAPI criAtomExHcaMx_Initialize( + const CriAtomExHcaMxConfig *config, void *work, CriSint32 work_size); + +/*EN + * \brief Finalize the HCA-MX + * \ingroup ATOMEXLIB_HCA_MX + * \par Description: + * Finalizes the HCA-MX.
+ * By executing this function, the HCA-MX data output is stopped.
+ * If an allocator was registered using the ::criAtomEx_SetUserAllocator macro, + * this function releases the memory allocated when HCA-MX was initialized.
+ * (If a work buffer was passed when HCA-MX was initialized, the the work buffer can be released + * after this function is executed.)
+ * \attention + * This is a blocking function.
+ * Executing this function blocks the server processing of the Atom library for a while.
+ * If this function is executed during audio playback, problems such as audio breakups may occur. + * Call this function only when a fluctuation in the load is acceptable, for example when loading a new level. + * \sa criAtomEx_SetUserAllocator, criAtomExHcaMx_Initialize + */ +void CRIAPI criAtomExHcaMx_Finalize(void); + +/*EN + *\brief Setting the bus send level for the mixer + * \ingroup ATOMEXLIB_HCA_MX + * \param[in] mixer_id Mixer ID + * \param[in] bus_name Bus name + * \param[in] level Send level value (0.0f to 1.0f) + * \par Description: + * Sets the bus send level for the mixer.
+ * By default, the HCA-MX decoding results are stored in the mixer and then + * sent to bus 0 at 1.0f level.
+ * By using this function, decoding results can be sent to other buses.
+ * (A different bus effect can be applied to each mixer.)
+ */ +void CRIAPI criAtomExHcaMx_SetBusSendLevelByName( + CriSint32 mixer_id, const CriChar8* bus_name, CriFloat32 level); + +/*EN + * \brief Set the output frequency adjustment ratio of a mixer + * \ingroup ATOMEXLIB_HCA_MX + * \param[in] mixer_id mixer ID + * \param[in] ratio send level (0.25f to 4.0f) + * \par Description: + * Sets the output frequency adjustment ratio of a mixer.
+ * The frequency adjustment ratio is the ratio of the audio data frequency to the playback frequency, and it is also equal to the scale factor of the playback speed.
+ * When the frequency ratio exceeds 1.0f, the sound data is played back faster than in the original sound. + * This function changes the playback speed of all the HCA-MX voices (audio data encoded for HCA-MX) + * played on the target mixer. + * (When playing back HCA-MX voices, the playback speed setting of each individual player is ignored.)
+ */ +void CRIAPI criAtomExHcaMx_SetFrequencyRatio(CriSint32 mixer_id, CriFloat32 ratio); + +/*EN + * \brief Specify the ASR rack ID + * \ingroup ATOMEXLIB_HCA_MX + * \param[in] mixer_id Mixer ID + * \param[in] rack_id ASR rack ID + * \par Description: + * Specifies the ASR rack ID for the given mixer output.
+ * This function changes the rack ID of the ASR for all the HCA-MX voices (audio data encoded for HCA-MX) + * played on the target mixer. + * (When playing back HCA-MX voices, the ASR rack ID setting of each individual player is ignored.)
+ * \attention + * This function takes effect only when the ASR is used as the mixer's sound renderer type.
+ * (Settings in this function are ignored for all other sound renderer types.)
+ * \sa CriAtomExAsr_CreateRack + */ +void CRIAPI criAtomExHcaMx_SetAsrRackId(CriSint32 mixer_id, CriSint32 rack_id); + +/*========================================================================== + * CRI Atom Decrypter API + *=========================================================================*/ +/*EN + * \brief Calculate the size of the work buffer required to create a decrypter + * \ingroup ATOMEXLIB_DECRYPTER + * \param[in] p_config configuration structure used to create a decrypter + * \return CriSint32 work buffer size + * \retval >= 0 successfully completed + * \retval -1 error occurred + * \par Description: + * Calculates the size of the work buffer required to create a decrypter.
+ * When the ::criAtomExDecrypter_Create function is called and no user allocator was registered (using the ::criAtomEx_SetUserAllocator macro), + * a memory buffer of the size returned by this function must be passed.
+ *
+ * If this function fails to calculate the size, it returns -1.
+ * To know the reason of the failure, refer to the error callback message.
+ * \par Remarks: + * The information in the configuration structure is only used during the initialization and is + * not referenced after that. Therefore, it is safe to release it once the function has returned. + * \sa CriAtomExDecrypterConfig, criAtomExDecrypter_Create, criAtomEx_SetUserAllocator + */ +#define criAtomExDecrypter_CalculateWorkSize(p_config) \ + criAtomDecrypter_CalculateWorkSize(p_config) + +/*EN + * \brief Create a decrypter + * \ingroup ATOMEXLIB_DECRYPTER + * \param[in] p_config configuration structure used to create a decrypter + * \param[in] p_work work buffer + * \param[in] work_size work buffer size + * \return CriAtomExDecrypterHn decrypter handle + * \par Description: + * Creates a decrypter to decrypt audio data.
+ *
+ * If this function fails to calculate the size of the work buffer, it returns -1.
+ * To know the reason of the failure, refer to the error callback message.
+ * \par Remarks: + * At present, when a decrypter is created, it is activated globally.
+ * Therefore, once this function is executed, only encrypted data can be played back.
+ * (Any audio data which is not encrypted or with a different key is turned to noise.)
+ *
+ * The information in the configuration structure is only used during the initialization and is + * not referenced after that. Therefore, it is safe to release it once the function has returned. + * \par Example: + * \code + * CriAtomExDecrypterConfig decrypter_config; + * CriAtomExDecrypterHn decrypter; + * CriAtomExVoicePoolHn voice_pool; + * + * // Clear the configuration structure to create a decrypter + * memset(&decrypter_config, 0, sizeof(decrypter_config)); + * + * // Set an encryption key + * decrypter_config.key = 123456789; + * + * // Create a decrypter + * decrypter = criAtomExDecrypter_Create(&decrypter_config, NULL, 0); + * + * // Create a Voice Pool + * voice_pool = criAtomExVoicePool_AllocateStandardVoicePool(NULL, NULL, 0); + * \endcode + * \attention + * You must initialize the library before executing this function.
+ *
+ * Currently, an application can only use one decrypter at once.
+ * (Multiple decrypters cannot be created simultaneously.)
+ *
+ * If you create a Voice Pool after creating a decrypter, + * do not destroy the decrypter before destroying the Voice Pool.
+ * If you destroy the decrypter without destroying the Voice Pool, + * audio data may not be played back correctly or an access violation may occur.
+ *
+ * If you call this function, you must always call the ::criAtomExDecrypter_Destroy function later.
+ * Also, do not release the work buffer that has been passed to this function and do not execute this function again before + * calling the ::criAtomExDecrypter_Destroy function. + *
+ * \sa + * CriAtomExDecrypterConfig, criAtomExDecrypter_CalculateWorkSize, + * criAtomExDecrypter_Destroy, criAtomEx_SetUserAllocator + */ +#define criAtomExDecrypter_Create(p_config, p_work, work_size) \ + criAtomDecrypter_Create((p_config), (p_work), (work_size)) + +/*EN + * \brief Destroy a decrypter + * \ingroup ATOMEXLIB_DECRYPTER + * \par Description: + * Destroys a decrypter.
+ * By executing this function, the process that decodes encrypted data is stopped.
+ * If a user allocator was registered by using the ::criAtomEx_SetUserAllocator macro, + * the memory allocated when creating the decrypter is released.
+ * (If you passed a work buffer when creating the decrypter, it can be released + * after this function is executed.)
+ * \attention + * This is a blocking function.
+ * Executing this function blocks the server processing of the Atom library for a while.
+ * If this function is executed during audio playback, problems such as the audio breaking up may occur. + * Call this function only when a fluctuation in load is acceptable, for example when loading a new game level. + * \sa criAtomExDecrypter_Create, criAtomEx_SetUserAllocator + */ +#define criAtomExDecrypter_Destroy(decrypter_hn) \ + criAtomDecrypter_Destroy(decrypter_hn) + +/*========================================================================== + * CRI AtomEx ACF API + *=========================================================================*/ +/*EN + * \brief Get the number of AISAC controls + * \ingroup ATOMEXLIB_ACF + * \return CriSint32 number of AISAC controls + * \par Description: + * Gets the number of AISAC controls included in the registered ACF.
+ * If no ACF is registered, the function returns -1. + */ +CriSint32 CRIAPI criAtomExAcf_GetNumAisacControls(void); + +/*EN + * \brief Get information about an AISAC control + * \ingroup ATOMEXLIB_ACF + * \param[in] index AISAC control index + * \param[out] info AISAC control information + * \return CriBool whether the information has been obtained or not (If succeeded: CRI_TRUE/if failed: CRI_FALSE) + * \par Description: + * Get the AISAC control information for the given AISAC control index.
+ * If there is no AISAC control with the specified index, the function returns CRI_FALSE. + */ +CriBool CRIAPI criAtomExAcf_GetAisacControlInfo(CriUint16 index, CriAtomExAisacControlInfo* info); + +/*EN + * \brief Get AISAC control ID from its name + * \ingroup ATOMEXLIB_ACF + * \param[in] name AISAC control name + * \return CriAtomExAisacControlId AISAC control ID + * \par Description: + * Gets the ID of an AISAC control from its name.
+ * If no ACF file is registered or if there is no AISAC control of the given name, the function returns CRIATOMEX_INVALID_AISAC_CONTROL_ID. + */ +CriAtomExAisacControlId CRIAPI criAtomExAcf_GetAisacControlIdByName(const CriChar8* name); + +/*EN + * \brief Get an AISAC control name from its ID + * \ingroup ATOMEXLIB_ACF + * \param[in] id AISAC control ID + * \return const CriChar8* AISAC control name + * \par Description: + * Gets the AISAC control name from its ID.
+ * If no ACF file is registered or if there is no AISAC control with the given ID, the function returns NULL. + */ +const CriChar8 * CRIAPI criAtomExAcf_GetAisacControlNameById(CriAtomExAisacControlId id); + +/*EN + * \brief Get the number of DSP bus settings + * \ingroup ATOMEXLIB_ACF + * \return CriSint32 number of DSP bus settings + * \par Description: + * Returns the number of DSP bus settings contained in the registered ACF file.
+ * If no ACF file is registered, the function returns -1. + * \sa criAtomExAcf_GetDspSettingNameByIndex + */ +CriSint32 CRIAPI criAtomExAcf_GetNumDspSettings(void); + +/*EN + * \brief Acquiring the number of DSP bus settings from ACF data + * \ingroup ATOMEXLIB_ACF + * \param[in] acf_data ACF data + * \param[in] acf_data_size ACF data size + * \return CriSint32 Number of DSP bus settings + * \par Description: + * Acquires the number of DSP bus settings contained in the specified ACF.
+ * \sa criAtomExAcf_GetNumDspSettings + */ +CriSint32 CRIAPI criAtomExAcf_GetNumDspSettingsFromAcfData( + void *acf_data, CriSint32 acf_data_size); + +/*EN + * \brief Get the DSP bus setting name (specifying index) + * \ingroup ATOMEXLIB_ACF + * \param[in] index DSP bus setting index + * \return const CriChar8* DSP bus setting name + * \par Description: + * Returns the name of the DSP bus setting whose index is passed.
+ * If no ACF file is registered, or if there is no DSP bus setting at this index, + * the function returns NULL. + * \sa criAtomExAcf_GetDspSettingInformation + */ +const CriChar8 * CRIAPI criAtomExAcf_GetDspSettingNameByIndex(CriUint16 index); + +/*EN + * \brief Acquiring the name of the DSP bus setting from ACF data + * \ingroup ATOMEXLIB_ACF + * \param[in] acf_data ACF data + * \param[in] acf_data_size ACF data size + * \param[in] index DSP bus setting index + * \return const CriChar8* DSP bus setting name + * \par Description: + * Acquires the DSP bus setting name contained in the specified ACF data.
+ * The third argument (index) indicates the DSP bus setting name to acquire.
+ * \sa criAtomExAcf_GetDspSettingNameByIndex + */ +const CriChar8 * CRIAPI criAtomExAcf_GetDspSettingNameByIndexFromAcfData( + void *acf_data, CriSint32 acf_data_size, CriUint16 index); + +/*EN + * \brief Get DSP bus setting information + * \ingroup ATOMEXLIB_ACF + * \param[in] name DSP bus setting name + * \param[out] info DSP bus setting information + * \return CriBool whether the information was acquired ot not (If succeeded: CRI_TRUE/if failed: CRI_FALSE) + * \par Description: + * Gets information about a DSP Setting specified by its name.
+ * If no DSP Setting has this name the function returns CRI_FALSE.
+ * \sa criAtomExAcf_GetDspSettingNameByIndex, criAtomExAcf_GetDspBusInformation + */ +CriBool CRIAPI criAtomExAcf_GetDspSettingInformation(const CriChar8* name, CriAtomExAcfDspSettingInfo* info); + +/*EN + * \brief Get the DSP bus setting snapshot information + * \ingroup ATOMEXLIB_ACF + * \param[in] index Snapshot index + * \param[out] info Snapshot information + * \return CriBool Was the information acquired? (If acquired: CRI_TRUE, If not acquired: CRI_FALSE) + * \par Description: + * Gets the snapshot information for the specified snapshot index.
+ * If a snapshot with this index does not exist, the function returns CRI_FALSE.
+ * Calculate the appropriate value for the snapshot index based on the snapshot_start_index and num_snapshots members + * in the ::CriAtomExAcfDspSettingInfo structure of the DSP bus setting information. + * \sa criAtomExAcf_GetDspBusInformation + */ +CriBool CRIAPI criAtomExAcf_GetDspSettingSnapshotInformation(CriUint16 index, CriAtomExAcfDspSettingSnapshotInfo* info); + + +/*EN + * \brief Get the DSP bus information + * \ingroup ATOMEXLIB_ACF + * \param[in] index bus index + * \param[out] info bus information + * \return CriBool Was the information acquired? (If acquired: CRI_TRUE, If not acquired: CRI_FALSE) + * \par Description: + * Gets the DSP bus information for the specified bus index.
+ * If there is no DSP bus with the specified index, the function returns CRI_FALSE.
+ * \sa criAtomExAcf_GetDspSettingInformation, criAtomExAcf_GetDspFxName, criAtomExAcf_GetDspFxType, criAtomExAcf_GetDspFxParameters, criAtomExAcf_GetDspBusLinkInformation + */ +CriBool CRIAPI criAtomExAcf_GetDspBusInformation(CriUint16 index, CriAtomExAcfDspBusInfo* info); + +/*EN + * \brief Get the DSP FX type + * \ingroup ATOMEXLIB_ACF + * \param[in] index DSP FX index + * \return CriUint32 DSP FX type + * \par Description: + * Gets the DSP FX type for the specified index.
+ * If there is no DSP bus with the specified index, the function returns 0.
+ * Convert the acquired type to a DSP ID ( ::CriAtomExAsrDspId and so on) for each platform before using it.
+ * \sa criAtomExAcf_GetDspBusInformation, criAtomExAcf_GetDspFxParameters + */ +CriUint32 CRIAPI criAtomExAcf_GetDspFxType(CriUint16 index); + +/*EN + * \brief Get DSP FX name + * \ingroup ATOMEXLIB_ACF + * \param[in] index DSP FX index + * \return const CriChar8* Pointer to a string. If it fails, CRI_NULL is returned. + * \par Description: + * Get the FX name for the specified DSP FX index. + * \sa criAtomExAcf_GetDspBusInformation, criAtomExAcf_GetDspFxParameters + */ +const CriChar8* CRIAPI criAtomExAcf_GetDspFxName(CriUint16 index); + +/*EN + * \brief Get DSP FX parameters + * \ingroup ATOMEXLIB_ACF + * \param[in] index DSP FX index + * \param[out] parameters DSP FX parameters + * \param[in] size DSP FX parameters work buffer size + * \return CriBool Was the information acquired? (If acquired: CRI_TRUE, If not acquired: CRI_FALSE) + * \par Description: + * Get the FX parameters for the specified DSP FX index from ACF.
+ * If the DSP FX for the specified index does not exist, this function returns CRI_FALSE.
+ * For the "size" argument, specify the parameter size according to the DSP FX type.
+ * If ASR is specified for the sound renderer, runtime parameters in the ACF are obtained in "parameters" in the form of a float array.
+ * For sound renderers other than ASR, a parameter structure is obtained. + * \sa criAtomExAcf_GetDspBusInformation, criAtomExAcf_GetDspFxName, criAtomExAcf_GetDspFxType + */ +CriBool CRIAPI criAtomExAcf_GetDspFxParameters(CriUint16 index, void* parameters, CriSint32 size); + +/*EN + * \brief Get DSP bus link information + * \ingroup ATOMEXLIB_ACF + * \param[in] index DSP bus link index + * \param[out] info DSP bus link information + * \return CriBool Was the information acquired? (If acquired: CRI_TRUE, If not acquired: CRI_FALSE) + * \par Description: + * This function gets DSP bus link information based on the specified index.
+ * If the DSP bus link for the specified index does not exist, this function returns CRI_FALSE.
+ * \sa criAtomExAcf_GetDspBusInformation + */ +CriBool CRIAPI criAtomExAcf_GetDspBusLinkInformation(CriUint16 index, CriAtomExAcfDspBusLinkInfo* info); + +/*EN + * \brief Acquiring the number of categories from ACF data + * \ingroup ATOMEXLIB_ACF + * \param[in] acf_data ACF data + * \param[in] acf_data_size ACF data size + * \return CriSint32 Number of categories + * \par Description: + * Acquires the number of categories contained in the specified ACF.
+ * \sa criAtomExAcf_GetNumCategories + */ +CriSint32 CRIAPI criAtomExAcf_GetNumCategoriesFromAcfData( + void *acf_data, CriSint32 acf_data_size); + +/*EN + * \brief Get the number of categories + * \ingroup ATOMEXLIB_ACF + * \return CriSint32 number of categories + * \par Description: + * Retruens the number of categories contained in the registered ACF. + */ +CriSint32 CRIAPI criAtomExAcf_GetNumCategories(void); + +/*EN + * \brief Acquiring the number of category references per playback from ACF data + * \ingroup ATOMEXLIB_ACF + * \param[in] acf_data ACF data + * \param[in] acf_data_size ACF data size + * \return CriSint32 Number of category references per playback + * \par Description: + * Acquires the number of categories contained in the specified ACF.
+ * \sa criAtomExAcf_GetNumCategoriesPerPlayback + */ +CriSint32 CRIAPI criAtomExAcf_GetNumCategoriesPerPlaybackFromAcfData( + void *acf_data, CriSint32 acf_data_size); + +/*EN + * \brief Get the number of category references per playback + * \ingroup ATOMEXLIB_ACF + * \return CriSint32 Number of category references per playback + * \par Description: + * This function returns the number of category references per playback contained in the registered ACF. + */ +CriSint32 CRIAPI criAtomExAcf_GetNumCategoriesPerPlayback(void); + +/*EN + * \brief Get information about a category given its index + * \ingroup ATOMEXLIB_ACF + * \param[in] index category index + * \param[out] info category information + * \return CriBool Was the information acquired? (If acquired: CRI_TRUE, If not acquired: CRI_FALSE) + * \par Description: + * Gets information about a category given its index.
+ * If no category with the specified index exists, this function returns CRI_FALSE. + */ +CriBool CRIAPI criAtomExAcf_GetCategoryInfo(CriUint16 index, CriAtomExCategoryInfo* info); + +/*EN + * \brief Get information about a category given its name + * \ingroup ATOMEXLIB_ACF + * \param[in] name category name + * \param[out] info category information + * \return CriBool Was the information acquired? (If acquired: CRI_TRUE, If not acquired: CRI_FALSE) + * \par Description: + * Gets information about a category given its name.
+ * If no category with the specified name exists, this function returns CRI_FALSE. + */ +CriBool CRIAPI criAtomExAcf_GetCategoryInfoByName(const CriChar8* name, CriAtomExCategoryInfo* info); + +/*EN + * \brief Get information about a category given its ID + * \ingroup ATOMEXLIB_ACF + * \param[in] id category ID + * \param[out] info category information + * \return CriBool Was the information acquired? (If acquired: CRI_TRUE, If not acquired: CRI_FALSE) + * \par Description: + * Gets information about a category given its ID.
+ * If no category with the specified ID exists, this function returns CRI_FALSE. + */ +CriBool CRIAPI criAtomExAcf_GetCategoryInfoById(CriUint32 id, CriAtomExCategoryInfo* info); + +/*EN + * \brief Get number of global AISACs + * \ingroup ATOMEXLIB_ACF + * \return CriSint32 number of global AISACs + * \par Description: + * Returns the number of global AISACs contained in the registered ACF. + */ +CriSint32 CRIAPI criAtomExAcf_GetNumGlobalAisacs(void); + +/*EN + * \brief Get information about a global AISAC (by specifying its index) + * \ingroup ATOMEXLIB_ACF + * \param[in] index global AISAC index + * \param[out] info global AISAC information + * \return CriBool Was the information acquired? (If acquired: CRI_TRUE, If not acquired: CRI_FALSE) + * \par Description: + * Gets information about a global AISAC given its index.
+ * If the global AISAC specified by the index does not exist, this function returns CRI_FALSE.
+ */ +CriBool CRIAPI criAtomExAcf_GetGlobalAisacInfo(CriUint16 index, CriAtomExGlobalAisacInfo* info); + +/*EN + * \brief Get information about a global AISAC (by specifying its name) + * \ingroup ATOMEXLIB_ACF + * \param[in] name global AISAC name + * \param[out] info global AISAC + * \return CriBool Was the information acquired? (If acquired: CRI_TRUE, If not acquired: CRI_FALSE) + * \par Description: + * Gets information about a global AISAC by specifying its name.
+ * If the global AISAC specified by the name does not exist, this function returns CRI_FALSE.
+ */ +CriBool CRIAPI criAtomExAcf_GetGlobalAisacInfoByName(const CriChar8* name, CriAtomExGlobalAisacInfo* info); + +/*EN + * \brief Acquiring Global Aisac Graph information + * \ingroup ATOMEXLIB_ACF + * \param[in] aisac_info Global Aisac information + * \param[in] graph_index Aisac graph index + * \param[out] graph_info Aisac graph information + * \return CriBool Whether information is acquired or not. (Acquired: CRI_TRUE/not acquired: CRI_FALSE) + * \par Description: + * Acquires graph information based on the Global Aisac information and the graph index.
+ * If a Global Aisac for the specified index does not exist, the function returns CRI_FALSE. + */ +CriBool CRIAPI criAtomExAcf_GetGlobalAisacGraphInfo( + const CriAtomExGlobalAisacInfo* aisac_info, + CriUint16 graph_index, + CriAtomExAisacGraphInfo* graph_info); + +/*EN + * \brief Acquiring the Global Aisac value + * \ingroup ATOMEXLIB_ACF + * \param[in] aisac_info Global Aisac information + * \param[in] control AISAC control value + * \param[in] type Graph type + * \param[out] value AISAC value + * \return CriBool Whether the value is acquired or not. (Acquired: CRI_TRUE/not acquired: CRI_FALSE) + * \par Description: + * Acquires the Aisac value by specifying the Global Aisac information, control value, and graph type.
+ * If the Global Aisac for the specified index does not exist or no graph exists, the function returns CRI_FALSE. + */ +CriBool CRIAPI criAtomExAcf_GetGlobalAisacValue( + const CriAtomExGlobalAisacInfo* aisac_info, + CriFloat32 control, + CriAtomExAisacGraphType type, + CriFloat32* value); + +/*EN + * \brief Get ACF information + * \ingroup ATOMEXLIB_ACF + * \param[out] acf_info ACF information + * \return CriBool Was the information acquired? (If acquired: CRI_TRUE, If not acquired: CRI_FALSE) + * \par Description: + * Gets information about the ACF data registered with the library.
+ * If the ACF information could not be acquired, CRI_FALSE is returned. + */ +CriBool CRIAPI criAtomExAcf_GetAcfInfo(CriAtomExAcfInfo *acf_info); + +/*EN + * \brief Get ACF information from the ACF data + * \ingroup ATOMEXLIB_ACF + * \param[in] acf_data ACF data + * \param[in] acf_data_size ACF data size + * \param[out] acf_info ACF information + * \return CriBool Was the information acquired? (If acquired: CRI_TRUE, If not acquired: CRI_FALSE) + * \par Description: + * Gets information about the specified ACF data.
+ * If the ACF information could be acquired, CRI_FALSE is returned. + * \attention + * The pointers in the acquired ACF information all point to areas within the ACF data (name string pointers, etc...).
+ * Therefore, do not release the ACF data area while still referencing the ACF information you acquired with this function. + * \sa criAtomExAcf_GetAcfInfo + */ +CriBool CRIAPI criAtomExAcf_GetAcfInfoFromAcfData( + void *acf_data, CriSint32 acf_data_size, CriAtomExAcfInfo *acf_info); + +/*EN + * \brief Get the number of selectors + * \ingroup ATOMEXLIB_ACF + * \return CriSint32 Number of selectors + * \par Description: + * Returns the number of selectors contained in the registered ACF. + */ +CriSint32 CRIAPI criAtomExAcf_GetNumSelectors(void); + +/*EN + * \brief Get information about a selector given its index + * \ingroup ATOMEXLIB_ACF + * \param[in] index Selector index + * \param[out] info Selector information + * \return CriBool Was the information acquired? (If acquired: CRI_TRUE, If not acquired: CRI_FALSE) + * \par Description: + * Gets information about the selector with the given index.
+ * If the selector with the specified index does not exist, this function returns CRI_FALSE. + */ +CriBool CRIAPI criAtomExAcf_GetSelectorInfoByIndex(CriUint16 index, CriAtomExSelectorInfo* info); + +/*EN + * \brief Get information about a selector based on its name + * \ingroup ATOMEXLIB_ACF + * \param[in] name Selector name + * \param[out] info Selector information + * \return CriBool Was the information acquired? (If acquired: CRI_TRUE, If not acquired: CRI_FALSE) + * \par Description: + * Gets information about a selector based on its name.
+ * If no selector with the specified name exists, this function returns CRI_FALSE. + */ +CriBool CRIAPI criAtomExAcf_GetSelectorInfoByName(const CriChar8* name, CriAtomExSelectorInfo* info); + +/*EN + * \brief Get information about a selector label + * \ingroup ATOMEXLIB_ACF + * \param[in] selector_info Selector information + * \param[in] label_index Label index + * \param[out] info Selector label information + * \return CriBool Was the information acquired? (If acquired: CRI_TRUE, If not acquired: CRI_FALSE) + * \par Description: + * Gets information about a selector label based on the selector information and the selector label index.
+ * If there is no selector label with this index, the function returns CRI_FALSE. + */ +CriBool CRIAPI criAtomExAcf_GetSelectorLabelInfo( + const CriAtomExSelectorInfo* selector_info, + CriUint16 label_index, + CriAtomExSelectorLabelInfo* label_info); + +/*EN + * \brief Set a Global Reference Label for Selector + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] selsector_name Selector name + * \param[in] label_name Label name + * \par Description: + * Sets the label to be globally referenced for the selector registered in the ACF file.
+ * \attention + * Before executing this function, you need to register an ACF file.
+ * \sa criAtomExAcf_SetGlobalLabelToSelectorByIndex + */ +void CRIAPI criAtomExAcf_SetGlobalLabelToSelectorByName(const CriChar8* selsector_name, const CriChar8* label_name); + +/*EN + * \brief Set a Global Reference Label for Selector + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] selsector_index Selector index + * \param[in] label_index Label index + * \par Description: + * Sets the label to be globally referenced for the selector registered in the ACF file.
+ * \attention + * Before executing this function, you need to register an ACF file.
+ * \sa criAtomExAcf_SetGlobalLabelToSelectorByName + */ +void CRIAPI criAtomExAcf_SetGlobalLabelToSelectorByIndex(CriUint16 selsector_index, CriUint16 label_index); + +/*EN + * \brief Acquiring the number of buses from ACF data + * \ingroup ATOMEXLIB_ACF + * \param[in] acf_data ACF data + * \param[in] acf_data_size ACF data size + * \return CriSint32 Number of buses + * \par Description: + * Acquires the number of buses contained in the specified ACF.
+ * \sa criAtomExAcf_GetNumBuses + */ +CriSint32 CRIAPI criAtomExAcf_GetNumBusesFromAcfData( + void *acf_data, CriSint32 acf_data_size); + +/*EN + * \brief Acquiring the number of buses + * \ingroup ATOMEXLIB_ACF + * \return CriSint32 Number of buses + * \par Description: + * Acquires the number of buses contained in the registered ACF. + */ +CriSint32 CRIAPI criAtomExAcf_GetNumBuses(void); + +/*EN + * \brief Acquiring the maximum number of buses in the DSP bus setting from ACF data + * \ingroup ATOMEXLIB_ACF + * \param[in] acf_data ACF data + * \param[in] acf_data_size ACF data size + * \return CriSint32 Maximum number of buses in the DSP bus setting + * \par Description: + * Acquires the maximum number of buses in the DSP bus setting contained in the specified ACF.
+ * \sa criAtomExAcf_GetMaxBusesOfDspBusSettings + */ +CriSint32 CRIAPI criAtomExAcf_GetMaxBusesOfDspBusSettingsFromAcfData( + void *acf_data, CriSint32 acf_data_size); + +/*EN + * \brief Acquiring the maximum number of buses in the DSP bus setting + * \ingroup ATOMEXLIB_ACF + * \return CriSint32 Maximum number of buses in the DSP bus setting + * \par Description: + * Acquires the maximum number of buses in the DSP bus setting contained in the registered ACF data. + */ +CriSint32 CRIAPI criAtomExAcf_GetMaxBusesOfDspBusSettings(void); + +/*EN + * \brief Acquiring the bus name in the ACF + * \ingroup ATOMEXLIB_ACF + * \param[in] bus_name Bus name + * \return st CriChar8* Bus name in the ACF + * \par Description: + * Acquires the string of the specified bus name in the ACF.
+ * If the specified bus name does not exist, NULL is returned.
+ */ +const CriChar8* CRIAPI criAtomExAcf_FindBusName(const CriChar8* bus_name); + +/*========================================================================== + * CRI AtomEx ACB API + *=========================================================================*/ +/*EN + * \brief Calculate the size of the work buffer required to load ACB data + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_data ACB data address + * \param[in] acb_data_size ACB data size + * \param[in] awb_binder handle to a binder including an AWB file + * \param[in] awb_path path to an AWB file + * \return CriSint32 work buffer size + * \retval >= 0 successfully completed + * \retval -1 error occurred + * \par Description: + * Calculates the size of the work buffer required to execute the ::criAtomExAcb_LoadAcbData function. + * When the ::criAtomExAcb_LoadAcbData function is used to load the AWB data + * without having registered a user allocator using the ::criAtomEx_SetUserAllocator macro, + * a memory buffer of the size returned by this function must be passed.
+ *
+ * If this function fails to calculate the size of the work buffer, it returns -1.
+ * To know the reason of the failure, refer to the error callback message.
+ * \par Note: + * Specify NULL when the data is not packed to CPK.
+ * \attention + * The size of the work buffer depends on the values of the parameters specified when the library is initialized + * (by calling the ::criAtomEx_Initialize function).
+ * Therefore, the library must be initialized before this function is executed.
+ * \sa criAtomExAcb_LoadAcbData + */ +CriSint32 CRIAPI criAtomExAcb_CalculateWorkSizeForLoadAcbData( + void *acb_data, CriSint32 acb_data_size, + CriFsBinderHn awb_binder, const CriChar8 *awb_path); + +/*EN + * \brief Calculate the size of the work buffer required to load ACB data (specifying a CPK content ID) + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_data ACB data address + * \param[in] acb_data_size ACB data size + * \param[in] awb_binder handle to a binder including an AWB file + * \param[in] awb_id ID of the AWB data in a CPK file + * \return CriSint32 work buffer size + * \retval >= 0 successfully completed + * \retval -1 error occurred + * \par Description: + * Calculates the size of the work buffer required to execute the ::criAtomExAcb_LoadAcbDataById function. + * Beside the fact that a CPK content ID is specified instead of a file path, + * this function works in the same way than the ::criAtomExAcb_CalculateWorkSizeForLoadAcbData function.
+ * \par Note: + * Specify NULL when the data is not packed to CPK.
+ * \sa criAtomExAcb_CalculateWorkSizeForLoadAcbData, criAtomExAcb_LoadAcbDataById + */ +CriSint32 CRIAPI criAtomExAcb_CalculateWorkSizeForLoadAcbDataById( + void *acb_data, CriSint32 acb_data_size, CriFsBinderHn awb_binder, CriUint16 awb_id); + +/*EN + * \brief Load ACB data in memory + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_data ACB data address + * \param[in] acb_data_size ACB data size + * \param[in] awb_binder handle to a binder including an AWB file + * \param[in] awb_path path to an AWB file + * \param[in] work work buffer + * \param[in] work_size work buffer size + * \return CriAtomExAcbHn ACB handle + * \par Description: + * Loads ACB data and gets the information required for Cue playback.
+ * The size of the work buffer required to load the ACB data + * is calculated by the ::criAtomExAcb_CalculateWorkSizeForLoadAcbData function.
+ *
+ * For the third argument (awb_binder) and the fourth argument (awb_path), + * specify an AWB file used for streaming playback.
+ * If the ACB data only concerns in-memory playback, the values specified for awb_binder + * and awb_path are ignored.)
+ *
+ * Once the ACB data is loaded, the function returns an ACB handle + * ( ::CriAtomExAcbHn ) to access that ACB data.
+ * By using the ::criAtomExPlayer_SetCueId function to assign both the ACB handle and the ID of a Cue to be played to an AtomEx Player, + * the Cue in the ACB data can be played back.
+ *
+ * If this function loads the ACB file successfully, it returns an ACB handle.
+ * If it fails to load the ACB file, for example due to a reading error, it returns CRI_NULL.
+ * \par Remarks: + * If a user allocator was registered by using the ::criAtomEx_SetUserAllocator macro, + * it is not necessary to pass a work buffer to this function.
+ * (By passing NULL for work and 0 for work_size, the amount of memory required will be allocated + * by the user allocator.) + *
+ * This is a non-blocking function.
+ * By loading an ACB file in memory and then executing this function, + * it is possible to create an ACB handle without blocking the processes. + *
+ * \par Note: + * Specify NULL when the data is not packed to CPK.
+ * \attention + * Both the data and the work buffers passed to this function + * must be maintained by the application until the ACB handle is destroyed.
+ * (Do not write in the work buffer and do not release its memory.)
+ * Part of the data buffer is also used as a work buffer.
+ * Therefore, the ACB data buffer cannot be used for other ACBs.
+ * (Sharing the ACB handle that was created between AtomEx players is possible though.)
+ *
+ * An ACB handle internally allocates a binder ( CriFsBinderHn ).
+ * When ACB files are loaded, the Atom library (or CRI File System library) must be initialized + * with settings that allow to allocate as many binders as the number of ACB handles.
+ *
+ * The library must be initialized before this function is called.
+ * \sa criAtomExAcb_CalculateWorkSizeForLoadAcbData, CriAtomExAcbHn, criAtomExPlayer_SetCueId + */ +CriAtomExAcbHn CRIAPI criAtomExAcb_LoadAcbData( + void *acb_data, CriSint32 acb_data_size, + CriFsBinderHn awb_binder, const CriChar8 *awb_path, + void *work, CriSint32 work_size); + +/*EN + * \brief Load ACB data in memory (specifying a CPK content ID) + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_data ACB data address + * \param[in] acb_data_size ACB data size + * \param[in] awb_binder handle to a binder including the AWB file + * \param[in] awb_id ID of the AWB data in a CPK file + * \param[in] work work buffer + * \param[in] work_size work buffer size + * \return CriAtomExAcbHn ACB handle + * \par Description: + * Loads ACB data and gets the information required for Cue playback.
+ * Beside the fact that a CPK content ID is specified instead of a file path, + * this function works in the same way than the ::criAtomExAcb_LoadAcbData function.
+ * \par Note: + * Specify NULL when the data is not packed to CPK.
+ * \sa criAtomExAcb_LoadAcbData + */ +CriAtomExAcbHn CRIAPI criAtomExAcb_LoadAcbDataById( + void *acb_data, CriSint32 acb_data_size, CriFsBinderHn awb_binder, CriUint16 awb_id, + void *work, CriSint32 work_size); + +/*EN + * \brief Calculate the size of the work buffer required to load an ACB file + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_binder handle to a binder including an ACB file + * \param[in] acb_path path to an ACB file + * \param[in] awb_binder handle to a binder including an AWB file + * \param[in] awb_path path to an AWB file + * \return CriSint32 work buffer size + * \retval >= 0 successfully completed + * \retval -1 error occurred + * \par Description: + * Calculates the size of the work buffer required to execute the ::criAtomExAcb_LoadAcbFile function. + * When the ::criAtomExAcb_LoadAcbFile function is used to load ACB data + * and no user allocator was registered (using the ::criAtomEx_SetUserAllocator macro), + * a memory buffer of the size returned by this function must be passed.
+ *
+ * If this function fails to calculate the size, it returns -1.
+ * To know the reason of the failure, refer to the error callback message.
+ * \attention + * The size of the work buffer depends on the value of the parameters specified when the library was initialized (by calling the ::criAtomEx_Initialize + * function).
+ * Therefore, the library must be initialized before this function is called.
+ *
+ * This function allocates a loader with the criFsLoader_Create function when it begins its execution + * and destroys that loader with the criFsLoader_Destroy function when it finishes its execution.
+ * Therefore, before calling this function, make sure to adjust the number of loaders so that there is at least + * one free load handle.
+ *
+ * This is a blocking function.
+ * The time required to load an ACB file varies depending on the platform.
+ * If this function is executed during a game loop or at any time requiring screen updates, + * since the processing is blocked in the order of the millisecond, frames may be dropped.
+ * Load ACB files only when a fluctuation in load is acceptable, + * for example when loading a new level.
+ * \sa criAtomExAcb_LoadAcbFile + */ +CriSint32 CRIAPI criAtomExAcb_CalculateWorkSizeForLoadAcbFile( + CriFsBinderHn acb_binder, const CriChar8 *acb_path, + CriFsBinderHn awb_binder, const CriChar8 *awb_path); + +/*EN + * \brief Calculate the size of the work buffer required to load an ACB file (specifying a CPK content ID) + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_binder handle to a binder including an ACB file + * \param[in] acb_id ID of the ACB data in the CPK file + * \param[in] awb_binder handle to a binder including an AWB file + * \param[in] awb_id ID of the AWB data in the CPK file + * \return CriSint32 work area size + * \retval >= 0 successfully completed + * \retval -1 error occurred + * \par Description: + * Calculates the size of the work buffer required to execute the ::criAtomExAcb_LoadAcbFileById function. + * Beside the fact that a CPK content ID is specified instead of a file path, + * this function works in the same way than the ::criAtomExAcb_CalculateWorkSizeForLoadAcbFile function.
+ * \par Note: + * Specify NULL when the data is not packed to CPK.
+ * \sa criAtomExAcb_CalculateWorkSizeForLoadAcbFile, criAtomExAcb_LoadAcbFileById + */ +CriSint32 CRIAPI criAtomExAcb_CalculateWorkSizeForLoadAcbFileById( + CriFsBinderHn acb_binder, CriUint16 acb_id, CriFsBinderHn awb_binder, CriUint16 awb_id); + +/*EN + * \brief Load an ACB file + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_binder handle to a binder including an ACB file + * \param[in] acb_path path to an ACB file + * \param[in] awb_binder handle to a binder including an AWB file + * \param[in] awb_path path to an AWB file + * \param[in] work work buffer + * \param[in] work_size work buffer size + * \return CriAtomExAcbHn ACB handle + * \par Description: + * Loads an ACB file and gets the information required for Cue playback.
+ * The size of the work buffer required to load the ACB file + * is calculated by the ::criAtomExAcb_CalculateWorkSizeForLoadAcbFile function.
+ *
+ * For the third argument (awb_binder) and the fourth argument (awb_path), + * specify an AWB file for streaming playback.
+ * (When the ACB data is only for in-memory playback (i.e. no streaming involved), the values specified for awb_binder + * and awb_path are ignored.)
+ *
+ * When an ACB file is loaded, this function returns an ACB handle + * ( ::CriAtomExAcbHn ) to access the ACB data.
+ * By using the ::criAtomExPlayer_SetCueId function to assign both the ACB handle and the ID of a Cue to be played to an AtomEx Player, + * the Cue in the ACB data can be played back.
+ *
+ * If this function loads the ACB file successfully, it returns an ACB handle.
+ * If it fails to load the ACB file, for example due to a reading error, it returns CRI_NULL.
+ * \par Remarks: + * If a user allocator was registered by using the ::criAtomEx_SetUserAllocator macro, + * it is not necessary to pass a work buffer to this function.
+ * (By passing NULL for work and 0 for work_size, the amount of memory required will be allocated + * by the user allocator.) + *
+ * \par Note: + * Specify NULL when the data is not packed to CPK.
+ * \attention + * The library must be initialized before this function is called.
+ *
+ * If a work buffer was passed to this function it + * must be maintained by the application until the ACB handle is destroyed.
+ * (Do not write in the work buffer and do not release its memory.)
+ *
+ * ACB handles internally allocate a binder ( CriFsBinderHn ) and a loader ( CriFsLoaderHn ).
+ * When loading an ACB file, you must initialize the Atom library (or CRI File System library) + * with the proper settings so that enough binders and loaders can be allocated for the number of ACB handles.
+ *
+ * This is a blocking function.
+ * The time required to load an ACB file varies depending on the platform.
+ * If this function is executed during a game loop or at any time requiring screen updates, + * since the processing is blocked in the order of the millisecond, frames may be dropped.
+ * Load ACB files only when a fluctuation in load is acceptable, + * for example when loading a new level.
+ * \sa criAtomExAcb_CalculateWorkSizeForLoadAcbFile, CriAtomExAcbHn, criAtomExPlayer_SetCueId + */ +CriAtomExAcbHn CRIAPI criAtomExAcb_LoadAcbFile( + CriFsBinderHn acb_binder, const CriChar8 *acb_path, + CriFsBinderHn awb_binder, const CriChar8 *awb_path, + void *work, CriSint32 work_size); + +/*EN + * \brief Load an ACB file (specifying a CPK content ID) + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_binder handle to a binder including an ACB file + * \param[in] acb_id ID of an ACB data in a CPK file + * \param[in] awb_binder handle to a binder including an AWB file + * \param[in] awb_id ID of an AWB data in a CPK file + * \param[in] work work buffer + * \param[in] work_size work buffer size + * \return CriAtomExAcbHn ACB handle + * \par Description: + * Loads an ACB file and gets the information required for Cue playback.
+ * Beside the fact that a CPK content ID is specified instead of a file path, + * this function works in the same way than the ::criAtomExAcb_LoadAcbFile function.
+ * \par Note: + * Specify NULL when the data is not packed to CPK.
+ * \sa criAtomExAcb_LoadAcbFile + */ +CriAtomExAcbHn CRIAPI criAtomExAcb_LoadAcbFileById( + CriFsBinderHn acb_binder, CriUint16 acb_id, CriFsBinderHn awb_binder, CriUint16 awb_id, + void *work, CriSint32 work_size); + +/*EN + * \brief Release an ACB handle + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \par Description: + * Releases an ACB handle.
+ * If an allocator was registered using the ::criAtomEx_SetUserAllocator macro, + * this function releases the memory allocated when the ACB handle was created.
+ * (If a work buffer was passed when the ACB handle was created, the work buffer can be released + * after this function is executed.)
+ * \par Remarks: + * When destroying an ACB handle with this function, all the Cues referenced + * by the ACB handle are stopped.
+ * The work buffer used to create the ACB handle and the memory used to store the ACB data + * will not be referenced after executing this function.
+ * \attention + * When this function is executed, it searches the library + * for an Atom Player referring to the ACB data to be destroyed.
+ * Therefore, if an Atom Player is created/destroyed on another thread while this function is in progress, + * a serious problem such as an access violation or a deadlock may occur.
+ * If you need to create/destroy an Atom Player on another thread while this function is in progress, + * create/destroy the Atom Player after locking the operation by calling the ::criAtomEx_Lock function.
+ * \sa criAtomExAcb_LoadAcbData, criAtomExAcb_LoadAcbFile + */ +void CRIAPI criAtomExAcb_Release(CriAtomExAcbHn acb_hn); + +/*EN + * \brief Check whether a ACB handle can be released immediately or not + * \ingroup ATOMLIBEX_ACB + * \param[in] acb_hn ACB handle + * \return CriBool status of the ACB (CRI_TRUE if the ACB handle can be released immediately, CRI_FALSE if there is still a player in playback mode) + * \par Description: + * Checks whether an ACB handle can be released immediately or not.
+ * If the ::criAtomExAcb_Release function is executed when this function returns CRI_FALSE, + * players referring to the ACB handle are stopped.
+ * (In the case of an ACB handle with streaming playback, it is necessary to wait for completion of the file reading operation. Therefore, + * the process may be blocked in the ::criAtomExAcb_Release function for a long time.)
+ * \par Remarks: + * Even if all players referring to the ACB handle for playback are stopped, + * there may be voices in the library that are referring to this ACB handle.
+ * (If stopping the processing is performed by the ::criAtomExPlayer_StopWithoutReleaseTime function or + * if a voice is recycled, the player is detached from the voice, + * but after that, the voice may still wait for completion of the file reading operation.)
+ * If you want to prevent processes from being blocked in the ::criAtomExAcb_Release function, + * do not execute the ::criAtomExAcb_Release function before this function returns CRI_TRUE.
+ * \attention + * When this function is executed, an Atom Player referring to the specified ACB data + * is searched for in the library.
+ * Therefore, if an Atom Player is created/destroyed on another thread while this function is in progress, + * a serious problem such as an access violation or a deadlock may occur.
+ * If you need to create/destroy an Atom Player on another thread while this function is in progress, + * create/destroy an Atom Player after locking the operation by calling the ::criAtomEx_Lock function.
+ * \sa criAtomExAcb_Release + */ +CriBool CRIAPI criAtomExAcb_IsReadyToRelease(CriAtomExAcbHn acb_hn); + +/*EN + * \brief Release all the ACB handles + * \ingroup ATOMEXLIB_ACB + * \par Description: + * Releases all the ACB handles already loaded.
+ * If a user allocator was registered by using the ::criAtomEx_SetUserAllocator macro, + * this function releases the memory allocated when the ACB handles were created.
+ * (If work buffers were passed when the ACB handles were created, these work buffers can be released + * after the execution of this function.)
+ * \par Remarks: + * When destroying ACB handles with this function, all the Cues referenced + * by the ACB handles are stopped.
+ * The work buffers used to create the ACB handles and the memory buffers used to store the ACB data + * will not be referenced anymore after executing this function.
+ * \attention + * When this function is executed, Atom Players referring to the specified ACB data + * are searched for in the library.
+ * Therefore, if an Atom Player is created/destroyed on another thread while this function is in progress, + * a serious problem such as an access violation or a deadlock may occur.
+ * If you need to create/destroy an Atom Player on another thread while this function is in progress, + * create/destroy an Atom Player after locking the operation by calling the ::criAtomEx_Lock function.
+ * \sa criAtomExAcb_LoadAcbData, criAtomExAcb_LoadAcbFile + */ +void CRIAPI criAtomExAcb_ReleaseAll(void); + +/*EN + * \brief ACB handle enumerator + * \ingroup ATOMEXLIB_ACB + * \param[in] func ACB handle callback function + * \param[in] obj User-specified object + * \return CriSint32 Number of enumerated ACB handles + * \par Description: + * Enumerates ACB handles.
+ *
+ * When this function is executed, the callback function passed in the first + * argument ( func ) is called as many times as there are ACB handles.
+ * Each ACB handle is passed as an argument to the callback function.
+ * \par Remarks: + * The value passed in the second argument ( obj ) is also passed to the callback function as an argument.
+ *
+ * The return value is the number of enumerated ACB handles (which corresponds to the number of times the callback function was called).
+ * (If the enumeration is stopped during the first callback, 1 will still be returned.)
+ * If no ACB handle exists, this function returns 0.
+ * If an error occurs (such as an invalid argument), this function returns -1.
+ * \attention + * Do not destroy an ACB handle within the callback function.
+ * To destroy all ACB handles at once, use the + * ::criAtomExAcb_ReleaseAll function instead.
+ * \sa CriAtomExAcbHandleCbFunc, criAtomExAcb_ReleaseAll + */ +CriSint32 CRIAPI criAtomExAcb_EnumerateHandles(CriAtomExAcbHandleCbFunc func, void *obj); + +/*EN + * \brief Get the version of the ACB data in memory + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_data ACB data address + * \param[in] acb_data_size ACB data size + * \param[out] flag flag that indicates whether the ACB can be loaded or not + * \return CriUint2 ACB format version + * \par Description: + * Gets the format version of the ACB data in memory.
+ * This function also uses the flag argument to indicate whether the data corresponding to this version can be loaded or not.
+ */ +CriUint32 CRIAPI criAtomExAcb_GetVersion( + void *acb_data, CriSint32 acb_data_size, void *flag); + +/*EN + * \brief Get the version of an ACB file + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_binder handle to a binder including an ACB file + * \param[in] acb_path path to an ACB file + * \param[in] work work buffer + * \param[in] work_size work buffer size + * \param[out] flag flag that indicates whether the ACB can be loaded or not + * \return CriUint2 ACB format version + * \par Description: + * Loads an ACB file in memory and gets the version of the format of the ACB data.
+ * The size of the work buffer required to register the ACB information + * is calculated by the ::criAtomExAcb_CalculateWorkSizeForLoadAcbFile function.
+ *
+ * This function also uses the flag argument to indicate whether the data corresponding to this version can be loaded or not.
+ * \par Remarks: + * If an allocator has already been registered by using the ::criAtomEx_SetUserAllocator macro, + * it is not necessary to pass a work buffer to this function.
+ * (By passing NULL for work and 0 for work_size, the amount of memory required will be allocated + * by the user allocator.) + * \par Note: + * Specify NULL when the data is not packed to CPK.
+ * \attention + * The application does not need to keep the work buffer set in this function.
+ * (When the function is finished, the data loaded in memory is released.)
+ *
+ * When this function is started, a loader is allocated with the criFsLoader_Create function. + * When it is finished, the loader is destroyed with the criFsLoader_Destroy function.
+ * When you execute this function, adjust the number of loaders + * so that one or more loader handles are available.
+ */ +CriUint32 CRIAPI criAtomExAcb_GetVersionFromFile( + CriFsBinderHn acb_binder, const CriChar8 *acb_path, void *work, CriSint32 work_size, CriBool *flag); + +/*EN + * \brief Get information about what ACB file versions can be loaded + * \ingroup ATOMEXLIB_ACB + * \param[out] version_low lowest version that can be loaded + * \param[out] version_high highest version that can be loaded + * \par Description: + * Gets information about what ACB file versions can be loaded.
+ * Since the highest version correspond to the version when the library was built, + * an ACB with a version higher than this value may be loadable.
+ */ +void CRIAPI criAtomExAcb_GetSupportedVersion( + CriUint32 *version_low, CriUint32 *version_high); + +/*EN + * \brief Get the number of Cues in the ACB + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \return CriSint32 number of Cues + * \par Description: + * Gets the number of Cues contained in an ACB data.
+ * \par Remarks: + * If NULL is specified for the acb_hn argument, the last ACB data loaded is used.
+ */ +CriSint32 CRIAPI criAtomExAcb_GetNumCues(CriAtomExAcbHn acb_hn); + +/*EN + * \brief Check if a Cue with a specific ID exists + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \param[in] id Cue ID + * \return CriBool whether the Cue exists or not (if exists: CRI_TRUE/if does not exist: CRI_FALSE) + * \par Description: + * Checks whether a Cue with the specified Cue ID exists or not .
+ * If it exists, this function returns CRI_TRUE.
+ * \par Remarks: + * If NULL is specified for the first argument (ach_hn), all ACBs will be searched.
+ * (In that case, even if a single ACB contains a Cue with the specified ID, this function will return CRI_TRUE.)
+ */ +CriBool CRIAPI criAtomExAcb_ExistsId(CriAtomExAcbHn acb_hn, CriAtomExCueId id); + +/*EN + * \brief Check if a Cue with a specific name exists + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \param[in] name Cue name + * \return CriBool whether the Cue exists or not (if exists: CRI_TRUE/if does not exist: CRI_FALSE) + * \par Description: + * Checks whether a Cue with the specified name exists or not.
+ * If it exists, this function returns CRI_TRUE.
+ * \par Remarks: + * If NULL is specified for the first argument (ach_hn), all ACBs will be searched.
+ * (In that case, even if a single ACB contains a Cue with the specified name, this function will return CRI_TRUE.)
+ */ +CriBool CRIAPI criAtomExAcb_ExistsName(CriAtomExAcbHn acb_hn, const CriChar8 *name); + +/*EN + * \brief Check if a Cue with a specific index exists + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \param[in] index Cue index + * \return CriBool whether the Cue exists or not (if exists: CRI_TRUE/if does not exist: CRI_FALSE) + * \par Description: + * Checks whether a Cue with the specified index exists or not.
+ * If it exists, this function returns CRI_TRUE.
+ * \par Remarks: + * If NULL is specified for the first argument (ach_hn), all ACBs will be searched.
+ * (In that case, even if a single ACB contains a Cue with the specified index, this function will return CRI_TRUE.)
+ */ +CriBool CRIAPI criAtomExAcb_ExistsIndex(CriAtomExAcbHn acb_hn, CriAtomExCueIndex index); + +/*EN + * \brief Get the ID of a Cue from its index + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \param[in] index Cue index + * \return CriAtomExCueId Cue ID + * \par Description: + * Gets the ID of a Cue from its index.
+ * If no Cue with that index exists, this function returns -1. + * \par Remarks: + * If NULL is specified for the first argument (ach_hn), all ACBs will be searched.
+ * (When this function finds an ACB containing a Cue with the specified index, + * it returns the ID of the Cue in that ACB.)
+ * The order of the search is the reverse of the ACB data loading order.
+ * (Search is performed starting from the last data loaded.)
+ */ +CriAtomExCueId CRIAPI criAtomExAcb_GetCueIdByIndex(CriAtomExAcbHn acb_hn, CriAtomExCueIndex index); + +/*EN + * \brief Get the ID of a Cue from its name + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \param[in] name Cue name + * \return CriAtomExCueId Cue ID + * \par Description: + * Gets the ID of a Cue from its name.
+ * If no Cue with that name exists, this function returns -1. + * \par Remarks: + * If NULL is specified for the first argument (ach_hn), all ACBs will be searched.
+ * (When this function finds an ACB containing a Cue with the specified name, + * it returns the ID of the Cue in that ACB.)
+ * The order of the search is the reverse of the ACB data loading order.
+ * (Search is performed starting from the last data loaded.)
+ */ +CriAtomExCueId CRIAPI criAtomExAcb_GetCueIdByName(CriAtomExAcbHn acb_hn, const CriChar8* name); + +/*EN + * \brief Get the name of a Cue from its index + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \param[in] index Cue index + * \return const CriChar8* Cue name + * \par Description: + * Gets the name of a Cue from its index.
+ * If no Cue with that index exists, this function returns NULL. + * \par Remarks: + * If NULL is specified for the first argument (ach_hn), all ACBs will be searched.
+ * (When this function finds an ACB containing a Cue with the specified index, + * it returns the name of the Cue in that ACB.)
+ * The order of the search is the reverse of the ACB data loading order.
+ * (Search is performed starting from the last data loaded.)
+ */ +const CriChar8 * CRIAPI criAtomExAcb_GetCueNameByIndex(CriAtomExAcbHn acb_hn, CriAtomExCueIndex index); + +/*EN + * \brief Get the name of a Cue from its ID + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \param[in] id Cue ID + * \return const CriChar8* Cue name + * \par Description: + * Gets the name of a Cue from its ID.
+ * If no Cue with that ID exists, this function returns NULL. + * \par Remarks: + * If NULL is specified for the first argument (ach_hn), all ACBs will be searched.
+ * (When this function finds an ACB containing a Cue with the specified ID, + * it returns the name of the Cue in that ACB.)
+ * The order of the search is the reverse of the ACB data loading order.
+ * (Search is performed starting from the last data loaded.)
+ */ +const CriChar8 * CRIAPI criAtomExAcb_GetCueNameById(CriAtomExAcbHn acb_hn, CriAtomExCueId id); + +/*EN + * \brief Get the index of a Cue from its ID + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \param[in] id Cue ID + * \return CriAtomExCueIndex Cue index + * \par Description: + * Gets the index of a Cue from its ID.
+ * If no Cue with that ID exists, this function returns -1. + * \par Remarks: + * If NULL is specified for the first argument (ach_hn), all ACBs will be searched.
+ * (When this function finds an ACB containing a Cue with the specified ID, + * it returns the index of the Cue in that ACB.)
+ * The order of the search is the reverse of the ACB data loading order.
+ * (Search is performed starting from the last data loaded.)
+ */ +CriAtomExCueIndex CRIAPI criAtomExAcb_GetCueIndexById(CriAtomExAcbHn acb_hn, CriAtomExCueId id); + +/*EN + * \brief Get the index of a Cue from its name + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \param[in] name Cue name + * \return CriAtomExCueIndex Cue index + * \par Description: + * Gets the index of a Cue from its name.
+ * If no Cue with that name exists, this function returns -1. + * \par Remarks: + * If NULL is specified for the first argument (ach_hn), all ACBs will be searched.
+ * (When this function finds an ACB containing a Cue with the specified name, + * it returns the index of the Cue in that ACB.)
+ * The order of the search is the reverse of the ACB data loading order.
+ * (Search is performed starting from the last data loaded.)
+ */ +CriAtomExCueIndex CRIAPI criAtomExAcb_GetCueIndexByName(CriAtomExAcbHn acb_hn, const CriChar8* name); + +/*EN + * \brief Get the user data string of a Cue from its ID + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \param[in] id Cue ID + * \return const CriChar8 * user data string + * \par Description: + * Gets the user data string of a Cue from its ID.
+ * If no Cue with that ID exists, this function returns NULL. + * \par Remarks: + * If NULL is specified for the first argument (ach_hn), all ACBs will be searched.
+ * (When this function finds an ACB containing a Cue with the specified ID, + * it returns the user data string of the Cue in that ACB.)
+ * The order of the search is the reverse of the ACB data loading order.
+ * (Search is performed starting from the last data loaded.)
+ */ +const CriChar8 * CRIAPI criAtomExAcb_GetUserDataById(CriAtomExAcbHn acb_hn, CriAtomExCueId id); + +/*EN + * \brief Get the user data string of a Cue from its name + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \param[in] name Cue name + * \return const CriChar8 * user data string + * \par Description: + * Gets the user data string of a Cue from its name.
+ * If no Cue with that name exists, this function returns NULL. + * \par Remarks: + * If NULL is specified for the first argument (ach_hn), all ACBs will be searched.
+ * (When this function finds an ACB containing a Cue with the specified name, + * it returns the user data string of the Cue in that ACB.)
+ * The order of the search is the reverse of the ACB data loading order.
+ * (Search is performed starting from the last data loaded.)
+ */ +const CriChar8 * CRIAPI criAtomExAcb_GetUserDataByName(CriAtomExAcbHn acb_hn, const CriChar8 *name); + +/*EN + * \brief Get the length of a Cue from its ID + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \param[in] id Cue ID + * \return CriSint64 Cue length (in milliseconds) + * \par Description: + * Gets the length of the Cue with the specified ID. The Cue length is given in milliseconds.
+ * If no Cue with the specified ID exists or if the Cue has an infinite loop, this function returns -1.
+ * \par Remarks: + * If NULL is specified for the first argument (ach_hn), all ACBs will be searched.
+ * (When this function finds an ACB containing a Cue with the specified ID, + * it returns the length of the Cue in that ACB.)
+ * The order of the search is the reverse of the ACB data loading order.
+ * (Search is performed starting from the last data loaded.)
+ */ +CriSint64 CRIAPI criAtomExAcb_GetLengthById(CriAtomExAcbHn acb_hn, CriAtomExCueId id); + +/*EN + * \brief Get the length of a Cue from its name + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \param[in] name Cue name + * \return CriSint64 Cue length (in milliseconds) + * \par Description: + * Gets the length of the Cue with the specified name. The Cue length is given in milliseconds.
+ * If no Cue with the specified name exists or if the Cue has an infinite loop, this function returns -1.
+ * \par Remarks: + * If NULL is specified for the first argument (ach_hn), all ACBs will be searched.
+ * (When this function finds an ACB containing a Cue with the specified name, + * it returns the length of the Cue in that ACB.)
+ * The order of the search is the reverse of the ACB data loading order.
+ * (Search is performed starting from the last data loaded.)
+ */ +CriSint64 CRIAPI criAtomExAcb_GetLengthByName(CriAtomExAcbHn acb_hn, const CriChar8 *name); + +/*EN + * \brief Get the number of AISAC Controls assigned to a Cue (specifying its ID) + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \param[in] id Cue ID + * \return CriSint32 number of AISAC Controls + * \par Description: + * Get the number of AISAC Controls assigned to a Cue specified by its ID.
+ * If no Cue with the specified ID exists, this function returns -1.
+ * \par Remarks: + * If NULL is specified for the first argument (ach_hn), all ACBs will be searched.
+ * (When this function finds an ACB containing a Cue with the specified ID, + * it returns the number of AISAC controls assigned to the Cue in that ACB.)
+ * The order of the search is the reverse of the ACB data loading order.
+ * (Search is performed starting from the last data loaded.)
+ * \sa criAtomExAcb_GetNumUsableAisacControlsByName, criAtomExAcb_GetUsableAisacControlById, criAtomExAcb_GetUsableAisacControlByName + */ +CriSint32 CRIAPI criAtomExAcb_GetNumUsableAisacControlsById(CriAtomExAcbHn acb_hn, CriAtomExCueId id); + +/*EN + * \brief Get the number of AISAC Controls assigned to a Cue (specifying its name) + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \param[in] name Cue name + * \return CriSint32 number of AISAC Controls + * \par Description: + * Get the number of AISAC Controls assigned to a Cue specified by its name.
+ * If no Cue with the specified name exists, this function returns -1.
+ * \par Remarks: + * If NULL is specified for the first argument (ach_hn), all ACBs will be searched.
+ * (When this function finds an ACB containing a Cue with the specified name, + * it returns the number of AISAC controls assigned to the Cue in that ACB.)
+ * The order of the search is the reverse of the ACB data loading order.
+ * (Search is performed starting from the last data loaded.)
+ * \sa criAtomExAcb_GetNumUsableAisacControlsById, criAtomExAcb_GetUsableAisacControlById, criAtomExAcb_GetUsableAisacControlByName + */ +CriSint32 CRIAPI criAtomExAcb_GetNumUsableAisacControlsByName(CriAtomExAcbHn acb_hn, const CriChar8 *name); + +/*EN + * \brief Get information about an AISAC Control assigned to a Cue (specifying the Cue's ID) + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \param[in] id Cue ID + * \param[in] index AISAC Control index + * \param[out] info AISAC Control information + * \return CriBool did we get the information? (if succeeded: CRI_TRUE, if failed: CRI_FALSE) + * \par Description: + * Gets information about an AISAC Control based on its index in the Cue of the specified ID.
+ * If no Cue with the specified ID exists, this function returns CRI_FALSE.
+ * Otherwise, if the AISAC Control with the given index is found in the Cue, the function passes the information back in the info argument. + * \par Remarks: + * If NULL is specified for the first argument (ach_hn), all ACBs will be searched.
+ * (When this function finds an ACB containing a Cue with the specified ID, + * it returns the information about the AISAC control of the given index, assigned to the Cue in that ACB.)
+ * The order of the search is the reverse of the ACB data loading order.
+ * (Search is performed starting from the last data loaded.)
+ * \sa criAtomExAcb_GetNumUsableAisacControlsById, criAtomExAcb_GetNumUsableAisacControlsByName, criAtomExAcb_GetUsableAisacControlByName + */ +CriBool CRIAPI criAtomExAcb_GetUsableAisacControlById(CriAtomExAcbHn acb_hn, CriAtomExCueId id, CriUint16 index, CriAtomExAisacControlInfo* info); + +/*EN + * \brief Get information about an AISAC Control assigned to a Cue (specifying the Cue's name) + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \param[in] name Cue name + * \param[in] index AISAC Control index + * \param[out] info AISAC Control information + * \return CriBool did we get the information? (if succeeded: CRI_TRUE, if failed: CRI_FALSE) + * \par Description: + * Gets information about an AISAC Control based on its index in the Cue of the specified name.
+ * If no Cue with the specified name exists, this function returns CRI_FALSE.
+ * Otherwise, if the AISAC Control with the given index is found in the Cue, the function passes the information back in the info argument. + * \par Remarks: + * If NULL is specified for the first argument (ach_hn), all ACBs will be searched.
+ * (When this function finds an ACB containing a Cue with the specified name, + * it returns the information about the AISAC control of the given index, assigned to the Cue in that ACB.)
+ * The order of the search is the reverse of the ACB data loading order.
+ * (Search is performed starting from the last data loaded.)
+ * \sa criAtomExAcb_GetNumUsableAisacControlsById, criAtomExAcb_GetNumUsableAisacControlsByName, criAtomExAcb_GetUsableAisacControlById + */ +CriBool CRIAPI criAtomExAcb_GetUsableAisacControlByName(CriAtomExAcbHn acb_hn, const CriChar8 *name, CriUint16 index, CriAtomExAisacControlInfo* info); + +/*EN + * \brief Determine if a Cue (whose ID is specified) can be controlled by a specific AISAC Control + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \param[in] id Cue ID + * \param[in] aisac_control_id AISAC Control ID + * \return CriBool Is control possible? (Possible: CRI_TRUE, Not possible: CRI_FALSE) + * \par Description: + * Determines if the Cue (whose ID is specified) can be controlled by a specific AISAC Control.
+ * If no Cue with the specified ID exists, this function returns CRI_FALSE.
+ * \par Remarks: + * If NULL is specified for the first argument (ach_hn), all ACBs will be searched.
+ * (When this function finds an ACB containing a Cue with the specified ID, + * it determines if the AISAC control of the given ID can control the Cue in that ACB.)
+ * The order of the search is the reverse of the ACB data loading order.
+ * (Search is performed starting from the last data loaded.)
+ * \sa criAtomExAcb_IsUsingAisacControlByName + */ +CriBool CRIAPI criAtomExAcb_IsUsingAisacControlById(CriAtomExAcbHn acb_hn, CriAtomExCueId id, CriAtomExAisacControlId aisac_control_id); + +/*EN + * \brief Determine if a Cue (whose name is specified) can be controlled by a specific AISAC Control + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \param[in] name Cue name + * \param[in] aisac_control_name AISAC Control name + * \return CriBool Is control possible? (Possible: CRI_TRUE, Not possible: CRI_FALSE) + * \par Description: + * Determines if the Cue (whose name is specified) can be controlled by a specific AISAC Control.
+ * If no Cue with the specified name exists, this function returns CRI_FALSE.
+ * \par Remarks: + * If NULL is specified for the first argument (ach_hn), all ACBs will be searched.
+ * (When this function finds an ACB containing a Cue with the specified name, + * it determines if the AISAC control of the given ID can control the Cue in that ACB.)
+ * The order of the search is the reverse of the ACB data loading order.
+ * (Search is performed starting from the last data loaded.)
+ * \sa criAtomExAcb_IsUsingAisacControlById + */ +CriBool CRIAPI criAtomExAcb_IsUsingAisacControlByName(CriAtomExAcbHn acb_hn, const CriChar8 *name, const CriChar8 *aisac_control_name); + + +/*EN + * \brief Get the priority of the Cue with the given ID + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \param[in] id Cue ID + * \return CriSint32 priority (-1 is returned if the function fails) + * \par Description: + * Gets the priority of the Cue with the given ID.
+ * If no Cue with the specified ID exists, this function returns -1.
+ * \par Remarks: + * If NULL is specified for the first argument (ach_hn), all ACBs will be searched.
+ * (When this function finds an ACB containing a Cue with the specified ID, + * it returms the priority of the Cue in that ACB.)
+ * The order of the search is the reverse of the ACB data loading order.
+ * (Search is performed starting from the last data loaded.)
+ * \sa criAtomExAcb_GetCuePriorityByName + */ +CriSint32 CRIAPI criAtomExAcb_GetCuePriorityById(CriAtomExAcbHn acb_hn, CriAtomExCueId id); + +/*EN + * \brief Get the priority of the Cue with the given name + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \param[in] name Cue name + * \return CriSint32 priority (-1 is returned if the function fails) + * \par Description: + * Gets the priority of the Cue with the given name.
+ * If no Cue with the specified name exists, this function returns -1.
+ * \par Remarks: + * If NULL is specified for the first argument (ach_hn), all ACBs will be searched.
+ * (When this function finds an ACB containing a Cue with the specified name, + * it returms the priority of the Cue in that ACB.)
+ * The order of the search is the reverse of the ACB data loading order.
+ * (Search is performed starting from the last data loaded.)
+ * \sa criAtomExAcb_GetCuePriorityById + */ +CriSint32 CRIAPI criAtomExAcb_GetCuePriorityByName(CriAtomExAcbHn acb_hn, const CriChar8 *name); + +/*EN + * \brief Get information about the waveform played by the Cue whose ID is given + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \param[in] id Cue ID + * \param[out] waveform_info waveform information + * \return CriBool did we get the information? (if succeeded: CRI_TRUE, if failed: CRI_FALSE) + * \par Description: + * Gets the information about the waveform played back by the Cue whose ID is given.
+ * If there are multiple waveforms in the Cue, this function get the information about the first waveform in the first Track. + * If no Cue with the specified ID exists, this function returns CRI_FALSE.
+ * \par Remarks: + * If NULL is specified for the first argument (ach_hn), all ACBs will be searched.
+ * (When this function finds an ACB containing a Cue with the specified ID, + * it gets the information about the waveform of the Cue in that ACB.)
+ * The order of the search is the reverse of the ACB data loading order.
+ * (Search is performed starting from the last data loaded.)
+ */ +CriBool CRIAPI criAtomExAcb_GetWaveformInfoById( + CriAtomExAcbHn acb_hn, CriAtomExCueId id, CriAtomExWaveformInfo *waveform_info); + +/*EN + * \brief Get information about the waveform played by the Cue whose name is given + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \param[in] name Cue name + * \param[out] waveform_info waveform information + * \return CriBool did we get the information? (if succeeded: CRI_TRUE, if failed: CRI_FALSE) + * \par Description: + * Gets the information about the waveform played back by the Cue whose name is given.
+ * If there are multiple waveforms in the Cue, this function get the information about the first waveform in the first Track. + * If no Cue with the specified name exists, this function returns CRI_FALSE.
+ * \par Remarks: + * If NULL is specified for the first argument (ach_hn), all ACBs will be searched.
+ * (When this function finds an ACB containing a Cue with the specified name, + * it gets the information about the waveform of the Cue in that ACB.)
+ * The order of the search is the reverse of the ACB data loading order.
+ * (Search is performed starting from the last data loaded.)
+ */ +CriBool CRIAPI criAtomExAcb_GetWaveformInfoByName( + CriAtomExAcbHn acb_hn, const CriChar8 *name, CriAtomExWaveformInfo *waveform_info); + +/*EN + * \brief Get an AWB handle from an ACB handle (for in-memory playback) + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \return CriAtomAwbHn AWB handle + * \par Description: + * Get an AWB handle for in-memory playback from an ACB handle.
+ * \par Remarks: + * The ACB data contains waveform data that is stored in the AWB format.
+ * When creating an ACB handle, the Atom library loads the AWB data for + * in-memory playback and creates a playback handle (AWB handle).
+ *
+ * This function can retrieve the AWB handle created internally by the Atom library.
+ * By using this AWB handle, the waveform data in the ACB can be directly played + * on the application side by using the ::criAtomExPlayer_SetWaveId function.
+ * (This can be used when seamless concatenated playback is performed + * for the waveform data contained in a Cue, or when in-memory waveform data + * contained in an ACB data is played for debugging purposes.)
+ * \par Remarks: + * \attention + * An AWB handle depending on an ACB handle is destroyed when the ACB handle is released.
+ * If the AWB handle retrieved by this function is destroyed separately, + * or if it is accessed after the ACB handle is released, + * a serious problem such as an access violation may occur.
+ * \sa criAtomExAcb_GetStreamingAwbHandle + */ +CriAtomAwbHn CRIAPI criAtomExAcb_GetOnMemoryAwbHandle(CriAtomExAcbHn acb_hn); + +/*EN + * \brief Get an AWB handle from an ACB handle (for streaming playback) + * \param[in] acb_hn ACB handle + * \return CriAtomAwbHn AWB handle + * \par Description: + * Get an AWB handle for streaming playback from an ACB handle.
+ * \par Remarks: + * AWB files for streaming playback have associations with other data within the ACB data.
+ * When creating an ACB handle, the Atom library loads the AWB data for streaming playback + * and creates a playback handle (AWB handle).
+ *
+ * This function can retrieve the AWB handle created internally by the Atom library.
+ * By using this AWB handle, the waveform data for streaming playback can be directly played + * on the application side by using the ::criAtomExPlayer_SetWaveId function.
+ * (This can be used when seamless concatenated playback is performed + * for the waveform data contained in a Cue, or when streamed waveform data + * contained in an ACB data is played for debugging purposes.)
+ * \attention + * An AWB handle depending on an ACB handle is destroyed when the ACB handle is released.
+ * If the AWB handle retrieved by this function is destroyed separately, + * or if it is accessed after the ACB handle is released, + * a serious problem such as an access violation may occur.
+ * \sa criAtomExAcb_GetOnMemoryAwbHandle + */ +CriAtomAwbHn CRIAPI criAtomExAcb_GetStreamingAwbHandle(CriAtomExAcbHn acb_hn); + +/*EN + * \brief Get information about the Cue whose name is specified + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \param[in] name Cue name + * \param[out] info Cue information + * \return CriBool did we get the information? (if succeeded: CRI_TRUE, if failed: CRI_FALSE) + * \par Description: + * Gets information about the Cue whose name is specified .
+ * If no Cue with that name exists, the function returns CRI_FALSE.
+ * \par Remarks: + * If NULL is specified for the first argument (ach_hn), all ACBs will be searched.
+ * (When this function finds an ACB containing a Cue with the specified name, + * it gets the information about the Cue of that ACB.)
+ * The order of the search is the reverse of the ACB data loading order.
+ * (Search is performed starting from the last data loaded.)
+ * \sa criAtomExAcb_GetCueInfoById, criAtomExAcb_GetCueInfoByIndex + */ +CriBool CRIAPI criAtomExAcb_GetCueInfoByName(CriAtomExAcbHn acb_hn, const CriChar8* name, CriAtomExCueInfo* info); + +/*EN + * \brief Get information about the Cue whose ID is specified + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \param[in] id Cue ID + * \param[out] info Cue information + * \return CriBool did we get the information? (if succeeded: CRI_TRUE, if failed: CRI_FALSE) + * \par Description: + * Gets information about the Cue whose ID is specified .
+ * If no Cue with that ID exists, the function returns CRI_FALSE.
+ * \par Remarks: + * If NULL is specified for the first argument (ach_hn), all ACBs will be searched.
+ * (When this function finds an ACB containing a Cue with the specified ID, + * it gets the information about the Cue of that ACB.)
+ * The order of the search is the reverse of the ACB data loading order.
+ * (Search is performed starting from the last data loaded.)
+ * \sa criAtomExAcb_GetCueInfoByName, criAtomExAcb_GetCueInfoByIndex + */ +CriBool CRIAPI criAtomExAcb_GetCueInfoById(CriAtomExAcbHn acb_hn, CriAtomExCueId id, CriAtomExCueInfo* info); + +/*EN + * \brief Get information about the Cue whose index is specified + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \param[in] index Cue index + * \param[out] info Cue information + * \return CriBool did we get the information? (if succeeded: CRI_TRUE, if failed: CRI_FALSE) + * \par Description: + * Gets information about the Cue whose index is specified .
+ * If no Cue with that index exists, the function returns CRI_FALSE.
+ * \par Remarks: + * If NULL is specified for the first argument (ach_hn), all ACBs will be searched.
+ * (When this function finds an ACB containing a Cue with the specified index, + * it gets the information about the Cue of that ACB.)
+ * The order of the search is the reverse of the ACB data loading order.
+ * (Search is performed starting from the last data loaded.)
+ * \sa criAtomExAcb_GetCueInfoByName, criAtomExAcb_GetCueInfoById + */ +CriBool CRIAPI criAtomExAcb_GetCueInfoByIndex(CriAtomExAcbHn acb_hn, CriAtomExCueIndex index, CriAtomExCueInfo* info); + +/*EN + * \brief Get the number of playing voices for a Cue with Cue limits (specifying the Cue name) + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \param[in] name Cue name + * \return CriSint32 number of voices (returns -1 if the specified Cue has no Cue limits) + * \par Description: + * Gets the number of playing voices for a Cue (specified by its name) for which the Cue limits are set.
+ * If no Cue with that name exists or if the Cue limits are not set for that Cue, the function returns -1.
+ * \par Remarks: + * If NULL is specified for the first argument (ach_hn), all ACBs will be searched.
+ * (When this function finds an ACB containing a Cue with the specified name, + * it gets the the number of playing voices for the Cue of that ACB.)
+ * The order of the search is the reverse of the ACB data loading order.
+ * (Search is performed starting from the last data loaded.)
+ * \sa criAtomExAcb_GetNumCuePlayingCountById, criAtomExAcb_GetNumCuePlayingCountByIndex + */ +CriSint32 CRIAPI criAtomExAcb_GetNumCuePlayingCountByName(CriAtomExAcbHn acb_hn, const CriChar8* name); + +/*EN + * \brief Get the number of playing voices for a Cue with Cue limits (specifying the Cue ID) + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \param[in] id Cue ID + * \return CriSint32 number of voices (returns -1 if the specified Cue has no Cue limits) + * \par Description: + * Gets the number of playing voices for a Cue (specified by its ID) for which the Cue limits are set.
+ * If no Cue with that ID exists or if the Cue limits are not set for that Cue, the function returns -1.
+ * \par Remarks: + * If NULL is specified for the first argument (ach_hn), all ACBs will be searched.
+ * (When this function finds an ACB containing a Cue with the specified ID, + * it gets the the number of playing voices for the Cue of that ACB.)
+ * The order of the search is the reverse of the ACB data loading order.
+ * (Search is performed starting from the last data loaded.)
+ * \sa criAtomExAcb_GetNumCuePlayingCountByName, criAtomExAcb_GetNumCuePlayingCountByIndex + */ +CriSint32 CRIAPI criAtomExAcb_GetNumCuePlayingCountById(CriAtomExAcbHn acb_hn, CriAtomExCueId id); + +/*EN + * \brief Get the number of playing voices for a Cue with Cue limits (specifying the Cue index) + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \param[in] index Cue index + * \return CriSint32 number of voices (returns -1 if the specified Cue has no Cue limits) + * \par Description: + * Gets the number of playing voices for a Cue (specified by its index) for which the Cue limits are set.
+ * If no Cue with that index exists or if the Cue limits are not set for that Cue, the function returns -1.
+ * \par Remarks: + * If NULL is specified for the first argument (ach_hn), all ACBs will be searched.
+ * (When this function finds an ACB containing a Cue with the specified index, + * it gets the the number of playing voices for the Cue of that ACB.)
+ * The order of the search is the reverse of the ACB data loading order.
+ * (Search is performed starting from the last data loaded.)
+ * \sa criAtomExAcb_GetNumCuePlayingCountByName, criAtomExAcb_GetNumCuePlayingCountById + */ +CriSint32 CRIAPI criAtomExAcb_GetNumCuePlayingCountByIndex(CriAtomExAcbHn acb_hn, CriAtomExCueIndex index); + +/*EN + * \brief Get the index of a block (specifying a Cue index) + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \param[in] index Cue index + * \param[in] block_name block name + * \return CriAtomExBlockIndex block index + * \par Description: + * Gets the index of a block, given the index of the Cue and the block name.
+ * If no Cue with this index exists or if the block name does not exist, + * CRIATOMEX_INVALID_BLOCK_INDEX is returned.
+ * \par Remarks: + * If NULL is specified for the first argument (ach_hn), all ACBs will be searched.
+ * (When this function finds an ACB containing a Cue with the specified index, + * it gets the index of the block for the Cue of that ACB.)
+ * The order of the search is the reverse of the ACB data loading order.
+ * (Search is performed starting from the last data loaded.)
+ */ +CriAtomExBlockIndex CRIAPI criAtomExAcb_GetBlockIndexByIndex(CriAtomExAcbHn acb_hn, CriAtomExCueIndex index, const CriChar8* block_name); + +/*EN + * \brief Get the index of a block (specifying a Cue ID) + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \param[in] id Cue ID + * \param[in] block_name block name + * \return CriAtomExBlockIndex block index + * \par Description: + * Gets the index of a block, given the ID of the Cue and the block name.
+ * If no Cue with this ID exists or if the block name does not exist, + * CRIATOMEX_INVALID_BLOCK_INDEX is returned.
+ * \par Remarks: + * If NULL is specified for the first argument (ach_hn), all ACBs will be searched.
+ * (When this function finds an ACB containing a Cue with the specified ID, + * it gets the index of the block for the Cue of that ACB.)
+ * The order of the search is the reverse of the ACB data loading order.
+ * (Search is performed starting from the last data loaded.)
+ */ +CriAtomExBlockIndex CRIAPI criAtomExAcb_GetBlockIndexById(CriAtomExAcbHn acb_hn, CriAtomExCueId id, const CriChar8* block_name); + +/*EN + * \brief Get the index of a block (specifying a Cue name) + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \param[in] name Cue name + * \param[in] block_name block name + * \return CriAtomExBlockIndex block index + * \par Description: + * Gets the index of a block, given the name of the Cue and the block name.
+ * If no Cue with this name exists or if the block name does not exist, + * CRIATOMEX_INVALID_BLOCK_INDEX is returned.
+ * \par Remarks: + * When specifying NULL for the first argument (ach_hn), the search for the data + * specified by the Cue index among all the ACB data is performed within the library.
+ * (Once the ACB data with the specified Cue name is found, + * the block index in the Cue within the ACB data is returned.)
+ * Search is performed in the reverse order of the ACB data loading.
+ * (Search is performed preferentially from the last loaded data.)
+ */ +CriAtomExBlockIndex CRIAPI criAtomExAcb_GetBlockIndexByName(CriAtomExAcbHn acb_hn, const CriChar8* name, const CriChar8* block_name); + + +/*EN + * \brief Registration of the loading detection callback function for in-game preview data + * \ingroup ATOMEXLIB_ACB + * \param[in] func Loading detection callback function + * \param[in] obj User-specified object + * \par Description: + * Registers a callback function that is called whenever the loading of in-game preview data is detected.
+ * The registered callback function is executed when the ACB content is parsed in an ACB loading function.
+ * \attention + * Generally, you should not call the Atom library APIs within a callback function.
+ * Note that if the process is blocked in the callback function for a long time, some problems such as audio dropout + * may occur.
+ *
+ * Only one such callback function can be registered.
+ * If you attempt to register multiple callback functions, the last registration + * will always overwrite the previous one.
+ *
+ * By specifying NULL for func, you can unregister the current callback function.
+ * \sa CriAtomExAcbDetectionInGamePreviewDataCbFunc + */ +void CRIAPI criAtomExAcb_SetDetectionInGamePreviewDataCallback(CriAtomExAcbDetectionInGamePreviewDataCbFunc func, void* obj); + +/*EN + * \brief Get information about the ACB + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \param[out] acb_info ACB information + * \return CriBool did we get the information? (if succeeded: CRI_TRUE, if failed: CRI_FALSE) + * \par Description: + * Get the information about the ACB data.
+ * \par Remarks: + * If NULL is specified for the acb_hn argument, information about the last ACB data that was loaded is returned.
+ * \sa CriAtomExAcbInfo + */ +CriBool CRIAPI criAtomExAcb_GetAcbInfo(CriAtomExAcbHn acb_hn, CriAtomExAcbInfo *acb_info); + +/*EN + * \brief Reset the type-based state of the Cue (specifying its name) + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \param[in] name Cue name + * \par Description: + * Resets the type-based state of the Cue with the specified name.
+ * \attention + * Only the state of the specified Cue is reset. The states of any SubSynths or CueLinks in the Cue + * will not be reset. + * \par Remarks: + * The state is used to store the tracks previously played back. + * It is type-based and does not apply to the Cues of polyphonic type.
+ * This function resets the state management and reverts the Cue to its state just after the ACB data was loaded. + * \sa criAtomExAcb_ResetCueTypeStateById, criAtomExAcb_ResetCueTypeStateByIndex + */ +void CRIAPI criAtomExAcb_ResetCueTypeStateByName(CriAtomExAcbHn acb_hn, const CriChar8* name); + +/*EN + * \brief Reset the type-based state of the Cue (specifying its ID) + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \param[in] id Cue ID + * \par Description: + * Resets the type-based state of the Cue with the specified ID.
+ * \attention + * Only the state of the specified Cue is reset. The states of any SubSynths or CueLinks in the Cue + * will not be reset. + * \par Remarks: + * The state is used to store the tracks previously played back. + * It is type-based and does not apply to the Cues of polyphonic type.
+ * This function resets the state management and reverts the Cue to its state just after the ACB data was loaded. + * \sa criAtomExAcb_ResetCueTypeStateByName, criAtomExAcb_ResetCueTypeStateByIndex + */ +void CRIAPI criAtomExAcb_ResetCueTypeStateById(CriAtomExAcbHn acb_hn, CriAtomExCueId id); + +/*EN + * \brief Reset the type-based state of the Cue (specifying its index) + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \param[in] index Cue index + * \par Description: + * Resets the type-based state of the Cue with the specified index.
+ * \attention + * Only the state of the specified Cue is reset. The states of any SubSynths or CueLinks in the Cue + * will not be reset. + * \par Remarks: + * The state is used to store the tracks previously played back. + * It is type-based and does not apply to the Cues of polyphonic type.
+ * This function resets the state management and reverts the Cue to its state just after the ACB data was loaded. + * \sa criAtomExAcb_ResetCueTypeStateByName, criAtomExAcb_ResetCueTypeStateById + */ +void CRIAPI criAtomExAcb_ResetCueTypeStateByIndex(CriAtomExAcbHn acb_hn, CriAtomExCueIndex index); + +/*EN + * \brief Attaching an AWB file for streaming + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \param[in] awb_binder Handle of the binder that contains the AWB file + * \param[in] awb_path Path to the AWB file + * \param[in] awb_name AWB name + * \param[in] work Additional work area required for attaching + * \param[in] work_size Additional work area size + * \par Description: + * Attaches an AWB file for streaming to the ACB handle. + * Use the second argument, awb_binder, and the third argument, awb_path, + * to specify the AWB file for stream playback.
+ * Use the fifth argument, awb_name, to specify the slot to which the AWB is attached. + * Therefore, if you have changed the AWB name (file name before the extension) that was output from AtomCraft, + * specify the original AWB name.
+ * To attach an AWB file, you must allocate a memory area + * (work area) that is internally used by the library.
+ * If the function fails to attach an AWB file, an error callback occurs.
+ * For the reason of the failure, refer to the error callback message.
+ * \par Note: + * You can allocate a work area in the two ways below.
+ * (a) User Allocator: A user provided function is used to allocate/release memory.
+ * (b) Fixed Memory: A required memory area is passed directly to the library.
+ *
+ * When you use the User Allocator method, you do not need to provide a work area.
+ * You can allocate the required memory with the registered memory allocation function simply by specifying NULL for "work" and 0 for "work_size".
+ * The memory allocated when the file was attached is released when the file is detached (the ::criAtomExAcb_DetachAwbFile function is executed) + *or when the ACB handle is released (the ::criAtomExAcb_Release function is executed).
+ *
+ * When you use the Fixed Memory method, you must set a pre-allocated memory area separately + * for this function as a work area.
+ * The size of the work area can be acquired by using the ::criAtomExAcb_CalculateWorkSizeForAttachAwbFile function.
+ * When you call this function, allocate as large memory as the size acquired with ::criAtomExAcb_CalculateWorkSizeForAttachAwbFile function + * and set it for this function.
+ *If you use the Fixed Memory method, the work area continues to be used in the library until the file is detached (the ::criAtomExAcb_DetachAwbFile + * function is executed) or until the ACB handle is released (the ::criAtomExAcb_Release + * function is executed).
+ * When an AWB file is attached, a binder (CriFsBinderHn) and a loader (CriFsLoaderHn) are allocated + * internally in the library.
+ * To attach additional AWB files, you must allocate as many binders and loaders as the number of the additional files + * and then initialize the Atom library (or the CRI File System library).
+ * \par Note: + * Specify NULL when the data is not packed in a CPK file.
+ * \sa criAtomExAcb_DetachAwbFile, criAtomExAcb_Release, criAtomExAcb_CalculateWorkSizeForAttachAwbFile +*/ +void CRIAPI criAtomExAcb_AttachAwbFile( + CriAtomExAcbHn acb_hn, + CriFsBinderHn awb_binder, + const CriChar8* awb_path, + const CriChar8* awb_name, + void* work, + CriSint32 work_size); + +/*EN + * \brief Detaching an AWB file for streaming + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \param[in] awb_name AWB name + * \par Description: + * Detaches the AWB file for streaming that is attached to the ACB handle. + * For the second argument, awb_name, specify the same AWB name as specified when the file was attached.
+ * When the User Allocator method was used to allocate the work area when the file was attached, it is released + * when this function is executed.
+ * \sa criAtomExAcb_AttachAwbFile + */ +void CRIAPI criAtomExAcb_DetachAwbFile( + CriAtomExAcbHn acb_hn, + const CriChar8* awb_name); + +/*EN + * \brief Acquiring the size of the work area required to attach an AWB file for streaming + * \ingroup ATOMEXLIB_ACB + * \param[in] awb_binder Handle of the binder that contains the AWB file + * \param[in] awb_path Path to the AWB file + * \return CriSint32 Work area size + * \retval 0 or larger Processing is completed successfully + * \retval -1 An error occurred + * \par Description: + * Calculates the work area size required for executing the ::criAtomExAcb_LoadAcbFileById function.
+ * \par Note: + * Specify NULL when the data is not packed in a CPK file.
+ * \sa criAtomExAcb_AttachAwbFile + */ +CriSint32 CRIAPI criAtomExAcb_CalculateWorkSizeForAttachAwbFile( + CriFsBinderHn awb_binder, + const CriChar8* awb_path); + +/*EN + * \brief Acquiring the number of AWB slots for streaming + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \return CriSint32 Number of AWB slots for streaming + * \par Description: + * Acquires the number of stream AWBs required by the ACB handle.
+ */ +CriSint32 CRIAPI criAtomExAcb_GetNumAwbFileSlots( + CriAtomExAcbHn acb_hn); + +/*EN + * \brief Acquiring the AWB slot for streaming + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \param[in] index Slot index + * \return const CriChar8* Stream AWB port name + * \par Description: + * Acquires the name of the stream AWB slot in the ACB handle. It is specified with its index.
+ * The acquired slot name is used as the fourth argument of the ::criAtomExAcb_AttachAwbFile function. + * It is also used to specify a slot for the second argument of the ::criAtomExAcb_DetachAwbFile function.
+ */ +const CriChar8*CRIAPI criAtomExAcb_GetAwbFileSlotName( + CriAtomExAcbHn acb_hn, CriUint16 index); + +/*EN + * \brief Acquiring the attaching status of an AWB file for streaming + * \ingroup ATOMEXLIB_ACB + * \param[in] acb_hn ACB handle + * \param[in] awb_name AWB name + * \par Description: + * Indicates whether the AWB file is attached to the ACB handle. + * The second argument, awb_name, is the name of the slot to which the AWB is attached. Specify the AWB name of the slot that you are interested in.
+ */ +CriBool CRIAPI criAtomExAcb_IsAttachedAwbFile( + CriAtomExAcbHn acb_hn, + const CriChar8* awb_name); + +/*========================================================================== + * CRI AtomEx Voice Pool API + *=========================================================================*/ +/*EN + * \brief Calculate the size of the work buffer required to create a standard Voice Pool + * \ingroup ATOMEXLIB_VOICE_POOL + * \param[in] config configuration structure to create a standard Voice Pool + * \return CriSint32 work buffer size + * \retval >= 0 successfully completed + * \retval -1 error occurred + * \par Description: + * Calculates the size of the work buffer required to create a standard Voice Pool.
+ * If no user-allocator was previously registered using the ::criAtomEx_SetUserAllocator macro, + * you must pass a work buffer of the size returned by this function + * when creating a Voice Pool with the ::criAtomExVoicePool_AllocateStandardVoicePool function.
+ *
+ * If the function fails to calculate the size of the work buffer, it returns -1.
+ * To know the reason of the failure, refer to the error callback message.
+ * \par Remarks: + * The size of the work buffer required for the creation of a Voice Pool depends on + * the values of the parameters in the configuration structure ( ::CriAtomExStandardVoicePoolConfig ).
+ *
+ * When NULL is specified for the argument, the size is calculated using the default settings + * (i.e. the same parameters than when using the ::criAtomExVoicePool_SetDefaultConfigForStandardVoicePool + * macro). + *
+ * The information in the configuration structure is only used within this function and is + * not referenced after that. Therefore, it is safe to release it once the function has returned. + * \attention + * Since the size of the work buffer depends on the parameters specified when initializing the library (i.e. when executing the ::criAtomEx_Initialize + * function), the library must be initialized before executing this function.
+ * \sa criAtomExVoicePool_AllocateStandardVoicePool + */ +CriSint32 CRIAPI criAtomExVoicePool_CalculateWorkSizeForStandardVoicePool( + const CriAtomExStandardVoicePoolConfig *config); + +/*EN + * \brief Create a standard Voice Pool + * \ingroup ATOMEXLIB_VOICE_POOL + * \param[in] config configuration structure used to create a standard Voice Pool + * \param[in] work work buffer + * \param[in] work_size work buffer size + * \return CriAtomExVoicePoolHn Voice Pool handle + * \par Description: + * Creates a standard Voice Pool.
+ * (A standard voice is a voice that supports the playback of both ADX and HCA data.)
+ *
+ * When creating a Voice Pool, a work buffer must be passed to this function.
+ * The size of the buffer required is calculated by calling the ::criAtomExVoicePool_CalculateWorkSizeForStandardVoicePool + * function.
+ * (If a user-allocator was previously registered using the ::criAtomEx_SetUserAllocator macro, + * it is not necessary to pass a work buffer.)
+ *
+ * Executing this function pools voices that can be used to play ADX and HCA data.
+ * When an AtomEx player needs to play back ADX or HCA data (or a Cue containing ADX or HCA data), + * it will acquire a voice from the standard Voice Pool that has been created.
+ *
+ * When a Voice Pool is created successfully, the function returns the Voice Pool handle.
+ * Then, when exiting the application, the Voice Pool must be destroyed using the ::criAtomExVoicePool_Free + * function.
+ *
+ * If the function fails to create a Voice Pool, it returns NULL.
+ * To know the reason of the failure, refer to the error callback message.
+ * \par Remarks: + * The number of voices created for the Voice Pool + * will correspond to the number specified in the configuration structure for the Voice Pool creation + * (i.e. num_voices in ::CriAtomExStandardVoicePoolConfig).
+ * The greater the number of voices created, the greater the number of voices that can be played back simultaneously, but also + * the larger the amount of memory required.
+ *
+ * When creating a Voice Pool, in addition to specifying the number of voices, you can also specify the number of audio channels that can be played, + * the sampling frequency and the availability of streaming playback.
+ *
+ * The number of audio channels (player_config.max_channels in the ::CriAtomExStandardVoicePoolConfig + * structure) specified when creating a Voice Pool is the number of audio data channels + * that can be played using the voices in the Voice Pool.
+ * Decreasing the number of channels reduces the amount of memory required to create the Voice Pool, + * but data having more channels will become unplayable.
+ * For example, if you create a mono Voice Pool, stereo data cannot be played.
+ * (When playing back stereo data, an AtomEx player can only acquire voices + * from Voice Pools that support stereo playback.)
+ * However, a stereo Voice Pool can be used to play back mono data.
+ *
+ * Lowering the sampling rate (player_config.max_sampling_rate of the ::CriAtomExStandardVoicePoolConfig structure) also reduces + * the amount of memory required for a Voice Pool, + * but again, data with a higher sampling rate will become unplayable.
+ * (Only data with a sampling rate equal to or lower than the specified value can be played back.)
+ *
+ * The availability of streaming playback (as specified by the player_config.streaming_flag in the ::CriAtomExStandardVoicePoolConfig structure), + * also affects the amount of memory required by a Voice Pool, with Voice Pools that only support in-memory playback requiring less memory + * than Voice Pools that support streaming playback.
+ *
+ * When an AtomEx player wants to play back data and all the voices of the Voice Pool are already in use, some voices may be stolen based on a priority system.
+ * (For details about the voice priority, see the description of the ::criAtomExPlayer_SetVoicePriority function .)
+ * \attention + * The library must be initialized before executing this function.
+ *
+ * If a work buffer is passed to this function, it must be maintained + * by the application until the Voice Pool is destroyed.
+ * (Do not write into the work buffer or release its memory.)
+ *
+ * The information in the configuration structure that is passed is only used within this function and is + * not referenced after that. Therefore, it is safe to release it once the function has returned. + *
+ * Voice Pools for streaming playback internally allocate a loader (CriFsLoaderHn) + * for each voice.
+ * When creating a Voice Pool for streaming playback, the Atom library (or CRI File System library) must be initialized + * with settings that allow the allocation of as many loaders as there are voices.
+ *
+ * This is a blocking function.
+ * The time required to create a Voice Pool varies depending on the platform.
+ * If this function is executed during a game loop or at anytime requiring regular screen updates, + * the processing is blocked by the millisecond and frames may be dropped.
+ * Create or destroy a Voice Pool only when a fluctuation in load is acceptable, + * for example when loading a new level.
+ * \sa CriAtomExStandardVoicePoolConfig, criAtomExVoicePool_CalculateWorkSizeForStandardVoicePool, criAtomExVoicePool_Free + */ +CriAtomExVoicePoolHn CRIAPI criAtomExVoicePool_AllocateStandardVoicePool( + const CriAtomExStandardVoicePoolConfig *config, void *work, CriSint32 work_size); + +/*EN + * \brief Calculate the size of the work buffer required to create an ADX Voice Pool + * \ingroup ATOMEXLIB_VOICE_POOL + * \param[in] config configuration structure to create an ADX Voice Pool + * \return CriSint32 work buffer size + * \retval >= 0 successfully completed + * \retval -1 error occurred + * \par Description: + * Calculates the size of the work buffer required to create an ADX Voice Pool.
+ * If no user-allocator was previously registered using the ::criAtomEx_SetUserAllocator macro, + * you must pass a work buffer of the size returned by this function + * when creating a Voice Pool with the ::criAtomExVoicePool_AllocateAdxVoicePool function.
+ *
+ * If the function fails to calculate the size of the work buffer, it returns -1.
+ * To know the reason of the failure, refer to the error callback message.
+ * \par Remarks: + * The size of the work buffer required for the creation of a Voice Pool depends on + * the values of the parameters in the configuration structure ( ::CriAtomExAdxVoicePoolConfig ).
+ *
+ * When NULL is specified for the argument, the size is calculated using the default settings + * (i.e. the same parameters than when using the ::criAtomExVoicePool_SetDefaultConfigForAdxVoicePool + * macro). + *
+ * The information in the configuration structure is only used within this fuunction and is + * not referenced after that. Therefore, it is safe to release it once the function has returned. + * \attention + * Since the size of the work buffer depends on the parameters specified when initializing the library (i.e. when executing the ::criAtomEx_Initialize + * function), the library must be initialized before executing this function.
+ * \sa criAtomExVoicePool_AllocateAdxVoicePool + */ +CriSint32 CRIAPI criAtomExVoicePool_CalculateWorkSizeForAdxVoicePool( + const CriAtomExAdxVoicePoolConfig *config); + +/*EN + * \brief Create an ADX Voice Pool + * \ingroup ATOMEXLIB_VOICE_POOL + * \param[in] config configuration structure used to create an ADX Voice Pool + * \param[in] work work buffer + * \param[in] work_size work buffer size + * \return CriAtomExVoicePoolHn Voice Pool handle + * \par Description: + * Creates an ADX Voice Pool.
+ * When creating a Voice Pool, a work buffer must be passed to this function.
+ * The size of the buffer required is calculated by calling the ::criAtomExVoicePool_CalculateWorkSizeForAdxVoicePool + * function.
+ * (If a user-allocator was previously registered using the ::criAtomEx_SetUserAllocator macro, + * it is not necessary to pass a work buffer.)
+ *
+ * Executing this function pools voices that can be used to play ADX data.
+ * When an AtomEx player needs to play back ADX data (or a Cue containing ADX data), + * it will acquire a voice from the Voice Pool that has been created.
+ *
+ * When a Voice Pool is created successfully, the function returns the Voice Pool handle.
+ * Then, when exiting the application, the Voice Pool must be destroyed using the ::criAtomExVoicePool_Free + * function.
+ *
+ * If the function fails to create a Voice Pool, it returns NULL.
+ * To know the reason of the failure, refer to the error callback message.
+ * \par Remarks: + * The number of voices created for the Voice Pool + * will correspond to the number specified in the configuration structure for the Voice Pool creation + * (i.e. num_voices in ::CriAtomExAdxVoicePoolConfig).
+ * The greater the number of voices created, the greater the number of voices that can be played back simultaneously, but also + * the larger the amount of memory required.
+ *
+ * When creating a Voice Pool, in addition to specifying the number of voices, you can also specify the number of audio channels that can be played, + * the sampling frequency and the availability of streaming playback.
+ *
+ * The number of audio channels (player_config.max_channels in the ::CriAtomExAdxVoicePoolConfig + * structure) specified when creating a Voice Pool is the number of audio data channels + * that can be played using the voices in the Voice Pool.
+ * Decreasing the number of channels reduces the amount of memory required to create the Voice Pool, + * but data having more channels will become unplayable.
+ * For example, if you create a mono Voice Pool, stereo data cannot be played.
+ * (When playing back stereo data, an AtomEx player can only acquire voices + * from Voice Pools that support stereo playback.)
+ * However, a stereo Voice Pool can be used to play back mono data.
+ *
+ * Lowering the sampling rate (player_config.max_sampling_rate of the ::CriAtomExAdxVoicePoolConfig structure) also reduces + * the amount of memory required for a Voice Pool, + * but again, data with a higher sampling rate will become unplayable.
+ * (Only data with a sampling rate equal to or lower than the specified value can be played back.)
+ *
+ * The availability of streaming playback (as specified by the player_config.streaming_flag in the ::CriAtomExAdxVoicePoolConfig structure), + * also affects the amount of memory required by a Voice Pool, with Voice Pools that only support in-memory playback requiring less memory + * than Voice Pools that support streaming playback.
+ *
+ * When an AtomEx player wants to play back data and all the voices of the Voice Pool are already in use, some voices may be stolen based on a priority system.
+ * (For details about the voice priority, see the description of the ::criAtomExPlayer_SetVoicePriority function .)
+ * \attention + * The library must be initialized before executing this function.
+ *
+ * If a work buffer is passed to this function, it must be maintained + * by the application until the Voice Pool is destroyed.
+ * (Do not write into the work buffer or release its memory.)
+ *
+ * The information in the configuration structure that is passed is only used within this function and is + * not referenced after that. Therefore, it is safe to release it once the function has returned. + *
+ * Voice Pools for streaming playback internally allocate a loader (CriFsLoaderHn) + * for each voice.
+ * When creating a Voice Pool for streaming playback, the Atom library (or CRI File System library) must be initialized + * with settings that allow the allocation of as many loaders as there are voices.
+ *
+ * This is a blocking function.
+ * The time required to create a Voice Pool varies depending on the platform.
+ * If this function is executed during a game loop or at anytime requiring regular screen updates, + * the processing is blocked by the millisecond and frames may be dropped.
+ * Create or destroy a Voice Pool only when a fluctuation in load is acceptable, + * for example when loading a new level.
+ * \sa CriAtomExAdxVoicePoolConfig, criAtomExVoicePool_CalculateWorkSizeForAdxVoicePool, criAtomExVoicePool_Free + */ +CriAtomExVoicePoolHn CRIAPI criAtomExVoicePool_AllocateAdxVoicePool( + const CriAtomExAdxVoicePoolConfig *config, void *work, CriSint32 work_size); + +/*EN + * \brief Calculate the size of the work buffer required to create an HCA Voice Pool + * \ingroup ATOMEXLIB_VOICE_POOL + * \param[in] config configuration structure to create an HCA Voice Pool + * \return CriSint32 work buffer size + * \retval >= 0 successfully completed + * \retval -1 error occurred + * \par Description: + * Calculates the size of the work buffer required to create an HCA Voice Pool.
+ * If no user-allocator was previously registered using the ::criAtomEx_SetUserAllocator macro, + * you must pass a work buffer of the size returned by this function + * when creating a Voice Pool with the ::criAtomExVoicePool_AllocateHcaVoicePool function.
+ *
+ * If the function fails to calculate the size of the work buffer, it returns -1.
+ * To know the reason of the failure, refer to the error callback message.
+ * \par Remarks: + * The size of the work buffer required for the creation of a Voice Pool depends on + * the values of the parameters in the configuration structure ( ::CriAtomExHcaVoicePoolConfig ).
+ *
+ * When NULL is specified for the argument, the size is calculated using the default settings + * (i.e. the same parameters than when using the ::criAtomExVoicePool_SetDefaultConfigForHcaVoicePool + * macro). + *
+ * The information in the configuration structure is only used within this function and is + * not referenced after that. Therefore, it is safe to release it once the function has returned. + * \attention + * Since the size of the work buffer depends on the parameters specified when initializing the library (i.e. when executing the ::criAtomEx_Initialize + * function), the library must be initialized before executing this function.
+ * \sa criAtomExVoicePool_AllocateHcaVoicePool + */ +CriSint32 CRIAPI criAtomExVoicePool_CalculateWorkSizeForHcaVoicePool( + const CriAtomExHcaVoicePoolConfig *config); + +/*EN + * \brief Create an HCA Voice Pool + * \ingroup ATOMEXLIB_VOICE_POOL + * \param[in] config configuration structure used to create an HCA Voice Pool + * \param[in] work work buffer + * \param[in] work_size work buffer size + * \return CriAtomExVoicePoolHn Voice Pool handle + * \par Description: + * Creates an HCA Voice Pool.
+ * When creating a Voice Pool, a work buffer must be passed to this function.
+ * The size of the buffer required is calculated by calling the ::criAtomExVoicePool_CalculateWorkSizeForHcaVoicePool + * function.
+ * (If a user-allocator was previously registered using the ::criAtomEx_SetUserAllocator macro, + * it is not necessary to pass a work buffer.)
+ *
+ * Executing this function pools voices that can be used to play HCA data.
+ * When an AtomEx player needs to play back HCA data (or a Cue containing HCA data), + * it will acquire a voice from the HCA Voice Pool that has been created.
+ *
+ * When a Voice Pool is created successfully, the function returns the Voice Pool handle.
+ * Then, when exiting the application, the Voice Pool must be destroyed using the ::criAtomExVoicePool_Free + * function.
+ *
+ * If the function fails to create a Voice Pool, it returns NULL.
+ * To know the reason of the failure, refer to the error callback message.
+ * \par Remarks: + * The number of voices created for the Voice Pool + * will correspond to the number specified in the configuration structure for the Voice Pool creation + * (i.e. num_voices in ::CriAtomExHcaVoicePoolConfig).
+ * The greater the number of voices created, the greater the number of voices that can be played back simultaneously, but also + * the larger the amount of memory required.
+ *
+ * When creating a Voice Pool, in addition to specifying the number of voices, you can also specify the number of audio channels that can be played, + * the sampling frequency and the availability of streaming playback.
+ *
+ * The number of audio channels (player_config.max_channels in the ::CriAtomExHcaVoicePoolConfig + * structure) specified when creating a Voice Pool is the number of audio data channels + * that can be played using the voices in the Voice Pool.
+ * Decreasing the number of channels reduces the amount of memory required to create the Voice Pool, + * but data having more channels will become unplayable.
+ * For example, if you create a mono Voice Pool, stereo data cannot be played.
+ * (When playing back stereo data, an AtomEx player can only acquire voices + * from Voice Pools that support stereo playback.)
+ * However, a stereo Voice Pool can be used to play back mono data.
+ *
+ * Lowering the sampling rate (player_config.max_sampling_rate of the ::CriAtomExHcaVoicePoolConfig structure) also reduces + * the amount of memory required for a Voice Pool, + * but again, data with a higher sampling rate will become unplayable.
+ * (Only data with a sampling rate equal to or lower than the specified value can be played back.)
+ *
+ * The availability of streaming playback (as specified by the player_config.streaming_flag in the ::CriAtomExHcaVoicePoolConfig structure), + * also affects the amount of memory required by a Voice Pool, with Voice Pools that only support in-memory playback requiring less memory + * than Voice Pools that support streaming playback.
+ *
+ * When an AtomEx player wants to play back data and all the voices of the Voice Pool are already in use, some voices may be stolen based on a priority system.
+ * (For details about the voice priority, see the description of the ::criAtomExPlayer_SetVoicePriority function .)
+ * \attention + * The library must be initialized before executing this function.
+ *
+ * If a work buffer is passed to this function, it must be maintained + * by the application until the Voice Pool is destroyed.
+ * (Do not write into the work buffer or release its memory.)
+ *
+ * The information in the configuration structure that is passed is only used within this function and is + * not referenced after that. Therefore, it is safe to release it once the function has returned. + *
+ * Voice Pools for streaming playback internally allocate a loader (CriFsLoaderHn) + * for each voice.
+ * When creating a Voice Pool for streaming playback, the Atom library (or CRI File System library) must be initialized + * with settings that allow the allocation of as many loaders as there are voices.
+ *
+ * This is a blocking function.
+ * The time required to create a Voice Pool varies depending on the platform.
+ * If this function is executed during a game loop or at anytime requiring regular screen updates, + * the processing is blocked by the millisecond and frames may be dropped.
+ * Create or destroy a Voice Pool only when a fluctuation in load is acceptable, + * for example when loading a new level.
+ * \sa CriAtomExHcaVoicePoolConfig, criAtomExVoicePool_CalculateWorkSizeForHcaVoicePool, criAtomExVoicePool_Free + */ +CriAtomExVoicePoolHn CRIAPI criAtomExVoicePool_AllocateHcaVoicePool( + const CriAtomExHcaVoicePoolConfig *config, void *work, CriSint32 work_size); + +/*EN + * \brief Calculate the size of the work buffer required to create an HCA-MX Voice Pool + * \ingroup ATOMEXLIB_VOICE_POOL + * \param[in] config configuration structure to create an HCA-MX Voice Pool + * \return CriSint32 work buffer size + * \retval >= 0 successfully completed + * \retval -1 error occurred + * \par Description: + * Calculates the size of the work buffer required to create an HCA-MX Voice Pool.
+ * If no user-allocator was previously registered using the ::criAtomEx_SetUserAllocator macro, + * you must pass a work buffer of the size returned by this function + * when creating a Voice Pool with the ::criAtomExVoicePool_AllocateHcaMxVoicePool function.
+ *
+ * If the function fails to calculate the size of the work buffer, it returns -1.
+ * To know the reason of the failure, refer to the error callback message.
+ * \par Remarks: + * The size of the work buffer required for the creation of a Voice Pool depends on + * the values of the parameters in the configuration structure ( ::CriAtomExHcaMxVoicePoolConfig ).
+ *
+ * When NULL is specified for the argument, the size is calculated using the default settings + * (i.e. the same parameters than when using the ::criAtomExVoicePool_SetDefaultConfigForHcaMxVoicePool + * macro). + *
+ * The information in the configuration structure is only used within this function and is + * not referenced after that. Therefore, it is safe to release it once the function has returned. + * \attention + * Since the size of the work buffer depends on the parameters specified when initializing HCA-MX (i.e. when executing the ::criAtomExHcaMx_Initialize + * function), HCA-MX must be initialized before executing this function.
+ * \sa criAtomExVoicePool_AllocateHcaMxVoicePool + */ +CriSint32 CRIAPI criAtomExVoicePool_CalculateWorkSizeForHcaMxVoicePool( + const CriAtomExHcaMxVoicePoolConfig *config); + +/*EN + * \brief Create an HCA-MX Voice Pool + * \ingroup ATOMEXLIB_VOICE_POOL + * \param[in] config configuration structure used to create an HCA-MX Voice Pool + * \param[in] work work buffer + * \param[in] work_size work buffer size + * \return CriAtomExVoicePoolHn Voice Pool handle + * \par Description: + * Create an HCA-MX Voice Pool.
+ * When creating a Voice Pool, a work buffer must be passed to this function.
+ * The size of the buffer required is calculated by calling the ::criAtomExVoicePool_CalculateWorkSizeForHcaMxVoicePool + * function.
+ * (If a user-allocator was previously registered using the ::criAtomEx_SetUserAllocator macro, + * it is not necessary to pass a work buffer.)
+ *
+ * Executing this function pools voices that can be used to play HCA-MX data.
+ * When an AtomEx player needs to play back HCA-MX data (or a Cue containing HCA-MX data), + * it will acquire a voice from the HCA-MX Voice Pool that has been created.
+ *
+ * When a Voice Pool is created successfully, the function returns the Voice Pool handle.
+ * Then, when exiting the application, the Voice Pool must be destroyed using the ::criAtomExVoicePool_Free + * function.
+ *
+ * If the function fails to create a Voice Pool, it returns NULL.
+ * To know the reason of the failure, refer to the error callback message.
+ * \par Remarks: + * The number of voices created for the Voice Pool + * will correspond to the number specified in the configuration structure for the Voice Pool creation + * (i.e. num_voices in ::CriAtomExHcaMxVoicePoolConfig).
+ * The greater the number of voices created, the greater the number of voices that can be played back simultaneously, but also + * the larger the amount of memory required.
+ *
+ * When creating a Voice Pool, in addition to specifying the number of voices, you can also specify the number of audio channels that can be played, + * the sampling frequency and the availability of streaming playback.
+ *
+ * The number of audio channels (player_config.max_channels in the ::CriAtomExHcaMxVoicePoolConfig + * structure) specified when creating a Voice Pool is the number of audio data channels + * that can be played using the voices in the Voice Pool.
+ * Decreasing the number of channels reduces the amount of memory required to create the Voice Pool, + * but data having more channels will become unplayable.
+ * For example, if you create a mono Voice Pool, stereo data cannot be played.
+ * (When playing back stereo data, an AtomEx player can only acquire voices + * from Voice Pools that support stereo playback.)
+ * However, a stereo Voice Pool can be used to play back mono data.
+ *
+ * Lowering the sampling rate (player_config.max_sampling_rate of the ::CriAtomExHcaMxVoicePoolConfig structure) also reduces + * the amount of memory required for a Voice Pool, + * but again, data with a higher sampling rate will become unplayable.
+ * (Only data with a sampling rate equal to or lower than the specified value can be played back.)
+ * (Unlike other Voice Pools, with HCA-MX, all data must share the same sampling rate.)
+ *
+ * The availability of streaming playback (as specified by the player_config.streaming_flag in the ::CriAtomExHcaMxVoicePoolConfig structure), + * also affects the amount of memory required by a Voice Pool, with Voice Pools that only support in-memory playback requiring less memory + * than Voice Pools that support streaming playback.
+ *
+ * When an AtomEx player wants to play back data and all the voices of the Voice Pool are already in use, some voices may be stolen based on a priority system.
+ * (For details about the voice priority, see the description of the ::criAtomExPlayer_SetVoicePriority function .)
+ * \attention + * HCA-MX must be initialized (by calling the ::criAtomExHcaMx_Initialize function) + * before being able to call this function.
+ * Furthermore, you cannot play more HCA-MX voices than the number specified when executing the ::criAtomExHcaMx_Initialize function.
+ * When creating an HCA-MX Voice Pool, make sure that the value of num_voices in the ::CriAtomExHcaMxVoicePoolConfig structure + * does not exceed the value of max_voices in the ::CriAtomExHcaMxConfig structure (specified during HCA-MX + * initialization).
+ *
+ * If a work buffer is passed to this function, it must be maintained + * by the application until the Voice Pool is destroyed.
+ * (Do not write into the work buffer or release its memory.)
+ *
+ * The information in the configuration structure that is passed is only used within this function and is + * not referenced after that. Therefore, it is safe to release it once the function has returned. + *
+ * Voice Pools for streaming playback internally allocate a loader (CriFsLoaderHn) + * for each voice.
+ * When creating a Voice Pool for streaming playback, the Atom library (or CRI File System library) must be initialized + * with settings that allow the allocation of as many loaders as there are voices.
+ *
+ * This is a blocking function.
+ * The time required to create a Voice Pool varies depending on the platform.
+ * If this function is executed during a game loop or at anytime requiring regular screen updates, + * the processing is blocked by the millisecond and frames may be dropped.
+ * Create or destroy a Voice Pool only when a fluctuation in load is acceptable, + * for example when loading a new level.
+ * \sa CriAtomExHcaMxVoicePoolConfig, criAtomExVoicePool_CalculateWorkSizeForHcaMxVoicePool, criAtomExVoicePool_Free + */ +CriAtomExVoicePoolHn CRIAPI criAtomExVoicePool_AllocateHcaMxVoicePool( + const CriAtomExHcaMxVoicePoolConfig *config, void *work, CriSint32 work_size); + +/*EN + * \brief alculate the size of the work buffer required to create a Wave Voice Pool + * \ingroup ATOMEXLIB_VOICE_POOL + * \param[in] config configuration structure to create a Wave Voice Pool + * \return CriSint32 work buffer size + * \retval >= 0 successfully completed + * \retval -1 error occurred + * \par Description: + * Calculates the size of the work buffer required to create a Wave Voice Pool.
+ * If no user-allocator was previously registered using the ::criAtomEx_SetUserAllocator macro, + * you must pass a work buffer of the size returned by this function + * when creating a Voice Pool with the ::criAtomExVoicePool_AllocateWaveVoicePool function.
+ *
+ * If the function fails to calculate the size of the work buffer, it returns -1.
+ * To know the reason of the failure, refer to the error callback message.
+ * \par Remarks: + * The size of the work buffer required for the creation of a Voice Pool depends on + * the values of the parameters in the configuration structure ( ::CriAtomExWaveVoicePoolConfig ).
+ *
+ * When NULL is specified for the argument, the size is calculated using the default settings + * (i.e. the same parameters than when using the ::criAtomExVoicePool_SetDefaultConfigForWaveVoicePool + * macro). + *
+ * The information in the configuration structure is only used within this function and is + * not referenced after that. Therefore, it is safe to release it once the function has returned. + * \attention + * Since the size of the work buffer depends on the parameters specified when initializing the library (i.e. when executing the ::criAtomEx_Initialize + * function), the library must be initialized before executing this function.
+ * \sa criAtomExVoicePool_AllocateWaveVoicePool + */ +CriSint32 CRIAPI criAtomExVoicePool_CalculateWorkSizeForWaveVoicePool( + const CriAtomExWaveVoicePoolConfig *config); + +/*EN + * \brief Create a Wave Voice Pool + * \ingroup ATOMEXLIB_VOICE_POOL + * \param[in] config configuration structure used to create a Wave Voice Pool + * \param[in] work work buffer + * \param[in] work_size work buffer size + * \return CriAtomExVoicePoolHn Voice Pool handle + * \par Description: + * Creates a Wave Voice Pool.
+ * When creating a Voice Pool, a work buffer must be passed to this function.
+ * The size of the buffer required is calculated by calling the ::criAtomExVoicePool_CalculateWorkSizeForWaveVoicePool + * function.
+ * (If a user-allocator was previously registered using the ::criAtomEx_SetUserAllocator macro, + * it is not necessary to pass a work buffer.)
+ *
+ * Executing this function pools voices that can be used to play Wave data.
+ * When an AtomEx player needs to play back Wave data (or a Cue containing Wave data), + * it will acquire a voice from the Wave Voice Pool that has been created.
+ *
+ * When a Voice Pool is created successfully, the function returns the Voice Pool handle.
+ * Then, when exiting the application, the Voice Pool must be destroyed using the ::criAtomExVoicePool_Free + * function.
+ *
+ * If the function fails to create a Voice Pool, it returns NULL.
+ * To know the reason of the failure, refer to the error callback message.
+ * \par Remarks: + * The number of voices created for the Voice Pool + * will correspond to the number specified in the configuration structure for the Voice Pool creation + * (i.e. num_voices in ::CriAtomExWaveVoicePoolConfig).
+ * The greater the number of voices created, the greater the number of voices that can be played back simultaneously, but also + * the larger the amount of memory required.
+ *
+ * When creating a Voice Pool, in addition to specifying the number of voices, you can also specify the number of audio channels that can be played, + * the sampling frequency and the availability of streaming playback.
+ *
+ * The number of audio channels (player_config.max_channels in the ::CriAtomExWaveVoicePoolConfig + * structure) specified when creating a Voice Pool is the number of audio data channels + * that can be played using the voices in the Voice Pool.
+ * Decreasing the number of channels reduces the amount of memory required to create the Voice Pool, + * but data having more channels will become unplayable.
+ * For example, if you create a mono Voice Pool, stereo data cannot be played.
+ * (When playing back stereo data, an AtomEx player can only acquire voices + * from Voice Pools that support stereo playback.)
+ * However, a stereo Voice Pool can be used to play back mono data.
+ *
+ *
+ * Lowering the sampling rate (player_config.max_sampling_rate of the ::CriAtomExWaveVoicePoolConfig structure) also reduces + * the amount of memory required for a Voice Pool, + * but again, data with a higher sampling rate will become unplayable.
+ * (Only data with a sampling rate equal to or lower than the specified value can be played back.)
+ *
+ * The availability of streaming playback (as specified by the player_config.streaming_flag in the ::CriAtomExWaveVoicePoolConfig structure), + * also affects the amount of memory required by a Voice Pool, with Voice Pools that only support in-memory playback requiring less memory + * than Voice Pools that support streaming playback.
+ *
+ * When an AtomEx player wants to play back data and all the voices of the Voice Pool are already in use, some voices may be stolen based on a priority system.
+ * (For details about the voice priority, see the description of the ::criAtomExPlayer_SetVoicePriority function .)
+ * \attention + * The library must be initialized before executing this function.
+ *
+ * If a work buffer is passed to this function, it must be maintained + * by the application until the Voice Pool is destroyed.
+ * (Do not write into the work buffer or release its memory.)
+ *
+ * The information in the configuration structure that is passed is only used within this function and is + * not referenced after that. Therefore, it is safe to release it once the function has returned. + *
+ * Voice Pools for streaming playback internally allocate a loader (CriFsLoaderHn) + * for each voice.
+ * When creating a Voice Pool for streaming playback, the Atom library (or CRI File System library) must be initialized + * with settings that allow the allocation of as many loaders as there are voices.
+ *
+ * This is a blocking function.
+ * The time required to create a Voice Pool varies depending on the platform.
+ * If this function is executed during a game loop or at anytime requiring regular screen updates, + * the processing is blocked by the millisecond and frames may be dropped.
+ * Create or destroy a Voice Pool only when a fluctuation in load is acceptable, + * for example when loading a new level.
+ *
+ * Currently, the chunks of the Wave files are not analyzed very strictly.
+ * Parsing of a Wave file may fail if the 'RIFF', 'fmt ' and 'data' chunks + * are not included in this order or if the file includes other chunks.
+ * In addition, only mono or stereo 16-bit uncompressed data + * is supported at this time.
+ * \sa CriAtomExWaveVoicePoolConfig, criAtomExVoicePool_CalculateWorkSizeForWaveVoicePool, criAtomExVoicePool_Free + */ +CriAtomExVoicePoolHn CRIAPI criAtomExVoicePool_AllocateWaveVoicePool( + const CriAtomExWaveVoicePoolConfig *config, void *work, CriSint32 work_size); + + /*EN + * \brief Calculate the size of the work buffer required to create an AIFF Voice Pool + * \ingroup ATOMEXLIB_VOICE_POOL + * \param[in] config configuration structure to create an AIFF Voice Pool + * \return CriSint32 Work buffer size + * \retval 0 or greater Process finished normally. + * \retval -1 Error occurred. + * \par Description: + * Calculates the size of the work buffer required to create an AIFF Voice Pool.
+ * If no user-allocator was previously registered using the ::criAtomEx_SetUserAllocator macro, + * you must pass a work buffer of the size returned by this function + * when creating a Voice Pool with the ::criAtomExVoicePool_AllocateAiffVoicePool function.
+ *
+ * If the function fails to calculate the size of the work buffer, it returns -1.
+ * To know the reason of the failure, refer to the error callback message.
+ * \par Remarks: + * The size of the work buffer required for the creation of a Voice Pool depends on + * the values of the parameters in the configuration structure ( ::CriAtomExAiffVoicePoolConfig ).
+ *
+ * When NULL is specified for the argument, the size is calculated using the default settings + * (i.e. the same parameters than when using the ::criAtomExVoicePool_SetDefaultConfigForAiffVoicePool + * macro). + *
+ * The information in the configuration structure is only used within this function and is + * not referenced after that. Therefore, it is safe to release it once the function has returned. + * \attention + * Since the size of the work buffer depends on the parameters specified when initializing the library (i.e. when executing the ::criAtomEx_Initialize + * function), the library must be initialized before executing this function.
+ * \sa criAtomExVoicePool_AllocateAiffVoicePool + */ +CriSint32 CRIAPI criAtomExVoicePool_CalculateWorkSizeForAiffVoicePool( + const CriAtomExAiffVoicePoolConfig *config); + +/*EN + * \brief Creates an AIFF Voice Pool + * \ingroup ATOMEXLIB_VOICE_POOL + * \param[in] config configuration structure used to create an AIFF Voice Pool + * \param[in] work work buffer + * \param[in] work_size work buffer size + * \return CriAtomExVoicePoolHn Voice Pool handle + * \par Description: + * Creates an AIFF Voice Pool.
+ * When creating a Voice Pool, a work buffer must be passed to this function.
+ * The size of the buffer required is calculated by calling the ::criAtomExVoicePool_CalculateWorkSizeForAiffVoicePool + * function.
+ * (If a user-allocator was previously registered using the ::criAtomEx_SetUserAllocator macro, + * it is not necessary to pass a work buffer.)
+ *
+ * Executing this function pools voices that can be used to play AIFF data.
+ * When an AtomEx player needs to play back AIFF data (or a Cue containing AIFF data), + * it will acquire a voice from the AIFF Voice Pool that has been created.
+ *
+ * When a Voice Pool is created successfully, the function returns the Voice Pool handle.
+ * Then, when exiting the application, the Voice Pool must be destroyed using the ::criAtomExVoicePool_Free + * function.
+ *
+ * If the function fails to create a Voice Pool, it returns NULL.
+ * To know the reason of the failure, refer to the error callback message.
+ * \par Remarks: + * The number of voices created for the Voice Pool + * will correspond to the number specified in the configuration structure for the Voice Pool creation + * (i.e. num_voices in ::CriAtomExAiffVoicePoolConfig).
+ * The greater the number of voices created, the greater the number of voices that can be played back simultaneously, but also + * the larger the amount of memory required.
+ *
+ * When creating a Voice Pool, in addition to specifying the number of voices, you can also specify the number of audio channels that can be played, + * the sampling frequency and the availability of streaming playback.
+ *
+ * The number of audio channels (player_config.max_channels in the ::CriAtomExAiffVoicePoolConfig + * structure) specified when creating a Voice Pool is the number of audio data channels + * that can be played using the voices in the Voice Pool.
+ * Decreasing the number of channels reduces the amount of memory required to create the Voice Pool, + * but data having more channels will become unplayable.
+ * For example, if you create a mono Voice Pool, stereo data cannot be played.
+ * (When playing back stereo data, an AtomEx player can only acquire voices + * from Voice Pools that support stereo playback.)
+ * However, a stereo Voice Pool can be used to play back mono data.
+ *
+ * Lowering the sampling rate (player_config.max_sampling_rate of the ::CriAtomExAiffVoicePoolConfig structure) also reduces + * the amount of memory required for a Voice Pool, + * but again, data with a higher sampling rate will become unplayable.
+ * (Only data with a sampling rate equal to or lower than the specified value can be played back.)
+ *
+ * The availability of streaming playback (as specified by the player_config.streaming_flag in the ::CriAtomExAiffVoicePoolConfig structure), + * also affects the amount of memory required by a Voice Pool, with Voice Pools that only support in-memory playback requiring less memory + * than Voice Pools that support streaming playback.
+ *
+ * When an AtomEx player wants to play back data and all the voices of the Voice Pool are already in use, some voices may be stolen based on a priority system.
+ * (For details about the voice priority, see the description of the ::criAtomExPlayer_SetVoicePriority function .)
+ * \attention + * The library must be initialized before executing this function.
+ *
+ * If a work buffer is passed to this function, it must be maintained + * by the application until the Voice Pool is destroyed.
+ * (Do not write into the work buffer or release its memory.)
+ *
+ * The information in the configuration structure that is passed is only used within this function and is + * not referenced after that. Therefore, it is safe to release it once the function has returned. + *
+ * Voice Pools for streaming playback internally allocate a loader (CriFsLoaderHn) + * for each voice.
+ * When creating a Voice Pool for streaming playback, the Atom library (or CRI File System library) must be initialized + * with settings that allow the allocation of as many loaders as there are voices.
+ *
+ * This is a blocking function.
+ * The time required to create a Voice Pool varies depending on the platform.
+ * If this function is executed during a game loop or at anytime requiring regular screen updates, + * the processing is blocked by the millisecond and frames may be dropped.
+ * Create or destroy a Voice Pool only when a fluctuation in load is acceptable, + * for example when loading a new level.
+ *
+ * Currently, the chunks of the AIFF files are not analyzed in a very strict way.
+ * Parsing of an AIFF file may fail if the chunks are not in the order 'FORM', 'COMM' and 'SSND', + * or if any other chunks are included in the file.
+ * Currently, only mono or stereo 16-bit uncompressed data + * formats are supported.
+ * \sa CriAtomExAiffVoicePoolConfig, criAtomExVoicePool_CalculateWorkSizeForAiffVoicePool, criAtomExVoicePool_Free + */ +CriAtomExVoicePoolHn CRIAPI criAtomExVoicePool_AllocateAiffVoicePool( + const CriAtomExAiffVoicePoolConfig *config, void *work, CriSint32 work_size); + +/*EN + * \brief Calculate the size of the work buffer required to create a raw PCM Voice Pool + * \ingroup ATOMEXLIB_VOICE_POOL + * \param[in] config configuration structure to create a raw PCM Voice Pool + * \return CriSint32 work buffer size + * \retval >= 0 successfully completed + * \retval -1 error occurred + * \par Description: + * Calculates the size of the work buffer required to create a raw PCM Voice Pool.
+ * If no user-allocator was previously registered using the ::criAtomEx_SetUserAllocator macro, + * you must pass a work buffer of the size returned by this function + * when creating a Voice Pool with the ::criAtomExVoicePool_AllocateRawPcmVoicePool function.
+ *
+ * If the function fails to calculate the size of the work buffer, it returns -1.
+ * To know the reason of the failure, refer to the error callback message.
+ * \par Remarks: + * The size of the work buffer required for the creation of a Voice Pool depends on + * the values of the parameters in the configuration structure ( ::CriAtomExRawPcmVoicePoolConfig ).
+ *
+ * When NULL is specified for the argument, the size is calculated using the default settings + * (i.e. the same parameters than when using the ::criAtomExVoicePool_SetDefaultConfigForRawPcmVoicePool + * macro). + *
+ * The information in the configuration structure is only used within this function and is + * not referenced after that. Therefore, it is safe to release it once the function has returned. + * \attention + * Since the size of the work buffer depends on the parameters specified when initializing the library (i.e. when executing the ::criAtomEx_Initialize + * function), the library must be initialized before executing this function.
+ * \sa criAtomExVoicePool_AllocateRawPcmVoicePool + */ +CriSint32 CRIAPI criAtomExVoicePool_CalculateWorkSizeForRawPcmVoicePool( + const CriAtomExRawPcmVoicePoolConfig *config); + +/*EN + * \brief Create a raw PCM Voice Pool + * \ingroup ATOMEXLIB_VOICE_POOL + * \param[in] config configuration structure used to create a raw PCM Voice Pool + * \param[in] work work buffer + * \param[in] work_size work buffer size + * \return CriAtomExVoicePoolHn Voice Pool handle + * \par Description: + * Creates a raw PCM Voice Pool.
+ * When creating a Voice Pool, a work buffer must be passed to this function.
+ * The size of the buffer required is calculated by calling the ::criAtomExVoicePool_CalculateWorkSizeForRawPcmVoicePool + * function.
+ * (If a user-allocator was previously registered using the ::criAtomEx_SetUserAllocator macro, + * it is not necessary to pass a work buffer.)
+ *
+ * Executing this function pools voices that can be used to play raw PCM data.
+ * When an AtomEx player needs to play back raw PCM data (or a Cue containing raw PCM data), + * it will acquire a voice from the raw PCM Voice Pool that has been created.
+ *
+ * When a Voice Pool is created successfully, the function returns the Voice Pool handle.
+ * Then, when exiting the application, the Voice Pool must be destroyed using the ::criAtomExVoicePool_Free + * function.
+ *
+ * If the function fails to create a Voice Pool, it returns NULL.
+ * To know the reason of the failure, refer to the error callback message.
+ * \par Remarks: + * The number of voices created for the Voice Pool + * will correspond to the number specified in the configuration structure for the Voice Pool creation + * (i.e. num_voices in ::CriAtomExRawPcmVoicePoolConfig).
+ * The greater the number of voices created, the greater the number of voices that can be played back simultaneously, but also + * the larger the amount of memory required.
+ *
+ * When creating a Voice Pool, in addition to specifying the number of voices, you can also specify the number of audio channels that can be played, + * the sampling frequency and the availability of streaming playback.
+ *
+ * The number of sound channels specified when creating a Voice Pool (player_config.max_channels + * in the ::CriAtomExRawPcmVoicePoolConfig structure) corresponds to the number of channels expected from the + * data in raw PCM format.
+ *
+ * Similarly, the sampling rate set for player_config.max_sampling_rate in the + * ::CriAtomExRawPcmVoicePoolConfig structure specifies the sampling rate + * of the data provided in raw PCM format.
+ *
+ * The availability of streaming playback (as specified by the player_config.streaming_flag in the ::CriAtomExRawPcmVoicePoolConfig structure), + * affects the amount of memory required by a Voice Pool, with Voice Pools that only support in-memory playback requiring less memory + * than Voice Pools that support streaming playback.
+ *
+ * When an AtomEx player wants to play back data and all the raw PCM voices of the Voice Pool are already in use, some voices may be stolen based on a priority system.
+ * (For details about the voice priority, see the description of the ::criAtomExPlayer_SetVoicePriority function .)
+ * \attention + * The library must be initialized before executing this function.
+ *
+ * If a work buffer is passed to this function, it must be maintained + * by the application until the Voice Pool is destroyed.
+ * (Do not write into the work buffer or release its memory.)
+ *
+ * The information in the configuration structure that is passed is only used within this function and is + * not referenced after that. Therefore, it is safe to release it once the function has returned. + *
+ * Voice Pools for streaming playback internally allocate a loader (CriFsLoaderHn) + * for each voice.
+ * When creating a Voice Pool for streaming playback, the Atom library (or CRI File System library) must be initialized + * with settings that allow the allocation of as many loaders as there are voices.
+ *
+ * This is a blocking function.
+ * The time required to create a Voice Pool varies depending on the platform.
+ * If this function is executed during a game loop or at anytime requiring regular screen updates, + * the processing is blocked by the millisecond and frames may be dropped.
+ * Create or destroy a Voice Pool only when a fluctuation in load is acceptable, + * for example when loading a new level.
+ * \sa CriAtomExRawPcmVoicePoolConfig, criAtomExVoicePool_CalculateWorkSizeForRawPcmVoicePool, criAtomExVoicePool_Free + */ +CriAtomExVoicePoolHn CRIAPI criAtomExVoicePool_AllocateRawPcmVoicePool( + const CriAtomExRawPcmVoicePoolConfig *config, void *work, CriSint32 work_size); + +/*EN + * \brief Destroy a Voice Pool + * \ingroup ATOMEXLIB_VOICE_POOL + * \param[in] pool Voice Pool handle + * \par Description: + * Destroys a Voice Pool.
+ * If a user-allocator was registered with the ::criAtomEx_SetUserAllocator macro, + * the memory allocated when creating the Voice Pool is automatically released.
+ * If you passed a work buffer when creating the Voice Pool, it can be released + * after executing this function.
+ * \attention + * This is a blocking function.
+ * If a Voice Pool is destroyed while playing a sound, the resource is released + * after waiting for the playback to be stopped within this function.
+ * (If you are playing from a file, there is also a waiting period for the loading to complete.)
+ * Therefore, processing may be blocked for an extended time (a few frames) within this function.
+ * Create or destroy a Voice Pool only when a fluctuation in load is acceptable, + * for example when a new gane level is being loaded.
+ * \sa criAtomExVoicePool_AllocateStandardVoicePool + */ +void CRIAPI criAtomExVoicePool_Free(CriAtomExVoicePoolHn pool); + +/*EN + * \brief Destroy all the Voice Pools + * \ingroup ATOMEXLIB_VOICE_POOL + * \par Description: + * Destroys all the Voice Pools.
+ * If a user-allocator was registered with the ::criAtomEx_SetUserAllocator macro, + * the memory allocated when creating the Voice Pools is automatically released.
+ * If you passed work buffers when creating the Voice Pools, they can be released + * after executing this function.
+ * \attention + * This is a blocking function.
+ * If the Voice Pools are destroyed while playing sounds, their resources are released + * after waiting for the playback to be stopped within this function.
+ * (If you are playing from a file, there is also a waiting period for the loading to complete.)
+ * Therefore, processing may be blocked for an extended time (a few frames) within this function.
+ * Create or destroy Voice Pools only when a fluctuation in load is acceptable, + * for example when a new gane level is being loaded.
+ * \sa criAtomExVoicePool_AllocateStandardVoicePool + */ +void CRIAPI criAtomExVoicePool_FreeAll(void); + +/*EN + * \brief Get the number of Voices being used + * \ingroup ATOMEXLIB_VOICE_POOL + * \param[in] pool Voice Pool handle + * \param[out] cur_num Number of Voices currently in use + * \param[out] limit Maximum number of Voices available + * \par Description: + * Returns the number of Voices currently in use and the maximum number of Voices available + * in the Voice Pool (this is equal to the value set in max_voices when creating the pool)
+ */ +void CRIAPI criAtomExVoicePool_GetNumUsedVoices( + CriAtomExVoicePoolHn pool, CriSint32 *cur_num, CriSint32 *limit); + +/*EN + * \brief Returns a player handle + * \ingroup ATOMEXLIB_VOICE_POOL + * \param[in] pool Voice Pool handle + * \param[in] index Player index + * \return CriAtomPlayerHn Atom player handle + * \par Description: + * Returns the Atom player handle created within a Voice Pool.
+ * \par Remarks: + * This is a debugging function that can only be used to retrieve information.
+ */ +CriAtomPlayerHn CRIAPI criAtomExVoicePool_GetPlayerHandle( + CriAtomExVoicePoolHn pool, CriSint32 index); + +/*========================================================================== + * CRI AtomEx Category API + *=========================================================================*/ +/*EN + * \brief Set the volume of a category specified by its ID + * \ingroup ATOMEXLIB_CATEGORY + * \param[in] id category ID + * \param[in] volume volume value + * \par Description: + * Sets the volume of a category specified by its ID. + * \attention + * The value set by this function overwrites the category volume set in the ACF.
+ * Please note that there is no multiplication between this value and the one set in the ACF. + */ +void CRIAPI criAtomExCategory_SetVolumeById(CriAtomExCategoryId id, CriFloat32 volume); + +/*EN + * \brief Get the volume of a category specified by its ID + * \ingroup ATOMEXLIB_CATEGORY + * \param[in] id category ID + * \return CriFloat32 category volume + * \par Description: + * Gets the volume assigned to a category specified by its ID. + */ +CriFloat32 CRIAPI criAtomExCategory_GetVolumeById(CriAtomExCategoryId id); + +/*EN + * \brief Get the final volume of a category specified by its ID + * \ingroup ATOMEXLIB_CATEGORY + * \param[in] id Category ID + * return CriFloat32 Category volume + * \par Description: + * Gets the final volume of a category specified by its ID (based on how it has been affected by REACT, AISAC, etc...). + * \par Remarks: + * This function is CPU-intensive due to the parameter calculations required + * to get the final category volume value. + */ +CriFloat32 CRIAPI criAtomExCategory_GetTotalVolumeById(CriAtomExCategoryId id); + +/*EN + * \brief Set the volume of a category specified by its name + * \ingroup ATOMEXLIB_CATEGORY + * \param[in] name category name + * \param[in] volume volume value + * \par Description: + * Sets the volume of a category specified by its name. + * \attention + * The setting value by this function overwrites the category volume set by ACF.
+ * Please note that multiplication of setting value by this function and ACF set value is not applied. + */ +void CRIAPI criAtomExCategory_SetVolumeByName(const CriChar8* name, CriFloat32 volume); + +/*EN + * \brief Get the volume of a category specified by its name + * \ingroup ATOMEXLIB_CATEGORY + * \param[in] name category name + * \return CriFloat32 category volume + * \par Description: + * Gets the volume applied to a category specified by its name. + */ +CriFloat32 CRIAPI criAtomExCategory_GetVolumeByName(const CriChar8* name); + +/*EN + * \brief Get the final volume of a category specified by its name + * \ingroup ATOMEXLIB_CATEGORY + * \param[in] name Category name + * return CriFloat32 Category volume + * \par Description: + * Gets the final volume of a category specified by its name (based on how it has been affected by REACT, AISAC, etc...). + * \par Remarks: + * This function is CPU-intensive due to the parameter calculations required + * to acquire the final category volume value. + */ +CriFloat32 CRIAPI criAtomExCategory_GetTotalVolumeByName(const CriChar8* name); + +/*EN + * \brief Mute / unmute a category specified by its ID + * \ingroup ATOMEXLIB_CATEGORY + * \param[in] id category ID + * \param[in] mute Mute status (CRI_TRUE = Mute, CRI_FALSE = Unmute) + * \par Description: + * Mutes / unmutes a category specified by its ID. + */ +void CRIAPI criAtomExCategory_MuteById(CriAtomExCategoryId id, CriBool mute); + +/*EN + * \brief Return whether a category (specified by its ID) is muted or not + * \ingroup ATOMEXLIB_CATEGORY + * \param[in] id category ID + * return CriBool Mute status (CRI_TRUE = Muted, CRI_FALSE = Not muted) + * \par Description: + * Returns whether a category (specified by its name) is muted or not. + */ +CriBool CRIAPI criAtomExCategory_IsMutedById(CriAtomExCategoryId id); + +/*EN + * \brief Mute / unmute a category specified by its name + * \ingroup ATOMEXLIB_CATEGORY + * \param[in] name category name + * \param[in] mute Mute status (CRI_TRUE = Mute, CRI_FALSE = Unmute) + * \par Description: + * Mutes / unmutes a category specified by its name. + */ +void CRIAPI criAtomExCategory_MuteByName(const CriChar8* name, CriBool mute); + +/*EN + * \brief Return whether a category (specified by its name) is muted or not + * \ingroup ATOMEXLIB_CATEGORY + * \param[in] name category name + * return CriBool Mute status (CRI_TRUE = Muted, CRI_FALSE = Not muted) + * \par Description: + * Returns whether a category (specified by its name) is muted or not. + */ +CriBool CRIAPI criAtomExCategory_IsMutedByName(const CriChar8* name); + +/*EN + * \brief Solo / unsolo a category specified by its ID + * \ingroup ATOMEXLIB_CATEGORY + * \param[in] id category ID + * \param[in] solo solo status (CRI_TRUE = Solo, CRI_FALSE = Not solo) + * \param[in] mute_volume volume applied to the other categories + * \par Description: + * Solo / unsolo the category specified by its ID.
+ * The volume specified in mute_volume is applied to the other categories + * from the same category group. + */ +void CRIAPI criAtomExCategory_SoloById(CriAtomExCategoryId id, CriBool solo, CriFloat32 mute_volume); + +/*EN + * \brief Return whether a category (specified by its ID) is solo'ed or not + * \ingroup ATOMEXLIB_CATEGORY + * \param[in] id category ID + * return CriBool solo status (CRI_TRUE = Solo, CRI_FALSE = Not solo) + * \par Description: + * Returns whether a category (specified by its ID) is solo'ed or not. + */ +CriBool CRIAPI criAtomExCategory_IsSoloedById(CriAtomExCategoryId id); + +/*EN + * \brief Solo / unsolo a category specified by its name + * \ingroup ATOMEXLIB_CATEGORY + * \param[in] name category name + * \param[in] solo solo status (CRI_TRUE = Solo, CRI_FALSE = Not solo) + * \param[in] mute_volume volume applied to the other categories + * \par Description: + * Solo / unsolo the category specified by its name.
+ * The volume specified in mute_volume is applied to the other categories + * from the same category group. + */ +void CRIAPI criAtomExCategory_SoloByName(const CriChar8* name, CriBool solo, CriFloat32 mute_volume); + +/*EN + * \brief Return whether a category (specified by its name) is solo'ed or not + * \ingroup ATOMEXLIB_CATEGORY + * \param[in] name category name + * return CriBool solo status (CRI_TRUE = Solo, CRI_FALSE = Not solo) + * \par Description: + * Returns whether a category (specified by its name) is solo'ed or not. + */ +CriBool CRIAPI criAtomExCategory_IsSoloedByName(const CriChar8* name); + +/*EN + * \brief Pause/resume a category specified by its ID + * \ingroup ATOMEXLIB_CATEGORY + * \param[in] id category ID + * \param[in] sw switch (CRI_FALSE = resume, CRI_TRUE = pause) + * \par Description: + * Pauses or resumes a category specified by its ID.
+ * If this function is called when the fade-out time is set by the ::criAtomExCategory_SetFadeOutTimeById or ::criAtomExCategory_SetFadeOutTimeByName functions, + * the category is paused after it has faded-out over the specified time.
+ * If this function is called when the fade-out time is set by the ::criAtomExCategory_SetFadeInTimeById or ::criAtomExCategory_SetFadeInTimeByName functions, + * the category fades-in over the specified time after it has resumed.
+ * \par Remarks: + * Pausing a category is handled independently from pausing an AtomEx player/playback sound + * (i.e. pausing with the ::criAtomExPlayer_Pause or ::criAtomExPlayback_Pause functions). + * The final pause status is determined based on both these pause statuses.
+ * In short, it is paused when both are paused, or resumed when both are resumed. + */ +void CRIAPI criAtomExCategory_PauseById(CriAtomExCategoryId id, CriBool sw); + +/*EN + * \brief Get the pause status of a category specified by its ID + * \ingroup ATOMEXLIB_CATEGORY + * \param[in] id category ID + * \return CriBool pause status + * \par Description: + * Gets the pause status of a category specified by its ID. + */ +CriBool CRIAPI criAtomExCategory_IsPausedById(CriAtomExCategoryId id); + +/*EN + * \brief Pause/resume category specified by name + * \ingroup ATOMEXLIB_CATEGORY + * \param[in] name category name + * \param[in] sw switch (CRI_FALSE = resume, CRI_TRUE = pause) + * \par Description: + * Pauses or resumes a category specified by its name.
+ * Equivalent to the ::criAtomExCategory_PauseById function, except that the category is specified by name.
+ * \sa criAtomExCategory_PauseById + */ +void CRIAPI criAtomExCategory_PauseByName(const CriChar8* name, CriBool sw); + +/*EN + * \brief Get the pause status of a category specified by its name + * \ingroup ATOMEXLIB_CATEGORY + * \param[in] name category name + * \return CriBool pause status + * \par Description: + * Gets the pause status of a category specified by its name. + */ +CriBool CRIAPI criAtomExCategory_IsPausedByName(const CriChar8* name); + +/*EN + * \brief Set the fade-in time of a category specified by its ID + * \ingroup ATOMEXLIB_CATEGORY + * \param[in] id category ID + * \param[in] ms fade-in time (milliseconds) + * \par Description: + * Sets the fade-in time of a category specified by its ID.
+ * The fade-in time is used when resuming the category.
+ */ +void CRIAPI criAtomExCategory_SetFadeInTimeById(CriAtomExCategoryId id, CriUint16 ms); + +/*EN + * \brief Set the fade-in time of a category specified by its name + * \ingroup ATOMEXLIB_CATEGORY + * \param[in] name category name + * \param[in] ms fade-in time (milliseconds) + * \par Description: + * Sets the fade-in time of a category specified by its name.
+ * The fade-in time is used when resuming the category.
+ */ +void CRIAPI criAtomExCategory_SetFadeInTimeByName(const CriChar8* name, CriUint16 ms); + +/*EN + * \brief Set the fade-out time of a category specified by its ID + * \ingroup ATOMEXLIB_CATEGORY + * \param[in] id category ID + * \param[in] ms fade-out time (milliseconds) + * \par Description: + * Sets the fade-out time of a category specified by its ID.
+ * The fade-out time is used when pausing the category.
+ */ +void CRIAPI criAtomExCategory_SetFadeOutTimeById(CriAtomExCategoryId id, CriUint16 ms); + +/*EN + * \brief Set the fade-out time of a category specified by its name + * \ingroup ATOMEXLIB_CATEGORY + * \param[in] name category name + * \param[in] ms fade-out time (milliseconds) + * \par Description: + * Sets the fade-out time of a category specified by its name.
+ * The fade-out time is used when pausing the category.
+ */ +void CRIAPI criAtomExCategory_SetFadeOutTimeByName(const CriChar8* name, CriUint16 ms); + +/*EN + * \brief Set the AISAC control value of a category specified by its ID + * \ingroup ATOMEXLIB_CATEGORY + * \param[in] id category ID + * \param[in] control_id AISAC control ID + * \param[in] control_value AISAC control value + * \par Description: + * Sets the AISAC control value of a category specified by its ID
+ * \par Remarks: + * Use the ::criAtomExAcf_GetAisacControlIdByName function when you want to specify the category by ID and the AISAC control by name. + * \attention + * For AISACs set to Cues or tracks, higher priority is given to the category's AISAC control value rather than to the player's AISAC control value.
+ * For AISACs attached to categories, only the AISAC control values set to the categories are taken into account. + * \sa criAtomExCategory_SetAisacControlByName, criAtomExCategory_AttachAisacById, criAtomExCategory_AttachAisacByName + */ +void CRIAPI criAtomExCategory_SetAisacControlById( + CriAtomExCategoryId id, + CriAtomExAisacControlId control_id, + CriFloat32 control_value +); + +/*EN + * \brief Set the AISAC control value of a category specified by its name + * \ingroup ATOMEXLIB_CATEGORY + * \param[in] name category name + * \param[in] control_name AISAC control name + * \param[in] control_value AISAC control value + * \par Description: + * Sets the AISAC control value of a category specified by its name.
+ * Equivalent to the ::criAtomExCategory_SetAisacControlById function, except that category and AISAC control are both specified by name.
+ * \par Remarks: + * Use the ::criAtomExAcf_GetAisacControlNameById function when you want to specify the category by name and the AISAC control by ID. + * \sa criAtomExCategory_SetAisacControlById, criAtomExCategory_AttachAisacById, criAtomExCategory_AttachAisacByName + */ +void CRIAPI criAtomExCategory_SetAisacControlByName( + const CriChar8* name, + const CriChar8* control_name, + CriFloat32 control_value +); + +/*EN +* \brief All AISAC control values attached to categories by ID designation are set to default values +* \ingroup ATOMEXLIB_CATEGORY +* \param[in] id Category ID +* \retval CRI_TRUE = Success +* \retval CRI_FALSE = Failure +* \par Description: +* Setting all AISAC control values attached to the category to default values.
+* If you specify a category that does not exist, CRI_FALSE is returned.
+* \sa criAtomExCategory_GetNumAttachedAisacsById +*/ +CriBool CRIAPI criAtomExCategory_ResetAllAisacControlById(CriAtomExCategoryId category_id); + +/*EN +* \brief All AISAC control values attached to categories by name designation are set to default values +* \ingroup ATOMEXLIB_CATEGORY +* \param[in] name Catefory Name +* \retval CRI_TRUE = Success +* \retval CRI_FALSE = Failure +* \par Description: +* Setting all AISAC control values attached to the category to default values.
+* If you specify a category that does not exist, CRI_FALSE is returned.
+* \sa criAtomExCategory_GetNumAttachedAisacsById +*/ +CriBool CRIAPI criAtomExCategory_ResetAllAisacControlByName(const CriChar8* category_name); + + +/*EN + * \brief Attach a global AISAC to a category specified by its ID + * \ingroup ATOMEXLIB_CATEGORY + * \param[in] id category ID + * \param[in] global_aisac_name name of the global AISAC to attach + * \par Description: + * Attaches a global AISAC to a category specified by its ID. + * By attaching a global AISAC at run-time, it is possible to use the AISAC control feature even when there is no AISAC assigned to a Cue or a track in the data.
+ *
+ * If the attachment of the AISAC has failed, an error callback is triggered.
+ * To know the reason of the failure, refer to the callback message.
+ * \par Remarks: + * Only global AISACs included in the global settings (ACF file) can be attached.
+ * The relevant AISAC control value must be set like for an AISAC configured for Cues or tracks.
+ * \attention + * Even when an AISAC that modifies AISAC control values is set to Cues or tracks, + * the resulting AISAC control values do not affect the AISACs attached to the categories.
+ * For AISACs attached to categories, only the AISAC control values set to the categories are taken into account.
+ * Currently, attaching an AISAC whose control type is "auto modulation" or "random" is not supported.
+ * The maximum number of AISACs that can be attached to a category is eight. + * \sa criAtomExCategory_DetachAisacById + */ +void CRIAPI criAtomExCategory_AttachAisacById(CriAtomExCategoryId id, const CriChar8* global_aisac_name); + +/*EN + * \brief Attach a global AISAC to a category specified by its name + * \ingroup ATOMEXLIB_CATEGORY + * \param[in] name category name + * \param[in] global_aisac_name name of the global AISAC to be attached + * \par Description: + * Attaches a global AISAC to a category specified by its name. + * Equivalent to the ::criAtomExCategory_AttachAisacById function, except that the category is specified by its name.
+ * \sa criAtomExCategory_AttachAisacById, criAtomExCategory_DetachAisacByName + */ +void CRIAPI criAtomExCategory_AttachAisacByName(const CriChar8* name, const CriChar8* global_aisac_name); + +/*EN + * \brief Detach an AISAC from a category specified by its ID + * \ingroup ATOMEXLIB_CATEGORY + * \param[in] id category ID + * \param[in] global_aisac_name name of the global AISAC to detach + * \par Description: + * Detaches a global AISAC from a category specified by its ID.
+ *
+ * If the function fails, an error callback is triggered.
+ * For the reason of the failure, refer to the callback message.
+ * \sa criAtomExCategory_AttachAisacById + */ +void CRIAPI criAtomExCategory_DetachAisacById(CriAtomExCategoryId id, const CriChar8* global_aisac_name); + +/*EN + * \brief Detach an AISAC from a category specified by its name + * \ingroup ATOMEXLIB_CATEGORY + * \param[in] name category name + * \param[in] global_aisac_name name of the global AISAC to detach + * \par Description: + * Detaches a global AISAC from a category specified by its name.
+ * Equivalent to the ::criAtomExCategory_DetachAisacById function, except that the category is specified by its name.
+ * \sa criAtomExCategory_DetachAisacById, criAtomExCategory_AttachAisacByName + */ +void CRIAPI criAtomExCategory_DetachAisacByName(const CriChar8* name, const CriChar8* global_aisac_name); + +/*EN + * \brief Detach all the AISACs from a category specified by its ID + * \ingroup ATOMEXLIB_CATEGORY + * \param[in] id category ID + * \par Description: + * Detaches all the AISACs from a category. + */ +void CRIAPI criAtomExCategory_DetachAisacAllById(CriAtomExCategoryId id); + +/*EN + * \brief Detach all the AISACs from a category specified by its name + * \ingroup ATOMEXLIB_CATEGORY + * \param[in] name category name + * \par Description: + * Detaches all the AISACs from a category. + */ +void CRIAPI criAtomExCategory_DetachAisacAllByName(const CriChar8* name); + +/*EN + * \brief Get the number of AISACs attached to a category specified by its ID + * \ingroup ATOMEXLIB_CATEGORY + * \param[in] id category ID + * \return number of AISACs attached to the category + * \par Description: + * Gets the number of AISACs attached to a category specified by its ID.
+ * If the category does not exist, a negative value is returned. + */ +CriSint32 CRIAPI criAtomExCategory_GetNumAttachedAisacsById(CriAtomExCategoryId id); + +/*EN + * \brief Get the number of AISACs attached to a category specified by its name + * \ingroup ATOMEXLIB_CATEGORY + * \param[in] name category name + * \return number of AISACs attached to the category + * \par Description: + * Gets the number of AISACs attached to a category specified its name. + * If the category does not exist, a negative value is returned. + */ +CriSint32 CRIAPI criAtomExCategory_GetNumAttachedAisacsByName(const CriChar8* name); + +/*EN + * \brief Get information about an AISAC attached to a category (specified by its ID) + * \ingroup ATOMEXLIB_CATEGORY + * \param[in] id category ID + * \param[in] aisac_attached_index index of the attached AISAC + * \param[out] aisac_info AISAC information + * \retval CRI_TRUE = information successfully acquired + * \retval CRI_TRUE = failed to get information + * \par Description: + * Gets information about an AISAC attached to a category.
+ * If the category does not exist or the AISAC index is invalid, CRI_FALSE is returned.
+ * \sa criAtomExCategory_GetNumAttachedAisacsById + */ +CriBool CRIAPI criAtomExCategory_GetAttachedAisacInfoById( + CriAtomExCategoryId id, + CriSint32 aisac_attached_index, + CriAtomExAisacInfo *aisac_info +); + +/*EN + * \brief Get information about an AISAC attached to a category (specified by its name) + * \ingroup ATOMEXLIB_CATEGORY + * \param[in] name category name + * \param[in] aisac_attached_index index of the attached AISAC + * \param[out] aisac_info AISAC information + * \retval CRI_TRUE = information successfully acquired + * \retval CRI_FALSE = failed to get information + * \par Description: + * Gets information about an AISAC attached to a category.
+ * If the category does not exist or the AISAC index is invalid, CRI_FALSE is returned.
+ * \sa criAtomExCategory_GetNumAttachedAisacsByName + */ +CriBool CRIAPI criAtomExCategory_GetAttachedAisacInfoByName( + const CriChar8* name, + CriSint32 aisac_attached_index, + CriAtomExAisacInfo *aisac_info +); + +/*EN +* \brief Acquire the current value of the AISAC control attached to the category by ID specification +* \ingroup ATOMEXLIB_CATEGORY +* \param[in] id Category ID +* \param[in] aisac_control_id AISAC control ID +* \param[out] control_value AISAC control value +* \retval CRI_TRUE = Success +* \retval CRI_FALSE = Failure +* \par Description: +* Gets the current value of the AISAC control attached to the category.
+* If you specify a nonexistent category or AISAC control, CRI_FALSE is returned.
+* \sa criAtomExCategory_GetNumAttachedAisacsById +*/ +CriBool CRIAPI criAtomExCategory_GetCurrentAisacControlValueById( + CriAtomExCategoryId category_id, + CriAtomExAisacControlId aisac_control_id, + CriFloat32 * control_value +); + +/*EN +* \brief Gets current value of AISAC control attached to category by name specification +* \ingroup ATOMEXLIB_CATEGORY +* \param[in] name Category Name +* \param[in] aisac_control_name AISAC control Name +* \param[out] control_value AISAC control value +* \retval CRI_TRUE = Success +* \retval CRI_FALSE = Failure +* \par Description: +* Gets the current value of the AISAC control attached to the category.
+* If you specify a nonexistent category or invalid index, CRI_FALSE is returned.
+* \sa criAtomExCategory_GetNumAttachedAisacsById +*/ +CriBool CRIAPI criAtomExCategory_GetCurrentAisacControlValueByName( + const CriChar8* category_name, + const CriChar8* aisac_control_name, + CriFloat32 * control_value +); + +/*EN +* \brief Set REACT drive parameter +* \ingroup ATOMEXLIB_CATEGORY +* \param[in] react_name REACT Name +* \param[in] react_parameter REACT parameter structure +* \par Description: +* Set the parameters to drive REACT.
+* Parameters can not be set while REACT is running (a warning will occur).
+* If you specify a REACT name that does not exist, an error callback will be returned.
+* \sa criAtomExCategory_GetReactParameter +*/ +void CRIAPI criAtomExCategory_SetReactParameter( + const CriChar8* react_name, + const CriAtomExReactParameter* react_parameter); + +/*EN +* \brief Get REACT drive parameter +* \ingroup ATOMEXLIB_CATEGORY +* \param[in] react_name REACT Name +* \param[out] react_parameter REACT parameter structure +* \retval CRI_TRUE = Success +* \retval CRI_FALSE = Failed +* \par Description: +* Get the current value of the parameter that drives REACT.
+* If you specify a REACT name that does not exist, an error callback occurs and CRI_FALSE is returned.
+* \sa criAtomExCategory_SetReactParameter +*/ +CriBool CRIAPI criAtomExCategory_GetReactParameter( + const CriChar8* react_name, + CriAtomExReactParameter* react_parameter); + +/*EN + * \brief Get the number of playing Cues attached to a category (specified by its ID) + * \ingroup ATOMEXLIB_CATEGORY + * \param[in] id category ID + * \return number of playing Cues attached to the category + * \par Description: + * Gets the number of playing Cues attached to a category.
+ * If a non-existent category is specified, a negative value is returned.
+ */ +CriSint32 CRIAPI criAtomExCategory_GetNumCuePlayingCountById(CriAtomExCategoryId id); + +/*EN + * \brief Get the number of playing Cues attached to a category (specified by its name) + * \ingroup ATOMEXLIB_CATEGORY + * \param[in] name category name + * \return number of playing Cues attached to the category + * \par Description: + * Gets the number of playing Cues attached to a category.
+ * If a non-existent category is specified, a negative value is returned.
+ */ +CriSint32 CRIAPI criAtomExCategory_GetNumCuePlayingCountByName(const CriChar8* name); + +/*EN + * \brief Stop the playing Cues that belong to the category having the given ID + * \ingroup ATOMEXLIB_CATEGORY + * \param[in] id Category ID + * \par Description: + * Stops the playing Cues belonging to the specified category.
+ */ +void CRIAPI criAtomExCategory_StopById(CriAtomExCategoryId id); + +/*EN + * \brief Stop the playing Cues that belong to the category having the given name + * \ingroup ATOMEXLIB_CATEGORY + * \param[in] name Category name + * \par Description: + * Stops the playing Cues belonging to the specified category.
+ */ +void CRIAPI criAtomExCategory_StopByName(const CriChar8* name); + +/*EN + * \brief Immediately stop the playing Cues that belong to the category having the given ID + * \ingroup ATOMEXLIB_CATEGORY + * \param[in] id Category ID + * \par Description: + * Immediately stops the playing Cues belonging to the specified category.
+ */ +void CRIAPI criAtomExCategory_StopWithoutReleaseTimeById(CriAtomExCategoryId id); + +/*EN + * \brief Immediately stop the playing Cues that belong to the category having the given name + * \ingroup ATOMEXLIB_CATEGORY + * \param[in] name Category name + * \par Description: + * Immediately stops the playing Cues belonging to the specified category.
+ */ +void CRIAPI criAtomExCategory_StopWithoutReleaseTimeByName(const CriChar8* name); + +/*========================================================================== + * CRI AtomEx Player API + *=========================================================================*/ +/*EN + * \brief Calculate the size of the work buffer required to create an AtomEx player + * \ingroup ATOMEXLIB_PLAYER + * \param[in] config configuration structure used to create an AtomEx player + * \return CriSint32 work buffer size + * \retval >= 0 successfully completed + * \retval -1 error occurred + * \par Description: + * Calculates the size of the work buffer required to create an AtomEx player.
+ * When creating an AtomEx player without having previously registered a user-allocator, + * a work buffer of the size returned by this function + * must be passed to the ::criAtomExPlayer_Create function.
+ *
+ * The size of the work buffer required to create a player depends on the values of the parameters in the configuration + * structure ( ::CriAtomExPlayerConfig ).
+ *
+ * If NULL is passed for config, the size of the work buffer is calculated from the default settings + * (i.e. the parameters obtained when calling ::criAtomExPlayer_SetDefaultConfig ). + *
+ * If the size calculation fails, -1 is returned.
+ * To know the reason of the failure, refer to the error callback message.
+ * \par Remarks: + * The information in the configuration structure is only used during the initialization and is + * not referenced after that. Therefore, it is safe to release it once the function has returned. + * \attention + * You must initialize the library before calling this function.
+ * \sa CriAtomExPlayerConfig, criAtomExPlayer_Create + */ +CriSint32 CRIAPI criAtomExPlayer_CalculateWorkSize( + const CriAtomExPlayerConfig *config); + +/*EN + * \brief Create an AtomEx player + * \ingroup ATOMEXLIB_PLAYER + * \param[in] config configuration structure used for the creation of an AtomEx player + * \param[in] work work buffer + * \param[in] work_size work buffer size + * \return CriAtomExPlayerHn AtomEx player handle + * \par Description: + * Creates an AtomEx player.
+ *
+ * When creating a player, the work buffer used internally by the library must be allocated.
+ * There are two ways to allocate it:
+ * (a) User-Allocator method: the user provides functions to allocate/release memory.
+ * (b) Fixed Memory method: The required memory is passed directly to the functions of the library.
+ *
+ * When using the User-Allocator method, you do not need to provide a work buffer to the function.
+ * You can ask the library to allocate the required memory by calling the registered user-allocator functions, simply by specifying NULL for work and 0 for work_size.
+ * The memory allocated when creating the AtomEx player will be released when the AtomEx player is destroyed (i.e. when executing the ::criAtomExPlayer_Destroy + * function).
+ *
+ * When using the Fixed Memory method, you must pass a memory buffer for this function to work with.
+ * The size of the work buffer can be obtained by calling the ::criAtomExPlayer_CalculateWorkSize function.
+ * Allocate a work buffer of the size returned by the ::criAtomExPlayer_CalculateWorkSize function and pass it + * to the function that creates the AtomEx player .
+ * If you use the Fixed Memory method, the work buffer will be used within the library until the AtomEx player + * is destroyed ( by calling the ::criAtomExPlayer_Destroy function).
+ * Therefore, do not release the work buffer before destroying the AtomEx player.
+ * \par Example: + * [Creating an AtomEx player with the User-Allocator method]
+ * When using the User-Allocator method, the AtomEx player creation/destruction procedure is as follows:
+ * -# Before creating the AtomEx player: use the ::criAtomEx_SetUserAllocator function to register the user-allocator functions.
+ * -# Set the parameters in the AtomEx player creation configuration structure.
+ * -# Create the AtomEx player by calling the ::criAtomExPlayer_Create function.
+ * (Specify NULL for work and 0 for work_size.)
+ * -# When the handle is no longer necessary, destroy the AtomEx player with the ::criAtomExPlayer_Destroy function.
+ * . + *
The specific code is as follows:
+ * \code + * // User's memory allocation function + * void *user_malloc(void *obj, CriUint32 size) + * { + * void *mem; + * + * // Allocate memory + * mem = malloc(size); + * + * return (mem); + * } + * + * // User's memory release function + * void user_free(void *obj, void *mem) + * { + * // Release memory + * free(mem); + * + * return; + * } + * + * main() + * { + * CriAtomExPlayerConfig config; // configuration structure used for AtomEx player creation + * CriAtomExPlayerHn player; // AtomEx player handle + * : + * // Register user's memory allocator + * criAtomEx_SetUserAllocator(user_malloc, user_free, NULL); + * + * // Set the configuration structure used for AtomEx player creation + * criAtomExPlayer_SetDefaultConfig(&config); + * + * // Create AtomEx player + * // Specify NULL and 0 for the work buffer and its size + * // -> Allocate the required memory using the registered memory allocation function + * player = criAtomExPlayer_Create(&config, NULL, 0); + * : + * // Sound playback processing + * : + * // Destroy AtomEx player when it is no longer needed + * // -> The memory allocated by the library when creating the AtomEx player is released. + * criAtomExPlayer_Destroy(player); + * : + * } + * \endcode + * *If memory the user-allocator functions were registered during the library initialization, they do mot need to be + * registered again when creating the AtomEx player.
+ *
+ * [Creating an AtomEx player with the Fixed Memory Method]
+ * When using the Fixed Memory method, the AtomEx player creation/destruction procedure is as follows:
+ * -# Set the parameters in the configuration structure used for the creation of the AtomEx player.
+ * -# Calculate the size of work buffer necessary to create the AtomEx player + * with the ::criAtomExPlayer_CalculateWorkSize function.
+ * -# Allocate a memory buffer of that size.
+ * -# Create the Atom Ex player by calling the ::criAtomExPlayer_Create function.
+ * (Specify the address of the allocated memory in work and its size in work_size.)
+ * -# When the handle is no longer necessary, destroy the AtomEx player with the ::criAtomExPlayer_Destroy function.
+ * -# Release the work buffer.
+ * . + *
The specific code is as follows:
+ * \code + * main() + * { + * CriAtomExPlayerConfig config; // configuration structure used for AtomEx player creation + * CriAtomExPlayerHn player; // AtomEx player handle + * void *work; // Work buffer address + * CriSint32 work_size; // Work buffer size + * : + * // Set the configuration structure used for AtomEx player creation + * criAtomExPlayer_SetDefaultConfig(&config); + * + * // Calculate the size of the work buffer necessary to create the AtomEx player + * work_size = criAtomExPlayer_CalculateWorkSize(&config); + * + * // Allocate the memory for the work buffer + * work = malloc((size_t)work_size); + * + * // Create the AtomEx player + * // Specify the address of the work buffer and its size + * // -> use provided buffer + * player = criAtomExPlayer_Create(&config, work, work_size); + * : + * // Sound playback processing + * // -> Allocated memory is retained during this time + * : + * // Destroy the AtomEx player when it is no longer needed + * criAtomExPlayer_Destroy(player); + * + * // Release the work buffer when no longer necessary + * free(work); + * : + * } + * \endcode + * When you call the ::criAtomExPlayer_Create function, an AtomEx player is created + * and a handle (::CriAtomExPlayerHn ) to control it is returned.
+ * All operations, such as setting the audio data to play, starting the playback and acquiring the playback status, are performed on the player + * through this handle.
+ *
+ * If the player creation fails, this function returns NULL.
+ * To know the reason of the failure, refer to the error callback message.
+ *
+ * The procedure to play the sound data using the AtomEx player handle is as follows:
+ * -# Use the ::criAtomExPlayer_SetData function to specify the audio data to play to the AtomEx player.
+ * (For file playback, use the ::criAtomExPlayer_SetFile or the ::criAtomExPlayer_SetContentId functions.)
+ * -# Start the playback with the ::criAtomExPlayer_Start function.
+ * \par Remarks: + * The information in the configuration structure is only used during the initialization and is + * not referenced after that. Therefore, it is safe to release it once the function has returned. + * \attention + * You must initialize the library before calling this function.
+ *
+ * This is a blocking function.
+ * The actual time required to create an AtomEx player varies depending on the platform.
+ * If this function is executed during a game loop or when regular graphic updates are expected, + * since processing will be blocked by the millisecond frames may be dropped.
+ * Create or destroy an AtomEx player only when a fluctuation in load is acceptable, + * for example when loading a game level.
+ * \sa CriAtomExPlayerConfig, criAtomExPlayer_CalculateWorkSize, + * CriAtomExPlayerHn, criAtomExPlayer_Destroy, + * criAtomExPlayer_SetData, criAtomExPlayer_SetFile, criAtomExPlayer_SetContentId, + * criAtomExPlayer_Start + */ +CriAtomExPlayerHn CRIAPI criAtomExPlayer_Create( + const CriAtomExPlayerConfig *config, void *work, CriSint32 work_size); + +/*EN + * \brief Destroy an AtomEx player + * \ingroup ATOMExLIB_PLAYER + * \param[in] player AtomEx player handle + * \par Description: + * Destroys an AtomEx player.
+ * The memory allocated when you created the AtomEx player is released when you execute this function.
+ * The AtomEx player handle specified as argument becomes invalid.
+ * \attention + * This is a blocking function.
+ * If you attempt to destroy the AtomEx player while playing a sound, + * resources will be released after the playback is stopped within this function.
+ * (If you are playing from a file, the function will also have to wait for loading completion.)
+ * Therefore, processing may be blocked for an extended time (a few frames) within this function.
+ * Create or destroy an AtomEx player only when a fluctuation in load is acceptable, + * for example when loading a game level.
+ * \sa criAtomExPlayer_Create, CriAtomExPlayerHn + */ +void CRIAPI criAtomExPlayer_Destroy(CriAtomExPlayerHn player); + +/*EN + * \brief Set the sound data to play (specifying a Cue ID) + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] acb_hn ACB handle + * \param[in] id Cue ID + * \par Description: + * Associates a Cue ID to an AtomEx player.
+ * After specifying a Cue ID with this function, call the ::criAtomExPlayer_Start function to start the playback of + * the specified Cue. + * \par Example: + * \code + * main() + * { + * : + * // Set the sound data to play + * criAtomExPlayer_SetCueId(player, acb_hn, 100); + * + * // Play the sound data + * criAtomExPlayer_Start(player); + * : + * } + * \endcode + * Note that once the data has been set, it is retained within the AtomEx player until some other data + * is set.
+ * Therefore, if you want to repeatedly play the same sound data, you do not need to set the data again each time + * you play. + * \par Remarks: + * When you specify NULL as the second argument ( ach_hn ), all loaded ACBs are tested for a match with + * the specified Cue ID.
+ * (When an ACB with the specified Cue ID is found, + * the Cue of that ACB data is set in the player.)
+ * During this operation, the order of search is the reverse of the ACB loading order.
+ * (Search is performed starting from the data loaded the most recently.)
+ *
+ * If you set the Cue with the ::criAtomExPlayer_SetCueId function, the parameters specified with the following functions + * are ignored:
+ * - ::criAtomExPlayer_SetFormat + * - ::criAtomExPlayer_SetNumChannels + * - ::criAtomExPlayer_SetSamplingRate + * . + * (The sound format, number of channels and sampling rate are + * set automatically based on the data in the ACB file.)
+ * \sa criAtomExPlayer_Start + */ +void CRIAPI criAtomExPlayer_SetCueId( + CriAtomExPlayerHn player, CriAtomExAcbHn acb_hn, CriAtomExCueId id); + +/*EN + * \brief Set the sound data to play (specifying a Cue name) + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] acb_hn ACB handle + * \param[in] cue_name Cue name + * Associates a Cue name to an AtomEx player.
+ * After specifying a Cue name with this function, call the ::criAtomExPlayer_Start function to start the playback of + * the specified Cue. + * \par Example: + * \code + * main() + * { + * : + * // Set the sound data to play + * criAtomExPlayer_SetCueName(player, acb_hn, "gun_shot"); + * + * // Play the sound data + * criAtomExPlayer_Start(player); + * : + * } + * \endcode + * Note that once the data has been set, it is retained within the AtomEx player until some other data + * is set.
+ * Therefore, if you want to repeatedly play the same sound data, you do not need to set the data again each time + * you play. + * \par Remarks: + * When you specify NULL as the second argument ( ach_hn ), all loaded ACBs are tested for a match with + * the specified Cue name.
+ * (When an ACB with the specified Cue name is found, + * the Cue of that ACB data is set in the player.)
+ * During this operation, the order of search is the reverse of the ACB loading order.
+ * (Search is performed starting from the data loaded the most recently.)
+ *
+ * If you set the Cue with the ::criAtomExPlayer_SetCueName function, the parameters specified with the following functions + * are ignored:
+ * - ::criAtomExPlayer_SetFormat + * - ::criAtomExPlayer_SetNumChannels + * - ::criAtomExPlayer_SetSamplingRate + * . + * (The sound format, number of channels and sampling rate are + * set automatically based on the data in the ACB file.)
+ * \sa criAtomExPlayer_Start + */ +void CRIAPI criAtomExPlayer_SetCueName( + CriAtomExPlayerHn player, CriAtomExAcbHn acb_hn, const CriChar8 *cue_name); + +/*EN + * \brief Set the sound data to play (specifying a Cue index) + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] acb_hn ACB handle + * \param[in] index Cue index + * Associates a Cue index to an AtomEx player.
+ * After specifying a Cue index with this function, call the ::criAtomExPlayer_Start function to start the playback of + * the specified Cue. + * \par Example: + * \code + * main() + * { + * : + * // Set the sound data to play + * criAtomExPlayer_SetCueIndex(player, acb_hn, 300); + * + * // Play the sound data + * criAtomExPlayer_Start(player); + * : + * } + * \endcode + * Note that once the data has been set, it is retained within the AtomEx player until some other data + * is set.
+ * Therefore, if you want to repeatedly play the same sound data, you do not need to set the data again each time + * you play. + * \par Remarks: + * When you specify NULL as the second argument ( ach_hn ), all loaded ACBs are tested for a match with + * the specified Cue index.
+ * (When an ACB with the specified Cue index is found, + * the Cue of that ACB data is set in the player.)
+ * During this operation, the order of search is the reverse of the ACB loading order.
+ * (Search is performed starting from the data loaded the most recently.)
+ *
+ * If you set the Cue with the ::criAtomExPlayer_SetCueIndex function, the parameters specified with the following functions + * are ignored:
+ * - ::criAtomExPlayer_SetFormat + * - ::criAtomExPlayer_SetNumChannels + * - ::criAtomExPlayer_SetSamplingRate + * . + * (The sound format, number of channels and sampling rate are + * set automatically based on the data in the ACB file.)
+ *
+ * Using this function, it is possible to associate a sound to the player + * without specifying a Cue name or a Cue ID.
+ * (It can be used for debugging purposes since you can play a sound from the + * ACB file even if you do not know the Cue name and the Cue ID.)
+ * \sa criAtomExPlayer_Start + */ +void CRIAPI criAtomExPlayer_SetCueIndex( + CriAtomExPlayerHn player, CriAtomExAcbHn acb_hn, CriAtomExCueIndex index); + +/*EN + * \brief Set the sound data to play (specifying in-memory data) + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] buffer buffer address + * \param[in] size buffer size + * \par Description: + * Associates the sound data in memory to an AtomEx player.
+ * Specify the address and size of the buffer containing the sound data with this function, and then call the ::criAtomExPlayer_Start function + * to start the playback. + * \par Example: + * \code + * main() + * { + * : + * // Set the sound data to play + * criAtomExPlayer_SetData(player, buffer, buffer_size); + * + * // Specify the format of the sound data + * criAtomExPlayer_SetFormat(player, CRIATOMEX_FORMAT_ADX); + * criAtomExPlayer_SetNumChannels(player, 1); + * criAtomExPlayer_SetSamplingRate(player, 24000); + * + * // Play the sound data + * criAtomExPlayer_Start(player); + * : + * } + * \endcode + * Note that once the data has been set, it is retained within the AtomEx player until some other data + * is set.
+ * Therefore, if you want to repeatedly play the same sound data, you do not need to set the data again each time + * you play. + * \attention + * The player only stores the address and the size of the buffer.
+ * (The data inside the buffer is not copied.)
+ * Therefore, the buffer must be maintained by the application + * until its playback is finished.
+ *
+ * Even if you stop the AtomEx player playing memory, + * there is still a possibility that a voice referencing the memory area exists in the library.
+ * To release the memory area set by this function, execute the ::criAtomEx_IsDataPlaying function + * beforehand to check that the memory area is not referenced anymore. + *
+ * When setting the sound data with this function, you must also call the following functions to + * specify its format, number of channels and sampling rate:
+ * - ::criAtomExPlayer_SetFormat + * - ::criAtomExPlayer_SetNumChannels + * - ::criAtomExPlayer_SetSamplingRate + * . + * \sa criAtomExPlayer_SetFormat, criAtomExPlayer_Start, criAtomEx_IsDataPlaying + */ +void CRIAPI criAtomExPlayer_SetData( + CriAtomExPlayerHn player, void *buffer, CriSint32 size); + +/*EN + * \brief Set the sound data to play (specifying a file name) + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] binder binder handle + * \param[in] path file path + * \par Description: + * Associates a sound file to an AtomEx player.
+ * After passing a file to this function, call the ::criAtomExPlayer_Start function to start the streaming playback of + * that file.
+ * Note that file loading is not started when you execute this function.
+ * It is actually started when you call the ::criAtomExPlayer_Start function.
+ * \par Example: + * \code + * main() + * { + * : + * // Set the sound file to play + * criAtomExPlayer_SetFile(player, NULL, "sample.hca"); + * + * // Specify the format of the sound data + * criAtomExPlayer_SetFormat(player, CRIATOMEX_FORMAT_HCA); + * criAtomExPlayer_SetNumChannels(player, 2); + * criAtomExPlayer_SetSamplingRate(player, 48000); + * + * // Play the sound data + * criAtomExPlayer_Start(player); + * : + * } + * \endcode + * Note that once the file has been set, the data is retained within the AtomEx player until some other data + * is set.
+ * Therefore, if you want to repeatedly play the same sound data, you do not need to set the data again each time + * you play. + * \par Note: + * Specify NULL when the data is not packed to CPK.
+ * \attention + * When you execute the ::criAtomExPlayer_SetFile function, + * the specified path is stored within the AtomEx player.
+ * By default, the AtomEx player allocates enough memory to store only one file path (in order to save memory.)
+ * If you want to set another file to the AtomEx player while you are already playing one, + * two paths will need to be stored.
+ * In that case, you must specify a larger + * value for max_path_strings when you create the player.
+ * The AtomEx player can store max_path_strings paths simultaneously.
+ * (By specifying a value equal to or larger than two for max_path_strings, + * it is possible to play back multiple files at the same time by specifying their paths.)
+ * Note that the size of the work buffer required increases based on the value of max_path_strings.
+ *
+ * When setting the sound data with this function, you must also call the following functions to + * specify its format, number of channels and sampling rate:
+ * - ::criAtomExPlayer_SetFormat + * - ::criAtomExPlayer_SetNumChannels + * - ::criAtomExPlayer_SetSamplingRate + * . + * \sa CriAtomExPlayerConfig, criAtomExPlayer_Create, criAtomExPlayer_Start + */ +void CRIAPI criAtomExPlayer_SetFile( + CriAtomExPlayerHn player, CriFsBinderHn binder, const CriChar8 *path); + +/*EN + * \brief Set the sound data to play (specifying a CPK content ID) + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] binder binder handle + * \param[in] id content ID + * \par Description: + * Associates content to an AtomEx player.
+ * This function is used to play back a content file in a CPK file using the CRI File System library. + * The file is specified by its ID.
+ * After passing a binder and a content ID to this function, call the ::criAtomExPlayer_Start function to start the streaming playback of + * the content file.
+ * Note that file loading is not started when you execute this function.
+ * It is actually started when you call the ::criAtomExPlayer_Start function.
+ * \par Example: + * \code + * main() + * { + * : + * // Bind the CPK file + * criFsBinder_BindCpk(binder, "sample.cpk", work, work_size, &bind_id); + * + * // Wait for the completion of the binding + * for (;;) { + * // Check the status + * criFsBinder_GetStatus(binder, &status); + * if (status == CRIFSBINDER_STATUS_COMPLETE) { + * break; + * } + * + * // Execute server processing + * criFs_ExecuteMain(); + * + * // Wait for Vsync etc. + * : + * } + * : + * // Set the sound file to play + * // Set the first content in sample.cpk + * criAtomExPlayer_SetContentId(player, binder, 1); + * + * // Specify the format of the sound data to play + * criAtomExPlayer_SetFormat(player, CRIATOMEX_FORMAT_ADX); + * criAtomExPlayer_SetNumChannels(player, 2); + * criAtomExPlayer_SetSamplingRate(player, 44100); + * + * // Play the sound data + * criAtomExPlayer_Start(player); + * : + * } + * \endcode + * Note that once the file has been set, the data is retained within the AtomEx player until some other data + * is set.
+ * Therefore, if you want to repeatedly play the same sound data, you do not need to set the data again each time + * you play. + * \par Note: + * Specify NULL when the data is not packed to CPK.
+ * \attention + * When setting the sound data with this function, you must also call the following functions to + * specify its format, number of channels and sampling rate:
+ * - ::criAtomExPlayer_SetFormat + * - ::criAtomExPlayer_SetNumChannels + * - ::criAtomExPlayer_SetSamplingRate + * . + * \sa CriAtomExPlayerConfig, criAtomExPlayer_Create, criAtomExPlayer_Start + */ +void CRIAPI criAtomExPlayer_SetContentId( + CriAtomExPlayerHn player, CriFsBinderHn binder, CriSint32 id); + +/*EN + * \brief Set the wave data to play (specifying a wave data ID) + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] awb AWB handle + * \param[in] id wave data ID + * \par Description: + * Associates wave data to an AtomEx player.
+ * After passing an AWB handle and a wave data ID to this function, call the ::criAtomExPlayer_Start function to start the streaming playback of + * the specified wave data.
+ * Note that file loading is not started when you execute this function.
+ * It is actually started when you call the ::criAtomExPlayer_Start function.
+ * \par Example: + * \code + * main() + * { + * : + * // Create an AWB handle by loading the AWB TOC information + * awb = criAtomAwb_LoadToc(NULL, "sample.awb", NULL, 0); + * : + * // Set the wave data + * // (Select the first wave data in the AWB) + * criAtomExPlayer_SetWaveId(player, awb, 1); + * + * // Specify the format of the sound data to play + * criAtomExPlayer_SetFormat(player, CRIATOMEX_FORMAT_HCA_MX); + * criAtomExPlayer_SetNumChannels(player, 2); + * criAtomExPlayer_SetSamplingRate(player, 32000); + * + * // Play the sound data + * criAtomExPlayer_Start(player); + * : + * } + * \endcode + * Note that once the file has been set, the data is retained within the AtomEx player until some other data + * is set.
+ * Therefore, if you want to repeatedly play the same sound data, you do not need to set the data again each time + * you play. + * \attention + * When you set sound data in this function, + * use the function below to separately specify the information of the sound data to play.
+ * - ::criAtomExPlayer_SetFormat + * - ::criAtomExPlayer_SetNumChannels + * - ::criAtomExPlayer_SetSamplingRate *
+ * . + * Do not destroy data with the ::criAtomAwb_Release function while playing the sound that was set with this function.
+ * To destroy the AWB file, make sure that playback is stopped and execute the ::criAtomAwb_Release function.
+ * \sa CriAtomExPlayerConfig, criAtomExPlayer_Create, criAtomExPlayer_Start + */ +void CRIAPI criAtomExPlayer_SetWaveId( + CriAtomExPlayerHn player, CriAtomAwbHn awb, CriAtomExWaveId id); + +/*EN + * \brief Start the playback + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \return CriAtomExPlaybackId playback ID + * \par Description: + * Starts the playback of the sound data.
+ * Before executing this function, you must call ::criAtomExPlayer_SetData + * to specify the sound data to be played by the AtomEx player.
+ * For example, when playing in-memory sound data, you must use the + * ::criAtomExPlayer_SetData function as follows:
+ * \code + * main() + * { + * : + * // Set the sound data + * criAtomExPlayer_SetData(player, buffer, buffer_size); + * + * // Specify the format of the sound data to play + * criAtomExPlayer_SetFormat(player, CRIATOMEX_FORMAT_HCA_MX); + * criAtomExPlayer_SetNumChannels(player, 1); + * criAtomExPlayer_SetSamplingRate(player, 24000); + * + * // Play the sound data + * criAtomExPlayer_Start(player); + * : + * } + * \endcode + * After executing this function, you can check the progress of the playback (e.g. if it has actually started or has completed) + * by calling the ::criAtomExPlayer_GetStatus function.
+ * The ::criAtomExPlayer_GetStatus function returns five types of status.
+ * -# CRIATOMEXPLAYER_STATUS_STOP + * -# CRIATOMEXPLAYER_STATUS_PREP + * -# CRIATOMEXPLAYER_STATUS_PLAYING + * -# CRIATOMEXPLAYER_STATUS_PLAYEND + * -# CRIATOMEXPLAYER_STATUS_ERROR + * . + * When an AtomEx player is created, it has the stopped status ( CRIATOMEXPLAYER_STATUS_STOP ).
+ * After having specified the sound data to play, the AtomEx player status changes to + * the preparation status ( CRIATOMEXPLAYER_STATUS_PREP ) when this function is executed.
+ * (In CRIATOMEXPLAYER_STATUS_PREP status, the player is waiting to receive data or start decoding.)
+ * When there is sufficient data to start playing, the AtomEx player status changes to the + * playing status ( CRIATOMEXPLAYER_STATUS_PLAYING ) and the sound output starts.
+ * When the playback of all the data completes, the AtomEx player status changes to the play end status + * ( CRIATOMEXPLAYER_STATUS_PLAYEND ).
+ * If an error occurs during playback, the AtomEx player status changes to + * ( CRIATOMEXPLAYER_STATUS_ERROR ).
+ *
+ * By checking the status of the AtomEx player and switching the process accordingly, + * it is possble to write a program that takes action based on the sound playback.
+ * For example, the following code can be used to wait for the sound playback to complete before continuing. + * \code + * main() + * { + * : + * // Set the sound data to play + * criAtomExPlayer_SetData(player, buffer, buffer_size); + * + * // Specify the format of the sound data + * criAtomExPlayer_SetFormat(player, CRIATOMEX_FORMAT_ADX); + * criAtomExPlayer_SetNumChannels(player, 1); + * criAtomExPlayer_SetSamplingRate(player, 22050); + * + * // Play the sound data + * criAtomExPlayer_Start(player); + * + * // Wait for playback completion + * for (;;) { + * // Get the status + * status = criAtomExPlayer_GetStatus(player); + * + * // Check the status + * if (status == CRIATOMEXPLAYER_STATUS_PLAYEND) { + * // Exit the loop when the playback is complete + * break; + * } + * + * // Execute the server processing + * criAtomEx_ExecuteMain(); + * + * // Refresh the screen display etc. + * : + * } + * : + * } + * \endcode + * \par Remarks: + * If the sound resources cannot be allocated during this function execution + * (for example when all voices are in use and no voice can be stolen), + * CRIATOMEX_INVALID_PLAYBACK_ID is returned.
+ * However, in most cases, there is no need to check the error from the return code.
+ * Indeed, if you pass CRIATOMEX_INVALID_PLAYBACK_ID to a function that needs a playback ID ( ::CriAtomExPlaybackId ), + * the Atom library will simply do nothing.
+ * Therefore, you do not need to change the application processing according to the result of this function. + *
+ * (When CRIATOMEX_INVALID_PLAYBACK_ID is returned, no error callback occurs even if you perform the same processing as when + * a valid playback ID is returned.) + * \sa criAtomExPlayer_SetData, criAtomExPlayer_SetFile, criAtomExPlayer_GetStatus, + * criAtomExPlayer_Pause, criAtomEx_ExecuteMain + */ +CriAtomExPlaybackId CRIAPI criAtomExPlayer_Start(CriAtomExPlayerHn player); + +/*EN + * \brief Prepare the playback + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \return CriAtomExPlaybackId playback ID + * \par Description: + * Prepares the playback of sound data.
+ * Before executing this function, you must call the ::criAtomExPlayer_SetData function + * to specify the sound data to be played by the AtomEx player.
+ *
+ * This function starts the sound playback in paused mode.
+ * When the function is called, the resources required for the sound playback are allocated + * and the buffering (loading of the file to be streamed) starts. + * However, the playback does not start after the completion of the buffering + * (i.e. the playback stays paused even after it becomes possible to play the sound).
+ *
+ * In the case where there is only one sound to play back, this function behaves similarly to the following code.
+ * \code + * : + * // Set the player to paused status + * criAtomExPlayer_Pause(player, CRI_TRUE); + * + * // Start the sound playback + * id = criAtomExPlayer_Start(player); + * : + * \endcode + *
+ * In order to start the playback of a sound prepared by this function, + * pass the playback ID ( ::CriAtomExPlaybackId ) it returned + * and call ::criAtomExPlayback_Pause(id, CRI_FALSE);
+ * \par Remarks: + * In streaming playback, when you call the ::criAtomExPlayer_Start function, + * there is a time lag before the sound is actually played back.
+ * (This is because the buffering of the sound data takes some time.)
+ *
+ * By performing the following operations, you can control the timing of the start of the playback + * even when streaming: + * -# Prepare the playback using the ::criAtomExPlayer_Prepare function. + * -# Check the status of the playback ID acquired at step 1, using the ::criAtomExPlayback_GetStatus function. + * -# Resume the playback by calling the ::criAtomExPlayback_Pause function when the status becomes ::CRIATOMEXPLAYBACK_STATUS_PLAYING. + * -# After resuming, the playback will start (the next time the server process is called). + * . + * The specific code is as follows:
+ * \code + * main() + * { + * : + * // Set the sound data to play + * criAtomExPlayer_SetFile(player, NULL, "sample.adx"); + * + * // Specify the format of the sound data + * criAtomExPlayer_SetFormat(player, CRIATOMEX_FORMAT_ADX); + * criAtomExPlayer_SetNumChannels(player, 2); + * criAtomExPlayer_SetSamplingRate(player, 48000); + * + * // Start preparing the playback of the sound data + * playback_id = criAtomExPlayer_Prepare(player); + * : + * // Wait until it is possible to start the playback + * for (;;) { + * // Check the playback status + * playback_status = criAtomExPlayback_GetStatus(playback_id); + * if (playback_status == CRIATOMEXPLAYBACK_STATUS_PLAYING) { + * // Exit the loop when the status becomes "PLAYING" + * break; + * } + * + * // Execute the server processing + * criAtomEx_ExecuteMain(); + * + * // Refresh screen display etc. + * : + * } + * + * // Resume + * criAtomExPlayback_Pause(playback_id, CRI_FALSE); + * : + * } + * \endcode + * When using the ::criAtomExPlayback_Pause function to resume, + * both the pause from playback preparation (by this function) and + * the pause from playback suspension (by the ::criAtomExPlayer_Pause function) + * are released.
+ * To play back the sound prepared by this function while pausing the sound + * by the ::criAtomExPlayer_Pause function, use the ::criAtomExPlayer_Resume + * function (or the ::criAtomExPlayback_Resume function).
+ * \sa criAtomExPlayback_GetStatus, criAtomExPlayback_Pause + */ +CriAtomExPlaybackId CRIAPI criAtomExPlayer_Prepare(CriAtomExPlayerHn player); + +/*EN + * \brief Stop the playback + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \par Description: + * Issues a request to stop the the playback.
+ * When you execute this function on an AtomEx player that is playing a sound, + * the AtomEx player stops playback (stops reading the file and outputting sound) and switch + * to the stopped state (CRIATOMEXPLAYER_STATUS_STOP).
+ * \par Remarks: + * If you execute this function on an AtomEx player that is already stopped (i.e. an AtomEx player with + * the CRIATOMEXPLAYER_STATUS_PLAYEND or the CRIATOMEXPLAYER_STATUS_ERROR status), + * the AtomEx player changes its status to CRIATOMEXPLAYER_STATUS_STOP. + * \attention + * This function is not a blocking function.
+ * Therefore, processing is not blocked in the function for a long time. + * However, note that playback may be in progress when the function is finished.
+ * (It may take some time until playback is stopped.)
+ * If the stop of playback must be guaranteed, + * make sure that the AtomEx player is in the stop status (CRIATOMEXPLAYER_STATUS_STOP) + * after calling this function. + * \sa criAtomExPlayer_Start, criAtomExPlayer_GetStatus + */ +void CRIAPI criAtomExPlayer_Stop(CriAtomExPlayerHn player); + +/*EN + * \brief Stop the playback (ignoring release time) + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \par Description: + * Issues a request to stop the the playback.
+ * This function stops the sound immediately, even when a release time is + * set for the envelope.
+ * When you execute this function on an AtomEx player that is playing a sound, + * the AtomEx player stops playback (stops reading the file and outputting sound) and switch + * to the stopped state (CRIATOMEXPLAYER_STATUS_STOP).
+ * \par Remarks: + * If you execute this function on an AtomEx player that is already stopped (i.e. an AtomEx player with + * the CRIATOMEXPLAYER_STATUS_PLAYEND or the CRIATOMEXPLAYER_STATUS_ERROR status), + * the AtomEx player changes its status to CRIATOMEXPLAYER_STATUS_STOP. + * \attention + * This function is not a blocking function.
+ * Therefore, processing is not blocked in the function for a long time. + * However, note that playback may be in progress when the function is finished.
+ * (It may take some time until playback is stopped.)
+ * If the stop of playback must be guaranteed, + * make sure that the AtomEx player is in the stop status (CRIATOMEXPLAYER_STATUS_STOP) + * after calling this function. + * \sa criAtomExPlayer_Start, criAtomExPlayer_GetStatus + */ +void CRIAPI criAtomExPlayer_StopWithoutReleaseTime(CriAtomExPlayerHn player); + +/*EN + * \brief Stopping playback in all the players + * \ingroup ATOMEXLIB_PLAYER + * \par Description: + * Issues a playback stop request to all the AtomEx players.
+ * When you execute this function, the AtomEx players stop playback (loading files and playing sounds) and + * move to the stop status (CRIATOMEXPLAYER_STATUS_STOP).
+ * \par Note: + * If you execute this function to an AtomEx player that is already stopped (CRIATOMEXPLAYER_STATUS_PLAYEND or + * CRIATOMEXPLAYER_STATUS_ERROR status), + * its status changes to CRIATOMEXPLAYER_STATUS_STOP. + * \attention + * This function is not a blocking function.
+ * Therefore, processing is not blocked in the function for a long time. + * However, note that playback may be in progress when the function is finished.
+ * (It may take some time until playback is stopped.)
+ * If the stop of playback must be guaranteed, + * make sure that the AtomEx player is in the stop status (CRIATOMEXPLAYER_STATUS_STOP) + * after calling this function. + * \sa criAtomExPlayer_Start, criAtomExPlayer_GetStatus + */ +void CRIAPI criAtomExPlayer_StopAllPlayers(void); + +/*EN + * \brief Stopping playback in all the players (release time ignored) + * \ingroup ATOMEXLIB_PLAYER + * \par Description: + * Issues a playback stop request to all the AtomEx players.
+ * In this case, even if the release time for the envelope is set for sound that is being played, + * it is ignored and playback is stopped.
+ * When you execute this function, the AtomEx players stop playback (loading files and playing sounds) and + * move to the stop status (CRIATOMEXPLAYER_STATUS_STOP).
+ * \par Note: + * If you execute this function to an AtomEx player that is already stopped (CRIATOMEXPLAYER_STATUS_PLAYEND or + * CRIATOMEXPLAYER_STATUS_ERROR status), + * its status changes to CRIATOMEXPLAYER_STATUS_STOP. + * \attention + * This function is not a blocking function.
+ * Therefore, processing is not blocked in the function for a long time. + * However, note that playback may be in progress when the function is finished.
+ * (It may take some time until playback is stopped.)
+ * If the stop of playback must be guaranteed, + * make sure that the AtomEx player is in the stop status (CRIATOMEXPLAYER_STATUS_STOP) + * after calling this function. + * \sa criAtomExPlayer_Start, criAtomExPlayer_GetStatus + */ +void CRIAPI criAtomExPlayer_StopAllPlayersWithoutReleaseTime(void); + +/*EN + * \brief Enumerating players + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] func Player callback function + * \param[in] obj User specified object + * \par Description: + * Enumerates the players allocated in the application.
+ *
+ * When you execute this function, the callback functions specified at the first argument (func) + * that are as many as the number of the AtomEx players are called.
+ * (An AtomEx player handle is passed to the callback function as an argument.)
+ * \par Note: + * The value that is set at the second argument (obj) is passed as an argument of the callback function.
+ * For other arguments of the callback function, + * refer to the description of ::CriAtomExPlayerCbFunc.
+ *
+ * By specifying NULL for func, you can unregister the registered function.
+ * \sa CriAtomExVoiceInfoCbFunc + */ +void CRIAPI criAtomExPlayer_EnumeratePlayers(CriAtomExPlayerCbFunc func, void *obj); + +/*EN + * \brief Pause/resume + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] sw switch (CRI_FALSE = Resume, CRI_TRUE = Pause) + * \par Description: + * Pauses or resumes playback.
+ * When you call this function by passing CRI_TRUE in sw, the AtomEX player pauses + * the output of sound being played.
+ * If you call it and pass CRI_FALSE in sw, the AtomEX player resumes + * the playback of paused sound.
+ * \par Remarks: + * The default status (i.e. the status immediately after the creation of a player) is resumed.
+ * \attention + * If you release the pause by passing CRI_FALSE, + * not only sounds paused by this function but also sounds in playback + * preparation (after the ::criAtomExPlayer_Prepare was called) will start to play.
+ * (This is done to maintain compatibility with older versions.)
+ * If you want to release the pause only for the sounds paused by this function, + * execute the following code instead:
+ * - criAtomExPlayer_Resume(player, CRIATOMEX_RESUME_PAUSED_PLAYBACK);
+ *
+ * By executing this function, all sounds played by the player + * are paused/resumed.
+ * In order to individually pause/resume each sound being played, + * call the ::criAtomExPlayback_Pause function. + * \sa criAtomExPlayer_IsPaused, criAtomExPlayback_Pause, criAtomExPlayer_Resume + */ +void CRIAPI criAtomExPlayer_Pause(CriAtomExPlayerHn player, CriBool sw); + +/*EN + * \brief Resume + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] mode resume target + * \par Description: + * Resumes paused playback.
+ * Unlike the ::criAtomExPlayer_Pause function, this function can be used to independently resume the playback of either the audio set in the waiting state by the ::criAtomExPlayer_Prepare function + * or the audio paused by the ::criAtomExPlayer_Pause and ::criAtomExPlayback_Pause functions.
+ *
+ * If you call this function with ::CRIATOMEX_RESUME_PAUSED_PLAYBACK for the second argument (mode), + * the audio playback paused by the ::criAtomExPlayer_Pause or the ::criAtomExPlayback_Pause + * functions is resumed.
+ * If you specifiy ::CRIATOMEX_RESUME_PREPARED_PLAYBACK for the second argument (mode), + * the audio prepared using the ::criAtomExPlayer_Prepare function will play.
+ *
+ * When the ::criAtomExPlayer_Prepare function is used to prepare the playback on a player itself paused by the ::criAtomExPlayer_Pause function, + * two calls to the resume function, one passing ::CRIATOMEX_RESUME_PAUSED_PLAYBACK and the other passing ::CRIATOMEX_RESUME_PREPARED_PLAYBACK, are needed + * to resume the playback.
+ * \par Remarks: + * Regardless of whether the ::criAtomExPlayer_Pause function or ::criAtomExPlayer_Prepare function is used, + * playback can always be started by specifying ::CRIATOMEX_RESUME_ALL_PLAYBACK for the second argument (mode) + * of this function, or by calling criAtomExPlayer_Pause(player, CRI_FALSE);.
+ * \attention + * Executing this function will resume playback of "all" sounds played by + * the player.
+ * To resume the playback of each sound individually, + * use the ::criAtomExPlayback_Resume function instead. + * \sa criAtomExPlayback_Resume, criAtomExPlayer_Pause + */ +void CRIAPI criAtomExPlayer_Resume(CriAtomExPlayerHn player, CriAtomExResumeMode mode); + +/*EN + * \brief Get the pause status + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \return CriBool pause status (CRI_FALSE = not paused, CRI_TRUE = paused) + * \par Description: + * Returns whether a player is paused or not.
+ * \attention + * This function returns CRI_TRUE only when all sounds on the player are paused.
+ * It will return CRI_FALSE if an individual sound was resumed (by passing its playback ID + * to the ::criAtomExPlayback_Pause function) after calling ::criAtomExPlayer_Pause.
+ *
+ * This function does not differentiate between sounds paused by the ::criAtomExPlayer_Pause + * function and sounds paused by the ::criAtomExPlayer_Prepare function.
+ * (The function only determines if all sounds are paused, regardless of the method used.)
+ * \sa criAtomExPlayer_Pause, criAtomExPlayback_Pause + */ +CriBool CRIAPI criAtomExPlayer_IsPaused(CriAtomExPlayerHn player); + +/*EN + * \brief Get the player status + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \return CriAtomExPlayerStatus status + * \par Description: + * Gets the status of an AtomEx player.
+ * The status indicates in what mode is the AtomEx player. It can have the following five values:
+ * -# CRIATOMEXPLAYER_STATUS_STOP + * -# CRIATOMEXPLAYER_STATUS_PREP + * -# CRIATOMEXPLAYER_STATUS_PLAYING + * -# CRIATOMEXPLAYER_STATUS_PLAYEND + * -# CRIATOMEXPLAYER_STATUS_ERROR + * . + * When an AtomEx player is created, its status is stopped ( CRIATOMEXPLAYER_STATUS_STOP ).
+ * Once the sound data to play has been specified, a call to the ::criAtomExPlayer_Start function will change + * the player status to preparation ( CRIATOMEXPLAYER_STATUS_PREP ).
+ * (In CRIATOMEXPLAYER_STATUS_PREP status, the player is waiting to receive data or to start decoding.)
+ * When there is enough data to start playing, the AtomEx player will switch to + * playing status ( CRIATOMEXPLAYER_STATUS_PLAYING ) and the sound output will start.
+ * When the playback has completed, the AtomEx player status changes to the play end status + * ( CRIATOMEXPLAYER_STATUS_PLAYEND ).
+ * If an error occurs during playback, the AtomEx player status changes to + * ( CRIATOMEXPLAYER_STATUS_ERROR ).
+ *
+ * By checking the status of the AtomEx player and switching the process accordingly, + * it is possble to write a program that takes action based on the sound playback.
+ * For example, the following code can be used to wait for the sound playback to complete before continuing. + * \code + * main() + * { + * : + * // Set the sound data to play + * criAtomExPlayer_SetData(player, buffer, buffer_size); + * + * // Specify the format of the sound data + * criAtomExPlayer_SetFormat(player, CRIATOMEX_FORMAT_ADX); + * criAtomExPlayer_SetNumChannels(player, 1); + * criAtomExPlayer_SetSamplingRate(player, 24000); + * + * // Play the sound data + * criAtomExPlayer_Start(player); + * + * // Wait for the playback completion + * for (;;) { + * // Get the status + * status = criAtomExPlayer_GetStatus(player); + * + * // Check the status + * if (status == CRIATOMEXPLAYER_STATUS_PLAYEND) { + * // Exit loop when the playback is complete + * break; + * } + * + * // Execute the server processing + * criAtomEx_ExecuteMain(); + * + * // Refresh screen display etc. + * : + * } + * : + * } + * \endcode + * \sa criAtomExPlayer_Start + */ +CriAtomExPlayerStatus CRIAPI criAtomExPlayer_GetStatus(CriAtomExPlayerHn player); + +/*EN + * \brief Get the number of sounds currently being played back + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \return CriSint32 number of sounds being played back + * \par Description: + * Gets the number of sounds currently being played by a player.
+ * \par Remarks: + * This function returns the number of sounds that have been started using the ::criAtomExPlayer_Start function and are currently being played back.
+ * (It is not the number of Voices currently in use: when a sequence with multiple waveforms is played it is only counted as one.)
+ * Use the ::criAtomExVoicePool_GetNumUsedVoices function if you want to get the number of Voices in use.
+ * \sa criAtomExPlayer_Start, criAtomExVoicePool_GetNumUsedVoices + */ +CriSint32 CRIAPI criAtomExPlayer_GetNumPlaybacks(CriAtomExPlayerHn player); + +/*EN + * \brief Get the playback ID of the last sound played + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEX player handle + * \return CriSint32 Playback ID + * \par Description: + * Gets the playback ID of the sound that was the last to be played on a player.
+ * \par Remarks: + * \sa criAtomExPlayer_Start + */ +CriAtomExPlaybackId CRIAPI criAtomExPlayer_GetLastPlaybackId(CriAtomExPlayerHn player); + +/*EN + * \brief Get the playback time + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \return Sint64 playback time (in milliseconds) + * \par Description: + * Gets the playback time of the last sound that was played by an AtomEx player.
+ *
+ * If the playback time was successfully acquired, this function returns 0 or a larger value.
+ * If the function failed to get playback time (for example if it could not get a Voice), it returns a negative value.
+ * \par Remarks: + * When multiple sounds are played using the same player and this function is called, it + * returns the playback time of the sound that was played last.
+ * If you want to check the playback time of multiple sounds, + * you have to create a player for each of them and then call the ::criAtomExPlayback_GetTime function on each player.
+ *
+ * The playback time returned by this function is the time elapsed since the start of playback.
+ * This means that it is never decremented according to the playback position, + * even when using looping playback or seamless concatenated playback.
+ *
+ * When the playback is paused using the ::criAtomExPlayer_Pause function, + * the incrementation of the playback time is also stopped.
+ * (The incrementation starts again when the playback is resumed.) + *
+ * The accuracy of the time that can be obtained by this function depends on the frequency of the server processing.
+ * (The time is updated during the server processing.)
+ * If you need a more accurate time, use the + * ::criAtomExPlayback_GetNumPlayedSamples function instead. + * It returns the exact number of samples that have been played.
+ * \attention + * Although the type of return value is CriSint64, the accuracy is currently limited to 32 bits.
+ * If you control the playback based on the playback time, note that the time becomes invalid after about 24 days.
+ * (Playback time overflows and becomes a negative value when it exceeds 2147483647 milliseconds.)
+ *
+ * When creating an AtomEx player, if you set updates_time in the ::CriAtomExPlayerConfig structure + * to CRI_FALSE, it will not be possible to get the playback time from the player.
+ *
+ * If the sound being played is stopped by the voice management, + * the counting of the playback time will be stopped at that point.
+ * In addition, if the voice management didn't allocate a Voice at the time of starting the playback, + * this function will not return a valid time.
+ * (A negative value will be returned.)
+ *
+ * Even if there is a media reading issue and the sound data is temporarily not supplied, + * the counting of the playback time will not stop.
+ * (The time will continue to be incremented even when the playback is stopped due to a discontinuation of the data supply.)
+ * Therefore, if you synchronize the sound with avideo based on the time acquired by this function, + * there will be an increasing loss of synchronization with each read-retry.
+ * If you have to strictly synchronize the wave data with video, use the + * ::criAtomExPlayback_GetNumPlayedSamples function instead. + * It will allow you to synchronize based on the number of samples that have been played.
+ * \sa criAtomExPlayback_GetTime, criAtomExPlayback_GetNumPlayedSamples + */ +CriSint64 CRIAPI criAtomExPlayer_GetTime(CriAtomExPlayerHn player); + +/*EN + * \brief Specify the format of a sound + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] format format + * \par Description: + * Specifies the format of a sound played back by an AtomEx player.
+ * When using the ::criAtomExPlayer_Start function for playback, the AtomEx player + * acquires a Voice from a Voice Pool capable of playing data in the specified format.
+ * The default format is ADX.
+ * \par Remarks: + * You only need to call this function when you play back sounds without using the information contained in an ACB file.
+ * When playing back a Cue, you do not have to call this function + * because the format is automatically obtained from the CueSheet.
+ */ +void CRIAPI criAtomExPlayer_SetFormat( + CriAtomExPlayerHn player, CriAtomExFormat format); + +/*EN + * \brief Specify the number of channels of a sound + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] num_channels number of channels + * \par Description: + * Specifies the number of channels of a sound played back by an AtomEx player.
+ * When using the ::criAtomExPlayer_Start function for playback, the AtomEx player + * acquires a Voice from a Voice Pool capable of playing data with the specified number of channels.
+ * The default number of channels is 2 (stereo).
+ * \par Remarks: + * You only need to call this function when you play back sounds without using the information contained in an ACB file.
+ * When playing back a Cue, you do not have to call this function + * because the format is automatically obtained from the CueSheet.
+ */ +void CRIAPI criAtomExPlayer_SetNumChannels( + CriAtomExPlayerHn player, CriSint32 num_channels); + +/*EN + * \brief Specify the sampling rate of a sound + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] sampling_rate sampling rate + * \par Description: + * Specifies the sampling rate of a sound played back by an AtomEx player.
+ * When using the ::criAtomExPlayer_Start function for playback, the AtomEx player + * acquires a Voice from a Voice Pool capable of playing data with the specified sampling rate.
+ * The default sampling rate is set to ::CRIATOM_DEFAULT_OUTPUT_SAMPLING_RATE.
+ * \par Remarks: + * You only need to call this function when you play back sounds without using the information contained in an ACB file.
+ * When playing back a Cue, you do not have to call this function + * because the format is automatically obtained from the CueSheet.
+ */ +void CRIAPI criAtomExPlayer_SetSamplingRate( + CriAtomExPlayerHn player, CriSint32 sampling_rate); + +/*EN + * \brief Specify the Sound renderer type + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] type Sound renderer type + * \par Description: + * Specifies the sound renderer used to output the sounds played back by the AtomEX player.
+ * When a sound is played via the ::criAtomExPlayer_Start function, the AtomEx player + * acquires a Voice from a Voice Pool that outputs the data to the specified sound renderer.
+ * The default value is ::CRIATOM_SOUND_RENDERER_ANY.
+ * \par Remarks: + * If ::CRIATOM_SOUND_RENDERER_ANY is specified, the first Voice Pool + * found will be used for sound playback, regardless of the voice output destination.
+ * \sa CriAtomSoundRendererType + */ +void CRIAPI criAtomExPlayer_SetSoundRendererType( + CriAtomExPlayerHn player, CriAtomSoundRendererType type); + +/*EN + * \brief Specify the group number + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] group_no group number + * \par Description: + * Specifies the Voice Limit Group from which a Voice is acquired when playing back a sound.
+ * When you pass ::CRIATOMEXPLAYER_NO_GROUP_LIMITATION for group_no, + * the player is not restricted by a Voice Limit Group.
+ * (A Voice is acquired irrespective of the Voice Limit Group when + * a Voice is available or when there is a Voice with a lower priority than itself.)
+ * \par Remarks: + * When the playback is started using the ::criAtomExPlayer_Start function, if all Voices + * in the specified Voice Limit Group are in use, whether the played-back sound is heard or not is determined by + * the voice priority control.
+ * (For details about voice priority, see the description of the ::criAtomExPlayer_SetVoicePriority function .)
+ *
+ * This function, when called while a Cue is being played, overrides the settings of the voice limit group set in the data (the setting value from the data is ignored) .
+ * However, if ::CRIATOMEXPLAYER_NO_GROUP_LIMITATION is specified for group_no, the voice limit group set on the data side is used. + * \sa CRIATOMEXPLAYER_NO_GROUP_LIMITATION, criAtomExPlayer_Start, criAtomExPlayer_SetVoicePriority, criAtomExPlayer_SetVoiceControlMethod + */ +void CRIAPI criAtomExPlayer_SetGroupNumber( + CriAtomExPlayerHn player, CriSint32 group_no); + +/*EN + * \brief Specifying a voice control method + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] method Voice control method + * \par Description: + * Sets a voice control method for an AtomEx player.
+ * If you set a voice control method using this function and then play sound using the ::criAtomExPlayer_Start function, + * the control method specified with this function is applied to the waveform data played with the player.
+ *
+ * The voice control method (method) can be one of the following:
+ * - CRIATOMEX_PREFER_LAST + * - CRIATOMEX_PREFER_FIRST + * - CRIATOMEX_PREFER_DATA + * . + *
+ * If a sound of the same priority as the voice that is being played is played when no voice is available, + * and CRIATOMEX_PREFER_LAST is specified as the voice control method, + * then the voice that is being played is stopped and playback of a new sound is started.
+ * If CRIATOMEX_PREFER_FIRST is specified under the same conditions, + * a new playback request is canceled, and playback of the existing voice is continued.
+ *
+ * If CRIATOMEX_PREFER_DATA is specified, + * the voice control method that is preset for the data (the value specified with the authoring tool) + * is used.
+ * If CRIATOMEX_PREFER_DATA is specified, but + * a voice control method is not specified for the data, as in single file playback, + * the voice is controlled on a last-come-first-served basis (CRIATOMEX_PREFER_LAST).
+ *
+ * The default value before executing this function is CRIATOMEX_PREFER_DATA. The method that is set for the data is used.
+ * \par Note: + * If an AtomEx player plays waveform data + * and the number of sounds in the voice limit group that the waveform data belongs to reaches the upper limit + * or all the voices in the voice pool are used, + * voices are controlled according to their priorities.
+ *
+ * The voice control method that is set with this function is used for sound control + * if the waveform data to play is the same as + * the waveform data that is being played in priority.
+ * (For more information about voice control according to voice priority, refer to the description of the ::criAtomExPlayer_SetVoicePriority + * function.)
+ * \sa criAtomExPlayer_Start, criAtomExPlayer_SetVoicePriority + */ +void CRIAPI criAtomExPlayer_SetVoiceControlMethod( + CriAtomExPlayerHn player, CriAtomExVoiceControlMethod method); + +/*EN + * \brief Specify the Voice Pool identifier + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] identifier Voice Pool identifier + * \par Description: + * Specifies the Voice Pool from which a Voice should be acquired when playing a sound.
+ * After calling this function, the player will only get Voices + * from the specified Voice Pool.
+ * \par Remarks: + * The default Voice Pool identifier is set to 0.
+ * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \sa CriAtomExStandardVoicePoolConfig, criAtomExVoicePool_AllocateStandardVoicePool + */ +void CRIAPI criAtomExPlayer_SetVoicePoolIdentifier( + CriAtomExPlayerHn player, CriAtomExVoicePoolIdentifier identifier); + +/*EN + * \brief Specify the mixer ID for HCA-MX decoding + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] mixer_id mixer ID + * \par Description: + * Specifies the mixer ID for HCA-MX decoding.
+ * \par Remarks: + * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \attention + * This function takes effect only when a HCA-MX Voice is used.
+ * (It is ignored when other types of Voices are used.)
+ *
+ * The mixer ID must be set before starting playback.
+ * You cannot modify the mixer ID of a sound which has already started to play.
+ * \sa CriAtomExHcaMxVoicePoolConfig, criAtomExVoicePool_AllocateHcaMxVoicePool + */ +void CRIAPI criAtomExPlayer_SetHcaMxMixerId(CriAtomExPlayerHn player, CriSint32 mixer_id); + +/*EN + * \brief Specifying the ASR rack ID + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] rack_id ASR rack ID + * \par Description: + * Specifies the ID of the voice output ASR rack.
+ * \par Remarks: + * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \attention + * This function takes effect only when ASR is used for the sound renderer type of the voice.
+ * (The settings for this function are ignored when other voices are used.)
+ *
+ * The ASR rack ID must be set before starting playback.
+ * You cannot modify the ASR rack ID for the sound for which playback has already started.
+ *
+ * For the sound data encoded for HCA-MX, the settings for this function are not applied.
+ * To set the ID of the output ASR rack for the sound data encoded for HCA-MX, + * use the ::criAtomExHcaMx_SetAsrRackId function to set the ID of the output ASR rack for the HCA-MX mixer.
+* \sa CriAtomExAsr_CreateRack, criAtomExHcaMx_SetAsrRackId + */ +void CRIAPI criAtomExPlayer_SetAsrRackId(CriAtomExPlayerHn player, CriSint32 rack_id); + +/*EN + * \brief Specifying multiple ASR rack IDs + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] rack_id_array ASR rack ID array + * \param[in] num_racks ASR rack ID count + * \par Description: + * Specify multiple destination ASR rack IDs for voice output.
+ * It is possible to specify as many ASR rack IDs defined for ::CRIATOMEXPLAYER_MAX_ASR_RACKS.
+ * When specifying a single ASR rack ID, it can also be specified by using the ::criAtomExPlayer_SetAsrRackId function. + * \par Remarks: + * This parameter is cleared by the ::criAtomExPlayer_ResetParameters function.
+ *
+ * When this function is called during cue playback, the ASR rack ID setting of the parameter palette set on the data side is overwritten (the setting value on the data side is ignored). + * \attention + * This function is effective only when ASR is used as the sound renderer type of voice.
+ * (When using another voice, the set value of this function is ignored.)
+ *
+ * The ASR rack ID must be set before starting playback.
+ * It is NOT possible to change the ASR rack ID later for the sound which has already started playback.
+ *
+ * When playing a player with multiple ASR rack IDs, the number of voices will be used as many as the specified ASR rack ID.
+ * Therefore, it is necessary to reserve the number of voices corresponding to the number of ASR rack IDs specified in advance.
+ *
+ * For playback other than cue playback using the ::criAtomExPlayer_SetData function etc, + * only the ASR rack ID stored in the element of the first (array index 0) among the multiple ASR rack IDs specified by this function applies It will be.
+ *
+ * If you execute this function after the ::criAtomExPlayer_SetAsrRackId function, + * the ASR rack ID setting set by the ::criAtomExPlayer_SetAsrRackId function is overwritten.
+ *
+ * This function setting is not applied to audio data encoded for HCA-MX.
+ * When setting the destination ASR rack ID for audio data encoded for HCA-MX, + * use the ::criAtomExHcaMx_SetAsrRackId function to set the destination ASR rack ID of the HCA-MX mixer itself.
+ * \sa criAtomExAsr_CreateRack, criAtomExPlayer_SetAsrRackId, criAtomExHcaMx_SetAsrRackId, criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_SetAsrRackIdArray( + CriAtomExPlayerHn player, const CriSint32 *rack_id_array, CriSint32 num_racks); + +/*EN + * \brief Specify the playback starting position + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] start_time_ms starting position (in milliseconds) of the playback + * \par Description: + * Specifies the starting position for the sound playback.
+ * If you want to start playing the sound data from another position that the beginning of the sound, + * you must call this function to specify that position (before starting playback).
+ *
+ * The starting position is specified in milliseconds.
+ * For example, if you set start_time_ms to 10000 when calling this function, + * the player will start playing from 10 seconds within the waveform. + * \par Remarks: + * Playing back from somewhere else than the beginning of the sound requires more time.
+ * This is because the system has to analyze the header of the sound data, jump to the specified position, + * and then re-read the data to start the playback. + * \attention + * Although it is possible to set a 64-bit value for start_time_ms, only 32 bits are taken into account.
+ *
+ * It is not possible to specify a playback starting position for some target-specific sound formats.
+ *
+ * Encrypted ADX data must be decrypted from the beginning.
+ * Therefore, when encrypted ADX data is played back from a given position, + * decryption up to that position will be required first, + * which may result in a high processing load.
+ *
+ * When you play back a sequence by specifying a starting position, the wavefdorm data + * placed before the specified position is not played.
+ * (Each waveform in the sequence is played from the starting position.)
+ */ +void CRIAPI criAtomExPlayer_SetStartTime( + CriAtomExPlayerHn player, CriSint64 start_time_ms); + +/*EN + * \brief Sets the sequence preparation time + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] seq_prep_time_ms Sequence preparation time (in milliseconds) + * \par Description: + * Specifies the amount of time allocated to the AtomEx player so it can prepare for the playback of a sequence. + * The individual sequence elements will actually start to play after that time.
+ * This can be used to reduce audio dropouts and prevent erroneous playback timing + * by loading files in advance. + *
+ * The preparation time is specified in milliseconds.
+ * For example, if this function is executed with a seq_prep_time_ms of 1000, + * playback preparation processing will be performed 1 second before the actual playback begins. + * \par Remarks: + * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \attention + * This function must be called before playback is started. If it is called after playback is started, the sequence that is being played is not affected. + * If sequence preparation time is set with this function, the sounds from the playback start position to the specified value of the sequence data are processed collectively + * when playback is started. Therefore, even if sounds are configured so that their playback timings are shifted, + * they are played in sync.
+ * Block transitions are also affected by the preparation time. + * For example, if the preparation time is set to 1 second and the next block index is specified during the playback of + * the current block, the transition will not occur for the next second and therefore may instead happen at the next transition time. + * \sa criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_SetSequencePrepareTime( + CriAtomExPlayerHn player, CriUint32 seq_prep_time_ms); + +/*EN + * \brief Setting the synchronous playback ID + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] playback_id ID of the target playback + * \par Description: + * Synchronizes the sound played in the AtomEx player with the sound of the specified playback ID.
+ * When you play a sound after setting the playback ID with this function, + * playback of the sound is started after seeking the same playback position as the specified playback ID.
+ * \par Note: + * If the target playback ID is invalid, playback is started at the beginning of the sound data.
+ * When you specify CRIATOMEX_INVALID_PLAYBACK_ID for playback_id, + * the playback ID is unregistered.
+ * \attention + * You can use this function only to play single waveform data.
+ * You cannot use it for sequence data.
+ * (When you use it for sequence data, + * it synchronizes the first waveform data that is found in the sequence.)
+ *
+ * This function can adjust the playback position only for the following codecs:
+ * - ADX + * - HCA + * - Wave + * . + *
+ * For other codecs, this function cannot provide synchronous playback.
+ * (This feature cannot be used for HCA-MX and sound codecs that perform hardware decoding.)
+ *
+ * This feature synchronizes the playback position on a sample basis whenever possible. + * We do not guarantee combination without an error of one sample.
+ * (Use this feature only when a difference of milliseconds is acceptable.)
+ * Accuracy of synchronization of the playback positions depends on platforms.
+ *
+ * You cannot use this function and the ::criAtomExPlayer_SetStartTime function at the same time.
+ * When you use this function, the playback start position of a sound is automatically adjusted in the library.
+ * Therefore, you cannot use this function and the ::criAtomExPlayer_SetStartTime function at the same time.
+ * (The settings for the ::criAtomExPlayer_SetStartTime function are ignored.)
+ *
+ * When you use this function for playback, a noise may occur when playback is started.
+ * When you use this feature, use fade-in whenever possible.
+ *
+ * When you use this function for cue playback, you cannot acquire correct playback time by using the ::criAtomExPlayer_GetTime function or + * the ::criAtomExPlayback_GetTime function.
+ * To acquire playback time, use the ::criAtomExPlayback_GetNumPlayedSamples function + * instead of these functions.
+ *
+ * Encrypted ADX data must be decrypted from the beginning sequentially.
+ * Therefore, if you play encrypted ADX data from some midpoint, + * decryption until the seek position occurs when playback is started, + * leading to possible significant increase in processing load.
+ * \sa criAtomExPlayback_GetNumPlayedSamples + */ +void CRIAPI criAtomExPlayer_SetSyncPlaybackId( + CriAtomExPlayerHn player, CriAtomExPlaybackId playback_id); + +/*EN + * \brief Set the sequence playback ratio + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] playback_ratio Sequence playback ratio + * \par Description: + * Sets the playback ratio for the sequences played by the AtomEx player.
+ * The valid range for the playback ratio is from 0.0f to 2.0f.
+ * If a value outside this range is set, it is clamped back to the valid range. + * \par Remarks: + * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \attention + * The value set by this function is only applied to a sequence-type Cue playback.
+ * It cannot be used for the playback ratio of the waveform data played in a sequence.
+ * \sa criAtomExPlayer_ResetParameter + */ +void CRIAPI criAtomExPlayer_SetPlaybackRatio( + CriAtomExPlayerHn player, CriFloat32 playback_ratio); + +/*EN + * \brief Set the the number of loops + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] count number of loops + * \par Description: + * Limits the number of times the waveform data will be looped.
+ * For example, when specifying one for the count, the playback of the waveform data is looped only once.
+ * (After reaching the loop-end point, it is returned to the loop start position.)
+ * \par + * By default, any audio data that has a loop point is looped infinitely.
+ * After limiting the number of loops, if you want to return to an infinite loop, just specify + * ::CRIATOMEXPLAYER_NO_LOOP_LIMITATION for the count.
+ *
+ * You can also specify ::CRIATOMEXPLAYER_IGNORE_LOOP for the count + * to play wave data while ignoring its loop point.
+ * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \attention + * You have to specify the number of loops before starting the audio playback.
+ * If you execute this function during the playback, the number of loops you set will be ignored.
+ * To stop the loop at any time, use the seamless concatenated playback.
+ *
+ * The number of loops set by this function is only applied when the waveform data + * contained loop points beforehand.
+ * If no loop points are present in the waveform data, this function + * will have no effect.
+ *
+ * When encoding the waveforms with loop points in CRI Atom Craft or CRI Atom Encoder, + * the data after the loop-end point is discarded to reduce the data size.
+ * Therefore, when the audio data is created by these tools, + * the wave data after the loop-end point will not be played once the loop playback is completed.
+ *
+ * For some platform-dependent audio codecs, this function cannot limit the number of loops.
+ *
+ * Sound data can also be played as a one-shot sound (including the data after the loop point) + * if the following conditions are met (the sound will not be looped):
+ * - The data is encoded with the "-nodelterm" flag by criatomencd.exe. + * - The playback is executed after passing ::CRIATOMEXPLAYER_IGNORE_LOOP to this function. + * . + *
+ * This function can set the number of loops only for the ADX and the HCA data.
+ * Do not execute this function on data encoded by platform-dependent audio codecs.
+ * (Doing so may result in the playback not finishing, in noise or other issues.)
+ * \sa criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_LimitLoopCount(CriAtomExPlayerHn player, CriSint32 count); + +/*EN + * \brief Update the playback parameters (for all sounds currently playing) + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \par Description: + * Assigns the playback parameters (including AISAC control values) set to the AtomEx player + * to all the sounds it is playing.
+ * \par Example: + * \code + * CriFloat32 volume; + * // Start the playback + * criAtomExPlayer_Start(player); + * : + * criAtomExPlayer_Start(player); + * : + * // Change the Volume + * volume = 0.3f; + * criAtomExPlayer_SetVolume(player, volume); + * criAtomExPlayer_UpdateAll(player); + * \endcode + * \sa criAtomExPlayer_Update + */ +void CRIAPI criAtomExPlayer_UpdateAll(CriAtomExPlayerHn player); + +/*EN + * \brief Update the playback parameters (specifying a playback ID) + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] id playback ID + * \par Description: + * Assigns the playback parameters (including AISAC control values) set to the AtomEx player + * to a sound specified by its playback ID.
+ * \par Example: + * \code + * CriFloat32 volume; + * // Start the playback + * id = criAtomExPlayer_Start(player); + * : + * // Change the Volume + * volume = 0.3f; + * criAtomExPlayer_SetVolume(player, volume); + * criAtomExPlayer_Update(player, id); + * \endcode + * \par Remarks: + * The playback ID must reference a sound being played back by this AtomEx player.
+ * \sa criAtomExPlayer_UpdateAll + */ +void CRIAPI criAtomExPlayer_Update( + CriAtomExPlayerHn player, CriAtomExPlaybackId id); + +/*EN + * \brief Reset the playback parameters + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \par Description: + * Restore the default values of the AtomEx player playback parameters (including the AISAC control values).
+ * After executing this function, if you call ::criAtomExPlayer_Start, the sound will be played using the default playback parameters.
+ * \par Example: + * \code + * CriFloat32 volume; + * // Start the playback + * id = criAtomExPlayer_Start(player); + * : + * // Change the Volume + * volume = 0.3f; + * criAtomExPlayer_SetVolume(player, volume); + * criAtomExPlayer_Update(player, id); + * : + * // Reset the Parameters + * criAtomExPlayer_ResetParameters(player); + * id = criAtomExPlayer_Start(player); + * \endcode + * \par Remarks: + * After calling this function, if you call the ::criAtomExPlayer_Update or + * ::criAtomExPlayer_UpdateAll functions, the parameters + * of the sound being already played back will not be restored to their initial values.
+ * If you want to modify the parameters of a sound being played, + * explicitly call functions such as ::criAtomExPlayer_SetVolume.
+ *
+ * The following parameters are reset by this function:
+ * - Parameters defined for the ::CriAtomExParameterId function + * - AISAC control values (::criAtomExPlayer_SetAisacControlById or ::criAtomExPlayer_SetAisacControlByName functions) + * - Number of loops (::criAtomExPlayer_LimitLoopCount function) + * - Cue priority (::criAtomExPlayer_SetCuePriority function) + * - 3D sound source handle (::criAtomExPlayer_Set3dSourceHn function) + * - 3D listner handle (::criAtomExPlayer_Set3dListenerHn function) + * - Category setting (::criAtomExPlayer_SetCategoryById or ::criAtomExPlayer_SetCategoryByName functions) + * - Playback start block (::criAtomExPlayer_SetFirstBlockIndex function) + * - Selector name, label name (set by the ::criAtomExPlayer_SetSelectorLabel function) + * - Sequence preload time (set by the ::criAtomExPlayer_SetSequencePrepareTime function) + * . + * The parameters of the 3D sound sources and 3D listener are not reset.
+ * Only their handles set in the AtomEx player are reset.
+ * If the parameters related to a specific handle should be reset, call the parameter's reset function of that handle.
+ * \sa criAtomEx3dSource_ResetParameters, criAtomEx3dListener_ResetParameters + */ +void CRIAPI criAtomExPlayer_ResetParameters(CriAtomExPlayerHn player); + +/*EN + * \brief Get the value of a parameter (as a floating point number) + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] id parameter ID + * \return value of the parameter + * \par Description: + * Gets the value of a parameter of an AtomEx player.
+ * The value is returned as a floating point number. + * \sa CriAtomExParameterId, criAtomExPlayer_GetParameterUint32, criAtomExPlayer_GetParameterSint32 + */ +CriFloat32 CRIAPI criAtomExPlayer_GetParameterFloat32(CriAtomExPlayerHn player, CriAtomExParameterId id); + +/*EN + * \brief Get the value of a parameter (as an unsigned integer) + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] id parameter ID + * \return value of the parameter + * \par Description: + * Gets the value of a parameter of an AtomEx player.
+ * The value is returned as an unsigned integer. + * \sa CriAtomExParameterId, criAtomExPlayer_GetParameterFloat32, criAtomExPlayer_GetParameterSint32 + */ +CriUint32 CRIAPI criAtomExPlayer_GetParameterUint32(CriAtomExPlayerHn player, CriAtomExParameterId id); + +/*EN + * \brief Get the value of a parameter (as a signed integer) + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] id parameter ID + * \return value of the parameter + * \par Description: + * Gets the value of a parameter of an AtomEx player.
+ * The value is returned as a signed integer. + * \sa CriAtomExParameterId, criAtomExPlayer_GetParameterFloat32, criAtomExPlayer_GetParameterUint32 + */ +CriSint32 CRIAPI criAtomExPlayer_GetParameterSint32(CriAtomExPlayerHn player, CriAtomExParameterId id); + +/*EN + * \brief Set the volume + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] volume volume + * \par Description: + * Sets the volume of the sound output of a player.
+ * If you set the volume with this function and then start the playback by calling ::criAtomExPlayer_Start, + * the new sound will be played back at the specified volume.
+ * You can also call the ::criAtomExPlayer_Update or ::criAtomExPlayer_UpdateAll functions after executing this function + * to update the volume of the sounds that are already playing.
+ *
+ * Volume is a simple scaling factor for the amplitude of the waveform data (it is not expressed in decibels).
+ * For example, if you specify 1.0f, the sound will be output with its volume unchanged.
+ * If you specify 0.5f, it will be output at half the original volume (-6dB).
+ * If you specify 0.0f, the sound is muted (silent).
+ * The default volume is 1.0f.
+ * \par Example: + * \code + * + * // Set the Volume + * criAtomExPlayer_SetVolume(player, 0.5f); + * + * // Start the playback + * // Remarks: The playback volume used is the value set to the player (0.5f). + * id = criAtomExPlayer_Start(player); + * : + * // Change the volume + * // Note: The volume of the sounds currently playing is not affected at this point + * criAtomExPlayer_SetVolume(player, 0.3f); + * + * // Apply the volume set to the player to the sounds currently playing + * criAtomExPlayer_Update(player, id); + * : + * \endcode + * \par Remark: + * A volume value higher than 1.0f can be specified (from version 1.21.07 of the CRI Atom library).
+ * When specifying a value over 1.0f, it is possible that the waveform will be played at a volume + * greater than supported by the platform.
+ * If you pass a negative value for the volume, it will be changed to 0.0f.
+ * (Passing a negative volume value is not a way to inverse the phase.)
+ *
+ * When playing a Cue, the volume has also been set on the data side (i.e. within the authoring tool). + * In that case, the final volume value will be the volume from the data side multiplied by the volume set with this function.
+ * For example, if the data side volume is 0.8f and the AtomEx player volume is 0.5f, + * the volume actually applied will be 0.4f.
+ *
+ * If that final volume exceeds 1.0f, the value is clipped to 1.0f.
+ * (The sound is never played at a volume greater than the original sound.)
+ * Similarly, if the final volume is less than 0.0f, the value is clipped to 0.0f.
+ * (The phase is never inversed.)
+ *
+ * If you have a volume in decibels, you can convert it to a scaling factor using this formula:
+ * \code + * volume = powf(10.0f, db_vol / 20.0f); + * \endcode + * db_vol is a decibel value, and volume is the scaling value. + * \par Remarks: + * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \attention + * When specifying a volume over 1.0f, the following points should be considered:
+ * - The behavior may differ on each platform. + * - Crackling sounds may occur. + * . + *
+ * Even when specifying a volume over 1.0f, whether or not the sound will be played at + * a volume higher than the source waveform depends on the platform or + * the audio compression codec.
+ * Therefore, when adjusting the volume on a multi-platform title, it is + * recommended to not use a volume over 1.0f.
+ * (When specifying a volume over 1.0f, the same waveform + * may be played at different volumes depending on the platforms.)
+ *
+ * Moreover, even on platforms where the volume can be increased, the hardware itself has + * a limit above which noise or crackling may be generated.
+ * \sa criAtomExPlayer_Start, criAtomExPlayer_Update, criAtomExPlayer_UpdateAll, criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_SetVolume( + CriAtomExPlayerHn player, CriFloat32 volume); + +/*EN + * \brief Set the pitch (detune) + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] pitch pitch (cents) + * \par Description: + * If you set the pitch (detune) with this function and then start the playback by calling ::criAtomExPlayer_Start, + * the new sound will be played back with the adjusted pitch.
+ * You can also call the ::criAtomExPlayer_Update or ::criAtomExPlayer_UpdateAll functions after executing this function + * to update the pitch of the sounds that are already playing.
+ *
+ * The pitch (detune) is specified in cents.
+ * A cent is 1/1200th of an octave. A half-tone is equal to 100 cents.
+ * For example, if you specify 100.0f, the pitch will be raised by half a tone. If you specify -100.0f, the pitch will be lowered by half a tone.
+ * The default pitch is 0.0f (i.e. no detune).
+ * \par Example: + * \code + * : + * // Set the pitch + * criAtomExPlayer_SetPitch(player, 100.0f); + * + * // Start the playback + * // Remarks: The pitch used is the value set to the player (0.5f). + * id = criAtomExPlayer_Start(player); + * : + * // Change the pitch + * // Note: The pitch of the sounds currently playing is not affected at this point + * criAtomExPlayer_SetPitch(player, -200.0f); + * + * // Apply the pitch set to the player to the sounds currently playing + * criAtomExPlayer_Update(player, id); + * + * \endcode + * \par Remark: + * During cue playback, if you call this function while a pitch is already set in the data, + * the final pitch will be the value set in the data added to the value set by the function.
+ * For example, if the pitch in the data is -100.0f and the pitch in the AtomEx player is 200.0f, + * the actual pitch is 100.0f. + *
+ * If you want to set the pitch as a frequency ratio of the sampling rate, use the following formula:
+ * \code + * pitch = 1200.0 * Math.Log(freq_ratio, 2.0); + * \endcode + * * pitch is the value of the pitch; freq_ratio is the frequency ratio. + * \par Remarks: + * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \attention + * You cannot change the pitch of any sound data that is encoded with HCA-MX.
+ * (Even if this function is executed, the pitch will not change.)
+ * If you want to change the pitch of a sound, use another codec such as ADX or HCA to encode the sound.
+ *
+ * The maximum configurable pitch change depends on the sampling rate of the sound data and the maximum sampling rate of the voice pool.
+ * For example, if the sampling rate of the sound data is 24 kHz and the maximum sampling rate of the voice pool is 48 kHz, + * the maximum configurable pitch is 1200 (the frequency ratio is 2:1).
+ *
+ * Since the pitch is changed by increasing or decreasing the playback sampling rate, + * the playback speed also changes when you change the pitch. + * \sa criAtomExPlayer_Start, criAtomExPlayer_Update, criAtomExPlayer_UpdateAll, criAtomExPlayer_SetMaxPitch, criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_SetPitch(CriAtomExPlayerHn player, CriFloat32 pitch); + +/*EN + * \brief Setting the maximum pitch + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] pitch pitch (cents) + * \par Description: + * Sets the maximum pitch of the sound.
+ * By specifying the maximum pitch with this function, pitch change within the specified range will be reflected immediately.
+ * \par Remarks: + * In previous CRI Atom library versions, pitch increasing might cause interuption of playback. + * (Sound data supplying could not catch up the playback speed.)
+ * CRI Atom library ver.2.10.00 fixed this problem. In this new implementation,
+ * enough size of sound data is buffered before pitch shift processing.
+ * But it is delayed by sound data buffering.
+ * (So, if pitch shift processing run many times in short period, strange noise may be made.) + *
+ * This function, ::criAtomExPlayer_SetMaxPitch , controls size of sound data buffered for pitch shift processing. + * Pitch shifting within maximum value can be applied immediately without extra buffering.
+ * If pitch shift processing is run many times in short period, set expected maximum values with this function.
+ * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \sa criAtomExPlayer_SetPitch, criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_SetMaxPitch(CriAtomExPlayerHn player, CriFloat32 pitch); + +/*EN + * \brief Set the panning 3D angle + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] pan3d_angle panning 3D angle (from -180.0f to 180.0f degrees) + * \par Description: + * Sets the panning 3D angle.
+ * If you specify the panning 3D angle with this function and then start the playback with the ::criAtomExPlayer_Start function, + * the sound is played at the specified panning 3D angle.
+ * After specifying the angle, you can call the ::criAtomExPlayer_Update function or the ::criAtomExPlayer_UpdateAll function + * to update the panning 3D angle of a sound that is already being played.
+ *
+ * Specify the angle in degrees.
+ * The front is 0 degree. You can specify an angle from -180.0f in the left direction (counterclockwise) to 180.0f in the right direction (clockwise).
+ * For example, if you specify 45.0f, the sound is located at 45 degrees of the front, on the right. If you specify -45.0f, the sound is located at 45 degrees of the front, on the left.
+ * \par Example: + * \code + * : + * // Set the panning 3D angle + * criAtomExPlayer_SetPan3dAngle(player, 45.0f); + * + * // Start the playback + * // Note: The value that is set in the player (=45.0f) is used for the panning 3D angle. + * id = criAtomExPlayer_Start(player); + * : + * // Change the panning 3D angle + * // Note: The panning 3D angle of the sound that is being played is not changed here. + * criAtomExPlayer_SetPan3dAngle(player, -45.0f); + * + * // The panning 3D angle that is set in the player is now used. + * criAtomExPlayer_Update(player, id); + * : + * \endcode + * \par Remarks: + * During cue playback, if you call this function while the panning 3D angle is already set in the data, + * the final panning 3D angle will be the value set in the data added to the value set by this function.
+ * For example, when the panning 3D angle in the data is 15.0f and the one set by this function is 30.0f, + * the actual panning 3D angle will be 45.0f. + *
+ * When the panning 3D angle exceeds 180.0f, 360.0f is subtracted from the value so that it stays within the range.
+ * Similarly, if the actual volume is smaller than -180.0f, 360.0f is added to the value so that it stays within the range as well.
+ * (Since the position of the sound does not change when 360.0f is added or subtracted, you can set the value beyond the range going from -180.0f to 180.0f.) + *
+ * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \sa criAtomExPlayer_Start, criAtomExPlayer_Update, criAtomExPlayer_UpdateAll, criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_SetPan3dAngle( + CriAtomExPlayerHn player, CriFloat32 pan3d_angle); + +/*EN + * \brief Set the panning 3D distance + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] pan3d_interior_distance panning 3D distance (from -1.0f to 1.0f) + * \par Description: + * Sets the distance for the interior panning in panning 3D.
+ * If you specify the panning 3D distance with this function and then start the playback with the ::criAtomExPlayer_Start function, + * the sound will be played at the specified panning 3D distance.
+ * After specifying the distance, you can call the ::criAtomExPlayer_Update function or the ::criAtomExPlayer_UpdateAll function + * to update the panning 3D distance of a sound that is already being played.
+ *
+ * The distance to the listener is 0.0f and the distance to the circumference on which the speakers are placed is 1.0f. You can specify a value from -1.0f to 1.0f.
+ * If a negative value is specified, the panning 3D angle is inverted by 180 degrees and the direction is reversed. + * \par Example: + * \code + * : + * // Set the panning 3D distance + * criAtomExPlayer_SetPan3dInteriorDistance(player, 0.5f); + * + * // Start the playback + * // Note: The value that is set in the player (=0.5f) is used for the panning 3D distance. + * id = criAtomExPlayer_Start(player); + * : + * // Change the panning 3D distance + * // Note: The panning 3D distance of the sound that is being played is not changed here. + * // Note: The following process is equal to reversing the panning 3D angle by 180 degrees. + * criAtomExPlayer_SetPan3dInteriorDistance(player, -0.5f); + * + * // The panning 3D distance that is set in the player is now used for the sound already being played. + * criAtomExPlayer_Update(player, id); + * : + * \endcode + * \par Remarks: + * During cue playback, if you call this function while the panning 3D distance is set in the data, + * the final panning 3D distance will be the value set in the data multiplied by the value set by this function.
+ * For example, when the panning 3D distance in the data is 0.8f and the one in the AtomEx player is 0.5f, + * the actual panning 3D distance is 0.4f. + *
+ * If the actual panning 3D distance exceeds 1.0f, the value is clamped to 1.0f.
+ * Similarly, if the actual panning 3D distance is over -1.0f, the value is clamped to -1.0f.
+ *
+ * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \sa criAtomExPlayer_Start, criAtomExPlayer_Update, criAtomExPlayer_UpdateAll, criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_SetPan3dInteriorDistance( + CriAtomExPlayerHn player, CriFloat32 pan3d_interior_distance); + +/*EN + * \brief Set the panning 3D volume + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] pan3d_volume panning 3D volume (from 0.0f to 1.0f) + * \par Description: + * Sets the panning 3D volume.
+ * After you set the panning 3D volume with this function and then start the playback with the ::criAtomExPlayer_Start function, + * the sound is played at the specified panning 3D volume.
+ * After specifying the volume, you can call the ::criAtomExPlayer_Update function or the ::criAtomExPlayer_UpdateAll function + * to update the panning 3D volume of a sound that is already being played.
+ *
+ * The panning 3D volume is used to control the panning 3D component and the output level of the center/LFE separately.
+ * For example, you may want to use the send level to output at a fixed volume for the LFE + * and to use panning 3D to control the orientation. + *
+ * The range and handling of the panning 3D volume is the same than for a normal volume. See the ::criAtomExPlayer_SetVolume function. + * \par Example: + * \code + * : + * // Set the panning 3D volume + * criAtomExPlayer_SetPan3dVolume(player, 0.8f); + * + * // Start the playback + * // Note: The value that is set in the player (=0.5f) is used for the panning 3D volume. + * id = criAtomExPlayer_Start(player); + * : + * // Change the panning 3D volume + * // Note: The panning 3D volume of the sound that is being played is not changed here. + * criAtomExPlayer_SetPan3dVolume(player, 0.7f); + * + * // The panning 3D volume that is set in the player is now used for the sound already being played. + * criAtomExPlayer_Update(player, id); + * : + * \endcode + * \par Remarks: + * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \sa criAtomExPlayer_Start, criAtomExPlayer_Update, criAtomExPlayer_UpdateAll, criAtomExPlayer_SetVolume, criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_SetPan3dVolume( + CriAtomExPlayerHn player, CriFloat32 pan3d_volume); + +/*EN + * \brief Set the pan type + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] pan_type pan type + * \par Description: + * Sets the pan type.
+ * If you specify the pan type with this function and then start the playback with the ::criAtomExPlayer_Start function, the sound is played using the specified pan type.
+ * After specifying the pan type, you can call the ::criAtomExPlayer_Update function or the ::criAtomExPlayer_UpdateAll function + * to update the pan type of a sound that is already being played.
+ * \par Remarks: + * If you call this function during cue playback, the pan type that is set in the data is overwritten (the value in the data is ignored).
+ * Usually, you do not need to call this function, because the pan type is set in the data.
+ * If you want to enable 3D positioning when a sound is played without using an ACB file, call this function by passing CRIATOMEX_PAN_TYPE_3D_POS to specify the Pos3d mode. + *
+ * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \sa criAtomExPlayer_Start, criAtomExPlayer_Update, criAtomExPlayer_UpdateAll, CriAtomExPanType, criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_SetPanType( + CriAtomExPlayerHn player, CriAtomExPanType pan_type); + +/*EN + * \brief Set the type of the speaker output (used for panning) + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] pan_speaker_type type of speaker output (used for panning) + * \par Description: + * Sets the type of the speaker output (used for panning).
+ * If you specify the type of the speaker output used for panning with this function and then start the playback with the ::criAtomExPlayer_Start function, + * the panning of the sound started will be calculated for the specified type.
+ * After specifying the type, you can call the ::criAtomExPlayer_Update function or the ::criAtomExPlayer_UpdateAll functions + * to update the type of speaker output of the sounds that are already being played.
+ * \par Remarks: + * The parameter passed to this function affects the panning calculation in both pan 3D and 3D positioning modes.
+ * The default value at the library initialization is 4ch panning (::CRIATOMEX_PAN_SPEAKER_TYPE_4CH).
+ * It can be changed by the ::criAtomExPlayer_ChangeDefaultPanSpeakerType function.
+ * In the case of platforms with stereo output, the sound is eventually mixed down to stereo, irrespective of the selection.
+ *
+ * Since this parameter cannot be set on the data side, the value passed to this function is always applied as it is.
+ *
+ * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \sa criAtomExPlayer_Start, criAtomExPlayer_Update, criAtomExPlayer_UpdateAll, CriAtomExPanSpeakerType, criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_SetPanSpeakerType( + CriAtomExPlayerHn player, CriAtomExPanSpeakerType pan_speaker_type); + +/*EN + * \brief Setting MixDownCenter volume offset value + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] mixdown_center_volume_offset MixDownCenter Volume offset value + * \par Description: + * Set the volume value to mix signals that are not Center or LFE to monaural and output to Center.
+ * The setting value by this function is added and applied to the data setting value by the CRI Atom Craft.
+ * For the second argument of this function, set 0 to 1 floating point value as output volume.
+ * \attention + * Valid setting outside the set value is not confirmed. Please pay attention to the following points when setting out of range.
+ * A value larger than 1: Clipping noise etc. may occur due to amplification of the output amplitude value.
+ * Negative value: When the sum with the data setting value becomes negative, the result of inverting the phase with respect to the positive result is output.
+ * \sa criAtomExPlayer_Start, criAtomExPlayer_Update, criAtomExPlayer_UpdateAll, CriAtomExPanSpeakerType, criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_AddMixDownCenterVolumeOffset( + CriAtomExPlayerHn player, CriFloat32 mixdown_center_volume_offset); + +/*EN + * \brief Setting MixDownLFE volume offset value + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] mixdown_lfe_volume_offset MixDownLFE Volume offset value + * \par Description: + * Set the volume value to mix signals that are not Center or LFE to monaural and output to LFE.
+ * The setting value by this function is added and applied to the data setting value by the CRI Atom Craft.
+ * For the second argument of this function, set 0 to 1 floating point value as output volume.
+ * \attention + * Valid setting outside the set value is not confirmed. Please pay attention to the following points when setting out of range.
+ * A value larger than 1: Clipping noise etc. may occur due to amplification of the output amplitude value.
+ * Negative value: When the sum with the data setting value becomes negative, the result of inverting the phase with respect to the positive result is output.
+ * \sa criAtomExPlayer_Start, criAtomExPlayer_Update, criAtomExPlayer_UpdateAll, CriAtomExPanSpeakerType, criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_AddMixDownLfeVolumeOffset( + CriAtomExPlayerHn player, CriFloat32 mixdown_lfe_volume_offset); + +/*EN + * \brief Changing the default output speaker type for panning + * \ingroup ATOMEXLIB_PLAYER + * \param[in] pan_speaker_type Output speaker type for panning + * \par Description: + * Changes the default output speaker type for panning.
+ * For all the AtomEx players to which the ::criAtomExPlayer_SetPanSpeakerType function is not executed, the output speaker type that is set with this function is used for playback.
+ * \par Note: + * The setting in this function affects the panning calculation in pan 3D and 3D positioning.
+ * The default value when the library is initialized is 4 ch panning (::CRIATOMEX_PAN_SPEAKER_TYPE_4CH).
+ * For a stereo speaker platform, sounds are eventually mixed down to stereo, irrespective of the selection.
+ *
+ * Because this parameter cannot be set for data, the setting in this function is always applied.
+ * \attention + * When the sound that is being played references the default value depends on user operation.
+ * Therefore, if the default value is changed during playback, the change may not be reflected at an expected timing.
+ * If you use this function, execute it before playing sounds, such as at initialization.
+ * \sa criAtomExPlayer_SetPanSpeakerType, CriAtomExPanSpeakerType + */ +void CRIAPI criAtomExPlayer_ChangeDefaultPanSpeakerType( + CriAtomExPanSpeakerType pan_speaker_type); + +/*EN + * \brief Set the type of the panning angle + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] pan_angle_type Panning angle type + * \par Description: + * Sets the type of the panning angle.
+ * The angle type determines how to handle the angles for each input channel when panning multi-channel sound materials (stereo, 5.1 ch, etc.).
+ * If you specify the angle type with this function and then start the playback by calling ::criAtomExPlayer_Start, + * the panning of the new sound will be calculated based on the specified angle type.
+ * After specifying the type, you can also call the ::criAtomExPlayer_Update or the ::criAtomExPlayer_UpdateAll functions + * to update the angle type of the sounds that are already being played.
+ * \par Remarks: + * The parameter passed to this function affects the panning calculation in both pan 3D and 3D positioning modes.
+ * The default value is offset (::CRIATOMEX_PAN_ANGLE_TYPE_OFFSET).
+ * This function is primarily used for compatibility with CRI Audio. + * Indeed, you can pass ::CRIATOMEX_PAN_ANGLE_TYPE_FIX to get the same pan 3D calculations than if you were using CRI Audio.
+ *
+ * Since this parameter cannot be set on the data side, the value passed to this function is always applied as it is.
+ *
+ * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \sa criAtomExPlayer_Start, criAtomExPlayer_Update, criAtomExPlayer_UpdateAll, CriAtomExPanAngleType, criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_SetPanAngleType( + CriAtomExPlayerHn player, CriAtomExPanAngleType pan_angle_type); + +/*EN + * \brief Set the sound spread during panning + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] spread Multi-channel sound spread + * \par Description: + * Sets the sound spread used for panning calculations.
+ * The spread specifies the angular distance between each input channel when panning multi-channel sound materials (stereo, 5.1 ch, etc.).
+ * The valid range for the spread goes from 0.0 to 1.0, the default value being 1.0.
+ * For example, if a stereo sound is played with a spread of 0.5, panning calculations would localize the left channel at -15 degrees from the front (-30 degrees * 0.5) and the right channel at 15 degrees (30 degrees * 0.5).
+ * This setting does not affect mono sounds.
+ * \par Remarks: + * If you specify the spread with this function and then start the playback by calling ::criAtomExPlayer_Start, + * the panning of the new sound will be calculated based on the specified spread.
+ * After specifying the spread, you can also call the ::criAtomExPlayer_Update or the ::criAtomExPlayer_UpdateAll functions + * to update spread of the sounds that were already being played.
+ *
+ * Since this parameter cannot be set on the data side, the value passed to this function is always applied as it is.
+ *
+ * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \sa criAtomExPlayer_Start, criAtomExPlayer_Update, criAtomExPlayer_UpdateAll, criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_SetPanSpread(CriAtomExPlayerHn player, CriFloat32 spread); + + +/*EN + * \brief Set a send level + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] ch channel number + * \param[in] spk speaker ID + * \param[in] level send level value (from 0.0f to 1.0f) + * \par Description: + * Specifies the send level.
+ * A send level lets you specify the volume of an audio channel on a given speaker.
+ * If you specify the send level with this function and then start the playback with the ::criAtomExPlayer_Start function, + * the sound is played with the specified send level.
+ * After specifying the send level, you can call the ::criAtomExPlayer_Update or the ::criAtomExPlayer_UpdateAll functions + * to update the send level of a sound that is already being played.
+ *
+ * The second argument (channel number) specifies the channel number for the sound data.
+ * The third argument (speaker ID) specifies the speaker to which the data for the specified channel number is sent. + * The fourth argument specifies the send level (volume).
+ * For example, if you want to play channel 0 of the sound data on the right speaker + * at full volume (1.0f), call this function as follows: + * \code + * criAtomExPlayer_SetSendLevel(player, 0, CRIATOMEX_SPEAKER_FRONT_RIGHT, 1.0f); + * \endcode + *
+ * The range and handling of the send level value is the same than for the volume. See the ::criAtomExPlayer_SetVolume function.
+ *
+ * In a platform with a center speaker, if you want to send mono sounds only to the center speaker, + * it is recommended to call ::criAtomExPlayer_SetPanSpeakerType instead of this function and pass ::CRIATOMEX_PAN_SPEAKER_TYPE_5CH + * for the parameter. + * \par Example: + * \code + * CriSint32 ch = 0; // channel number 0 + * CriAtomExSpeakerId spk = CRIATOMEX_SPEAKER_FRONT_CENTER; + * CriFloat32 level = 1.0f; + * // Set the send level(ch0 to center) + * criAtomExPlayer_SetSendLevel(player, ch, spk, level); + * // Start the playback + * id = criAtomExPlayer_Start(player); + * : + * // Change the send level + * level = 0.7f; + * criAtomExPlayer_SetSendLevel(player, ch, spk, level); + * criAtomExPlayer_Update(player, id); + * \endcode + * \par Note: + * Two types of send level settings are available: "automatic setting" and "manual setting."
+ * Immediately after an AtomEx player is created or if a parameter is cleared with the ::criAtomExPlayer_ResetParameters function, + * the send level setting is "automatic setting."
+ * On the other hand, when this function is executed, the send level is set to "manual setting."
+ * (The user must control the send level to each speaker to perform panning.)
+ *
+ * In "automatic setting," the AtomEx player assigns the sound as follows:
+ *
+ * [When playing back monaural sound]
+ * The sound on channel 0 is output from the right and left speakers at a volume of 0.7f (-3dB).
+ *
+ * [When playing back stereo sound]
+ * The sound on channel 0 is output from the left speaker, and + * the sound on channel 1 is output from the right speaker.
+ *
+ * [When playing 4 channel sound]
+ * The sound for channel 0 is output from the left speaker, and the sound for channel 1 is output from the right speaker. + * The sound for channel 2 is output from the surround left speaker, + * and the sound for channel 3 is output from the surround right speaker.
+ *
+ * [When playing 5.1 channel sound]
+ * The sound for channel 0 is output from the left speaker, and the sound for channel 1 is output from the right speaker. + * The sound for channel 2 is output from the center speaker, and the sound for channel 3 is output from the LFE. + * The sound for channel 4 is output from the surround left speaker, + * and the sound for channel 5 is output from the surround right speaker.
+ *
+ * [When playing 7.1 ch sound]
+ * The sound for channel 0 is output from the left speaker, and the sound for channel 1 is output from the right speaker. + * The sound for channel 2 is output from the center speaker, and the sound for channel 3 is output from the LFE. + * The sound for channel 4 is output from the surround left speaker, + * and the sound for channel 5 is output from the surround right speaker.
+ * The sound for channel 6 is output from the surround back left speaker, + * and the sound for channel 7 is output from the surround back right speaker.
+ *
+ * On the other hand, when this function was used for "manual setting", the sound is sent with the specified send level setting + * regardless of the number of sound data channels.
+ * (You must switch send level settings as required depending on the number of sound data channels.)
+ *
+ * If you want to clear the specified send level and restore routing to "automatic setting", + * execute the ::criAtomExPlayer_ResetParameters function.
+ *
+ * The value set in this function is always used, because this parameter cannot be set from the data side (i.e. within the tool).
+ * \attention + * If no send level is set for a chanel, no sound is output.
+ * For example, when the sound data is stereo but a send level is + * set only for one of the channels, the sound of the other channel is muted.
+ * If you want to control the send levels manually, be sure to set the send levels for all the channels + * that you want to output.
+ *
+ * When this function is used to set the send level, the pan 3D and 3D positioning settings are ignored.
+* \sa criAtomExPlayer_Start, criAtomExPlayer_Update, criAtomExPlayer_UpdateAll, criAtomExPlayer_SetVolume, criAtomExPlayer_SetPanSpeakerType, criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_SetSendLevel( + CriAtomExPlayerHn player, CriSint32 ch, CriAtomExSpeakerId spk, CriFloat32 level); + +/*EN + * \brief Setting the bus send level + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] bus_name Bus name + * \param[in] level Send level value (0.0f to 1.0f) + * \par Description: + * Sets the bus send level.
+ * A bus send level specifies the sound is sent to which bus at which level.
+ * When playback is started with the ::criAtomExPlayer_Start function after this function is used to set the bus send level, + * the sound is played at the specified bus send level.
+ * After the setting, you can call the ::criAtomExPlayer_Update function or the ::criAtomExPlayer_UpdateAll function + * to update the bus send level of the sound that has already been played.
+ * If you call this function during Cue playback when the bus send level is set in the data, + * the value obtained by multiplying the value set in the data with the value set with this function is applied.
+ *
+ * For the second argument, specify the bus name in the DSP bus setting.
+ * For the third argument, specify the send level (volume).
+ *
+ * If the bus specified as the bus name for the second argument does not exist in the applied DSP bus setting, the setting value is handled as an invalid value.
+ * The range and handling of the send level is the same as the volume. See the ::criAtomExPlayer_SetVolume function. + * \par Example: + * \code + * : + * // Set bus send level + * cosnt CriChar8* bus_name = "Reverb"; + * CriFloat32 level = 0.3f; + * criAtomExPlayer_SetBusSendLevelByName(player, bus_name, level); + * + * // Start playback + * id = criAtomExPlayer_Start(player); + * : + * // Change parameters + * // Note: The parameters for the sound that is being played are not changed at this time. + * level = 0.5f; + * criAtomExPlayer_SetBusSendLevelByName(player, bus_name, level); + * + * // Reflect the parameters that are set for the player also on the sound that is being played + * criAtomExPlayer_Update(player, id); + * : + * \endcode + * \par Note: + * You can send the sound to multiple buses by specifying different bus names and calling this function several times.
+ *
+ * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \sa criAtomExPlayer_Start, criAtomExPlayer_Update, criAtomExPlayer_UpdateAll, criAtomExPlayer_SetVolume, criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_SetBusSendLevelByName( + CriAtomExPlayerHn player, const CriChar8* bus_name, CriFloat32 level); + +/*EN + * \brief Setting the bus send level (by specifying the offset) + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] bus_name Bus name + * \param[in] level_offset Send level value (0.0f to 1.0f) + * \par Description: + * Specifies the bus send level with its offset.
+ * If you call this function during Cue playback when the bus send level is set in the data, + * the value obtained by adding the value set in the data to the value set with this function is applied.
+ * The other specifications are the same as for the ::criAtomExPlayer_SetBusSendLevel function. + * \par Note: + * By setting 0.0f with the ::criAtomExPlayer_SetBusSendLevel function and setting the offset value with this function,
+ * you can ignore the bus send level that is set in the data and set a new level. (Overwriting)
+ *
+ * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \sa criAtomExPlayer_SetBusSendLevel, criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_SetBusSendLevelOffsetByName( + CriAtomExPlayerHn player, const CriChar8* bus_name, CriFloat32 level_offset); + +/*EN + * \brief Set the ADX1-compatible panning + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] ch channel number + * \param[in] pan panning setting (from -1.0f to 1.0f) + * \par Description: + * This is a pan setting function compatible with ADX1.
+ * \par Remarks: + * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \attention + * It is only provided to make it easier to port existing titles that were using ADX1.
+ * If you are developing a new application that performs panning operations in ADX2, + * use the ::criAtomExPlayer_SetPan3dAngle function instead.
+ *
+ * If you specify the panning with this function and then start the playback by calling ::criAtomExPlayer_Start, + * the new sound will be using that panning.
+ * After specifying the panning, you can also call the ::criAtomExPlayer_Update or the ::criAtomExPlayer_UpdateAll functions + * to update the panning of the sounds that were already being played.
+ * Only mono and stereo sounds can be controlled by this function. + * In addition, only the horizontal orientation can be controlled.
+ * If you want to control panning for sounds with more channels, or if you want to control the orientation including the front/back position, + * you must use the ::criAtomExPlayer_SetPan3dAngle or ::criAtomExPlayer_SetSendLevel functions.
+ *
+ * If the sound data to be played back is stereo, you can control the panning of channel 0 and channel 1 + * independently.
+ * However, since there is nothing to enforce setting the panning to the right number of channels, + * when you use an AtomEx player configured for stereo and play a mono sound, + * the sound source may be badly panned.
+ *
+ * In the case where the sound data is stereo but the panning is set for only one channel, the other channel + * is played in the center. + * When controlling the panning of a stereo sound, be sure to set a value for both channels.
+ *
+ * Do not use this function in conjunction with the ::criAtomExPlayer_SetPan3dAngle or ::criAtomExPlayer_SetSendLevel functions.
+ * When they are used together, it may be played in the unintended pan setting.
+ * \sa criAtomExPlayer_Start, criAtomExPlayer_Update, criAtomExPlayer_UpdateAll, + * criAtomExPlayer_SetPan3dAngle, criAtomExPlayer_SetSendLevel, criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_SetPanAdx1Compatible( + CriAtomExPlayerHn player, CriSint32 ch, CriFloat32 pan); + +/*EN + * \brief Set the band pass filter parameters + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] cof_low Normalized low-range cutoff frequency (from 0.0f to 1.0f) + * \param[in] cof_high Normalized high-range cutoff frequency (from 0.0f to 1.0f) + * \par Description: + * Sets the cutoff frequencies for the band pass filter.
+ * If you set the cutoff frequencies with this function and then start the playback with the ::criAtomExPlayer_Start function, + * the band pass filter will only allow the frequencies between them to pass.
+ * After specifying the frequencies, you can also call the ::criAtomExPlayer_Update function or the ::criAtomExPlayer_UpdateAll function + * to update the cutoff frequencies of the band pass filter of a sound that is already being played.
+ *
+ * Cutoff frequencies are normalized when they are mapped from values in the range from 24 Hz to 24,000 Hz on a logarithmic scale to values in the range from 0.0f to 1.0f.
+ * For example, when you specify 0.0f for the normalized low-range cutoff frequency and 1.0f for the normalized high-range cutoff frequency, + * the band pass filter passes the entire frequency range. The higher the normalized low-range cutoff frequency or the lower the normalized high-range cutoff frequency are, + * the narrower the range of frequencies that are passed by the filter will be.
+ * \par Example: + * \code + * ... + * // Set the filter parameters + * CriFloat32 cof_low = 0.0f; + * CriFloat32 cof_high = 0.3f; + * criAtomExPlayer_SetBandpassFilterParameters(player, cof_low, cof_high); + * + * // Start the playback + * id = criAtomExPlayer_Start(player); + * ... + * // Change the parameters + * // Note: The parameters of the sound that is being played are not yet changed here. + * cof_low = 0.7f; + * cof_high = 1.0f; + * criAtomExPlayer_SetBandpassFilterParameters(player, cof_low, cof_high); + * + * // The parameters that are set in the player are now used by the filter of the sound already being played. + * criAtomExPlayer_Update(player, id); + * ... + * \endcode + * \par Remarks: + * During cue playback, if you call this function while the parameters of the band pass filter are already set in the data, + * the parameters will be set as follows: + * - cof_low
+ * cof_low_rev (= 1.0f - cof_low) is multiplied by the value that is set in the data. Then cof_low (= 1.0f - cof_low_rev) is applied.
+ * In short, 0.0f indicates that "the filter is opened the widest to low frequencies." The openness is adjusted by the multiplication. + * - cof_hight
+ * cof_hight is multiplied by the value that is set in the data.
+ * In short, 1.0f indicates that "the filter is opened the widest to high frequencies." The openness is adjusted by the multiplication. + *
+ * If a normalized cutoff frequency is higher than 1.0f, the value is clipped to 1.0f.
+ * Similarly, if a normalized cutoff frequency is lower than 0.0f, the value is clipped to 0.0f.
+ *
+ * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \sa criAtomExPlayer_Start, criAtomExPlayer_Update, criAtomExPlayer_UpdateAll,criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_SetBandpassFilterParameters( + CriAtomExPlayerHn player, CriFloat32 cof_low, CriFloat32 cof_high); + +/*EN + * \brief Set the biquad filter parameters + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] type filter type + * \param[in] frequency Normalized frequency (from 0.0f to 1.0f) + * \param[in] gain gain (in decibels) + * \param[in] q_value Q-value + * \par Description: + * Sets the parameters of the biquad filter.
+ * If you set the biquad filter parameters with this function and then start the playback with the ::criAtomExPlayer_Start function, + * the biquad filter will use the specified parameters.
+ * After specifying the parameters, you can call the ::criAtomExPlayer_Update function or the ::criAtomExPlayer_UpdateAll function + * to update the parameters for a sound that is already being played.
+ *
+ * The normalized frequency is a value where a frequency in the range from 24 Hz to 24,000 Hz on a logarithmic scale is normalized to the range from 0.0f to 1.0f.
+ * The gain must be specified in decibels.
+ * The gain is valid only when the filter type is one of the following:
+ * - CRIATOMEX_BIQUAD_FILTER_TYPE_LOWSHELF: Low shelf filter + * - CRIATOMEX_BIQUAD_FILTER_TYPE_HIGHSHELF: High shelf filter + * - CRIATOMEX_BIQUAD_FILTER_TYPE_PEAKING: Peaking filter + * . + * \par Example: + * \code + * ... + * // Set the filter parameters + * CriAtomExBiquadFilterType type = CRIATOMEX_BIQUAD_FILTER_TYPE_LOWPASS; + * CriFloat32 frequency = 0.5f; + * CriFloat32 gain = 1.0f; + * CriFloat32 q_value = 3.0f; + * criAtomExPlayer_SetBiquadFilterParameters(player, type, frequency, gain, q_value); + * + * // Start the playback + * id = criAtomExPlayer_Start(player); + * ... + * // Change the parameters + * // Note: The parameters for the sound that is being played are not changed here. + * frequency = 0.7f; + * criAtomExPlayer_SetBiquadFilterParameters(player, type, frequency, gain, q_value); + * + * // The parameters that are set in the player are now used by the sound that is being played. + * criAtomExPlayer_Update(player, id); + * ... + * \endcode + * \par Remarks: + * - type
+ * Overwrites the value that is set in the data. + * - frequency
+ * Added to the value that is set in the data. + * - gain
+ * Multiplied by the value that is set in the data. + * - q_value
+ * Added to the value that is set in the data. + * . + *
+ * If the normalized cutoff frequency is higher than 1.0f, the value is clipped to 1.0f.
+ * Similarly, if the normalized cutoff frequency is lower than 0.0f, the value is clipped to 0.0f.
+ *
+ * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \attention + * The biquad filter is not applied to the sound data encoded with HCA-MX.
+ * If you need to use the biquad filter for a sound, use another codec, such as ADX or HCA to encode the sound.
+ * \sa criAtomExPlayer_Start, criAtomExPlayer_Update, criAtomExPlayer_UpdateAll, criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_SetBiquadFilterParameters( + CriAtomExPlayerHn player, CriAtomExBiquadFilterType type, CriFloat32 frequency, + CriFloat32 gain, CriFloat32 q_value); + +/*EN + * \brief Set the priority + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] priority voice priority (from -255 to 255) + * \par Description: + * Sets the priority of the AtomEx player.
+ * If you set the priority with this function and then start the playback with the ::criAtomExPlayer_Start function, + * the player will use the specified priority to play the sounds.
+ * After specifying the priority, you can call the ::criAtomExPlayer_Update or the ::criAtomExPlayer_UpdateAll functions + * to update the priority of the sounds that are already being played.
+ *
+ * For the priority value, specify an integer between -255 and 255. + * If a value outside of the valid range is specified, it will be clamped.
+ * The default value is 0.
+ * \par Remarks: + * If the number of sounds in the voice limit group to which the waveform data belongs reaches the limit or + * if all the voices in the voice pool are in use + * when the AtomEx player tries to play the waveform data, + * voices are controlled based on the voice priority.
+ * (Whether to play the specified waveform data or not is determined based on the voice priority.)
+ *
+ * If the waveform data to play has a higher priority than the waveform data that is being played, + * the AtomEx player takes away the voice that is being played and starts playing the requested waveform data.
+ * (The sound being played back is stopped, and another sound is played.)
+ *
+ * If the waveform data to play has a lower priority than the waveform data that is being played, + * the AtomEx player does not play the requested waveform data.
+ * (The requested sound is not played; the sound currently being played back continues.)
+ *
+ * If the waveform data to play has the same priority than the waveform data that is being played, + * the AtomEx player uses a voice control method (first in, first out or last in, first out):
+ * - With the first-in, first-out method, the waveform data already playing is prioritized. The requested waveform data is not played. + * - With the last-in, first-out method, the requested waveform data is prioritized. The voice currently uses is taken away. + *
+ * If you call this function during cue playback and the voice priority is already set in the data, + * the final priority is the value set in the data added to the value passed to this function.
+ * For example, if the priority in the data is 255 and the one you set to the AtomEx Player is 45, + * the actual priority value is 300.
+ * Note that this function allows you to set a priority value only between -255 to 255. + * However, after the value set in the data is added, the actual priority can be outside the [-255,255] range, + * because it is calculated as an integer in the library.
+ *
+ * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \attention + * This function controls the voice priority, which is set for the waveform data.
+ * Note that it does not affect the category cue priority, which is set for a cue in Atom Craft. + * \sa criAtomExPlayer_Start, criAtomExPlayer_Update, criAtomExPlayer_UpdateAll, criAtomExPlayer_SetVoiceControlMethod, criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_SetVoicePriority( + CriAtomExPlayerHn player, CriSint32 priority); + +/*EN + * \brief Set an AISAC control value (specifying the control ID) + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] control_id control ID + * \param[in] control_value control value (from 0.0f to 1.0f) + * \par Description: + * Sets the control value for the AISAC specified by its control ID.
+ * If you specify the AISAC control value with this function and then start the playback with the ::criAtomExPlayer_Start function, + * the sound is played back by using the specified AISAC control value.
+ * After specifying the value, you can call the ::criAtomExPlayer_Update function or the ::criAtomExPlayer_UpdateAll function + * to update the AISAC control value of a sound that is already being played.
+ * To remove the value set to an AISAC control, use the ::criAtomExPlayer_ClearAisacControls function.
+ *
+ * Specify a float value between 0.0f and 1.0f for the AISAC control value.
+ * \par Example: + * \code + * ... + * // Set the AISAC control value + * CriAtomExAisacControlId control_id = 0; + * CriFloat32 control_value = 0.5f; + * criAtomExPlayer_SetAisacControlById(player, control_id, control_value); + * + * // Start the playback + * id = criAtomExPlayer_Start(player); + * ... + * // Change parameters + * // Note: The parameters for the sound that is being played are not changed here. + * control_value = 0.3f; + * criAtomExPlayer_SetAisacControlById(player, control_id, control_value); + * + * // The parameters that are set in the player are used for the sound that is already being played. + * criAtomExPlayer_Update(player, id); + * ... + * \endcode + * \par Remarks: + * The behavior of the system changes as follows, depending on the AISAC control type: + * - Off + * - If the AISAC control value is not set with this function, the AISCA does not work. + * - Auto modulation + * - The value that is set with this function has no effect. The AISAC control value automatically changes with time. + * - Random + * - The final AISAC control value is randomized within the random range set in the data. The AISAC control value specified by this function is used as the median value. + * - The parameters are randomized before the playback is started. You cannot change the AISAC control value for a sound during playback. + * - If the AISAC control value is not set when playback is started, 0.0f is used as the median value for randomization. + * . + * . + *
+ * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \sa criAtomExPlayer_Start, criAtomExPlayer_Update, criAtomExPlayer_UpdateAll, criAtomExPlayer_SetAisacByName, criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_SetAisacControlById( + CriAtomExPlayerHn player, CriAtomExAisacControlId control_id, CriFloat32 control_value); + +/*EN + * \brief Set AISAC control value (specifying a control name) + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] control_name control name + * \param[in] control_value control value (from 0.0f to 1.0f) + * \par Description: + * Sets the control value of the AISAC specified by its control name.
+ * If you specify the AISAC control value with this function and then start the playback with the ::criAtomExPlayer_Start function, + * the sound will be played back by using the specified AISAC control value.
+ * After specifying the value, you can call the ::criAtomExPlayer_Update function or the ::criAtomExPlayer_UpdateAll function + * to update the AISAC control value of a sound that is already being played.
+ * To remove the value set to an AISAC control, use the ::criAtomExPlayer_ClearAisacControls function.
+ *
+ * The AISAC control value is handled in the same way than when using the ::criAtomExPlayer_SetAisacControlById function.
+ * \par Example: + * \code + * ... + * // Set the AISAC control value + * const CriChar8 *control_name = "Any"; + * CriFloat32 control_value = 0.5f; + * criAtomExPlayer_SetAisacControlByName(player, control_name, control_value); + * + * // Start the playback + * id = criAtomExPlayer_Start(player); + * ... + * // Change the parameters + * // Note: The parameters for the sound that is being played are not changed here. + * control_value = 0.3f; + * criAtomExPlayer_SetAisacControlByName(player, control_name, control_value); + * + * // The parameters that are set in the player are now used by the sound that is being played. + * criAtomExPlayer_Update(player, id); + * : + * \endcode + * \par Remarks: + * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \sa criAtomExPlayer_Start, criAtomExPlayer_Update, criAtomExPlayer_UpdateAll, criAtomExPlayer_SetAisacById, criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_SetAisacControlByName( + CriAtomExPlayerHn player, const CriChar8 *control_name, CriFloat32 control_value); + +/*EN + * \brief Clear the AISAC control values set to the player + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \par Description: + * Clear all the AISAC control values set to the player.
+ * Once they have been cleared, you can call the ::criAtomExPlayer_Update or ::criAtomExPlayer_UpdateAll function + * to clear them from any sound currently playing. + * \sa criAtomExPlayer_SetAisacControlById, criAtomExPlayer_SetAisacControlByName, criAtomExPlayer_Update, criAtomExPlayer_UpdateAll + */ +void CRIAPI criAtomExPlayer_ClearAisacControls(CriAtomExPlayerHn player); + +/*EN + * \brief Set the 3D sound source handle + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] source 3D sound source handle + * \par Description: + * Set the 3D sound source handle used for 3D positioning.
+ * If you set a 3D listener handle and a 3D sound source handle, the orientation, volume and pitch are automatically applied (based on the the relative position of the 3D sound source from the 3D listener).
+ * If you set the 3D sound soource handle with this function and then start the playback by calling ::criAtomExPlayer_Start, + * the sound will be played back based on the 3D sound source properties.
+ * After specifying the sound source, you can also call the ::criAtomExPlayer_Update or ::criAtomExPlayer_UpdateAll functions + * to modify the 3D sound source referenced by the sounds that are already being played.
+ * Passing NULL clears the 3D sound source handle that was previously set.
+ * \par Remarks: + * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \attention + * To modify or update the parameters of a 3D sound source object, use the functions for the 3D sound source object instead of those of the AtomEx player.
+ * By default, a left-handed coordinate system is used to calculate the 3D positioning.
+ * If you want to use a right-handed coordinate system, pass CRIATOMEX_COORDINATE_SYSTEM_RIGHT_HANDED for ::CriAtomExConfig::coordinate_system + * when initializing the library ( ::criAtomEx_Initialize function). + * .
+ * When the sound is played back without using an ACB file, you must pass ::CRIATOMEX_PAN_TYPE_3D_POS to the ::criAtomExSetPanType function to explicitly enable the 3D positioning.
+ *
+ * This function and ::CriAtomExPlayer_Set3dSourceListHn function overwrite the setting with each other.
+ * For example, when setting the 3D sound source handle to the AtomEx player using this function after + * setting the 3D sound source handle list to the AtomEx player using the ::CriAtomExPlayer_Set3dSourceListHn function, + * a new 3D sound source handle is set for the AtomEx player, + * and the 3D sound source handle list that be set by the ::CriAtomExPlayer_Set3dSourceListHn function is cleared from the AtomEx player. + *
+ * The 3D sound source handle setting by the AtomEx player using this function can not be added to the 3D sound source handle list. + * If you want to add it to the 3D sound source handle list, clear the 3D sound source handle setting of the AtomEx player already set. + * \par Example: + * \code + * CriAtomEx3dListenerHn listener; + * CriAtomEx3dSourceHn source; + * CriAtomExVector pos; + * + * listener = criAtomEx3dListener_Create(NULL, NULL, 0); + * source = criAtomEx3dSource_Create(NULL, NULL, 0); + * player = criAtomExPlayer_Create(NULL, NULL, 0); + * criAtomExPlayer_Set3dListenerHn(player, listener); + * criAtomExPlayer_Set3dSourceHn(player, source); + * + * pos.x = 0.0f; + * pos.y = 0.0f; + * pos.z = 0.0f; + * criAtomEx3dSource_SetPosition(source, &pos); + * criAtomEx3dSource_Update(source); + * // Start the playback + * id = criAtomExPlayer_Start(player); + * : + * pos.x += 10.0f; + * criAtomEx3dSource_SetPosition(source, &pos); + * criAtomEx3dSource_Update(source); + * \endcode + * \sa CriAtomEx3dSourceHn, CriAtomEx3dSourceListHn, criAtomExPlayer_Set3dSourceListHn, criAtomEx3dListenerHn, criAtomExPlayer_SetListenerHn, criAtomExPlayer_Update, criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_Set3dSourceHn( + CriAtomExPlayerHn player, CriAtomEx3dSourceHn source); + +/*EN + * \brief Assign a 3D sound source handle list to a player + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] source_list 3D sound source handle list + * \par Description: + * Sets the 3D sound source list to a player to provide multi-positioning playback.
+ * By setting the 3D listener handle and the 3D sound source list, sound localization, volume, pitch, + * etc. are automatically applied.
+ * If you start the playback with the ::criAtomExPlayer_Start function after setting the 3D sound source list with this function, + * positioning wil be based on the 3D sound sources.
+ * Like for other parameters, after setting the handle, you can call the ::criAtomExPlayer_Update or ::criAtomExPlayer_UpdateAll functions to actually apply it.
+ * If the "source_list" argument is set to NULL, the current 3D sound source list handle is cleared.
+ * \par Remarks: + * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \attention + * The 3D sound source handles added to the 3D sound source list are changed and updated using a function from the 3D sound source handle, not a function from the AtomEX player.
+ * To pass the various vectors in the right hand coordinate system, specify CRIATOMEX_COORDINATE_SYSTEM_RIGHT_HANDED for + * ::CriAtomExConfig::coordinate_system in the library initialization (::criAtomEx_Initialize) setting.
+ * When playing audio without using ACB files, you need to set ::CRIATOMEX_PAN_TYPE_3D_POS by calling the ::criAtomExSetPanType function to explicitly enable 3D positioning.
+ *
+ * This function and the ::CriAtomExPlayer_Set3dSourceHn function are mutually overwriting their settings.
+ * For example, when setting the 3D sound sources handle list to the AtomEx player using this function after + * setting the 3D sound source handle to the AtomEx player using the ::CriAtomExPlayer_Set3dSourceHn function, + * a new 3D sound source handle list is set for the AtomEx player, + * and the 3D sound source handle that was set by the ::CriAtomExPlayer_Set3dSourceHn function is cleared from the AtomEx player. + * \par Example: + * \code + * CriAtomEx3dListenerHn listener; + * CriAtomEx3dSourceListHn source_list; + * CriAtomEx3dSourceHn source[8]; + * CriAtomExVector pos[8]; + * CriSint32 i; + * + * listener = criAtomEx3dListener_Create(NULL, NULL, 0); + * source_list = criAtomEx3dSourceList_Create(NULL, NULL, 0); + * for (i = 0; i < 8; i++) { + * source[i] = criAtomEx3dSource_Create(NULL, NULL, 0); + * + * pos[i].x = (CriFloat32)i; + * pos[i].y = 0.0f; + * pos[i].z = 0.0f; + * criAtomEx3dSource_SetPosition(source, &pos); + * criAtomEx3dSource_Update(source); + * + * criAtomEx3dSourceList_Add(source_list, source[i]); + * } + * + * player = criAtomExPlayer_Create(NULL, NULL, 0); + * criAtomExPlayer_Set3dListenerHn(player, listener); + * criAtomExPlayer_Set3dSourceListHn(player, source_list); + * + * // Start playback + * id = criAtomExPlayer_Start(player); + * : + * pos[2].x += 25.0f; + * criAtomEx3dSource_SetPosition(source[2], &pos); + * criAtomEx3dSource_Update(source[2]); + * pos[5].z += 10.0f; + * criAtomEx3dSource_SetPosition(source[5], &pos); + * criAtomEx3dSource_Update(source[5]); + * \endcode + * \sa CriAtomEx3dSourceListHn, CriAtomEx3dSourceHn, criAtomExPlayer_Set3dSourceHn, CriAtomEx3dListenerHn, CriAtomExPlayer_Set3dListenerHn, criAtomExPlayer_Update, criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_Set3dSourceListHn( + CriAtomExPlayerHn player, CriAtomEx3dSourceListHn source_list); + +/*EN + * \brief Set the 3D listener handle + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] listener 3D listener handle + * \par Description: + * Set the 3D listener handle used for 3D positioning.
+ * If you set a 3D listener handle and a 3D sound source handle, the orientation, volume and pitch are automatically applied (based on the the relative position of the 3D sound source from the 3D listener).
+ * If you set the 3D listener handle with this function and then start the playback by calling ::criAtomExPlayer_Start, + * the sound will be played back based on the 3D listener properties.
+ * After specifying the listener, you can also call the ::criAtomExPlayer_Update or ::criAtomExPlayer_UpdateAll functions + * to modify the 3D listener referenced by the sounds that are already being played.
+ * Passing NULL clears the 3D listener handle that was previously set.
+ * \par Remarks: + * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \attention + * To modify or update the parameters of a 3D listener, use the functions of the 3D listener object instead of those of the AtomEx player.
+ * By default, a left-handed coordinate system is used to calculate the 3D positioning.
+ * If you want to use a right-handed coordinate system, pass CRIATOMEX_COORDINATE_SYSTEM_RIGHT_HANDED for ::CriAtomExConfig::coordinate_system + * when initializing the library ( ::criAtomEx_Initialize function).
+ * When the sound is played back without using an ACB file, you must pass ::CRIATOMEX_PAN_TYPE_3D_POS to the ::criAtomExSetPanType function to explicitly enable the 3D positioning.
+ *
+ * \par Example: + * \code + * CriAtomEx3dListenerHn listener; + * CriAtomEx3dSourceHn source; + * CriAtomExVector pos; + * + * listener = criAtomEx3dListener_Create(NULL, NULL, 0); + * source = criAtomEx3dSource_Create(NULL, NULL, 0); + * player = criAtomExPlayer_Create(NULL, NULL, 0); + * criAtomExPlayer_Set3dListenerHn(player, listener); + * criAtomExPlayer_Set3dSourceHn(player, source); + * + * pos.x = 0.0f; + * pos.y = 0.0f; + * pos.z = 0.0f; + * criAtomEx3dSource_SetPosition(source, &pos); + * criAtomEx3dSource_Update(source); + * // Start the playback + * id = criAtomExPlayer_Start(player); + * : + * pos.x += 10.0f; + * criAtomEx3dSource_SetPosition(source, &pos); + * criAtomEx3dSource_Update(source); + * \endcode + * \sa CriAtomEx3dListenerHn, criAtomExPlayer_Set3dSourceHn, criAtomExPlayer_Update, criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_Set3dListenerHn( + CriAtomExPlayerHn player, CriAtomEx3dListenerHn listener); + +/*EN + * \brief Get an AISAC control value (specifying the control ID) + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] control_id control ID + * \return CriFloat32 control value (from 0.0f to 1.0f), -1.0f if not specified + * \par Description: + * Gets the control value of an AISAC (specified by its control ID).
+ * If no value has been set, -1.0f is returned.
+ * \attention + * This function gets the AISAC control value set to the AtomEx player.
+ * If the sound currently being played has an AISAC which controls the AISAC control value, you cannot get the modified value. + * \par Example: + * \code + * CriAtomExAisacControlId control_id = 0; + * CriFloat32 control_value = 0.5f; + * // Set the AISAC control value + * criAtomExPlayer_SetAisacControlById(player, control_id, control_value); + * // Start the playback + * id = criAtomExPlayer_Start(player); + * : + * // Get the AISAC control value + * control_value = criAtomExPlayer_GetAisacControlById(player, control_id); + * \endcode + * \sa criAtomExPlayer_SetAisacControlById, criAtomExPlayer_GetAisacControlByName + */ +CriFloat32 CRIAPI criAtomExPlayer_GetAisacControlById( + CriAtomExPlayerHn player, CriAtomExAisacControlId control_id); + +/*EN + * \brief Get an AISAC control value (specifying the control name) + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] control_name control name + * \return CriFloat32 control value (from 0.0f to 1.0f), -1.0f if not specified + * \par Description: + * Gets the control value of an AISAC (specified by its control name).
+ * If no value has been set, -1.0f is returned.
+ * \attention + * This function gets the AISAC control value set to the AtomEx player.
+ * If the sound currently being played has an AISAC which controls the AISAC control value, you cannot get the modified value. + * \par Example: + * \code + * const CriChar8 *control_name = "Any"; + * CriFloat32 control_value = 0.5f; + * // Set the AISAC control value + * criAtomExPlayer_SetAisacControlByName(player, control_name, control_value); + * // Start the playback + * id = criAtomExPlayer_Start(player); + * : + * // Get the AISAC control value + * control_value = criAtomExPlayer_GetAisacControlByName(player, control_name); + * \endcode + * \sa criAtomExPlayer_SetAisacControlByName, criAtomExPlayer_GetAisacControlById + */ +CriFloat32 CRIAPI criAtomExPlayer_GetAisacControlByName( + CriAtomExPlayerHn player, const CriChar8 *control_name); + +/*EN + * \brief Set the category (specifying its ID) + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] category_id category ID + * \par Description: + * Sets the category by specifying its ID.
+ * In order to remove the current category, use the ::criAtomExPlayer_UnsetCategory function.
+ * \par Remarks: + * If this function is called when a cue is playing, it overrides the category set on the data side.
+ * The category set with this function is cleared when the ACF file is registered and unregistered.
+ * When no ACF file is registered, one of the default categories can be used. + * Use ::CriAtomExCategoryDefaultId to specify the default category ID.
+ *
+ * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \par Example: + * \code + * // Set the default category + * criAtomExPlayer_SetCategoryById(player, (CriUint32)CRIATOMEXCATEGORY_DEFAULT_ID_BGM); + * \endcode + * \attention + * Set the category before starting the playback. If you update the category of a sound already playing, the category playback count may not be correct.
+ * \sa criAtomExPlayer_UnsetCategory, criAtomExPlayer_SetCategoryByName, criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_SetCategoryById( + CriAtomExPlayerHn player, CriUint32 category_id); + +/*EN + * \brief Set the category (specifying its name) + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] category_name category name + * \par Description: + * Sets the category by specifying its name.
+ * In order to remove the current category, use the ::criAtomExPlayer_UnsetCategory function.
+ * \par Remarks: + * It is similar to the ::criAtomExPlayer_SetCategoryById function, except that the category is specified by name. + * Use CRIATOMEXCATEGORY_DEFAULT_NAME_??? for the default category name.
+ *
+ * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \par Example: + * \code + * // Set the default category + * criAtomExPlayer_SetCategoryByName(player, CRIATOMEXCATEGORY_DEFAULT_NAME_BGM); + * \endcode + * \sa criAtomExPlayer_UnsetCategory, criAtomExPlayer_SetCategoryById, criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_SetCategoryByName( + CriAtomExPlayerHn player, const CriChar8 *category_name); + +/*EN + * \brief Remove a category + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \par Description: + * Removes the category set to a player handle.
+ * \par Example: + * \code + * // Unset the category + * criAtomExPlayer_UnsetCategory(player); + * \endcode + * \sa criAtomExPlayer_SetCategoryByName, criAtomExPlayer_SetCategoryById + */ +void CRIAPI criAtomExPlayer_UnsetCategory(CriAtomExPlayerHn player); + +/*EN + * \brief Acquiring the number of categories + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \return CriSint32 Number of categories + * \par Description: + * Acquires the number of categories that are set for the player handle. + */ +CriSint32 CRIAPI criAtomExPlayer_GetNumCategories(CriAtomExPlayerHn player); + +/*EN + * \brief Acquiring category information (by specifying an index) + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] index Index + * \param[out] info Category information + * \return CriBool Whether information is acquired or not. (Acquired: CRI_TRUE/not acquired: CRI_FALSE) + * \par Description: + * Acquires category information that is set for the player handle by specifying an index.
+ * If the category for the specified index does not exist, this function returns CRI_FALSE. + */ +CriBool CRIAPI criAtomExPlayer_GetCategoryInfo(CriAtomExPlayerHn player, CriUint16 index, CriAtomExCategoryInfo* info); + +/*EN + * \brief Set the track information + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] num_tracks the number of tracks + * \param[in] channels_per_track the number of channels per track + * \par Description: + * Sets the track configuration for a multichannel sound.
+ * By using this function, you can treat a 6ch sound as 6 mono tracks or 3 + * stereo tracks.
+ * \par Example: + * \code + * : + * // Specify the track information + * // Remark) Treat the 6ch sound as 3 stereo tracks + * CriSint32 channels_per_track[3] = { 2, 2, 2 }; + * criAtomExPlayer_SetTrackInfo(params.player, 3, channels_per_track); + * : + * // Set the volume for each track + * criAtomExPlayer_SetTrackVolume(params.player, 0, 1.0f); + * criAtomExPlayer_SetTrackVolume(params.player, 1, 0.5f); + * criAtomExPlayer_SetTrackVolume(params.player, 2, 0.25f); + * : + * \endcode + * \attention + * This function uses the ::criAtomExPlayer_SetSendLevel function internally.
+ * Therefore, when you use the ::criAtomExPlayer_SetSendLevel function after calling this function, + * the output position or the volume of the sound may not be as intended.
+ * (Similarly, the ::criAtomExPlayer_SetPan3dAngle function cannot be used).
+ * This function is available only on platforms which support 3 or more input channels.
+ * A linking error happens for platforms which only support 2 (stereo) or fewer channels.
+ * \sa criAtomExPlayer_SetTrackVolume + */ +void CRIAPI criAtomExPlayer_SetTrackInfo(CriAtomExPlayerHn player, + CriSint32 num_tracks, const CriSint32 *channels_per_track); + +/*EN + * \brief Set the track volume + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] track_no track number + * \param[in] volume track volume + * \par Description: + * Sets the volume of a track.
+ * \par Remarks: + * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \attention + * This function can be only be called on a player for which the track information was set (by using ::criAtomExPlayer_SetTrackInfo).
+ *
+ * This function uses the ::criAtomExPlayer_SetSendLevel function internally.
+ * Therefore, when you use the ::criAtomExPlayer_SetSendLevel function after calling this function, + * the output position or the volume of the sound may not be as intended.
+ * (Similarly, the ::criAtomExPlayer_SetPan3dAngle function cannot be used).
+ * This function is available only on platforms which support 3 or more input channels.
+ * A linking error happens for platforms which only support 2 (stereo) or fewer channels.
+ * \sa criAtomExPlayer_SetTrackInfo, criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_SetTrackVolume( + CriAtomExPlayerHn player, CriSint32 track_no, CriFloat32 volume); + +/*EN + * \brief Set the silence-handling mode + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] silent_mode silence-handling mode + * \par Description: + * Determines how the silence is handled.
+ * If you specify the silence-handling mode with this function and then start the playback by calling ::criAtomExPlayer_Start, + * the sound will be played using the specified silence-handling mode.
+ * After specifying the mode, you can also call the ::criAtomExPlayer_Update or the ::criAtomExPlayer_UpdateAll functions + * to update mode for the sounds that are already playing.
+ *
+ * For more information on the silence-handling mode, see ::CriAtomExSilentMode.
+ * Its default value is ::CRIATOMEX_SILENT_MODE_NORMAL.
+ * \par Example: + * \code + * // Set the silence mode + * criAtomExPlayer_SetSilentMode(player, CRIATOMEX_SILENT_MODE_STOP); + * // Start the playback + * id = criAtomExPlayer_Start(player); + * : + * // Change the volume to silence + * volume = 0.0f; + * criAtomExPlayer_SetVolume(player, volume); + * criAtomExPlayer_Update(player, id); + * \endcode + * \par Remarks: + * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \sa CriAtomExSilentMode, criAtomExPlayer_Start, criAtomExPlayer_Update, criAtomExPlayer_UpdateAll, criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_SetSilentMode( + CriAtomExPlayerHn player, CriAtomExSilentMode silent_mode); + +/*EN + * \brief Set the Cue priority + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] cue_priority Cue priority + * \par Description: + * Sets the cue priority for an AtomEx player.
+ * If you set a cue priority with this function and then play a sound with the ::criAtomExPlayer_Start function, + * that sound will be played back based on the cue priority that you set.
+ * The default priority value before this function is executed is 0.
+ * \par Note: + * If the maximum number of sounds allowed for the cue's category is reached + * when the AtomEx player plays the cue, voices are controlled / limited based on the priority.
+ * If the AtomEx player's playback request has a higher priority than the cue being played, + * the AtomEx player stops the current cue and starts the requested playback.
+ * (The sound being played back is stopped, and another sound is played.)
+ * On the other hand, if the AtomEx player's playback request has a lower priority, + * the playback request is rejected.
+ * (The requested cue is not played.)
+ * If the AtomEx player's playback request has the priority than the cue being played, + * the AtomEx player controls voices in a last-in, first-out order.
+ *
+ * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \sa criAtomExPlayer_Start, criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_SetCuePriority( + CriAtomExPlayerHn player, CriSint32 cue_priority); + +/*EN + * \brief Setting the pre-delay time + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] predelay_time_ms Pre-delay (0.0f - 10000.0f) + * \par Description: + * Sets the pre-delay time.
+ * After setting the pre-delay time with this function, + * when playback is started by the ::criAtomExPlayer_Start function, wait for the set pre-delay time pronunciation.
+ *
+ * For the pre-delay time, specify a real value in the range of 0.0f to 10000.0f. The unit is ms (milliseconds).
+ * The default value of the pre-delay time is 0.0f.
+ * \attention + * It can not be updated by the ::criAtomExPlayer_Update function or the ::criAtomExPlayer_UpdateAll function during playback.
+ * \par Note: + * When the cue is played back, if this function is called when the pre-delay time is set on the data side, + * the value set on the data side plus the setting value of this function is applied.
+ * \sa criAtomExPlayer_Start + */ +void CRIAPI criAtomExPlayer_SetPreDelayTime( + CriAtomExPlayerHn player, CriFloat32 predelay_time_ms); + +/*EN + * \brief Set the attack time of the envelope + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] attack_time_ms attack time (from 0.0f to 2000.0f) + * \par Description: + * Sets the attack time of an envelope.
+ * If you set the attack time with this function and then start the playback with the ::criAtomExPlayer_Start function, the sound will be played back using the specified attack time.
+ *
+ * For the attack time, specify a real number from 0.0f to 2000.0f (the unit is a millisecond).
+ * The default attack time is 0.0f (i.e. no attack).
+ * \attention + * You cannot update the attack time using the ::criAtomExPlayer_Update or ::criAtomExPlayer_UpdateAll functions during playback.
+ * \par Example: + * \code + * CriFloat32 attack_time_ms = 10.0f; + * // Set the attack time + * criAtomExPlayer_SetEnvelopeAttackTime(player, attack_time_ms); + * // Start the playback (attack time=10ms) + * criAtomExPlayer_Start(player); + * \endcode + * \par Remarks: + * If you call this function during cue playback, any attack time already set in the data will be overwritten (i.e. the setting in the data is ignored).
+ *
+ * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \sa criAtomExPlayer_Start, criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_SetEnvelopeAttackTime( + CriAtomExPlayerHn player, CriFloat32 attack_time_ms); + +/*EN + * \brief Set the hold time of the envelope + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] hold_time_ms hold time (from 0.0f to 2000.0f) + * \par Description: + * Sets the hold time of an envelope.
+ * If you specify the hold time with this function and then start the playback with the ::criAtomExPlayer_Start function, the sound will be played with the specified hold time.
+ *
+ * For the hold time, specify a real number from 0.0f to 2000.0f (the unit is a milliseconds).
+ * The default hold time is 0.0f (no hold).
+ * \attention + * You cannot update the hold time using the ::criAtomExPlayer_Update or ::criAtomExPlayer_UpdateAll functions during playback.
+ * \par Example: + * \code + * CriFloat32 hold_time_ms = 10.0f; + * // Set the hold time + * criAtomExPlayer_SetEnvelopeHoldTime(player, hold_time_ms); + * // Start the playback (hold time=10ms) + * criAtomExPlayer_Start(player); + * \endcode + * \par Remarks: + * If you call this function during cue playback, any hold time already set in the data will be overwritten.
+ *
+ * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \sa criAtomExPlayer_Start, criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_SetEnvelopeHoldTime( + CriAtomExPlayerHn player, CriFloat32 hold_time_ms); + +/*EN + * \brief Set the decay time of the envelope + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] decay_time_ms decay time (from 0.0f to 2000.0f) + * \par Description: + * Sets the decay time of the envelope.
+ * If you specify the decay time with this function and then start the playback with the ::criAtomExPlayer_Start function, the sound will be played with the specified decay time.
+ *
+ * For the decay time, specify a real number from 0.0f to 2000.0f (the unit is a millisecond).
+ * The default decay time is 0.0f (no decay).
+ * \attention + * You cannot update the decay time using the ::criAtomExPlayer_Update or ::criAtomExPlayer_UpdateAll functions during playback.
+ * \par Example: + * \code + * CriFloat32 decay_time_ms = 10.0f; + * // Set the decay time + * criAtomExPlayer_SetEnvelopeDecayTime(player, decay_time_ms); + * // Start the playback (decay time=10ms) + * criAtomExPlayer_Start(player); + * \endcode + * \par Remarks: + * If you call this function during cue playback, any decay time already set in the data will be overwritten (i.e. the setting in the data is ignored).
+ *
+ * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \sa criAtomExPlayer_Start, criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_SetEnvelopeDecayTime( + CriAtomExPlayerHn player, CriFloat32 decay_time_ms); + +/*EN + * \brief Set the release time of the envelope + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] release_time_ms release time (from 0.0f to 10000.0f) + * \par Description: + * Sets the release time of the envelope.
+ * If you specify the release time with this function and then start the playback with the ::criAtomExPlayer_Start function, the sound will be played with the specified release time.
+ *
+ * For the release time, specify a real number from 0.0f to 10000.0f (the unit is a millisecond).
+ * The default release time is 0.0f (no release).
+ * \attention + * You cannot update the release time using the ::criAtomExPlayer_Update or ::criAtomExPlayer_UpdateAll functions during playback.
+ * \par Example: + * \code + * CriFloat32 release_time_ms = 3000.0f; + * // Set the release time + * criAtomExPlayer_SetEnvelopeReleaseTime(player, release_time_ms); + * // Start the playback (release time=3000ms) + * criAtomExPlayer_Start(player); + * \endcode + * \par Remarks: + * If you call this function during cue playback, any release time already set in the data will be overwritten (i.e. the setting in the data is ignored).
+ *
+ * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \sa criAtomExPlayer_Start, criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_SetEnvelopeReleaseTime( + CriAtomExPlayerHn player, CriFloat32 release_time_ms); + +/*EN + * \brief Set the sustain level of the envelope + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] sustain_level sustain level (from 0.0f to 1.0f) + * \par Description: + * Sets the sustain level of the envelope.
+ * If you specify the sustain level with this function and then start the playback with the ::criAtomExPlayer_Start function, the sound will be played with the specified sustain level.
+ *
+ * For the sustain level, specify a real number between 0.0f to 1.0f.
+ * The default sustain level is 0.0f (no sustain).
+ * \attention + * You cannot update the sustain level using the ::criAtomExPlayer_Update or ::criAtomExPlayer_UpdateAll function while playing back.
+ * \par Example: + * \code + * CriFloat32 susutain_level = 0.5f; + * // Set the sustain level + * criAtomExPlayer_SetEnvelopeSustainLevel(player, susutain_level); + * // Start the playback (sustain level=0.5) + * criAtomExPlayer_Start(player); + * \endcode + * \par Remarks: + * If you call this function during cue playback, any sustain level already set in the data will be overwritten (i.e. the setting in the data is ignored).
+ *
+ * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \sa criAtomExPlayer_Start, criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_SetEnvelopeSustainLevel( + CriAtomExPlayerHn player, CriFloat32 susutain_level); + +/*EN + * \brief Register the data request callback function + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] func data request callback function + * \param[in] obj user-specified object + * \par Description: + * Registers a data request callback function.
+ *
+ * The data request callback is used to play back multiple sounds by seamlessly concatenating them.
+ * It is called when the Atom player used internally by a Voice requires data for the concatenated playback.
+ * (The callback function is called when the next chunk of data to be played back is required.)
+ * By supplying the new data to the Atom player (within the registered callback, using functions such as ::criAtomPlayer_SetData), + * it can be concatenated seamlessly with the previous data and played back.
+ * In addition, by calling the ::criAtomPlayer_SetPreviousDataAgain function within the callback, + * the same data can be played back repeatedly.
+ * \par Remarks: + * If no new data is supplied within the registered callback function, the status of the AtomEx player + * changes to CRIATOMEXPLAYER_STATUS_PLAYEND when the playback of current data is finished.
+ *
+ * If you do not want the status to be changed to CRIATOMEXPLAYER_STATUS_PLAYEND + * even when you cannot supply data due to problems such as timing issues, call + * ::criAtomPlayer_DeferCallback within the callback function.
+ * By executing this function, the data request callback function + * wil be called again after about 1V.
+ * However, if you call the ::criAtomPlayer_DeferCallback function, the playback may stop temporarily + * (silence will be inserted at the concatenation point).
+ * \par Example: + * By executing the following code, the data in buffer1 and buffer2 is + * concatenated and played back seamlessly.
+ * (Then, the data in buffer2 is repeatedly played back.)
+ * \code + * // Data request callback function + * void on_data_request(void *obj, CriAtomExPlaybackId id, CriAtomPlayerHn player) + * { + * // Set the data to be played back without a break + * criAtomPlayer_SetData(player, buffer2, buffer_size2); + * } + * + * main() + * { + * : + * // Register the data request callback function + * criAtomExPlayer_SetDataRequestCallback(player, on_data_request, NULL); + * + * // Set the sound data + * criAtomExPlayer_SetData(player, buffer1, buffer_size1); + * + * // Play the sound data + * criAtomExPlayer_Start(player); + * : + * } + * \endcode + * By using the following code, the same sound data can be played back in loop infinitely.
+ * \code + * // Data request callback function + * void on_data_request(void *obj, CriAtomExPlaybackId id, CriAtomPlayerHn player) + * { + * // Set the previously-played data again + * criAtomPlayer_SetPreviousDataAgain(player); + * } + * + * main() + * { + * : + * // Register the data request callback function + * criAtomExPlayer_SetDataRequestCallback(player, on_data_request, NULL); + * + * // Set the sound data + * criAtomExPlayer_SetData(player, buffer, buffer_size); + * + * // Play the sound data + * criAtomExPlayer_Start(player); + * : + * } + * \endcode + * \attention + * The callback function must be set before starting playback.
+ * You cannot set a callback for sounds already being played + * or change a callback that has already been set.
+ *
+ * When a Cue containing multiple waveforms is played, + * the callback function is triggered when the playback of the first waveform has finished.
+ * Therefore, when concatenated playback is performed on a Cue containing multiple waveforms, + * they may be played back in unexpected ways.
+ * When you use this feature, you should play Cues containing only one waveform or + * play back file or in-memory data.
+ *
+ * Note that if you block the processing in the data request callback function for a long time, + * problems -such as the audio breaking up- may occur.
+ *
+ * The functions that can be called within the callback are:
+ * - criAtomExAcb_GetWaveformInfoById (argument cannot be NULL) + * - criAtomExAcb_GetWaveformInfoByName (argument cannot be NULL) + * - criAtomExAcb_GetOnMemoryAwbHandle + * - criAtomExAcb_GetStreamingAwbHandle + * - criAtomPlayer_SetData + * - criAtomPlayer_SetFile + * - criAtomPlayer_SetContentId + * - criAtomPlayer_SetWaveId + * - criAtomPlayer_SetPreviousDataAgain + * - criAtomPlayer_DeferCallback + * . + * When a function that is not listed above is called within a callback function, + * problems such as error callback or deadlock may occur.
+ *
+ * If the codec used does not support seamless concatenated playback, the data will not be continuously played + * even when the next chunk of data is set within the data request callback function. + *
+ * - If you are using the HCA-MX codec, data will not be concatenated seamlessly + * and some silence will be inserted between the current sound and the next. + * - An error may occur when using platform-specific audio codecs. + * Also, when waveform data with loop information is set within the data request + * callback function, the loop playback is not performed.
+ * (The loop points are discarded and the playback ends.)
+ * \sa CriAtomExPlayerDataRequestCbFunc, criAtomPlayer_SetData, + * criAtomPlayer_SetPreviousDataAgain, criAtomPlayer_DeferCallback + */ +void CRIAPI criAtomExPlayer_SetDataRequestCallback( + CriAtomExPlayerHn player, CriAtomExPlayerDataRequestCbFunc func, void *obj); + +/*EN + * \brief Register the wave filter callback function + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] func wave filter callback function + * \param[in] obj user-specified object + * \par Description: + * Registers a callback function to be called when decoded PCM data is supplied.
+ * This callback is triggered when the sound data for the Voice has been decoded.
+ * \attention + * You can register this callback function only on stopped players.
+ * You cannot register it on players currently playing.
+ * (If you do so, an error callback will be triggered and the registration will fail.)
+ *
+ * If you play a cue containing multiple audio data, callback will be executed only for the first waveform data found.
+ * (For cues containing multiple waveform data, it is not possible to take information on the second and subsequent waveform data.)
+ *
+ * Do not call Atom library APIs within the callback function.
+ * Indeed this callback function is called from the server processing in the Atom library.
+ * Therefore, when APIs that cannot be interrupted are called, + * problems such as errors or deadlocks may occur.
+ *
+ * Note that when you block the processing within the wave filter callback for a long time, + * some problems such as audio breakups may occur.
+ *
+ * The filter callback is not available when using HCA-MX or a platform-specific codec.
+ * \sa CriAtomExPlayerFilterCbFunc + */ +void CRIAPI criAtomExPlayer_SetFilterCallback( + CriAtomExPlayerHn player, CriAtomExPlayerFilterCbFunc func, void *obj); + +/*EN + * \brief Set the random number seed + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] seed random number seed + * \par Description: + * Sets the random seed used for the pseudo random number generator of this AtomEx player.
+ * By setting the random seed, a random playback process can be reproduced.
+ *
+ * \sa criAtomEx_SetRandomSeed + */ +void CRIAPI criAtomExPlayer_SetRandomSeed(CriAtomExPlayerHn player, CriUint32 seed); + +/*EN + * \brief Set a DSP parameter + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] param_id parameter ID (0 - 7) + * \param[in] param_val parameter value (0.0f - 1.0f) + * \par Description: + * Sets the value of a DSP parameter.
+ * Before enabling a DSP, it must be attached to a Voice Pool.
+ * \par Remarks: + * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \sa criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_SetDspParameter( + CriAtomExPlayerHn player, CriSint32 param_id, CriFloat32 param_val); + + +/*EN + * \brief Attach a global AISAC to a player + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] global_aisac_name name of the global AISAC to be attached + * \par Description: + * Attaches a global AISAC to a player. + * An AISAC can be used even if it is not set to a Cue or a track.
+ * After attaching an AISAC with this function, when you call ::criAtomExPlayer_Start various parameters of the new sound can be modified based on the AISAC.
+ * After attaching the AISAC, you can also call the ::criAtomExPlayer_Update or ::criAtomExPlayer_UpdateAll functions + * to apply the AISAC to the sounds already being played.
+ *
+ * If the attachment failed, an error callback occurs.
+ * To know the reason of the failure, refer to the error callback message.
+ * \par Example: + * \code + * // Attach a global Aisac + * criAtomExPlayer_AttachAisac(player, "GlobalAisac1"); + * criAtomExPlayer_SetAisacControlByName(player, "Any", 0.5f); + * criAtomExPlayer_Start(player); + * \endcode + * \par Remarks: + * Only global AISACs defined in the global settings (ACF file) can be attached.
+ * In order for the global AISAC to have an effect, the relevant AISAC control value must be set, like for any AISAC configured for Cues or tracks.
+ *
+ * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \attention + * Even when an AISAC is set to a Cue or a track, the resulting AISAC control value does not affect the global AISAC attached to the player. + * Currently, attaching an AISAC whose control type is "auto modulation" or "random" is not supported.
+ * Also, the maximum number of AISACs that can be attached to a player is eight. + * \sa criAtomExPlayer_DetachAisac, criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_AttachAisac(CriAtomExPlayerHn player, const CriChar8* global_aisac_name); +void CRIAPI criAtomExPlayer_AttachAisacByIndex(CriAtomExPlayerHn player, CriUint16 global_aisac_index); + +/*EN + * \brief Detach an AISAC from the player + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player + * \param[in] global_aisac_name name of the global AISAC to be detached + * \par Description: + * Detaches a global AISAC from a player.
+ * After detaching an AISAC with this function, if you start a new sound by calling ::criAtomExPlayer_Start, the now-detached AISAC will not affect the playback anymore.
+ * After detaching the AISAC, if you call the ::criAtomExPlayer_Update or ::criAtomExPlayer_UpdateAll functions, + * even the sounds already being played will not be affected by the AISAC anymore.
+ *
+ * If this function fails, an error callback will be triggered.
+ * To know the reason of the failure, refer to the error callback message.
+ * \sa criAtomExPlayer_AttachAisac + */ +void CRIAPI criAtomExPlayer_DetachAisac(CriAtomExPlayerHn player, const CriChar8* global_aisac_name); +void CRIAPI criAtomExPlayer_DetachAisacByIndex(CriAtomExPlayerHn player, CriUint16 global_aisac_index); + +/*EN + * \brief Detach all the AISACs from a player + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player + * \par Description: + * Detaches all global AISACs from a player.
+ * After detaching the AISACs with this function, if you start a new sound by calling ::criAtomExPlayer_Start, no global AISAC will affect the playback anymore.
+ * After detaching the AISACs, if you call the ::criAtomExPlayer_Update or ::criAtomExPlayer_UpdateAll functions, + * even the sounds already being played will not be affected by the AISACs anymore.
+ * \sa criAtomExPlayer_AttachAisac + */ +void CRIAPI criAtomExPlayer_DetachAisacAll(CriAtomExPlayerHn player); + +/*EN + * \brief Get the number of AISACs attached to a player + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player + * \return The number of AISACs attached to the player + * \par Description: + * Gets the number of AISACs attached to a player. + */ +CriSint32 CRIAPI criAtomExPlayer_GetNumAttachedAisacs(CriAtomExPlayerHn player); + +/*EN + * \brief Get information on a specific AISAC attached to a player + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player + * \param[in] aisac_attached_index index of the AISAC + * \param[out] aisac_info AISAC information + * \retval CRI_TRUE = the information was successfully obtained + * \retval CRI_FALSE = failed to get information + * \par Description: + * Gets information on a specific AISAC attached to a player.
+ * If an invalid index was specified, CRI_FALSE is returned.
+ * \sa criAtomExPlayer_GetNumAttachedAisacs + */ +CriBool CRIAPI criAtomExPlayer_GetAttachedAisacInfo( + CriAtomExPlayerHn player, + CriSint32 aisac_attached_index, + CriAtomExAisacInfo *aisac_info +); + +/*EN + * \brief Set the streaming cache for player + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player + * \param[in] cache_id ID of the streaming cache to be used in the player + * \par Description: + * Sets a streaming cache (by specifying its ID) to be used by a player.
+ * \attention + * Later, you have to destroy the player before destroying the streaming cache.
+ * If they are not destroyed in this order, the result is undefined.
+ * \sa criAtomStreamingCache_Create, criAtomStreamingCache_Destroy + */ +void CRIAPI criAtomExPlayer_SetStreamingCacheId( + CriAtomExPlayerHn player, CriAtomExStreamingCacheId cache_id); + +/*EN + * \brief Attach a Tween to a player + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] tween Tween handle + * \par Description: + * Attaches a Tween to a player. + * A Tween makes it possible to modify the player's parameters smoothly over time.
+ * After attaching a Tween, the parameters will be updated according to the Tween when a new sound is started with the ::criAtomExPlayer_Start function.
+ * The parameters of already-playing sounds will also be modified by the Tween after calling the ::criAtomExPlayer_Update or the ::criAtomExPlayer_UpdateAll functions.
+ * \par Example: + * \code + * // Create a Tween to fade the volume + * CriAtomExTweenConfig config; + * criAtomExTween_SetDefaultConfig(&config); + * + * config.parameter_type = CRIATOMEX_PARAMETER_TYPE_BASIC; + * config.id.parameter_id = CRIATOMEX_PARAMETER_ID_VOLUME; + * fade_tween = criAtomExTween_Create(&config, NULL, 0); + * + * // Attach the Tween + * criAtomExPlayer_AttachTween(player, fade_tween); + * + * // Start the playback + * criAtomExPlayer_Start(player); + * : + * : + * // Fade the volume to 0.2 over one second + * criAtomExTween_MoveTo(fade_tween, 1000, 0.2f); + * : + * : + * // Restore the volume to 1.0 over two seconds + * criAtomExTween_MoveTo(fade_tween, 2000, 1.0f); + * \endcode + * \par Remarks: + * Parameters changed by a Tween are added to, multiplied by, or overwrite the parameters set for the AtomEx Player.
+ * The operation (addition, multiplication, or overwriting) is the same than for the corresponding AtomEx Player setting functions ( ::criAtomExPlayer_SetVolume etc.). + * For example, the volume is multiplied, while an AISAC control value is overwritten.
+ * Currently, up to eight Tweens can be attached to a player.
+ *
+ * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \sa criAtomExPlayer_DetachTween, criAtomExPlayer_DetachTweenAll, criAtomExTween_Create, criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_AttachTween(CriAtomExPlayerHn player, CriAtomExTweenHn tween); + +/*EN + * \brief Detach a Tween from a player + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx Player + * \param[in] tween handle of the Tween to be detached + * \par Description: + * Detaches a Tween from a player.
+ * Once this function is called, a sound started by the ::criAtomExPlayer_Start function will not be affected by the Tween.
+ * Calling the ::criAtomExPlayer_Update or ::criAtomExPlayer_UpdateAll functions after detaching the Tween + * will also cancel its effect on the sounds that are being played back.
+ * \sa criAtomExPlayer_AttachTween + */ +void CRIAPI criAtomExPlayer_DetachTween(CriAtomExPlayerHn player, CriAtomExTweenHn tween); + +/*EN + * \brief Detach all Tweens from a player + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx Player + * \par Description: + * Detaches all the Tweens from a player.
+ * Once this function is called, sounds started by the ::criAtomExPlayer_Start function will not be affected by any Tween.
+ * Calling the ::criAtomExPlayer_Update or ::criAtomExPlayer_UpdateAll functions after detaching the Tweens + * will also cancel their effect on the sounds that are being played back.
+ * \sa criAtomExPlayer_AttachTween + */ +void CRIAPI criAtomExPlayer_DetachTweenAll(CriAtomExPlayerHn player); + +/*EN + * \brief Set the start block (by specifying a block index) + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] index block index + * \par Description: + * Sets the index of the starting block for playback with an AtomEx player.
+ * If you use this function and then start playing the block sequence cue by calling the + * ::criAtomExPlayer_Start function, the playback will start at the specified block. + * \par Example: + * \code + * main() + * { + * : + * // Specify the audio data to play + * criAtomExPlayer_SetCueIndex(player, acb_hn, 300); + * + * // Specify the start block + * criAtomExPlayer_SetFirstBlockIndex(player, 1); + * + * // Start the playback + * criAtomExPlayer_Start(player); + * : + * } + * \endcode + * \par Remarks: + * By default, the index of the starting block for an AtomEx player is 0.
+ * If the cue that is set for the player is not a block sequence when the ::criAtomExPlayer_Start function starts playback, + the value set with this function is ignored.
+ * If there is no block with the specified index, playback is started at the first block.
+ * In this case, a warning appears saying that a block is missing at the specified index.
+ * \par Note: + * The ::criAtomExPlayback_SetNextBlockIndex function is used to transition to a another block after the playback is started. + * The ::criAtomExPlayback_GetCurrentBlockIndex function is used to get the index of the block being played back.
+ *
+ * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \sa criAtomExPlayer_Start, criAtomExPlayback_SetNextBlockIndex, criAtomExPlayback_GetCurrentBlockIndex, criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_SetFirstBlockIndex( + CriAtomExPlayerHn player, CriAtomExBlockIndex index); + +/*EN + * \brief Register the block transition callback function + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] func block transition callback function + * \param[in] obj user-specified object + * \par Description: + * Registers a callback function that is triggered + * when a block transition occurs during the playback of a block sequence.
+ * \attention + * The registeration of this callback function is possible only when the player is stopped.
+ * It is not possible to register a callback function for a player which is in the play status.
+ * (An error callback will occur and the registeration will fail.)
+ *
+ * Do not execute the Atom library APIs within the callback function.
+ * Since the callback function is executed from the server process within the Atom library, + * if you execute a function that does not support interrupts, + * an error or a deadlock may occur.
+ *
+ * If the process is blocked within the callback function over a long period of time, + * problems -such as the audio breaking up- may occur.
+ *
+ * \sa CriAtomExPlayerBlockTransitionCbFunc + */ +void CRIAPI criAtomExPlayer_SetBlockTransitionCallback( + CriAtomExPlayerHn player, CriAtomExPlayerBlockTransitionCbFunc func, void *obj); + +/*EN + * \brief Acquire a sound object + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \return Sound object handle + * \par Description: + * Acquires the sound object associated with the specified AtomEx player.
+ * NULL is returned if no sound object is associated. + * \sa CriAtomExSoundObjectHn, criAtomExSoundObject_AddPlayer + */ +CriAtomExSoundObjectHn CRIAPI criAtomExPlayer_GetSoundObject(CriAtomExPlayerHn player); + +/*EN + * \brief Set the dry send level (for compatibility with CRI Audio) + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] spk Speaker ID + * \param[in] offset Dry send level offset (added value) + * \param[in] gain Dry send level gain (multiplied value) + * \par Description: + * Sets the dry send level of the output sound.
+ * This function is provided for CRI Audio compatibility. It exhibits the same behavior than the dry send level in CRI Audio.
+ * After setting the dry send level with this function, any new sound started by calling ::criAtomExPlayer_Start will use that level.
+ * After executing this function, you can also call the ::criAtomExPlayer_Update or ::criAtomExPlayer_UpdateAll functions to update the dry send level + * of the sounds that have already been playing.
+ *
+ * You can specify the dry send level for each speaker individually during playback.
+ * Which input channel is sent to each speaker depends on the number of channels of the waveform. + * For example, in the case of a mono waveform, channel 0 is output to all speakers. + * A stereo waveform will output channel 0 (L channel) to all the left-side speakers (L, SL, SBL) + * and channel 1 (R channel) to all the right-side speakers (R, SR, SBL). + * (When a dry send level is used, the stereo sound is not output to the center speaker or LFE.)
+ *
+ * The dry send level is added to the output level based on the pan 3D and send level settings.
+ * The range and handling of the dry send level are basically the same than for the volume. Therefore, refer to the ::criAtomExPlayer_SetVolume function for details.
+ * The default dry send level is 0.0f.
+ *
+ * \par Example: + * \code + * main() + * { + * : + * // Remarks: Here it is assumed that the sound to be played is mono + * // Set the dry send level (halve the data-side value and add 0.2f). + * criAtomExPlayer_SetDrySendLevel(player, CRIATOMEX_SPEAKER_FRONT_CENTER, 0.2f, 0.5f); + * + * // Start the playback + * // Remarks: The dry send level used is the value set to the player. + * id = criAtomExPlayer_Start(player); + * : + * // Set the dry send level (disable the data-side value and overwrite with 0.8f). + * // Note: the dry send level of the sounds currently playing is not changed at this point. + * criAtomExPlayer_SetDrySendLevel(player, CRIATOMEX_SPEAKER_FRONT_CENTER, 0.8f, 0.0f); + * + * // Apply the dry send level to the sounds that were already playing. + * criAtomExPlayer_Update(player, id); + * : + * } + * \endcode + * \par Remarks: + * If this function is called when there is a dry send level set from the data side (e.g. during Cue playback), + * the value set in the data is multiplied by the gain parameter and the offset parameter is added to that result.
+ * For example, if the data-side dry send level is 1.0f and the AtomEx player dry send level has an offset of 0.2f and gain of 0.5f, + * the actual send level will be 0.7f.
+ * The dry send level can normally not be set using CRI Atom Craft. It will be set in the data + * only when importing a project file created with CRI Audio Craft.
+ * Normally when playing 6-channel materials, the sound is output automatically from the center and LFE channels, + * but that will not be the case if the dry send level is set, either on the data-side or by using this function. + * Similarly, the center/LFE channel mix levels set in CRI Atom Craft are disabled when the dry send level is set.
+ *
+ * This parameter is cleared by ::criAtomExPlayer_ResetParameters function. + * \sa criAtomExPlayer_Start, criAtomExPlayer_Update, criAtomExPlayer_UpdateAll, criAtomExPlayer_ResetParameters + */ +void CRIAPI criAtomExPlayer_SetDrySendLevel( + CriAtomExPlayerHn player, CriAtomExSpeakerId spk, CriFloat32 offset, CriFloat32 gain); + +/*EN + * \brief Set selector information to the player + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \param[in] selector Selector name + * \param[in] label Label name + * \par Description: + * Set a selector and a label (specified by their names) to the player.
+ * When playing a Cue that has selector labels specified for its tracks, only the tracks matching the selector label passed to this function will be played.
+ * The selector and label names are both defined in the ACF header.
+ * To clear the label information set to the player, execute the ::criAtomExPlayer_ClearSelectorLabels function.
+ * To delete all of the player settings including the label information, execute the ::criAtomExPlayer_ResetParameters function.
+ * \sa criAtomExPlayer_ClearSelectorLabels, criAtomExPlayer_ResetParameters, criAtomExPlayer_Update, criAtomExPlayer_UpdateAll + */ +void CRIAPI criAtomExPlayer_SetSelectorLabel( + CriAtomExPlayerHn player, const CriChar8 *selector, const CriChar8 *label); + + +/*EN + * \brief Clear the selector information set to the player + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx player handle + * \par Description: + * Clear all selector and label names set to the player.
+ * After executing this function, you can call the ::criAtomExPlayer_Update or ::criAtomExPlayer_UpdateAll functions to + * clear the selector information from the currently playing sounds. However, note that no currently playing sound will be stopped. + * \sa criAtomExPlayer_SetSelectorLabel, criAtomExPlayer_Update, criAtomExPlayer_UpdateAll + */ +void CRIAPI criAtomExPlayer_ClearSelectorLabels(CriAtomExPlayerHn player); + +/*EN + * \brief Registering playback track number notification callback function + * \ingroup ATOMEXLIB_PLAYER + * \param[in] player AtomEx Player handle + * \param[in] func Playback track number notification callback function + * \param[in] obj User specified object + * \par Description: + * Register the callback function to notify the played track number.
+ * The registered callback function is called when playing a cue other than polyphonic type.
+ * \attention + * Registering the callback function is possible only for players which are stopped.
+ * Can not register a callback for the player that is playing.
+ * (Error call back occurs and registration fails.)
+ *
+ * Do not execute the API of the Atom library within the callback function.
+ * The callback function is executed from the server process in the Atom library.
+ * Therefore, if you execute an API that does not consider interrupts to server processing, + * errors may occur or deadlock may occur.
+ *
+ * Only one callback function can be registered.
+ * If perform a registration operation more than once, + * the already registered callback function will be overwritten by the callback function registered later.
+ *
+ * Registering registered functions can be canceled by specifying NULL for func.
+ * \sa CriAtomExPlayerPlaybackTrackInfoNotificationCbFunc + */ +void CRIAPI criAtomExPlayer_SetPlaybackTrackInfoNotificationCallback( + CriAtomExPlayerHn player, CriAtomExPlayerPlaybackTrackInfoNotificationCbFunc func, void *obj); + +/*EN + * \brief Registration of playback event callback + * \ingroup ATOMEXLIB_PLAYER + * \param[in] func Replay event callback function + * \param[in] obj User specified object + * \par Description: + * Register playback event callback.
+ * By registering a playback event callback using this function, + * detailed information (play source AtomEx player or playback ID) that a playback event + * (securement / release of playback resource, voice assignment, virtualization) occurs can be gotten.
+ * \par Note: + * The value set in the second argument (obj) is passed as an argument of the callback function.
+ * Please refer to the explanation of the ::CriAtomExPlaybackEventCbFunc for other arguments of callback function.
+ *
+ * By specifying NULL for func, you can unregister registered functions.
+ * \attention + * Only one callback function can be registered for one AtomEx player.
+ * If you perform registration operation multiple times, already registered callback function will be overwritten + * by the callback function registered later.
+ * \sa CriAtomExVoiceEventCbFunc + */ +void CRIAPI criAtomExPlayer_SetPlaybackEventCallback( + CriAtomExPlayerHn player, CriAtomExPlaybackEventCbFunc func, void *obj); + +/*========================================================================== + * CRI AtomEx Playback API + *=========================================================================*/ +/*EN + * \brief Stop the sound + * \ingroup ATOMEXLIB_PLAYBACK + * \param[in] id playback ID + * \par Description: + * Stops the specified sound.
+ * You can use this function to stop individual sounds from being played by the player + * without stopping the player itself.
+ * \par Remarks: + * If you want to stop all the sounds being played back by an AtomEx player, + * use the ::criAtomExPlayer_Stop function instead.
+ * (The ::criAtomExPlayer_Stop function stops all sounds being played back by the specified player.)
+ * \attention + * When a sound is stopped with this function, its status changes to ::CRIATOMEXPLAYBACK_STATUS_REMOVED.
+ * Since the Voice resource is also destroyed when the sound is stopped, once the status changes to ::CRIATOMEXPLAYBACK_STATUS_REMOVED, + * no information can be obtained from that playback ID anymore.
+ * \sa criAtomExPlayer_Stop, criAtomExPlayback_GetStatus + */ +void CRIAPI criAtomExPlayback_Stop(CriAtomExPlaybackId id); + +/*EN + * \brief Stop the sound (ignoring the release time) + * \ingroup ATOMEXLIB_PLAYBACK + * \param[in] id playback ID + * \par Description: + * Stops the specified sound.
+ * This function stops the sound immediately, even when a release time has been set for the envelope.
+ * You can use this function to stop individual sounds from being played by the player + * without stopping the player itself.
+ * \par Remarks: + * If you want to stop all the sounds being played back by a player, + * use the ::criAtomExPlayer_StopWithoutReleaseTime function instead.
+ * \attention + * When a sound is stopped with this function, its status changes to ::CRIATOMEXPLAYBACK_STATUS_REMOVED.
+ * Since the Voice resource is also destroyed when the sound is stopped, once the status changes to ::CRIATOMEXPLAYBACK_STATUS_REMOVED, + * no information can be obtained from that playback ID anymore.
+ * \sa criAtomExPlayer_StopWithoutReleaseTime + */ +void CRIAPI criAtomExPlayback_StopWithoutReleaseTime(CriAtomExPlaybackId id); + +/*EN + * \brief Pause/resume the sound + * \ingroup ATOMEXLIB_PLAYBACK + * \param[in] id playback ID + * \param[in] sw switch ( CRI_FALSE = resume, CRI_TRUE = pause ) + * \par Description: + * Pauses or resumes the specified sound.
+ * If you pass CRI_TRUE for sw, the sound with the specified ID is paused.
+ * If you pass CRI_FALSE, the sound with the specified ID is resumed (and its playback as well).
+ *
+ * You can use this function to pause/resume individual sounds being played back by the player + * without pausing/resuming the player itself.
+ * \par Remarks: + * If you want to pause/resume all the sounds being played back by a player, + * use the ::criAtomExPlayer_Pause function instead.
+ *
+ * When you use this function to pause/resume individual sounds having a fader attached, + * the crossfading will be performed according to the pause status.
+ * For example, if you pause both sounds using the ::criAtomExPlayer_Pause function, + * fade-in will be processed according to the pause status of the target sound.
+ * \attention + * When passing CRI_FALSE in the second argument (sw), both a sound previously + * paused by this function or a sound in playback + * preparation (if you called ::criAtomExPlayer_Prepare) will start to play.
+ * (This is done to maintain compatibility with the older versions.)
+ * To only resume the playback of a sound paused by this function, + * do not use this function but execute the following code instead;
+ * - criAtomExPlayer_Resume(player, CRIATOMEX_RESUME_PAUSED_PLAYBACK);
+ *
+ * When you release the pause for a sound which as a fader attached, + * if a playback resource used for the fade-in sound cannot be allocated or + * if it has been stolen by another sound, the pause cannot be released and + * the sound to be faded-out can never be started.
+ * For a sound played by a player whith a fader attached, release the pause + * by calling ::criAtomExPlayer_Pause instead of this function.
+ * \sa criAtomExPlayback_IsPaused, criAtomExPlayer_Pause, criAtomExPlayback_Resume + */ +void CRIAPI criAtomExPlayback_Pause(CriAtomExPlaybackId id, CriBool sw); + +/*EN + * \brief Resume the audio playback (paused by a specific pause method) + * \ingroup ATOMEXLIB_PLAYBACK + * \param[in] id playback ID + * \param[in] mode resume target + * \par Description: + * Resumes the audio playback which was paused with a specific method.
+ * Unlike the ::criAtomExPlayback_Pause function, this function can individually resume playback of audio set to the waiting state by the ::criAtomExPlayer_Prepare function + * and audio paused by the ::criAtomExPlayer_Pause function (or the ::criAtomExPlayback_Pause function).
+ *
+ * Executing this function when the argument (mode) is set to CRIATOMEX_RESUME_PAUSED_PLAYBACK + * resumes the playback of the audio that was paused by the ::criAtomExPlayer_Pause or the ::criAtomExPlayback_Pause functions.
+ * Executing this function when the argument (mode) is set to ::CRIATOMEX_RESUME_PREPARED_PLAYBACK + * starts the playback of the audio prepared by the ::criAtomExPlayer_Prepare function.
+ *
+ * If the ::criAtomExPlayer::Prepare function was used to prepare the playback in a player which is paused, + * the playback is resumed only after the pause is canceled passing both the ::CRIATOMEX_RESUME_PAUSED_PLAYBACK and + * ::CRIATOMEX_RESUME_PREPARED_PLAYBACK modes.
+ * \par Remarks: + * When you use this function to pause/resume individual sounds having a fader attached, + * the crossfading will be performed according to the pause status.
+ * For example, when the ::criAtomExPlayer_Pause function is used during crossfading to pause the sounds on both sides, + * canceling the pause of the sound on the fade-in side will resume the crossfading. + * However, the crossfading cannot be resumed by canceling the pause of the sound on the fade-out side.
+ * \attention + * When you release the pause for a sound which as a fader attached, + * if a playback resource used for the fade-in sound cannot be allocated or + * if it has been stolen by another sound, the pause cannot be released and + * the sound to be faded-out can never be started.
+ * For a sound played by a player whith a fader attached, release the pause + * by calling ::criAtomExPlayer_Pause instead of this function.
+ * \sa criAtomExPlayback_IsPaused, criAtomExPlayer_Resume, criAtomExPlayer_Pause + */ +void CRIAPI criAtomExPlayback_Resume(CriAtomExPlaybackId id, CriAtomExResumeMode mode); + +/*EN + * \brief Get the pause status of the sound + * \ingroup ATOMEXLIB_PLAYBACK + * \param[in] id playback ID + * \return CriBool whether the sound is paused or not (CRI_FALSE = not paused, CRI_TRUE = paused) + * \par Description: + * Returns whether the sound specified by the playback ID is paused or not.
+ * \sa criAtomExPlayback_Pause + */ +CriBool CRIAPI criAtomExPlayback_IsPaused(CriAtomExPlaybackId id); + +/*EN + * \brief Get the playback status + * \ingroup ATOMEXLIB_PLAYBACK + * \param[in] id playback ID + * \return CriAtomExPlaybackStatus playback status + * \par Description: + * Gets the status of a sound being played back by calling the ::criAtomExPlayer_Start function.
+ * \par Remarks: + * While the ::criAtomExPlayer_GetStatus function returns the status of an AtomEx player, + * this function gets status of an individual sound already being played.
+ *
+ * The voice resource for the sound being played back can be removed in the following occasions:
+ * - When the playback has finished. + * - When the current sound is stopped by the criAtomExPlayback_Stop function. + * - When the current Voice has been stolen by a playback request with a higher priority. + * - When an error has occurred during playback. + * . + * So, regardless of whether the sound was explicitly stopped using the ::criAtomExPlayback_Stop function or its + * playback was stopped due to other factors, + * its status changes to ::CRIATOMEXPLAYBACK_STATUS_REMOVED. + *
+ * (Consequently, if you need to know if there was an error, you must use the ::criAtomExPlayer_GetStatus function + * instead of this function to check the status of the AtomEx player itself.)
+ * \sa criAtomExPlayer_Start, criAtomExPlayer_GetStatus, criAtomExPlayback_Stop + */ +CriAtomExPlaybackStatus CRIAPI criAtomExPlayback_GetStatus(CriAtomExPlaybackId id); + +/*EN + * \brief Get information about the format of the sound being played + * \ingroup ATOMEXLIB_PLAYBACK + * \param[in] id playback ID + * \param[out] info format information + * \return CriBool whether the information could be retrieved or not (CRI_TRUE = success, CRI_FALSE = fail) + * \par Description: + * Gets information about the format of the sound being played by calling the ::criAtomExPlayer_Start function.
+ *
+ * If the format information could be retrieved, this function returns CRI_TRUE.
+ * If the corresponding Voice has already been removed, it returns CRI_FALSE.
+ * \par Remarks: + * When a cue with multiple sounds is being played back, the information about the first detected sound data + * is returned.
+ * \attention + * This function can get the format information only during sound playback.
+ * If playback is being prepared, if it is finished, or if the voice has been stolen due its low priority, + * this function will fail to get the format information.
+ * \sa criAtomExPlayer_Start, criAtomExPlayer_GetStatus + */ +CriBool CRIAPI criAtomExPlayback_GetFormatInfo( + CriAtomExPlaybackId id, CriAtomExFormatInfo *info); + +/*EN + * \brief Get information about the source of the sound + * \ingroup ATOMEXLIB_PLAYBACK + * \param[in] id playback ID + * \param[out] source source information + * \retval CRI_TRUE = information was successfully retrieved + * \retval CRI_FALSE = failed to get information + * \par Description: + * Gets information about the source of the sound played back by the ::criAtomExPlayer_Start function.
+ * By using functions such as ::criAtomExAcb_GetCueInfoByIndex on the data returned, + * it is possible to get even more detailed information.
+ *
+ * If the source information could be retrieved, this function returns CRI_TRUE.
+ * If the corresponding Voice has already been removed, it returns CRI_FALSE.
+ * \par Remarks: + * The information that can be retrieved depends on the source type.
+ * Check the "type" field of info and use the right data structure to examine the "source" union.
+ * \code + * CriAtomExSourceInfo source; + * criAtomExPlayback_GetSource(playback_id, &source); + * + * switch (source.type) { + * case CRIATOMEXPLAYBACK_SOURCE_TYPE_CUE_ID: + * { + * CriAtomExCueInfo cue_info; + * criAtomExAcb_GetCueInfoById(source.info.cue_id.acb, source.info.cue_id.id, &cue_info); + * : + * } + * break; + * : + * } + * \endcode + * \attention + * This function can retrieve the information about the source only when the sound is being played back.
+ * If the playback has finished or the Voice was removed, + * any attempt to get the information will fail.
+ * \sa criAtomExPlayer_Start, criAtomExPlayer_GetStatus + */ +CriBool CRIAPI criAtomExPlayback_GetSource( + CriAtomExPlaybackId id, CriAtomExSourceInfo *source); + +/*EN + * \brief Acquisition of an Atom player + * \ingroup ATOMEXLIB_PLAYBACK + * \param[in] id Playback ID + * \retval CriAtomPlayerHn Atom player handle + * \par Description: + * Gets the voice (= Atom player handle) associated with the given playback ID.
+ * \par Remarks: + * When playing a cue containing multiple waveforms - and therefore voices - + * this function returns the Atom player handle corresponding to the first voice that was found.
+ * If no waveform data is being played, this function returns NULL.
+ */ +CriAtomPlayerHn CRIAPI criAtomExPlayback_GetAtomPlayer(CriAtomExPlaybackId id); + +/*EN + * \brief Get the playback time + * \ingroup ATOMEXLIB_PLAYBACK + * \param[in] id playback ID + * \return Sint64 playback time (in milliseconds) + * \par Description: + * Gets the playback time of a sound played by calling the ::criAtomExPlayer_Start function.
+ *
+ * If the playback time was successfully acquired, this function returns a value of 0 or larger.
+ * If this function failed to get the playback time (for example because it could not acquire a voice), it returns a negative value.
+ * \par Remarks: + * The playback time returned by this function is the time since the playback is started.
+ * The playback time is never decremented based on the playback position, + * even with loop playback or seamless concatenated playback.
+ *
+ * When the ::criAtomExPlayer_Pause function pauses the playback, + * the counting of the playback time is also stopped.
+ * (The counting starts again when the playback is resumed.) + *
+ * The accuracy of the time returned by this function depends on the frequency of server processing.
+ * (Time is updated at each server process.)
+ * If you need a more accurate time, use the + * ::criAtomExPlayback_GetNumPlayedSamples function + * to get the number of samples that have been played.
+ * \attention + * Although the type of the return value is long, its precision is currently only 32 bits.
+ * If you control the playback based on the playback time, note that the playback time will be invalid in about 24 days.
+ * (The playback time overflows and becomes negative when it exceeds 2147483647 milliseconds.)
+ *
+ * This function can retrieve the time only when a sound is being played back.
+ * (unlike the ::criAtomExPlayer_GetTime function, this function can get the time for each sound being played back, + * but it is not possible to get the time once playback has ended.)
+ * When the playback has finished or a Voice was removed by the playback control, + * attempts to get the playback time will fail.
+ * (A negative value will be returned.)
+ *
+ * Even if the sound data is not supplied temporarily (for example due to a read-retry by the disk), + * the counting of the playback time does not stop.
+ * (The time continues to be incremented even when playback is stopped due to an insufficient supply of data.)
+ * Therefore, if you synchronize the sound with a video based on the time acquired by this function, + * synchronization may be getting worse with each read retry.
+ * If you must synchronize wave data with video very precisely, use the + * ::criAtomExPlayback_GetNumPlayedSamples function + * to synchronize with the number of samples that have been played.
+ * \sa criAtomExPlayer_Start, criAtomExPlayer_GetTime, criAtomExPlayback_GetNumPlayedSamples + */ +CriSint64 CRIAPI criAtomExPlayback_GetTime(CriAtomExPlaybackId id); + +/*EN + * \brief Get the playback time (synchronized with playback sound) + * \ingroup ATOMEXLIB_PLAYBACK + * \param[in] id playback ID + * \return Sint64 playback time (in milliseconds) + * \par Description: + * Gets the playback time of a sound played by calling the ::criAtomExPlayer_Start function.
+ *
+ * If the playback time was successfully acquired, this function returns a positive value (including 0).
+ * If this function failed to get the playback time (for example because it could not acquire a voice), it returns a negative value.
+ * \par Remarks: + * Unlike the value corresponding to the "elapsed time since playback started" returned by the ::criAtomExPlayback_GetTime function, + * playback time synchronized with the sound being played can be acquired from this function.
+ * When the supply of audio data is interrupted (e.g. due to read-retry processing of the device), + * or when audio output is disturbed by an interrupt from the system, + * the playback time counting temporarily stops.
+ * Therefore, if you want something to be strictly synchronized with the reproduced sound, + * please use the time returned by this function.
+ * However, even when performing loop playback or seamless concatenated playback, + * the time will not be rewound depending on the playback position.
+ * For a sequence Cue with a low waveform density, it is not possible to acquire the playback time normally.
+ *
+ * When the ::criAtomExPlayer_Pause function pauses the playback, + * the counting of the playback time is also stopped.
+ * (The counting starts again when the playback is resumed.) + *
+ * To obtain the playback time using this function, set enable_audio_synced_timer of + * ::CriAtomExPlayerConfig structure to CRI_TRUE when creating the corresponding AtomEx player.
+ * By default it is disabled.
+ *
+ * Although the type of the return value is long, its precision is currently only 32 bits.
+ * If you control the playback based on the playback time, note that the playback time will become invalid after about 24 days.
+ * (The playback time overflows and becomes negative when it exceeds 2147483647 milliseconds.)
+ *
+ * This function can retrieve the time only when a sound is being played back.
+ * (unlike the ::criAtomExPlayer_GetTime function, this function can get the time for each sound being played back, + * but it is not possible to get the time once the playback has ended.)
+ * When the playback has finished or a Voice was removed by the playback control, + * attempts to get the playback time will fail.
+ * (A negative value will be returned.)
+ *
+ * This function internally calculates time, and depending on the platform, processing load may be a problem. + * It also returns the updated time for each call, even within the same frame than the application.
+ * Basically, this function should be used only once per frame, although it depends on how the application uses the playback time.
+ * \sa criAtomExPlayer_Create, criAtomExPlayer_Start, criAtomExPlayback_GetTime + */ +CriSint64 CRIAPI criAtomExPlayback_GetTimeSyncedWithAudio(CriAtomExPlaybackId id); + +/*EN + * \brief Get the playback time (synchronized with playback sound) + * \ingroup ATOMEXLIB_PLAYBACK + * \param[in] id playback ID + * \return Sint64 playback time (in microseconds) + * \par Description: + * Gets the playback time of a sound played by calling the ::criAtomExPlayer_Start function.
+ *
+ * If the playback time was successfully acquired, this function returns a positive value (including 0).
+ * If this function failed to get the playback time (for example because it could not acquire a voice), it returns a negative value.
+ * \par Remarks: + * Unlike the value corresponding to the "elapsed time since playback started" returned by the ::criAtomExPlayback_GetTime function, + * this function returns the playback time synchronized with the sound being played.
+ * This means that when the supply of audio data is interrupted (e.g. due to read-retry processing of the device), + * or when audio output is halted by an interrupt from the system, + * the playback time counting temporarily stops.
+ * Therefore, if you want something to be strictly synchronized with the reproduced sound, + * please use the time returned by this function.
+ * However, even when performing loop playback or seamless concatenated playback, + * the time will not be rewound depending on the playback position.
+ * For sequence Cues with a low waveform density, it is not possible to acquire the playback time normally.
+ *
+ * When the ::criAtomExPlayer_Pause function pauses the playback, + * the counting of the playback time is also stopped.
+ * (The counting starts again when the playback is resumed.) + *
+ * To obtain the playback time using this function, set the enable_audio_synced_timer property of the + * ::CriAtomExPlayerConfig structure to CRI_TRUE when creating the corresponding AtomEx player.
+ * By default it is disabled.
+ *
+ * Although the type of the return value is long, its precision is currently only 32 bits.
+ * If you control the playback based on the playback time, note that the playback time will become invalid after about 24 days.
+ * (The playback time overflows and becomes negative when it exceeds 2147483647 milliseconds.)
+ *
+ * This function can retrieve the time only when a sound is being played back.
+ * (unlike the ::criAtomExPlayer_GetTime function, this function can get the time for each sound being played back, + * but it is not possible to get the time once the playback has ended.)
+ * When the playback has finished or when a Voice was removed by the playback control, + * attempts to get the playback time will fail.
+ * (A negative value will be returned.)
+ *
+ * This function internally calculates time, and depending on the platform, the processing load may be a problem. + * It also returns the updated time for each call, even within the same frame of the application.
+ * Basically, this function should be used only once per frame, although it depends on how the application uses the playback time.
+ * \sa criAtomExPlayer_Create, criAtomExPlayer_Start, criAtomExPlayback_GetTime + */ +CriSint64 CRIAPI criAtomExPlayback_GetTimeSyncedWithAudioMicro(CriAtomExPlaybackId id); + + +/*EN + * \brief Acquiring the sequence playback position + * \ingroup ATOMEXLIB_PLAYBACK + * \param[in] id Playback ID + * \return Sint64 Sequence playback position (milliseconds) + * \par Description: + * Acquires the sequence playback position of the sound that was played with the ::criAtomExPlayer_Start function.
+ *
+ * If the playback position was successfully acquired, this function returns a value of 0 or larger.
+ * If the specified sequence has already been removed, this function returns a negative value.
+ * \par Note: + * The playback time returned by this function is the playback position on the sequence data.
+ * After a sequence loop and block transition, the value after the rewind is returned.
+ *
+ * The sequencer works for playback only by Cue specification. For playback except by Cue specification, + * this function returns a negative value.
+ *
+ * When the ::criAtomExPlayer_Pause is used to pause playback, + * the update of the playback position is also stopped.
+ * (When playback is resumed, the update starts again.) + *
+ * Accuracy of the time that can be acquired by this function depends on the frequency of server processing.
+ * (Time is updated at each server process.)
+ * \attention + * Although the type of the return value is CriSint64, accuracy is currently limited to 32 bits.
+ * If you control playback based on the playback position, note that the playback position becomes invalid in about 24 days for data without settings such as a sequence loop.
+ * (The playback position overflows and becomes a negative value when it exceeds 2147483647 milliseconds.)
+ *
+ * This function can acquire the position only when sound is being played.
+ * When playback has finished or the sequence was removed by control of the number of played sounds, + * it fails in acquiring the playback position.
+ * (A negative value is returned.)
+ */ +CriSint64 CRIAPI criAtomExPlayback_GetSequencePosition(CriAtomExPlaybackId id); + +/*EN + * \brief Get the number of samples played + * \ingroup ATOMEXLIB_PLAYBACK + * \param[in] id playback ID + * \param[out] num_samples the number of samples already played back + * \param[out] sampling_rate sampling rate + * \return CriBool whether the number of samples could be retrieved or not (CRI_TRUE = success, CRI_FALSE = fail) + * \par Description: + * Returns the number of samples played back by the ::criAtomExPlayer_Start function + * and the sampling rate.
+ *
+ * If the number of samples played is obtained, this function returns true.
+ * If the specified voice was already removed, this function returns false.
+ * (If an error occurs, num_samples and sampling_rate are also negative.)
+ * \par Note: + * The accuracy of the number of samples returned depends on the sound library + * of the platform SDK.
+ *
+ * When a Cue with multiple sounds is played back, the information about the first sound detected + * is returned.
+ * \attention + * If the sound data is not supplied temporarily because the device reads or writes, + * the counting of the samples played will stop.
+ * (The counting will be resumed at the same time than the data supply.)
+ *
+ * This function can retrieve the number of samples played only during sound playback.
+ * Once the playback is finished or if the voice was stolen due to its lower priority, + * it will fail to obtain the number of samples played.
+ * \sa criAtomExPlayer_Start + */ +CriBool CRIAPI criAtomExPlayback_GetNumPlayedSamples( + CriAtomExPlaybackId id, CriSint64 *num_samples, CriSint32 *sampling_rate); + +/*EN + * \brief Get a parameter (floating point number) + * \ingroup ATOMEXLIB_PLAYBACK + * \param[in] playback_id playback ID + * \param[in] parameter_id parameter ID + * \param[out] value_float32 parameter value + * \return Whether the parameter was obtained or not (CRI_TRUE = obtained, CRI_FALSE = not obtained) + * \par Description: + * Gets the value of a specific parameter (specified by its ID) of a sound played back by the ::criAtomExPlayer_Start function.
+ * The value is returned as a floating point number.
+ * This function returns CRI_TRUE when the parameter is successfully obtained.
+ * If the specified Voice was already removed, or the parameter could not be obtained for some other reason, this function returns CRI_FALSE.
+ * \attention + * This function can only obtain the value of the parameter while the sound is being played back.
+ * Once the playback has completed or the Voice has been removed due to priority control, + * this function will fail to obtain the parameter.
+ * \sa CriAtomExParameterId, criAtomExPlayback_GetParameterUint32, criAtomExPlayback_GetParameterSint32 + */ +CriBool CRIAPI criAtomExPlayback_GetParameterFloat32( + CriAtomExPlaybackId playback_id, + CriAtomExParameterId parameter_id, + CriFloat32 *value_float32 +); + +/*EN + * \brief Get a parameter (unsigned integer) + * \ingroup ATOMEXLIB_PLAYBACK + * \param[in] playback_id playback ID + * \param[in] parameter_id parameter ID + * \param[out] value_uint32 parameter value + * \return Whether the parameter was obtained or not (CRI_TRUE = obtained, CRI_FALSE = not obtained) + * \par Description: + * Gets the value of a specific parameter (specified by its ID) of a sound played back by the ::criAtomExPlayer_Start function.
+ * The value is returned as an unsigned integer.
+ * This function returns CRI_TRUE when the parameter is successfully obtained.
+ * If the specified Voice was already removed, or the parameter could not be obtained for some other reason, this function returns CRI_FALSE.
+ * \attention + * This function can only obtain the value of the parameter while the sound is being played back.
+ * Once the playback has completed or the Voice has been removed due to priority control, + * this function will fail to obtain the parameter.
+ * \sa CriAtomExParameterId, criAtomExPlayback_GetParameterFloat32, criAtomExPlayback_GetParameterSint32 + */ +CriBool CRIAPI criAtomExPlayback_GetParameterUint32( + CriAtomExPlaybackId playback_id, + CriAtomExParameterId parameter_id, + CriUint32* value_uint32 +); + +/*EN + * \brief Get a parameter (signed integer) + * \ingroup ATOMEXLIB_PLAYBACK + * \param[in] playback_id playback ID + * \param[in] parameter_id parameter ID + * \param[out] value_sint32 parameter value + * \return Whether the parameter was obtained or not (CRI_TRUE = obtained, CRI_FALSE = not obtained) + * \par Description: + * Gets the value of a specific parameter (specified by its ID) of a sound played back by the ::criAtomExPlayer_Start function.
+ * The value is returned as a signed integer.
+ * This function returns CRI_TRUE when the parameter is successfully obtained.
+ * If the specified Voice was already removed, or the parameter could not be obtained for some other reason, this function returns CRI_FALSE.
+ * \attention + * This function can only obtain the value of the parameter while the sound is being played back.
+ * Once the playback has completed or the Voice has been removed due to priority control, + * this function will fail to obtain the parameter.
+ * \sa CriAtomExParameterId, criAtomExPlayback_GetParameterFloat32, criAtomExPlayback_GetParameterUint32 + */ +CriBool CRIAPI criAtomExPlayback_GetParameterSint32( + CriAtomExPlaybackId playback_id, + CriAtomExParameterId parameter_id, + CriSint32* value_sint32 +); + +/*EN + * \brief Get the value of an AISAC control (specified by its ID) + * \ingroup ATOMEXLIB_PLAYBACK + * \param[in] playback_id playback ID + * \param[in] control_id control ID + * \param[out] control_value control value (from 0.0f to 1.0f, -1.0f if not set) + * \return Whether the AISAC control value was obtained or not (CRI_TRUE = obtained, CRI_FALSE = not obtained) + * \par Description: + * Gets the AISAC control value assigned to a sound whose playback is started by calling ::criAtomExPlayer_Start function.
+ * The AISAC control is specified by its ID.
+ * This function returns CRI_TRUE if the AISAC control value is successfully obtained (including if it is -1.0f because the value is not set).
+ * If the specified Voice was already removed, or the value could not be obtained for some other reason, this function returns CRI_FALSE.
+ * \attention + * This function can only obtain the AISAC control value while the sound is being played back.
+ * After the playback is complete or if the Voice was removed due to priority control, + * this function will fail to obtain the AISAC control value.
+ * \sa criAtomExPlayer_SetAisacControlById, criAtomExPlayback_GetAisacControlByName + */ +CriBool CRIAPI criAtomExPlayback_GetAisacControlById( + CriAtomExPlaybackId playback_id, CriAtomExAisacControlId control_id, CriFloat32 *control_value); + + +/*EN + * \brief Get the value of an AISAC control (specified by its name) + * \ingroup ATOMEXLIB_PLAYBACK + * \param[in] playback_id playback ID + * \param[in] control_name control name + * \param[out] control_value control value (0.0f to 1.0f. If not set, -1.0f.) + * \return Whether the AISAC control value was obtained (CRI_TRUE = obtained, CRI_FALSE = not obtained) + * \par Description: + * Gets the AISAC control value assigned to a sound whose playback is started by calling ::criAtomExPlayer_Start function.
+ * The AISAC control is specified by its name.
+ * This function returns CRI_TRUE if the AISAC control value is successfully obtained (including if it is -1.0f because the value is not set).
+ * If the specified Voice was already removed, or the value could not be obtained for some other reason, this function returns CRI_FALSE.
+ * \attention + * This function can only obtain the AISAC control value while the sound is being played back.
+ * After the playback is complete or if the Voice was removed due to priority control, + * this function will fail to obtain the AISAC control value.
+ * \sa criAtomExPlayer_SetAisacControlById, criAtomExPlayback_GetAisacControlByName + */ +CriBool CRIAPI criAtomExPlayback_GetAisacControlByName( + CriAtomExPlaybackId playback_id, const CriChar8 *control_name, CriFloat32 *control_value); + +/*EN + * \brief Set the index of the next block + * \ingroup ATOMEXLIB_PLAYBACK + * \param[in] id playback ID + * \param[in] index block index + * \par Description: + * Performs a block transition at the next possible occasion.
+ * By executing this function, the sound with the specified ID - if it has a block sequence - + * will transit to the specified block. The timing of the transition is determined by the settings. + *
+ * \par Remarks: + * Use the ::criAtomExPlayer_SetFirstBlockIndex function to specify the playback starting block, + * and use the ::criAtomExPlayback_GetCurrentBlockIndex function to obtain the current block index during playback.
+ * \sa criAtomExPlayer_SetFirstBlockIndex, criAtomExPlayback_GetCurrentBlockIndex + */ +void CRIAPI criAtomExPlayback_SetNextBlockIndex(CriAtomExPlaybackId id, CriAtomExBlockIndex index); + +/*EN + * \brief Get the current block index of the sound beng played back + * \ingroup ATOMEXLIB_PLAYBACK + * \param[in] id playback ID + * \return CriAtomExBlockIndex current block index + * \par Description: + * Gets the current block index in the block sequence started by calling + * the ::criAtomExPlayer_Start function.
+ * \par Remarks: + * If the sound whose playback ID is specified is not a block sequence, + * ::CRIATOMEX_INVALID_BLOCK_INDEX is returned.
+ * \sa criAtomExPlayer_Start, criAtomExPlayer_SetFirstBlockIndex, criAtomExPlayback_SetNextBlockIndex + */ +CriAtomExBlockIndex CRIAPI criAtomExPlayback_GetCurrentBlockIndex(CriAtomExPlaybackId id); + +/*EN + * \brief Get the playback track info + * \ingroup ATOMEXLIB_PLAYBACK + * \param[in] id playback ID + * \param[out] info playback track info + * \return CriBool Success / Failed + * \par Description: + * Get track information of the cue being played back.
+ * Track information that can be acquired is only information immediately under the cue, information on subsequences and cue links can not be acquired.
+ * \par Remarks: + * If data corresponding to the following is being played, acquisition of track information will fail.
+ * - Data other than the cue is being played. (Because track information does not exist)
+ * - The cue being played is a polyphonic type or a switch type with a selector reference. (There is a possibility that there are two or more pieces of track information)
+ * - The cue being played is the track transition type. (Since the playback track changes due to the transition)
+ */ +CriBool CRIAPI criAtomExPlayback_GetPlaybackTrackInfo(CriAtomExPlaybackId id, CriAtomExPlaybackTrackInfo* info); + +/*EN + * \brief Get the beat synchronization information + * \ingroup ATOMEXLIB_PLAYBACK + * \param[in] id playback ID + * \param[out] info beat synchronization info + * \return CriBool Success / Failed + * \par Description: + * Get beat synchronization information of the cue being played back.
+ * Can get the current BPM, bar count, beat count, beat progress ratio (0.0 - 1.0).
+ * Beat synchronization information must be set in the cue.
+ * It is not possible to get the information of the cue playing in cue link or start action.
+ * \par Remarks: + * Getting of beat synchronization information will fail if data corresponding to the following is playing.
+ * - Non-Cue data is being played. (Beat synchronization information does not exist)
+ * - The cue for which beat synchronization information is not set is being played.
+ * - The cue for which the beat synchronization information is set is played "indirectly". (It is playing with cue link and start action)
+ */ +CriBool CRIAPI criAtomExPlayback_GetBeatSyncInfo(CriAtomExPlaybackId id, CriAtomExBeatSyncInfo* info); + +/*========================================================================== + * CRI AtomEx Fader API + *=========================================================================*/ +/*EN + * \brief Calculate the size of the work buffer required to attach a fader + * \ingroup ATOMEXLIB_FADER + * \param[in] config configuration structure used to attach a fader + * \return CriSint32 work buffer size + * \retval >= 0 successfully completed + * \retval -1 error occurred + * \par Description: + * Calculates the size of the work buffer required to attach a fader to an AtomEx player.
+ * If you attach a fader without having registered a user-allocator, you must first calculate the size of the buffer required with this function, + * allocate that precise amount of memory, and pass it to the ::criAtomExPlayer_AttachFader function.
+ *
+ * When NULL is specified for config, the default settings are used to calculate the work buffer size + * (i.e. the same parameters that are set when ::criAtomExFader_SetDefaultConfig is used).
+ *
+ * If this function fails to calculate the size of the work buffer, it will return -1.
+ * To know the reason of the failure, refer to the error callback message.
+ * \par Remarks: + * The information in the configuration structure is only used during the initialization and is + * not referenced after that. Therefore, it is safe to release it once the function has returned. + * \attention + * You must initialize the library before executing this function.
+ * \sa CriAtomExFaderConfig, criAtomExPlayer_AttachFader + */ +CriSint32 CRIAPI criAtomExPlayer_CalculateWorkSizeForFader( + const CriAtomExFaderConfig *config); + +/*EN + * \brief Attach a fader to a player + * \ingroup ATOMEXLIB_FADER + * \param[in] player AtomEx player + * \param[in] config configuration structure used to attach a fader + * \param[in] work work buffer + * \param[in] work_size work buffer size + * \par Description: + * Attaches a fader to the player and switches it to a crossfade-only player.
+ * (Some of the functions provided by a normal AtomEx player will no longer be available, such as the simultaneous playback of multiple sounds.)
+ *
+ * Once this function attaches a fader to a player, the player does the following + * every time the ::criAtomExPlayer_Start or the ::criAtomExPlayer_Prepare functions are executed.
+ * - Stops the sound that is fading out. + * - Fades out the sound that is being played (or fading in). + * - Fades in the sound that starts being played. + * . + *
+ * When ::criAtomExPlayer_Stop is called, the following happens:
+ * - Fading out sounds will be forced to stop. + * - The currently playing (or fading in) sounds will fade out. + *
+ * When attaching a fader to a player, you must pass a memory buffer.
+ * The size of the work buffer required is calculated with the ::criAtomExPlayer_CalculateWorkSizeForFader + * function.
+ * (If a user-allocator has already been registered by using the ::criAtomEx_SetUserAllocator macro, + * you do not need to pass a work buffer to this function.)
+ *
+ * If the function fails to attach a fader, an error callback will occur.
+ * To know the reason of the failure, refer to the error callback message.
+ * \par Example: + * The following shows how to croosfade two Cues (MUSIC1 and MUSIC2).
+ * \code + * : + * // Create the AtomEx player + * player = criAtomExPlayer_Create(NULL, NULL, 0); + * + * // Attach a fader to the player + * criAtomExPlayer_AttachFader(player, NULL, NULL, 0); + * + * // Specify the fade-in/out times + * // Remarks: The following example specifies that the crossfading is performed over five seconds. + * criAtomExPlayer_SetFadeInTime(player, 5000); // Specify the fade-in time + * criAtomExPlayer_SetFadeOutTime(player, 5000); // Specify the fade-out time + * + * // Set the audio data to be played + * criAtomExPlayer_SetCueName(player, acb_hn, "MUSIC1"); + * + * // Start the playback + * // Remarks: This process plays back MUSIC1 with a five-second fade-in. + * criAtomExPlayer_Start(player); + * : + * (Playback loop) + * : + * // Set the audio data to be played back next + * criAtomExPlayer_SetCueName(player, acb_hn, "MUSIC2"); + * + * // Start the playback + * // Remarks: This process plays back MUSIC2 while fading MUSIC1 out and fading MUSIC2 in. + * criAtomExPlayer_Start(player); + * : + * \endcode + * \par Remarks: + * If the player is already playing sounds when the fader is attached to it, + * these sounds are stopped when this function is executed.
+ *
+ * Every time the ::criAtomExPlayer_Start or + * ::criAtomExPlayer_Stop functions are executed on a player with an attached fader, + * the fader affects the sounds being played:
+ *
+ * -# If a sound is fading out, it is stopped immediately. + * -# If a sound is fading in (or being played), + * it is faded out from its current volume over the time specified by the ::criAtomExPlayer_SetFadeOutTime + * function. + * -# If the ::criAtomExPlayer_Start function is executed, + * the playback of the sound data assigned to the player is started at volume 0, + * and the sound is faded in over the time specified by the ::criAtomExPlayer_SetFadeInTime + * function. + * . + *
+ * (If you use the ::criAtomExPlayer_Prepare function instead of the ::criAtomExPlayer_Start function, + * the above happens when the pause is canceled.)
+ * \attention + * If you execute this function, the play/stop operation of the AtomEx player is radically changed.
+ * The number of voices that can be played simultaneously is limited to one (two during cross-fading), + * and control with ::CriAtomExPlaybackId becomes unavailable.
+ *
+ * This function is required only if you want to achieve crossfading.
+ * To fade in or fade out a single sound, you should use an envelope or a Tween.
+ *
+ * If you pass a work buffer to this function, the memory + * must be maintained by the application until the fader is detached.
+ * (Do not write a value in the work buffer once it has already been passed and do not release the memory.)
+ *
+ * Due to the specifications of the fader, + * only the two previous sounds being played back are faded in or out.
+ * The sounds that were played before that are stopped forcefully when the ::criAtomExPlayer_Start or + * ::criAtomExPlayer_Stop functions are called.
+ * An unexpected noise may occur when the sounds are forcefully stopped. + * Therefore, please ensure that the number of simultaneous playbacks is not three or more.
+ * (Use the ::criAtomExPlayer_GetNumPlaybacks function to check the number of sounds being played simultaneously.)
+ *
+ * The fade-in and fade-out functions are only available at the player level.
+ * Fade out will not occur for any playback ID acquired by executing the ::criAtomExPlayer_Start function, + * even when ::criAtomExPlayback_Stop is called.
+ * (The fader settings will be ignored and the stop request is immediately processed.)
+ *
+ * The information in the configuration structure is only used during the initialization and is + * not referenced after that. Therefore, it is safe to release it once the function has returned. + *
+ * \sa CriAtomExFaderConfig, criAtomExPlayer_CalculateWorkSizeForFader + */ +void CRIAPI criAtomExPlayer_AttachFader(CriAtomExPlayerHn player, + const CriAtomExFaderConfig *config, void *work, CriSint32 work_size); + +/*EN + * \brief Detach a fader from a player + * \ingroup ATOMEXLIB_FADER + * \param[in] player AtomEx player + * \par Description: + * Detaches a fader from a player.
+ * After this function detaches a fader from a player, the player does not perform fade-in/out control anymore.
+ * \par Remarks: + * If the player from which the fader is detached is still playing sounds, they are all stopped when this function is executed.
+ *
+ * If you destroy a player without executing this function, when the player is destroyed (by executing the ::criAtomExPlayer_Destroy function), + * the fader is detached within the library.
+ * \sa criAtomExPlayer_AttachFader + */ +void CRIAPI criAtomExPlayer_DetachFader(CriAtomExPlayerHn player); + +/*EN + * \brief Set the fade-out time + * \ingroup ATOMEXLIB_FADER + * \param[in] player AtomEx player handle + * \param[in] ms fade-out time (in milliseconds) + * \par Description: + * Specifies the fade-out time used by a player with an attached fader.
+ * The next time audio playback is performed (by calling the ::criAtomExPlayer_Start function), + * the sound will fade out over the time specified by this function.
+ *
+ * The default fade-out time is 500 milliseconds.
+ * \par Remarks: + * When a fade-out time has been set, the AtomEx player stops the playback in the following order:
+ *
+ * -# It decreases the audio volume to 0 over the specified time. + * -# It continues the playback at a volume of 0 until a delay time passes. + * -# It stops the playback after the delay time has passed. + * . + *
+ * The volume control for fade-out is performed before the audio playback is stopped.
+ * Therefore, the release time of an envelope specified in a waveform data in advance is ignored.
+ * (Strictly speaking, the release process of the envelope is applied after the volume is 0.)
+ *
+ * Depending on whether the second argument (ms) is set to 0 or ::CRIATOMEX_IGNORE_FADE_OUT, + * the behavior of the function is different:
+ *
+ * - If 0 is specified: the function immediately turns down the volume to 0 and performs the stopping process. + * - If CRIATOMEX_IGNORE_FADE_OUT is specified, the function performs the stopping process without turning down the volume. + * . + *
+ * \par + * If, when the playback is stopped, you want to enable the release process of the envelope (as specified for the waveform beforehand, + * without performing the fade-out process) specify CRIATOMEX_IGNORE_FADE_OUT for the second argument (ms).
+ * Specifying CRIATOMEX_IGNORE_FADE_OUT disables volume control by the fade-out process. + * After the ::criAtomExPlayer_Stop function is called, the standard stopping process is performed (after the delay time has passed).
+ * (If the release of the envelope has been set in the waveform data, a release process will be performed.)
+ * \attention + * Before calling this function, you must use the ::criAtomExPlayer_AttachFader function + * to attach a fader to the player.
+ *
+ * The value set by this function does not affect the sounds during playback.
+ * The fading time set by this function is only applied when the ::criAtomExPlayer_Start or + * ::criAtomExPlayer_Stop functions are called later.
+ * (If a sound's fade-out process has already started, + * you cannot change the fade-out time.)
+ * \sa criAtomExPlayer_AttachFader, criAtomExPlayer_SetFadeInTime + */ +void CRIAPI criAtomExPlayer_SetFadeOutTime(CriAtomExPlayerHn player, CriSint32 ms); + +/*EN + * \brief Get the fade-out time + * \ingroup ATOMEXLIB_FADER + * \param[in] player AtomEx player handle + * \return CriSint32 fade-out time (in milliseconds) + * \par Description: + * Gets the fade-out time.
+ * \par Remarks: + * This function returns the value set by the ::criAtomExPlayer_SetFadeOutTime function.
+ * \sa criAtomExPlayer_SetFadeOutTime + */ +CriSint32 CRIAPI criAtomExPlayer_GetFadeOutTime(CriAtomExPlayerHn player); + +/*EN + * \brief Set the fade-in time + * \ingroup ATOMEXLIB_FADER + * \param[in] player AtomEx player handle + * \param[in] ms fade-in time (in milliseconds) + * \par Description: + * Specifies the fade-in time used by a player with an attached fader.
+ * The next time audio playback is performed (by calling the ::criAtomExPlayer_Start function), + * the sound will fade in over the time specified by this function.
+ *
+ * The default fade-in time is 0 seconds.
+ * Therefore, if this function is not used, a fade-in process is not performed, + * and the audio playback starts immediately at full volume.
+ * \attention + * Before executing this function, you must call the ::criAtomExPlayer_AttachFader function + * to attach a fader to the player.
+ *
+ * The value set by this function does not affect the sounds during playback.
+ * The fading time set by this function is only applied when the ::criAtomExPlayer_Start or + * ::criAtomExPlayer_Stop functions are called later.
+ * (If a sound's fade-in process has already started, + * you cannot change the fade-in time.)
+ * \sa criAtomExPlayer_AttachFader, criAtomExPlayer_SetFadeInTime + */ +void CRIAPI criAtomExPlayer_SetFadeInTime(CriAtomExPlayerHn player, CriSint32 ms); + +/*EN + * \brief Get the fade-in time + * \ingroup ATOMEXLIB_FADER + * \param[in] player AtomEx player handle + * \return CriSint32 fade-in time (in milliseconds) + * \par Description: + * Gets the fade-in time.
+ * \par Remarks: + * This function returns the value set by the ::criAtomExPlayer_SetFadeInTime function.
+ * \sa criAtomExPlayer_SetFadeInTime + */ +CriSint32 CRIAPI criAtomExPlayer_GetFadeInTime(CriAtomExPlayerHn player); + +/*EN + * \brief Set the fade-in start offset + * \ingroup ATOMEXLIB_FADER + * \param[in] player AtomEx player handle + * \param[in] ms fade-in start offset (in milliseconds) + * \par Description: + * Specifies the fade-in start offset for a player with an attached fader.
+ * By using this function, you can arbitrarily advance or delay + * the beginning of a fade-in relatively to a fade-out.
+ * For example, if you set the fade-out time to 5 seconds and the fade-in start offset to 5 seconds, + * you can fade in the next sound immediately after the fade-out for 5 seconds.
+ * On the other hand, if you set the fade-in time to 5 seconds and the fade-in start offset to -5 seconds, + * you can start fading out the sound during playback immediately after the fade-in for 5 seconds.
+ *
+ * The default fade-in start offset is 0 seconds.
+ * (Fade-in and fade-out start simultaneously.)
+ * \par Remarks: + * A fade-in starts when a sound to be faded in is ready to be played back.
+ * Therefore, even if the fade-in start offset is set to 0 seconds, + * it may take a while to actually start the fade-in, especially + * if it takes time to buffer the sound (e.g. during streaming playback).
+ * (This parameter is a relative value for adjusting the timings of the fade-in and fade-out.)
+ * \attention + * Before executing this function, you must call the ::criAtomExPlayer_AttachFader function + * to attach a fader to the player.
+ *
+ * The value set by this function does not affect the sounds during playback.
+ * The fading time is applied when the ::criAtomExPlayer_Start or + * the ::criAtomExPlayer_Stop functions are called (after this function).
+ * (It is not possible to change the fading offset of a sound whose fading process has already started by using this function.)
+ * \sa criAtomExPlayer_AttachFader, criAtomExPlayer_SetFadeInTime + */ +void CRIAPI criAtomExPlayer_SetFadeInStartOffset(CriAtomExPlayerHn player, CriSint32 ms); + +/*EN + * \brief Get the fade-in start offset + * \ingroup ATOMEXLIB_FADER + * \param[in] player AtomEx player handle + * \return CriSint32 fade-in start offset (in milliseconds) + * \par Description: + * Gets the fade-in start offset.
+ * \par Remarks: + * Returns the value set by the ::criAtomExPlayer_SetFadeInStartOffset function.
+ * \sa criAtomExPlayer_SetFadeInStartOffset + */ +CriSint32 CRIAPI criAtomExPlayer_GetFadeInStartOffset(CriAtomExPlayerHn player); + +/*EN + * \brief Set the delay time after the fade-out + * \ingroup ATOMEXLIB_FADER + * \param[in] player AtomEx player handle + * \param[in] ms delay time after fade-out (in milliseconds) + * \par Description: + * Specifies the delay time after the end of a fade-out and before a voice is destroyed.
+ * By using this function, you can arbitrarily set the time at which a voice will be destroyed after having faded out.
+ *
+ * The default delay time is 500 milliseconds.
+ * (i.e. a voice that plays a fade-out sound is destroyed 500 milliseconds after the volume has reached 0.)
+ * \par Note: + * Except on platforms for which a voice is stopped before the sound is faded out, + * you do not need to use this function.
+ * \attention + * Before calling this function, you must call the ::criAtomExPlayer_AttachFader function + * to attach a fader to the player.
+ *
+ * The value set by this function does not affect the sounds during playback.
+ * The delay time set by this function is applied when the ::criAtomExPlayer_Start or + * ::criAtomExPlayer_Stop functions are called (after this function).
+ * (It is not possible to change the delay time of a sound for which the fade-out process has already started.)
+ *
+ * When the volume is controlled and when the voice is stopped differs depending on the platforms.
+ * Therefore, if 0 is specified by this function, the voice may be stopped + * before the volume is changed on some platforms.
+ * \sa criAtomExPlayer_AttachFader, criAtomExPlayer_SetFadeInTime + */ +void CRIAPI criAtomExPlayer_SetFadeOutEndDelay(CriAtomExPlayerHn player, CriSint32 ms); + +/*EN + * \brief Get the delay time after the fade-out + * \ingroup ATOMEXLIB_FADER + * \param[in] player AtomEx player handle + * \return CriSint32 delay time that after a fade-out (in milliseconds) + * \par Description: + * Gets the delay time after the fade-out.
+ * \par Remarks: + * This function returns the value set by the ::criAtomExPlayer_SetFadeOutEndDelay function.
+ * \sa criAtomExPlayer_SetFadeOutEndDelay + */ +CriSint32 CRIAPI criAtomExPlayer_GetFadeOutEndDelay(CriAtomExPlayerHn player); + +/*EN + * \brief Check whether fading is in process or not + * \ingroup ATOMEXLIB_FADER + * \param[in] player AtomEx player handle + * \return CriBool fading status (CRI_TRUE = fading, CRI_FALSE = not fading) + * \par Description: + * Checks whether fading is in process or not.
+ * \par Remarks: + * This function returns CRI_TRUE in the following cases: + * - when it is waiting for the synchronization to start a crossfade. + * - when it is processing the fade-in/fade-out (changing volume). + * - during the fade-out delay time. + */ +CriBool CRIAPI criAtomExPlayer_IsFading(CriAtomExPlayerHn player); + +/*EN + * \brief Initialize the fader parameters + * \ingroup ATOMEXLIB_FADER + * \param[in] player AtomEx player handle + * \par Description: + * Clears the parameters set for the fader and restores them to their initial values.
+ * \attention + * Before calling this function, you must use the ::criAtomExPlayer_AttachFader function + * to attach a fader to the player.
+ *
+ * Clearing the fader parameters with this function does not affect the sounds that are already being played.
+ * The fader parameters cleared by this function take effect when the ::criAtomExPlayer_Start + * or the ::criAtomExPlayer_Stop functions are executed.
+ * (You cannot apply a parameter reset using this function to a sound for which a fading process has already started.)
+ * \sa criAtomExPlayer_AttachFader, criAtomExPlayer_SetFadeInTime + */ +void CRIAPI criAtomExPlayer_ResetFaderParameters(CriAtomExPlayerHn player); + +/*========================================================================== + * CRI AtomEx Sequencer API + *=========================================================================*/ +/*EN + * \brief Register a sequence callback function + * \ingroup ATOMEXLIB_SEQUENCER + * \param[in] func sequence callback function + * \param[in] obj user-specified object + * \par Description: + * Registers a callback function that receives the information embedded in a sequence data.
+ * It is called when a callback event is processed in the server process.
+ * \attention + * Therefore, if an API that does not take into account interrupts to the server process is executed, + * an error or a deadlock may occur.
+ * Basically, do not use aany Atom library APIs within a callback function.
+ * Note that if processes are blocked in the callback function for a long time, some problems such as a audio breakups + * may occur.
+ *
+ * By passing NULL to func, you can unregister the current callback function.
+ * \sa CriAtomExSequencerEventCbFunc + */ +void CRIAPI criAtomExSequencer_SetEventCallback(CriAtomExSequencerEventCbFunc func, void* obj); + +/*========================================================================== + * CRI AtomEx Beat Sync API + *=========================================================================*/ +/*EN + * \brief Register beat synchronization position detection callback function + * \ingroup ATOMEXLIB_BEATSYNC + * \param[in] func Beat synchronization position detection callback function + * \param[in] obj User specified object + * \par Description: + * Register a callback function that receives beat synchronization position detection information.
+ * The registered callback function is executed at the timing when beat synchronization position detection is processed in the server function.
+ * \attention + * Do not execute the API of the Atom library within the callback function.
+ * The callback function is executed from the server process in the Atom library.
+ * Therefore, if you execute an API that does not consider interrupts to server processing, + * errors may occur or deadlock may occur.
+ *
+ * Only one callback function can be registered.
+ * If perform a registration operation more than once, + * the already registered callback function will be overwritten by the callback function registered later.
+ *
+ * Registering registered functions can be canceled by specifying NULL for func.
+ * \sa CriAtomExBeatSyncCbFunc + */ +void CRIAPI criAtomExBeatSync_SetCallback(CriAtomExBeatSyncCbFunc func, void* obj); + +/*========================================================================== + * CRI AtomEx 3D API + *=========================================================================*/ +/*EN + * \brief Calculate the size of the work buffer required to create a 3D sound source + * \ingroup ATOMEXLIB_3D + * \param[in] config pointer to the configuration structure used to create a 3D sound source + * \return CriSint32 work buffer size + * \retval >= 0 successfully completed + * \retval -1 error occurred + * \par Description: + * Calculates the size of the work buffer required to create a 3D sound source.
+ * If you create a 3D sound source without having registered a user-allocator, + * a memory buffer having the size returned by this function + * must be passed to ::criAtomEx3dSource_Create.
+ *
+ * The size of the work buffer needed to create a 3D sound source depends + * on the value of the parameters in the configuration structure ( ::CriAtomEx3dSourceConfig ).
+ *
+ * When NULL is specified for the structure, the default settings + * (the same than the ones set by the ::criAtomEx3dSource_SetDefaultConfig macro) are used + * to calculate the size of the work buffer. + *
+ * If this function fails to calculate the size of the work buffer, it will return -1.
+ * To know the reason of the failure, refer to the error callback message.
+ * message.
+ * \par Remarks: + * The information in the configuration structure is only used during the initialization and is + * not referenced after that. Therefore, it is safe to release it once the function has returned. + * \sa criAtomEx3dSource_Create, CriAtomEx3dSourceConfig + */ +CriSint32 CRIAPI criAtomEx3dSource_CalculateWorkSize(const CriAtomEx3dSourceConfig *config); + +/*EN + * \brief Create a 3D sound source + * \ingroup ATOMEXLIB_3D + * \param[in] config pointer to the configuration structure used to create a 3D sound source + * \param[in] work pointer to the work buffer + * \param[in] work_size size of the work buffer + * \return CriAtomEx3dSourceHn 3D sound source handle + * \par Description: + * Creates a 3D sound source based on the value of the parameters of the configuration structure.
+ * When this function creates a 3D sound source successfully, it returns a handle.
+ * When creating a 3D sound source, you must pass a work buffer.
+ * The size of that buffer is calculated by calling the ::criAtomEx3dSource_CalculateWorkSize + * function.
+ * (If a user-allocator has already been registered by using the ::criAtomEx_SetUserAllocator macro, + * you do not need to pass the work buffer.)
+ * \attention + * You must initialize the library before executing this function.
+ *
+ * \sa criAtomEx3dSource_CalculateWorkSize, criAtomEx3dSource_Destroy + */ +CriAtomEx3dSourceHn CRIAPI criAtomEx3dSource_Create( + const CriAtomEx3dSourceConfig *config, void *work, CriSint32 work_size); + +/*EN + * \brief Destroy a 3D sound source + * \ingroup ATOMEXLIB_3D + * \param[in] ex_3d_source 3D sound source handle + * \par Description: + * Destroys a 3D sound source.
+ * All resources allocated when you created the 3D sound source are released when you execute this function.
+ * Also, the 3D sound source handle specified as an argument is disabled.
+ * If any sounds are being played back on an AtomEx player to which this 3D sound source handle has been assigned, + * you must first stop these sounds or destroy the AtomEx player, then only execute this function. + * \sa criAtomEx3dSource_Create + */ +void CRIAPI criAtomEx3dSource_Destroy(CriAtomEx3dSourceHn ex_3d_source); + +/*EN + * \brief Update a 3D sound source + * \ingroup ATOMEXLIB_3D + * \param[in] ex_3d_source 3D sound source handle + * \par Description: + * Updates a 3D sound source with the parameters previously specified with other functions.
+ * This function updates all the parameters specified for the 3D sound source at once.
+ * Updating the 3D sound source with this function every time you change a single parameter is inefficient. + * You should update it after changing all the parameters you need to change.
+ * \par Example: + * \code + * CriAtomExVector pos; + * CriAtomExVector vel; + * + * // Set the position + * pos.x = 0.0f + * pos.y = 0.0f + * pos.z = 1.0f + * criAtomEx3dSource_SetPosition(source, &pos); + * // Set the velocity + * vel.x = 1.0f + * vel.y = 0.0f + * vel.z = 0.0f + * criAtomEx3dSource_SetVelocity(source, &vel); + * + * // Update the sound source parameters + * criAtomEx3dSource_Update(source); + * \endcode + * \attention + * This function works independently from the parameter update functions ( ::criAtomExPlayer_UpdateAll and + * ::criAtomExPlayer_Update). Whenever you change the parameters of a 3D sound source, use this function to update them. + */ +void CRIAPI criAtomEx3dSource_Update(CriAtomEx3dSourceHn ex_3d_source); + +/*EN + * \brief Reset the 3D sound source parameters + * \ingroup ATOMEXLIB_3D + * \param[in] ex_3d_source 3D sound source handle + * \par Description: + * Clears the parameters set for the 3D sound source and restores them to their initial values.
+ * \attention + * To actually apply the cleared parameters, the user must call the ::criAtomEx3dSource_Update function. + * \sa criAtomEx3dSource_Update + */ +void CRIAPI criAtomEx3dSource_ResetParameters(CriAtomEx3dSourceHn ex_3d_source); + +/*EN + * \brief Set the position of a 3D sound source + * \ingroup ATOMEXLIB_3D + * \param[in] ex_3d_source 3D sound source handle + * \param[in] position position vector + * \par Description: + * Sets the position of the 3D sound source.
+ * The position is used to calculate the distance attenuation and the localization .
+ * Specify the position as a 3D vector.
+ * The default value is (0.0f, 0.0f, 0.0f).
+ * The value set by this function is always used because the position cannot be set on the data side.
+ * \attention + * To actually apply the specified values, you have to call the ::criAtomEx3dSource_Update function. + * \sa criAtomEx3dSource_Update + */ +void CRIAPI criAtomEx3dSource_SetPosition(CriAtomEx3dSourceHn ex_3d_source, const CriAtomExVector *position); + +/*EN + * \brief Get the 3D sound source position + * \ingroup ATOMEXLIB_3D + * \param[in] ex_3d_source 3D sound source handle + * \par Description: + * Get the position of the 3D sound source.
+ * Position is acquired with 3 dimensional vector. + */ +CriAtomExVector CRIAPI criAtomEx3dSource_GetPosition(CriAtomEx3dSourceHn ex_3d_source); + + +/*EN + * \brief Set the velocity of a 3D sound source + * \ingroup ATOMEXLIB_3D + * \param[in] ex_3d_source 3D sound source handle + * \param[in] velocity velocity vector + * \par Description: + * Sets the velocity of the 3D sound source.
+ * The velocity is used to calculate the Doppler effect.
+ * Specify the velocity as a 3D vector.
+ * The velocity corresponds to the distance traveled per second.
+ * The default value is (0.0f, 0.0f, 0.0f).
+ * The value set in this function is always used, because the velocity cannot be set on the data side.
+ * \attention + * To actually apply the specified values, you hve to call the ::criAtomEx3dSource_Update function. + * \sa criAtomEx3dSource_Update + */ +void CRIAPI criAtomEx3dSource_SetVelocity(CriAtomEx3dSourceHn ex_3d_source, const CriAtomExVector *velocity); + +/*EN + * \brief Setting the direction of 3D sound source + * \ingroup ATOMEXLIB_3D + * \param[in] ex_3d_source 3D sound source handle + * \param[in] front Forward vector + * \param[in] top Up vector + * \par Description: + * Sets the orientation of the specified 3D sound source.
+ * The sound cone represents the orientation of the sounds generated from a sound source. It is used to represent the directivity of sounds.
+ * Specify the orientation of the sound cone as a 3D vector.
+ * The specified orientation vector is used after being normalized within the library.
+ * The default values are as follows:
+ * - Forward vector : (0.0f, 0.0f, 1.0f) + * - Up vector : (0.0f, 1.0f, 0.0f) + * \par Remarks: + * If you set the direction of the sound cone, the upward vector is ignored and only the forward vector is used.
+ * If Ambisonics playback is used, Ambisonics rotates according to the orientation specified by this function and the direction of the listener. + * The value set in this function is always used, because the orientation of the sound cone cannot be set on the data side.
+ * \attention + * To actually apply the specified values, you have to call the ::criAtomEx3dSource_Update function.
+ * It is not possible to apply a sound cone to Ambiosnics. + * \sa criAtomEx3dSource_SetConeParameter, criAtomEx3dSource_Update + */ +void CRIAPI criAtomEx3dSource_SetOrientation(CriAtomEx3dSourceHn ex_3d_source, const CriAtomExVector *front, const CriAtomExVector *top); + +/*EN + * \brief Set the parameters of the sound cone of a 3D sound source + * \ingroup ATOMEXLIB_3D + * \param[in] ex_3d_source 3D sound source handle + * \param[in] inside_angle inside angle of the sound cone + * \param[in] outside_angle outside angle of the sound cone + * \param[in] outside_volume outside volume of the sound cone + * \par Description: + * Sets the parameters of the sound cone of the 3D sound source.
+ * A sound cone represents the orientation of the sounds generated from a sound source, and is used to represent the directivity of sounds.
+ * A sound cone consists of inside and outside cones. insideAngle indicates the angle of the inside cone, and + * outsideAngle indicates the angle of the outside cone. outsideVolume indicates the volume at an angle that is greater than or equal to the angle of the outside cone.
+ * When the sound source angle is smaller than the angle of the inside cone, no attenuation occurs due to the cone. + * At an angle between the inside and outside cones, the volume gradually decreases towards the outside volume.
+ * For the inside and outside angles, specify a degree from 0.0f to 360.0f.
+ * The outside volume is specified as a scaling factor between 0.0f and 1.0f (the unit is not decibel).
+ * The default values at the initialization of the library are as follow (no attenuation occurs due to the cone).
+ * - Inside angle: 360.0f + * - Outside angle: 360.0f + * - Outside volume: 0.0f + * . + * The default values can be changed by calling the ::criAtomEx3dSource_ChangeDefaultConeParameter function.
+ * If the sound cone parameters are set on the data side, the parameters are evaluated as follows when this function is called.
+ * - Inside angle: Addition + * - Outside angle: Addition + * - Outside volume: Multiplication + * . + * \attention + * To actually apply the specified parameters, call the ::criAtomEx3dSource_Update function. + * \sa criAtomEx3dSource_Update, criAtomEx3dSource_ChangeDefaultConeParameter + */ +void CRIAPI criAtomEx3dSource_SetConeParameter(CriAtomEx3dSourceHn ex_3d_source, + CriFloat32 inside_angle, + CriFloat32 outside_angle, + CriFloat32 outside_volume +); + +/*EN + * \brief Change the default values of the sound cone parameters a 3D sound source + * \ingroup ATOMEXLIB_3D + * \param[in] inside_angle inside angle of the sound cone + * \param[in] outside_angle outside angle of the sound cone + * \param[in] outside_volume outside volume of the sound cone + * \par Description: + * Changes the default values for the sound cone parameters of a 3D sound source.
+ * If you change the default value by this function, the initial value of the sound cone parameter + * of the 3D sound source handle (::CriAtomEx3dSourceHn) to be created later becomes the value set by this function.
+ * For default values at library initialization, see ::criAtomEx3dSource_SetConeParameter function.
+ * \attention + * For this parameter, the default value is implicitly applied for "not changed by tool" (default state) data.
+ * Therefore, if you change the default value with this function, it may be different from the intended parameter when editing with the tool.
+ * However, data built for in-game preview is not affected by this function. + * \sa criAtomEx3dSource_SetConeParameter + */ +void CRIAPI criAtomEx3dSource_ChangeDefaultConeParameter( + CriFloat32 inside_angle, + CriFloat32 outside_angle, + CriFloat32 outside_volume +); + +/*EN + * \brief Set the minimum and maximum attenuation distances of a 3D sound source + * \ingroup ATOMEXLIB_3D + * \param[in] ex_3d_source 3D sound source handle + * \param[in] min_attenuation_distance minimum distance + * \param[in] max_attenuation_distance maximum distance + * \par Description: + * Sets the minimum and maximum attenuation distances for a 3D sound source.
+ * The minimum distance represents the distance below which the volume is maximum.
+ * The maximum distance represents the distance at which the minimum volume is reached.
+ * The default values at the initialization of the library are as follows:
+ * - Minimum distance: 0.0f + * - Maximum distance: 0.0f + * . + * The default values can be changed by calling the ::criAtomEx3dSource_ChangeDefaultMinMaxAttenuationDistance function.
+ * If the parameter is set on the data side (i.e. in the tool), the values of the data are overwritten (ignored) when this function is called.
+ * \attention + * To actually apply the specified values, you have to call the ::criAtomEx3dSource_Update function. + * \sa criAtomEx3dSource_Update, criAtomEx3dSource_ChangeDefaultMinMaxAttenuationDistance + */ +void CRIAPI criAtomEx3dSource_SetMinMaxAttenuationDistance(CriAtomEx3dSourceHn ex_3d_source, + CriFloat32 min_attenuation_distance, + CriFloat32 max_attenuation_distance +); + +/*EN + * \brief Change the default values of the minimum and maximum attenuation distances of a 3D sound source + * \ingroup ATOMEXLIB_3D + * \param[in] min_attenuation_distance minimum distance + * \param[in] max_attenuation_distance maximum distance + * \par Description: + * Changes the default values for the minimum and maximum attenuation distances.
+ * If you change the default value by using this function, the initial values of the sound cone parameters + * of the 3D sound source handle (::CriAtomEx3dSourceHn) to be created later become the value set by this function.
+ * For default values at library initialization, see ::criAtomEx3dSource_SetMinMaxAttenuationDistance function.
+ * \attention + * If the relevant parameters were not set in the tool, the default values are used implicitly.
+ * Therefore, if you change the default values, the parameters may be different from the ones intended.
+ * However, in the following cases the data is not affected by this function. + * - Initial value of minimum distance / maximum distance is set to other than 0.0 in tool properties + * - The Cue Sheets are built for in-game preview + * \sa criAtomEx3dSource_SetMinMaxDistance + */ +void CRIAPI criAtomEx3dSource_ChangeDefaultMinMaxAttenuationDistance( + CriFloat32 min_attenuation_distance, + CriFloat32 max_attenuation_distance +); + +/*EN + * \brief Set the interior panning boundaries of a 3D sound source + * \ingroup ATOMEXLIB_3D + * \param[in] ex_3d_source 3D sound source handle + * \param[in] source_radius Radius of 3D sound source + * \param[in] interior_distance Interior distance + * \par Description: + * Sets the interior panning boundaries of a 3D sound source.
+ * The radius of the 3D sound source corresponds to the sound source being considered as a sphere.
+ * The interior distance is the distance from the radius of the 3D sound source applied to the interior panning.
+ * Interior panning is applied within the radius of the 3D sound source, but since the interior distance is treated as 0.0, + * sound is played at the same volume from all the speakers.
+ * Within the interior distance, interior panning is applied.
+ * Outside the interior distance, interior panning is not applied, + * and audio is played from the one or two speakers closest to the sound source location.
+ * The default values at library initialization are as follows.
+ * - Radius of 3D sound source : 0.0f + * - Interior distance : 0.0f (Depends on minimum distance of 3D sound source) + * . + * The default value can be changed with the ::criAtomEx3dSource_ChangeDefaultInteriorPanField function.
+ * Since this parameter can not currently be set in the tool, the value set with this function is always used. + * \attention + * In order to actually apply these parameters, you need to call the ::criAtomEx3dSource_Update function. + * \sa criAtomEx3dSource_Update, criAtomEx3dSource_ChangeDefaultInteriorPanField + */ +void CRIAPI criAtomEx3dSource_SetInteriorPanField(CriAtomEx3dSourceHn ex_3d_source, CriFloat32 source_radius, CriFloat32 interior_distance); + +/*EN + * \brief Change the default value of the interior panning boundaries of a 3D sound source + * \ingroup ATOMEXLIB_3D + * \param[in] source_radius Radius of 3D sound source + * \param[in] interior_distance Interior distance + * \par Description: + * Change the default values for the interior panning boundaries of a 3D sound source.
+ * If you change the default value with this function, the initial interior panning boundary values of any + * 3D sound source handle (::CriAtomEx3dSourceHn) created later will be the values you passed.
+ * For default values at library initialization, see ::criAtomEx3dSource_SetInteriorPanField function.
+ * \sa criAtomEx3dSource_SetInteriorPanField + */ +void CRIAPI criAtomEx3dSource_ChangeDefaultInteriorPanField(CriFloat32 source_radius, CriFloat32 interior_distance); + +/*EN + * \brief Set the Doppler factor for a 3D sound source + * \ingroup ATOMEXLIB_3D + * \param[in] ex_3d_source 3D sound source handle + * \param[in] doppler_factor Doppler factor + * \par Description: + * Sets the Doppler factor for a 3D sound source.
+ * The Doppler factor is a scale factor to exaggerate the Doppler effect, which is calculated based on a sound velocity of 340 m/s.
+ * For example, if you specify 2.0f, the pitch that is calculated based on a sound velocity of 340 m/s is doubled.
+ * If you specify 0.0f, the Doppler effect is disabled.
+ * The default value at the initialization of the library is 0.0f.
+ * If a Doppler factor is set on the data side, the value in the data is overwritten (ignored) when this function is called.
+ * \attention + * To actually apply the specified value, you have to call the ::criAtomEx3dSource_Update function. + * \sa criAtomEx3dSource_Update, criAtomEx3dSource_ChangeDefaultDopplerFactor + */ +void CRIAPI criAtomEx3dSource_SetDopplerFactor(CriAtomEx3dSourceHn ex_3d_source, CriFloat32 doppler_factor); + +/*EN + * \brief Change the default Doppler factor for a 3D sound source + * \ingroup ATOMEXLIB_3D + * \param[in] doppler_factor Doppler factor + * \par Description: + * Changes the default value of the Doppler factor for a 3D sound source.
+ * If you change the default value by this function, the initial value of the doppler factor + * of the 3D sound source handle (::CriAtomEx3dSourceHn) to be created later becomes the value set by this function.
+ * For default values at library initialization, see ::criAtomEx3dSource_SetConeParameter function.
+ * \attention + * When the relevant parameter is not set in the tool, the default value is used implicitly.
+ * Therefore, if you change the default value, the parameter may be different than what was intended.
+ * However, data built for in-game preview is not affected by this function. + * \sa criAtomEx3dSource_SetDopplerFactor + */ +void CRIAPI criAtomEx3dSource_ChangeDefaultDopplerFactor(CriFloat32 doppler_factor); + +/*EN + * \brief Set the volume of a 3D sound source + * \ingroup ATOMEXLIB_3D + * \param[in] ex_3d_source 3D sound source handle + * \param[in] volume volume + * \par Description: + * Sets the volume of the 3D sound source.
+ * The volume of the 3D sound source affects only the volumes (L, R, SL, and SR) related to sound localization. It does not affect the output levels of the LFE or the center speaker.
+ * Specify a real number of 0.0f to 1.0f for the volume value.
+ * The volume is a scaling factor for the amplitude of the sound data (the unit is not decibel).
+ * For example, if you specify 1.0f, the volume of the original sound is maintained.
+ * If you specify 0.5f, the amplitude of the original sound is halved + * (i.e. the volume is -6 dB).
+ * If you specify 0.0f, the sound is muted (silent).
+ * The default value at the initialization of the library is 1.0f.
+ * If the volume of the 3D sound source is set on the data side and this function is called, the result of the multiplication between the volume from the data and the volume passed to the function will be applied.
+ * \attention + * To actually apply the specified value, you have to call the ::criAtomEx3dSource_Update function. + * \sa criAtomEx3dSource_Update, criAtomEx3dSource_ChangeDefaultVolume + */ +void CRIAPI criAtomEx3dSource_SetVolume(CriAtomEx3dSourceHn ex_3d_source, CriFloat32 volume); + +/*EN + * \brief Change the default volume of a 3D sound source + * \ingroup ATOMEXLIB_3D + * \param[in] volume volume + * \par Description: + * Changes the default volume of a 3D sound source.
+ * If you change the default value by this function, the initial value of the volume + * of the 3D sound source handle (::CriAtomEx3dSourceHn) to be created later becomes the value set by this function.
+ * For default values at library initialization, see ::criAtomEx3dSource_SetConeParameter function.
+ * \attention + * When the relevant parameter is not set in the tool, the default value is used implicitly.
+ * Therefore, if you change the default value, the parameter may be different than what was intended.
+ * However, data built for in-game preview is not affected by this function. + * \sa criAtomEx3dSource_SetVolume + */ +void CRIAPI criAtomEx3dSource_ChangeDefaultVolume(CriFloat32 volume); + +/*EN + * \brief Set the maximum variation of the angle AISAC control valu + * \ingroup ATOMEXLIB_3D + * \param[in] ex_3d_source 3D sound source handle + * \return max_delta maximum variation of the angle AISAC control value + * \par Description: + * Sets the maximum variation when the AISAC control value is changed by the angle AISAC.
+ * When the maximum variation is set to a small value, the angle AISAC changes the AISAC control value smoothly, + * even if the relative angle between the sound source and the listener is changed sharply.
+ * For example, if you set (0.5f / 30.0f), 30 frames are used to change the angle from 0 degrees to 180 degrees.
+ * The default value is 1.0f (no restriction).
+ * The value set by this function is always used, because this parameter cannot be set on the data side.
+ * \attention + * To apply the specified value, you have to call the ::criAtomEx3dSource_Update function.
+ * The maximum variation set by this function is applied only to the change in the angle AISAC control value that is calculated based on the localization angle. + * It does not affect the localization angle itself. + * \sa criAtomEx3dSource_Update + */ +void CRIAPI criAtomEx3dSource_SetMaxAngleAisacDelta(CriAtomEx3dSourceHn ex_3d_source, CriFloat32 max_delta); + +/*EN + * \brief Set the distance AISAC control ID + * \ingroup ATOMEXLIB_3D + * \param[in] ex_3d_source 3D sound source handle + * \param[in] aisac_control_id Distance AISAC control ID + * \par Description: + * Specify the AISAC control ID linked with the distance attenuation between the minimum and maximum distances.
+ * The distance AISAC control ID set on the data side (i.e. in AtomCraft) is overwritten by this function.
+ * \attention + * In order to actually apply this parameter, you need to call the ::criAtomEx3dSource_Update function.
+ * \sa criAtomEx3dSource_Update + */ +void CRIAPI criAtomEx3dSource_SetDistanceAisacControlId(CriAtomEx3dSourceHn ex_3d_source, CriUint16 aisac_control_id); + +/*EN + * \brief Set the listener reference angle AISAC control ID + * \ingroup ATOMEXLIB_3D + * \param[in] ex_3d_source 3D sound source handle + * \param[in] aisac_control_id Listener reference angle AISAC control ID + * \par Description: + * Specify the AISAC control ID linked with the angle of the sound source seen from the listener.
+ * The listener reference angle AISAC control ID set on the data side (i.e. in AtomCraft) is overwritten by this function.
+ * \attention + * In order to actually apply this parameter, you need to call the ::criAtomEx3dSource_Update function.
+ * \sa criAtomEx3dSource_Update + */ +void CRIAPI criAtomEx3dSource_SetListenerBasedAngleAisacControlId(CriAtomEx3dSourceHn ex_3d_source, CriUint16 aisac_control_id); + +/*EN + * \brief Set the sound source reference angle AISAC control ID + * \ingroup ATOMEXLIB_3D + * \param[in] ex_3d_source 3D sound source handle + * \param[in] aisac_control_id Angle AISAC control ID based on sound source + * \par Description: + * Specify the AISAC control ID linked with the angle of the listener as seen from the sound source.
+ * The sound source reference angle AISAC control ID set on the data side (i.e. in AtomCraft) is overwritten by this function.
+ * \attention + * In order to actually apply this parameter, you need to call the ::criAtomEx3dSource_Update function.
+ * \sa criAtomEx3dSource_Update + */ +void CRIAPI criAtomEx3dSource_SetSourceBasedAngleAisacControlId(CriAtomEx3dSourceHn ex_3d_source, CriUint16 aisac_control_id); + +/*EN + * \brief Calculate the size of the work area necessary to create the 3D sound source handle list + * \ingroup ATOMEXLIB_3D + * \param[in] config Pointer to the configuration structure for the creation of the 3D sound source handle list + * \return CriSint32 Work size the creation of the 3D sound source handle list creation + * \retval >= 0 Successfully completed + * \retval -1 Error occurred + * \par Description: + * Get the size of the work area required to create a 3D sound source handle list.
+ * When creating a 3D sound source handle list without having registered an allocator, + * it is necessary to call the ::criAtomEx3dSourceList_Create function with the right size for the work area.
+ *
+ * The size of the work memory required to create the 3D sound source handle list varies depending on + * the contents of the 3D sound source handle list creation configuration structure (::CriAtomEx3dSourceListConfig).
+ *
+ * When NULL is specified as an argument, the work area size is calculated from the default settings. + * (::criAtomEx3dSourceList_SetDefaultConfig) + *
+ * If the work area size calculation fails, the return value is -1.
+ * The reason why the work area size calculation failed can be confirmed with the error call back message.
+ * \par Remarks: + * The information passed in the argument "config" is only referenced within this function.
+ * Therefore it is safe to release the "config" area after executing the function. + * \sa criAtomEx3dSourceList_Create, CriAtomEx3dSourceListConfig + */ +CriSint32 CRIAPI criAtomEx3dSourceList_CalculateWorkSize(const CriAtomEx3dSourceListConfig *config); + +/*EN + * \brief Create a 3D sound source handle list + * \ingroup ATOMEXLIB_3D + * \param[in] config Pointer to the configuration structure for the creation of a 3D sound source handle list + * \param[in] work Pointer to the work area for the creation of a 3D sound source handle list + * \param[in] work_size Work size for the creation of a 3D sound source handle list + * \return CriAtomEx3dSourceListHn 3D sound source handle list + * \par Description: + * Creates a 3D sound source handle list creation based on the configuration structure.
+ * After successful creation, the 3D sound source handle list is returned.
+ * When creating a 3D sound source handle list, it is necessary to pass memory as a work area.
+ * Calculate the required memory size with the ::criAtomEx3dSourceList_CalculateWorkSize function.
+ * (If you have registered an allocator using the ::criAtomEx_SetUserAllocator macro, + * you do not need to specify a work area for this function.)
+ * \attention + * Before executing this function, it is necessary to initialize the library.
+ *
+ * \sa criAtomEx3dSourceList_CalculateWorkSize, criAtomEx3dSourceList_Destroy + */ +CriAtomEx3dSourceListHn CRIAPI criAtomEx3dSourceList_Create( + const CriAtomEx3dSourceListConfig *config, void *work, CriSint32 work_size); + +/*EN + * \brief Discard a 3D sound source handle list + * \ingroup ATOMEXLIB_3D + * \param[in] ex_3d_source_list 3D sound source handle list + * \par Description: + * Discards a 3D sound source handle list.
+ * When this function is executed, all the resources secured when creating a 3D sound source handle list are released.
+ * Also, the 3D sound source handle list specified as an argument becomes invalid.
+ * If there is sound being played by the AtomEx player who uses the 3D sound source handle list, + * stop these sounds or discard the AtomEx player before executing this function. + * \par Remarks: + * When this function is executed, any 3D sound source handle in the list is automatically deleted. + * \sa criAtomEx3dSourceList_Create + */ +void CRIAPI criAtomEx3dSourceList_Destroy(CriAtomEx3dSourceListHn ex_3d_source_list); + +/*EN + * \brief Add a 3D sound source handle to a 3D sound source handle list + * \ingroup ATOMEXLIB_3D + * \param[in] ex_3d_source_list 3D sound source handle list + * \param[in] ex_3d_source 3D sound source handle + * \par Description: + * Adds a 3D sound source handle to a 3D sound source handle list.
+ * The added AtomEx player is associated with the 3D sound source handle list, + * and multi-positioning playback becomes possible.
+ * To delete the added 3D sound source handle from the 3D sound source handle list, + * call ::criAtomEx3dSourceList_Remove function or ::criAtomEx3dSourceList_RemoveAll function.
+ * \par Remarks: + * A 3D sound source handle that satisfies the following conditions can not be added to the 3D sound source handle list.
+ * - Already assigned to the AtomEx player + * - Already added to another 3D sound source handle list + *
+ * This function can be used on the 3D sound source handle list attached to the AtomEx player currently playing.
+ * \attention + * When this function is executed, the Atom library processing will be blocked for a while.
+ * If it happens during sound playback, problems such as interruption of sound may occur, + * so please call this function when your application can tolerate load fluctuation, such as a scene change. + * \sa criAtomEx3dSourceList_Remove, criAtomEx3dSourceList_RemoveAll + */ +void CRIAPI criAtomEx3dSourceList_Add( + CriAtomEx3dSourceListHn ex_3d_source_list, CriAtomEx3dSourceHn ex_3d_source); + +/*EN + * \brief Delete a 3D sound source handle from 3D sound source handle list + * \ingroup ATOMEXLIB_3D + * \param[in] ex_3d_source_list 3D sound source handle list + * \param[in] ex_3d_source 3D sound source handle + * \par Description: + * Delete the specified 3D sound source handle from the 3D sound source handle list.
+ * If you want to delete all 3D sound source handles from a 3D sound source handle list, + * please call ::criAtomEx3dSourceList_Remove function.
+ * If you want to add a 3D sound source handle to a 3D sound source handle list, call ::criAtomEx3dSourceList_Add function. + * \par Remarks: + * This function can be used on the 3D sound source handle list attached to the AtomEx player currently playing.
+ * \attention + * When this function is executed, the Atom library processing will be blocked for a while.
+ * If it happens during sound playback, problems such as interruption of sound may occur, + * so please call this function when your application can tolerate load fluctuation, such as a scene change. + * \sa criAtomEx3dSourceList_RemoveAll + */ +void CRIAPI criAtomEx3dSourceList_Remove( + CriAtomEx3dSourceListHn ex_3d_source_list, CriAtomEx3dSourceHn ex_3d_source); + +/*EN + * \brief Delete all the 3D sound source handles from a 3D sound source handle list + * \ingroup ATOMEXLIB_3D + * \param[in] ex_3d_source_list 3D sound source handle list + * \par Description: + * Deletes all the 3D sound source handles from a 3D sound source handle list.
+ * If you want to delete a specific 3D sound source handle from the 3D sound source handle list, + * call the ::criAtomEx3dSourceList_Remove function.
+ * If you want to add a 3D sound source handle to the 3D sound source handle list, call ::criAtomEx3dSourceList_Add function. + * \par Remarks: + * This function can be used on the 3D sound source handle list attached to the AtomEx player currently playing.
+ * \attention + * When this function is executed, the Atom library processing will be blocked for a while.
+ * If it happens during sound playback, problems such as interruption of sound may occur, + * so please call this function when your application can tolerate load fluctuation, such as a scene change. + * \sa criAtomEx3dSourceList_Remove + */ +void CRIAPI criAtomEx3dSourceList_RemoveAll(CriAtomEx3dSourceListHn ex_3d_source_list); + +/*EN + * \brief Calculate the size of the work buffer required to create a 3D listener + * \ingroup ATOMEXLIB_3D + * \param[in] config pointer to the configuration structure used to create a 3D listener + * \param[out] CriSint32 size of the work buffer + * \par Description: + * Calculates the size of the work buffer required to create a 3D listener.
+ * If you create a 3D listener without having registered a user-allocator, + * a memory buffer having the size returned by this function + * must be passed to ::criAtomEx3dListener_Create.
+ *
+ * The size of the work buffer needed to create a 3D listener depends + * on the value of the parameters in the configuration structure ( ::CriAtomEx3dListenerConfig ).
+ *
+ * When NULL is specified for the structure, the default settings + * (the same than the ones set by the ::criAtomEx3dListener_SetDefaultConfig macro) are used + * to calculate the size of the work buffer. + *
+ * If this function fails to calculate the size of the work buffer, it will return -1.
+ * To know the reason of the failure, refer to the error callback message.
+ * \par Remarks: + * The information in the configuration structure is only used during the initialization and is + * not referenced after that. Therefore, it is safe to release it once the function has returned. + * \sa criAtomEx3dListener_Create, CriAtomEx3dListenerConfig + */ +CriSint32 CRIAPI criAtomEx3dListener_CalculateWorkSize(const CriAtomEx3dListenerConfig *config); + +/*EN + * \brief Create a 3D listener + * \ingroup ATOMEXLIB_3D + * \param[in] config pointer to the configuration structure used to create a 3D listener + * \param[in] work pointer to the work buffer + * \param[in] work_size size of the work buffer + * \return CriAtomEx3dListenerHn 3D listener handle + * \par Description: + * Creates a 3D listener based on the value of the parameters of the configuration structure.
+ * When this function creates a 3D listener successfully, it returns a handle.
+ * When creating a 3D listener, you must pass a work buffer.
+ * The size of that buffer is calculated by calling the ::criAtomEx3dListener_CalculateWorkSize + * function.
+ * (If a user-allocator has already been registered by using the ::criAtomEx_SetUserAllocator macro, + * you do not need to pass the work buffer.)
+ * \attention + * You must initialize the library before executing this function.
+ *
+ * \sa criAtomEx3dListener_CalculateWorkSize, criAtomEx3dListener_Destroy + */ +CriAtomEx3dListenerHn CRIAPI criAtomEx3dListener_Create( + const CriAtomEx3dListenerConfig *config, void *work, CriSint32 work_size); + +/*EN + * \brief Destroy a 3D listener + * \ingroup ATOMEXLIB_3D + * \param[in] ex_3d_listener 3D listener handle + * \par Description: + * Destroys a 3D listener.
+ * All resources allocated when you created the 3D listener are released when you execute this function.
+ * Also, the 3D listener handle specified as an argument is disabled.
+ * If any sounds are being played back on an AtomEx player to which this 3D listener handle has been assigned, + * you must first stop these sounds or destroy the AtomEx player, then only execute this function. + * \sa criAtomEx3dListener_Create + */ +void CRIAPI criAtomEx3dListener_Destroy(CriAtomEx3dListenerHn ex_3d_listener); + +/*EN + * \brief Update a 3D listener + * \ingroup ATOMEXLIB_3D + * \param[in] ex_3d_listener 3D listener handle + * \par Description: + * Updates a 3D listener with the parameters previously specified with other functions.
+ * This function updates all the parameters specified for the 3D listener at once.
+ * Updating the 3D listener with this function every time you change a single parameter is inefficient. + * You should update it after changing all the parameters you need to change.
+ * \par Example: + * \code + * CriAtomExVector pos; + * CriAtomExVector vel; + * + * // Set the position + * pos.x = 0.0f + * pos.y = 0.0f + * pos.z = 1.0f + * criAtomEx3dListener_SetPosition(listener, &pos); + * // Set the velocity + * vel.x = 1.0f + * vel.y = 0.0f + * vel.z = 0.0f + * criAtomEx3dListener_SetVelocity(listener, &vel); + * + * // Update the listener parameters + * criAtomEx3dListener_Update(listener); + * \endcode + * \attention + * This function works independently from the parameter update functions ( ::criAtomExPlayer_UpdateAll and + * criAtomExPlayer_Update). Whenever you change the parameters of a 3D listener, use this function to update them. + */ +void CRIAPI criAtomEx3dListener_Update(CriAtomEx3dListenerHn ex_3d_listener); + +/*EN + * \brief Reset the 3D listener parameters + * \ingroup ATOMEXLIB_3D + * \param[in] ex_3d_listener 3D listener handle + * \par Description: + * Clears the parameters set for the 3D listener and restores them to their initial values.
+ * \attention + * To actually apply the cleared parameters, the user must call the ::criAtomEx3dListener_Update function. + * \sa criAtomEx3dListener_Update + */ +void CRIAPI criAtomEx3dListener_ResetParameters(CriAtomEx3dListenerHn ex_3d_listener); + +/*EN + * \brief Set the position of a 3D listener + * \ingroup ATOMEXLIB_3D + * \param[in] ex_3d_listener 3D listener handle + * \param[in] position position vector + * \par Description: + * Sets the position of the 3D listener.
+ * The position is used to calculate the distance attenuation and the localization .
+ * Specify the position as a 3D vector.
+ * The default value is (0.0f, 0.0f, 0.0f).
+ * The value set by this function is always used because the position cannot be set on the data side.
+ * \attention + * To actually apply the specified values, you have to call the ::criAtomEx3dListener_Update function. + * \sa criAtomEx3dListener_Update + */ +void CRIAPI criAtomEx3dListener_SetPosition(CriAtomEx3dListenerHn ex_3d_listener, const CriAtomExVector *position); + +/*EN + * \brief Get 3D position of listener + * \ingroup ATOMEXLIB_3D + * \param[in] ex_3d_listener 3D listener handle + * \par Description: + * Gets the position of the 3D listener.
+ * Position is acquired with 3 dimensional vector. + */ +CriAtomExVector CRIAPI criAtomEx3dListener_GetPosition(CriAtomEx3dListenerHn ex_3d_listener); + + +/*EN + * \brief Set the velocity of a 3D listener + * \ingroup ATOMEXLIB_3D + * \param[in] ex_3d_listener 3D listener handle + * \param[in] velocity velocity vector + * \par Description: + * Sets the velocity of a 3D listener.
+ * The velocity is used to calculate the Doppler effect.
+ * Specify the velocity as a 3D vector.
+ * The velocity corresponds to the distance traveled per second.
+ * The default value is (0.0f, 0.0f, 0.0f).
+ * The value set in this function is always used, because the velocity cannot be set on the data side.
+ * \attention + * To actually apply the specified values, you hve to call the ::criAtomEx3dListener_Update function. + * \sa criAtomEx3dListener_Update + */ +void CRIAPI criAtomEx3dListener_SetVelocity(CriAtomEx3dListenerHn ex_3d_listener, const CriAtomExVector *velocity); + +/*EN + * \brief Set the orientation of the 3D listener + * \ingroup ATOMEXLIB_3D + * \param[in] ex_3d_listener 3D listener handle + * \param[in] front front orientation vector + * \param[in] top top orientation vector + * \par Description: + * Sets the orientation of the 3D listener using front and top orientation vectors.
+ * The orientation is specified by 3D vectors. They are used after being normalized within the library. + * The default values are as follows.
+ * - Front orientation vector (0.0f, 0.0f, 1.0f) + * - Top orientation vector (0.0f, 1.0f, 0.0f) + * . + * The value set in this function is always used, because the orientation cannot be set on the data side.
+ * \attention + * To actually apply the specified values, you hve to call the ::criAtomEx3dListener_Update function. + * \sa criAtomEx3dListener_Update + */ +void CRIAPI criAtomEx3dListener_SetOrientation(CriAtomEx3dListenerHn ex_3d_listener, const CriAtomExVector *front, const CriAtomExVector *top); + +/*EN + * \brief Set the Doppler multiplier for the 3D listener + * \ingroup ATOMEXLIB_3D + * \param[in] ex_3d_listener 3D listener handle + * \param[in] doppler_multiplier Doppler multiplier + * \par Description: + * Set the Doppler multiplier of 3D listener. This scaling factor is used to calculate the Doppler effect.
+ * For example, if you specify 10.0 f for doppler_multiplier, the Doppler effect will be 10 times normal.
+ * Specify a value of 0.0 f or more for doppler_multiplier. + * The default value is 1.0f.
+ * Since the listener's Doppler multiplier can not be set on the data side, the setting value of this function is always used.
+ * \attention + * To actually apply the specified parameter, call the ::criAtomEx3dListener_Update function. + * \sa criAtomEx3dListener_Update + */ +void CRIAPI criAtomEx3dListener_SetDopplerMultiplier(CriAtomEx3dListenerHn ex_3d_listener, CriFloat32 doppler_multiplier); + +/*EN + * \brief Set the focus point of the 3D listener + * \ingroup ATOMEXLIB_3D + * \param[in] ex_3d_listener 3D listener handle + * \param[in] focus_point focus point vector + * \par Description: + * Sets the focus point of a 3D listener.
+ * When performing 3D positioning, + * setting a focus point connects the listener position and the focus point with a straight line along which the microphone can be moved.
+ * For example, you can easily represent and adjust objective and subjective situations by setting a focus point on the main character while keeping the listener and the camera sychronized.
+ * Note that the microphone that can be moved between the listener position and focus point differs from real-world microphones in that its distance sensor (for distance attenuation calculation) and direction sensor (for localization calculation) are independent.
+ * By operating the sensors separately, you can achieve effects such as setting the focus on the main character and performing distance attenuation based on the character position, or performing localization calculation based on the camera position to match localization with the view point on the screen.
+ * The default value is (0.0f, 0.0f, 0.0f). When the focus levels of the distance sensor and direction sensor are not set, there is no need to set a focus point. In that case, all 3D positioning calculations are performed based on the listener position as usual.
+ * \attention + * To actually apply the specified parameter, call the ::criAtomEx3dListener_Update function. + * \sa criAtomEx3dListener_Update, criAtomEx3dListener_SetDistanceFocusLevel, criAtomEx3dListener_SetDirectionFocusLevel + */ +void CRIAPI criAtomEx3dListener_SetFocusPoint(CriAtomEx3dListenerHn ex_3d_listener, const CriAtomExVector *focus_point); + +/*EN + * \brief Set the focus level of the distance sensor + * \ingroup ATOMEXLIB_3D + * \param[in] ex_3d_listener 3D listener handle + * \param[in] distance_focus_level focus level of the distance sensor + * \par Description: + * Sets the focus level of the distance sensor.
+ * The distance sensor represents the reference position used to calculate the distance attenuation for the 3D positioning. It can be considered as a microphone that only detects the effect of the distance attenuation and ignores localization.
+ * The focus level represents how close the sensor (microphone) can be brought to the focus point. The sensor (microphone) can be moved along the line connecting the listener position and the focus point, with 0.0f and 1.0f corresponding to the listener position and the focus point, respectively.
+ * For example, when the focus level of the distance sensor is set to 1.0f and the focus level of the direction sensor is set to 0.0f, the distance attenuation is applied based on the focus point, and the localization is determined based on the listener position.
+ * The default value is 0.0f. When the focus levels of the distance and direction sensors are not set, all 3D positioning calculations are performed based on the listener position as usual.
+ * \attention + * To actually apply the specified parameter, call the ::criAtomEx3dListener_Update function. + * \sa criAtomEx3dListener_Update, criAtomEx3dListener_SetFocusPoint, criAtomEx3dListener_SetDirectionFocusLevel + */ +void CRIAPI criAtomEx3dListener_SetDistanceFocusLevel(CriAtomEx3dListenerHn ex_3d_listener, CriFloat32 distance_focus_level); + +/*EN + * \brief Set the focus level of the direction sensor + * \ingroup ATOMEXLIB_3D + * \param[in] ex_3d_listener 3D listener handle + * \param[in] direction_focus_level focus level of the direction sensor + * \par Description: + * Sets the focus level of the direction sensor.
+ * The direction sensor represents the reference position used to calculate the localization for the 3D positioning. It can be considered as a microphone that only detects localization and ignores distance attenuation.
+ * For the orientation of the direction sensor, the orientation of the listener is used (set by the ::criAtomEx3dListener_SetOrientation function).
+ * The focus level represents how close the sensor (microphone) can be brought to the focus point. The sensor (microphone) can be moved along the line connecting the listener position and the focus point, with 0.0f and 1.0f corresponding to the listener position and the focus point, respectively.
+ * For example, when the focus level of the distance sensor is set to 1.0f and the focus level of the direction sensor is set to 0.0f, the distance attenuation is applied based on the focus point, and the localization is determined based on the listener position.
+ * The default value is 0.0f. When the focus levels of the distance and direction sensors are not set, all 3D positioning calculations are performed based on the listener position as usual.
+ * \attention + * To actually apply the specified parameter, call the ::criAtomEx3dListener_Update function. + * \sa criAtomEx3dListener_Update, criAtomEx3dListener_SetFocusPoint, criAtomEx3dListener_SetDistanceFocusLevel + */ +void CRIAPI criAtomEx3dListener_SetDirectionFocusLevel(CriAtomEx3dListenerHn ex_3d_listener, CriFloat32 direction_focus_level); + +/*EN + * \brief Set whether to reflect distance attenuation AISAC and angle AISAC control value to sound source when pan type is pan 3D + * \ingroup ATOMEXLIB_3D + * \param[in] flag Whether to apply AISAC control value (CRI_TRUE/CRI_FALSE) + * \par Description: + * If CRI_TRUE is set in the ::flag argument, calculation results of the set distance attenuation AISAC and angle AISAC
+ * will be applied to the sound source whenever the sound source with pan type 3D is played back. + * \attention + * By default in the Atom library, the calculation results of distance attenuation AISAC and angle AISAC are not applied to pan 3D sound source.
+ *
+ * \sa criAtomEx_IsEnableCalculationAisacControlFrom3dPosition + */ +void CRIAPI criAtomEx_EnableCalculationAisacControlFrom3dPosition(CriBool flag); + +/*EN + * \brief Gets whether distance attenuation AISAC and angle AISAC control values are reflected in the sound source when pan type is pan 3D + * \ingroup ATOMEXLIB_3D + * \retval CRI_TRUE Applying calculation results + * \retval CRI_FALSE Not applying calculation results + * \par Description: + * When playing Pan type 3D sound source, it acquires whether calculation results of set distance
+ * attenuation AISAC and angle AISAC are applied to the sound source. + * \attention + * By default in the Atom library, the calculation results of distance attenuation AISAC and angle AISAC are not applied to pan 3D sound source.
+ *
+ * \sa criAtomEx_EnableCalculationAisacControlFrom3dPosition + */ +CriBool CRIAPI criAtomEx_IsEnableCalculationAisacControlFrom3dPosition(void); + +/*========================================================================== + * CRI AtomEx DSP API + *=========================================================================*/ + +/*EN + * \brief Detach a DSP + * \ingroup ATOMEXLIB_DSP + * \param[in] pool Voice Pool handle + * \par Description: + * Detaches a DSP from the specified Voice Pool.
+ * \attention + * This is a blocking function.
+ * Executing this function blocks the server processing of the Atom library for a while.
+ * If this function is executed during audio playback, problems such as audio breakups may occur. + * Call this function only when a fluctuation in load is acceptable, for example when loading a new level. + * \attention Remarks: + * This function is currently unavailable on some platforms.
+ */ +void CRIAPI criAtomExVoicePool_DetachDsp(CriAtomExVoicePoolHn pool); + +/*EN + * \brief Calculate the size of the work buffer required to attach a pitch shifter DSP + * \ingroup ATOMEXLIB_DSP + * \param[in] config configuration structure used to attach the DSP + * \return CriSint32 work buffer size + * \retval >= 0 successfully completed + * \retval -1 error occurred + * \par Description: + * Calculates the size of the work buffer required to attach the pitch shifter DSP. + * \sa criAtomExVoicePool_AttachDspPitchShifter + */ +CriSint32 CRIAPI criAtomExVoicePool_CalculateWorkSizeForDspPitchShifter( + const CriAtomExDspPitchShifterConfig *config); + +/*EN + * \brief Attach a pitch shifter DSP + * \ingroup ATOMEXLIB_DSP + * \param[in] pool Voice Pool handle + * \param[in] config configuration structure used to attach the pitch shifter DSP + * \param[in] work work buffer + * \param[in] work_size work buffer size + * \par Description: + * Attaches a pitch shifter DSP to a Voice Pool.
+ * \attention + * This is a blocking function.
+ * Executing this function blocks the server processing of the Atom library for a while.
+ * If this function is executed during audio playback, problems such as audio breakups may occur. + * Call this function only when a fluctuation in load is acceptable, for example when loading a new level. + * \attention Remarks: + * This function is currently unavailable on some platforms.
+ */ +void CRIAPI criAtomExVoicePool_AttachDspPitchShifter(CriAtomExVoicePoolHn pool, + const CriAtomExDspPitchShifterConfig *config, void *work, CriSint32 work_size); + +/*EN + * \brief Calculate the size of the work buffer required to attach a time-stretching DSP + * \ingroup ATOMEXLIB_DSP + * \param[in] config configuration structure used to attach a time-stretching DSP + * \return CriSint32 work buffer size + * \retval >= 0 successfully completed + * \retval -1 error occurred + * \par Description: + * Calculates the size of the work buffer required to attach a time-stretching DSP. + * \sa criAtomExVoicePool_AttachDspTimeStretch + */ +CriSint32 CRIAPI criAtomExVoicePool_CalculateWorkSizeForDspTimeStretch( + const CriAtomExDspTimeStretchConfig *config); + +/*EN + * \brief Attach a time-stretching DSP + * \ingroup ATOMEXLIB_DSP + * \param[in] pool Voice Pool handle + * \param[in] config configuration structure used to attach the time-stretching DSP + * \param[in] work work buffer + * \param[in] work_size work buffer size + * \par Description: + * Attaches a time-stretching DSP to a Voice Pool.
+ * \attention + * This is a blocking function.
+ * Executing this function blocks the server processing of the Atom library for a while.
+ * If this function is executed during audio playback, problems such as audio breakups may occur. + * Call this function only when a fluctuation in load is acceptable, for example when loading a new level. + * \attention Remarks: + * This function is currently unavailable on some platforms.
+ */ +void CRIAPI criAtomExVoicePool_AttachDspTimeStretch(CriAtomExVoicePoolHn pool, + const CriAtomExDspTimeStretchConfig *config, void *work, CriSint32 work_size); + +/* ========================================================================*/ +/* CRI AtomEx Streaming Cache API */ +/* ========================================================================*/ +/*EN + * \brief Determines if the streaming data of a Cue (specified by its ID) is already cached + * \ingroup ATOMEXLIB_STREAMING_CACHE + * \param[in] stm_cache_id streaming cache ID + * \param[in] acb_hn ACB handle containing the Cue + * \param[in] id ID of the Cue for which the status of the streaming data is checked + * \retval CRI_TRUE = cached + * \retval CRI_FALSE = not cached + * \par Description: + * This function determines if the streaming data of a Cue (specified by its ID) is already cached.
+ * \attention + * The information returned will not be accurate if the Cue has several streams.
+ * In that case, the function will return CRI_TRUE as soon as one of the streams is found as being cached.
+ * \sa criAtomStreamingCache_IsCachedWaveformByName + */ +CriBool CRIAPI criAtomExStreamingCache_IsCachedWaveformById( + CriAtomExStreamingCacheId stm_cache_id, CriAtomExAcbHn acb_hn, CriAtomExCueId id); + +/*EN + * \brief Determines if the streaming data of a Cue (specified by its name) is already cached + * \ingroup ATOMEXLIB_STREAMING_CACHE + * \param[in] stm_cache_id streaming cache ID + * \param[in] acb_hn ACB handle containing the Cue + * \param[in] name Name of Cue for which the status of the streaming data is checked + * \retval CRI_TRUE = cached + * \retval CRI_FALSE = not cached + * \par Description: + * This function determines if the streaming data of a Cue (specified by its name) is already cached.
+ * \attention + * The information returned will not be accurate if the Cue has several streams.
+ * In that case, the function will return CRI_TRUE as soon as one of the streams is found as being cached.
+ * \sa criAtomStreamingCache_IsCachedWaveformById + */ +CriBool CRIAPI criAtomExStreamingCache_IsCachedWaveformByName( + CriAtomExStreamingCacheId stm_cache_id, CriAtomExAcbHn acb_hn, const CriChar8 *name); + +/*EN + * \brief Starting to cache streaming data of the Cue (specified by its ID) + * \ingroup ATOMEXLIB_STREAMING_CACHE + * \param[in] stm_cache_id Target streaming cache ID + * \param[in] acb_hn ACB handle containing the Cue + * \param[in] cue_id Cue ID of the Cue to cache + * \return CriFsLoaderHn CriFsLoader handle + * \retval NULL = Failed in starting to cache + * \retval Other than NULL = Succeeded in starting to cache + * \par Description: + * Starts to load streaming data for the Cue specified by its ID into a streaming cache.
+ * If this function succeeds, loading is started, and the ::CriFsLoader handle + * in the ::CRIFSLAODER_STATUS_LOADING status is returned.
+ * If this function fails, NULL is returned.
+ * When the returned CriFsLoader handle is in the ::CRIFSLOADER_STATUS_COMPLETE status, + * loading and caching are complete.
+ * After loading is complete, use the ::criFsLoader_Destroy function + * to destroy the CriFsLoader handle obtained from this function.
+ * \par Note: + * This function is a non-blocking function. + * \attention + * If the Cue has multiple streaming data, + * this function loads only the first streaming data found in the Cue.
+ */ +CriFsLoaderHn CRIAPI criAtomExStreamingCache_LoadWaveformByIdAsync( + CriAtomExStreamingCacheId stm_cache_id, CriAtomExAcbHn acb_hn, CriAtomExCueId cue_id); + +/*EN + * \brief Starting to cache streaming data of the Cue (specified by its name) + * \ingroup ATOMEXLIB_STREAMING_CACHE + * \param[in] stm_cache_id Target streaming cache ID + * \param[in] acb_hn ACB handle containing the Cue + * \param[in] name Name of the Cue to cache + * \return CriFsLoaderHn CriFsLoader handle + * \retval NULL = Failed in starting to cache + * \retval Other than NULL = Succeeded in starting to cache + * \par Description: + * Loads streaming data for the Cue specified by its name into a streaming cache.
+ * If this function succeeds, loading is started, and the ::CriFsLoader handle + * in the ::CRIFSLAODER_STATUS_LOADING status is returned.
+ * If this function fails, NULL is returned.
+ * When the returned CriFsLoader handle is in the ::CRIFSLOADER_STATUS_COMPLETE status, + * loading and caching are complete.
+ * After loading is complete, use the ::criFsLoader_Destroy function + * to destroy the CriFsLoader handle obtained from this function.
+ * \par Note: + * This function is a non-blocking function. + * \attention + * If the Cue has multiple streaming data, + * this function loads only the first streaming data found in the Cue.
+ */ +CriFsLoaderHn CRIAPI criAtomExStreamingCache_LoadWaveformByNameAsync( + CriAtomExStreamingCacheId stm_cache_id, CriAtomExAcbHn acb_hn, const CriChar8 *name); + +/*EN + * \brief Caching streaming data of the Cue (specified by its ID) + * \ingroup ATOMEXLIB_STREAMING_CACHE + * \param[in] stm_cache_id Target streaming cache ID + * \param[in] acb_hn ACB handle containing the Cue + * \param[in] cue_id Cue ID of the Cue to cache + * \return CriBool Succeeded/failed + * \retval CRI_FALSE = Failed in loading + * \retval CRI_TRUE = Succeeded in loading + * \par Description: + * Loads streaming data for the Cue specified by its ID into a streaming cache.
+ * If this function succeeds, ::CRI_TRUE is returned, and the specified Cue is in the cache complete status.
+ * If this function fails, ::CRI_FALSE is returned.
+ * \par Note: + * This function is a blocking function. + * \attention + * If the Cue has multiple streaming data, + * this function loads only the first streaming data found in the Cue.
+ */ +CriBool CRIAPI criAtomExStreamingCache_LoadWaveformById( + CriAtomExStreamingCacheId stm_cache_id, CriAtomExAcbHn acb_hn, CriAtomExCueId cue_id); + +/*EN + * \brief Caches streaming data of the Cue (specified by its name) + * \ingroup ATOMEXLIB_STREAMING_CACHE + * \param[in] stm_cache_id Target streaming cache ID + * \param[in] acb_hn ACB handle containing the Cue + * \param[in] name Name of the Cue to cache + * \return CriBool Succeeded/failed + * \retval CRI_FALSE = Failed in loading + * \retval CRI_TRUE = Succeeded in loading + * \par Description: + * Loads streaming data for the Cue specified by its ID into a streaming cache.
+ * If this function succeeds, ::CRI_TRUE is returned, and the specified Cue is in the cache complete status.
+ * If this function fails, ::CRI_FALSE is returned.
+ * \par Note: + * This function is a blocking function. + * \attention + * If the Cue has multiple streaming data, + * this function loads only the first streaming data found in the Cue.
+ */ +CriBool CRIAPI criAtomExStreamingCache_LoadWaveformByName( + CriAtomExStreamingCacheId stm_cache_id, CriAtomExAcbHn acb_hn, const CriChar8 *name); + + +/* ========================================================================*/ +/* CRI AtomEx Tween (Parameter Evolution) API */ +/* ========================================================================*/ +/*EN + * \brief Calculate the size of the work buffer required to create a Tween + * \ingroup ATOMEXLIB_TWEEN + * \param[in] config configuration structure used to create a Tween + * \return CriSint32 work buffer size + * \retval >= 0 successfully completed + * \retval -1 error occurred + * \par Description: + * Calculates the size of the work buffer required to create a Tween.
+ * If you create a Tween without having registered a user-allocator, + * a memory buffer having the size returned by this function + * must be passed to ::criAtomExTween_Create.
+ * When NULL is specified for the structure, the default settings + * (the same than the ones set by the ::criAtomExTween_SetDefaultConfig macro) are used + * to calculate the size of the work buffer. + *
+ * If this function fails to calculate the size of the work buffer, it will return -1.
+ * To know the reason of the failure, refer to the error callback message.
+ * \par Remarks: + * The information in the configuration structure is only used during the initialization and is + * not referenced after that. Therefore, it is safe to release it once the function has returned. + * \attention + * The library must be initialized before executing this function.
+ * \sa CriAtomExTweenConfig, criAtomExTween_Create + */ +/* Calculate work area size required for creating Tween. */ +CriSint32 CRIAPI criAtomExTween_CalculateWorkSize(const CriAtomExTweenConfig *config); + +/*EN + * \brief Create Tween + * \ingroup ATOMEXLIB_TWEEN + * \param[in] config configuration structure used to create a Tween + * \param[in] work work buffer + * \param[in] work_size work buffer size + * \return CriAtomExTweenHn Tween handle + * \par Description: + * Creates a Tween based on the value of the parameters of the configuration structure.
+ * When this function creates a Tween successfully, it returns a handle.
+ * When creating a Tween, you must pass a work buffer.
+ * The size of that buffer is calculated by calling the ::criAtomExTween_CalculateWorkSize + * function.
+ * (If a user-allocator has already been registered by using the ::criAtomEx_SetUserAllocator macro, + * you do not need to pass the work buffer.)
+ * To use the Tween that was created, attach it to the AtomEx Player by using the ::criAtomExPlayer_AttachTween function. + * \par Remarks: + * The initial value of a Tween parameter depends on its type, as specified in the configuration structure.
+ * - ::CRIATOMEX_PARAMETER_TYPE_BASIC : default value
+ * - ::CRIATOMEX_PARAMETER_TYPE_AISAC : 0.0f
+ * \attention + * The library must be initialized before executing this function.
+ *
+ * \sa criAtomExTween_CalculateWorkSize, criAtomExTween_Destroy, criAtomExPlayer_AttachTween + */ +CriAtomExTweenHn CRIAPI criAtomExTween_Create( + const CriAtomExTweenConfig *config, void *work, CriSint32 work_size); + +/*EN + * \brief Destroy a Tween + * \ingroup ATOMEXLIB_TWEEN + * \param[in] tween Tween handle + * \par Description: + * Destroys a Tween.
+ * The memory allocated when you created the Tween is released when you execute this function.
+ * Also, the Tween handle specified as an argument is disabled.
+ * If any sounds are being played back on the AtomEx player to which the Tween is attached, + * you must first stop these sounds or destroy the AtomEx player, then only execute this function. + * \sa criAtomExTween_Create + */ +void CRIAPI criAtomExTween_Destroy(CriAtomExTweenHn tween); + +/*EN + * \brief Get the current value of the Tween + * \ingroup ATOMEXLIB_TWEEN + * \param[in] tween Tween handle + * \par Description: + * Gets the current value of the parameter associated to a Tween.
+ */ +CriFloat32 CRIAPI criAtomExTween_GetValue(CriAtomExTweenHn tween); + +/*EN + * \brief Smoothly change the current value of the parameter to the specified value + * \ingroup ATOMEXLIB_TWEEN + * \param[in] tween Tween handle + * \param[in] time_ms time over which the change is made (in milliseconds) + * \param[in] value final value + * \par Description: + * Takes the time specified by time_ms to change a Tween parameter from its current value (i.e. when this function is called) to the value specified.
+ * The variation curve is linear. + */ +void CRIAPI criAtomExTween_MoveTo(CriAtomExTweenHn tween, CriUint16 time_ms, CriFloat32 value); + +/*EN + * \brief Smoothly change the specified value to the current value + * \ingroup ATOMEXLIB_TWEEN + * \param[in] tween Tween handle + * \param[in] time_ms time over which the change is made (in milliseconds) + * \param[in] value initial value + * \par Description: + * Takes the time specified by time_ms to change a Tween parameter from the value specified to the currently value of the Tween (when this function is called).
+ * The variation curve is linear. + */ +void CRIAPI criAtomExTween_MoveFrom(CriAtomExTweenHn tween, CriUint16 time_ms, CriFloat32 value); + +/*EN + * \brief Stop the Tween + * \ingroup ATOMEXLIB_TWEEN + * \param[in] tween Tween handle + * \par Description: + * Stops the variation of the Tween parameter over time.
+ */ +void CRIAPI criAtomExTween_Stop(CriAtomExTweenHn tween); + +/*EN + * \brief Reset the Tween + * \ingroup ATOMEXLIB_TWEEN + * \param[in] tween Tween handle + * \par Description: + * Resets the parameter associated with the Tween handle and reverts it to its initial value.
+ * The initial value of a Tween parameter depends on its type, as specified in the configuration structure.
+ * - ::CRIATOMEX_PARAMETER_TYPE_BASIC : default value
+ * - ::CRIATOMEX_PARAMETER_TYPE_AISAC : 0.0f
+ * \par Remarks: + * Stops the variation of the Tween parameter if it is in progress.
+ */ +void CRIAPI criAtomExTween_Reset(CriAtomExTweenHn tween); + +/*========================================================================== + * CRI AtomEx Voice Event API + *=========================================================================*/ +/*EN + * \brief Register a voice event callback + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] func Voice event callback function + * \param[in] obj User-specified object + * \par Description: + * Registers a voice event callback.
+ * By registering this callback, detailed information about voice events such as allocation, release and deprivation + * can be retrieved.
+ * \par Remarks: + * The value set for the second argument ( obj ) will be passed to the callback function.
+ * For information about the other arguments of the callback function, refer to + * the description of ::CriAtomExVoiceEventCbFunc.
+ *
+ * By specifying NULL for func, the registered function will be unregistered.
+ * \attention + * Only the information relating to the limit control based on Voice priority can be retrieved.
+ * At this time, the information about the control by the category Cue priority cannot be retrieved.
+ * \sa CriAtomExVoiceEventCbFunc + */ +void CRIAPI criAtomEx_SetVoiceEventCallback(CriAtomExVoiceEventCbFunc func, void *obj); + +/*EN + * \brief Voice information enumerator + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] func Voice information callback function + * \param[in] obj User-specified object + * \par Description: + * Enumerates the information about the voices currently playing.
+ *
+ * When this function is executed, the callback function passed in the first + * argument ( func ) is called as many times as there are voices currently being played.
+ * Detailed information about the voices being played is passed to + * the callback function in a CriAtomExVoiceInfoDetail structure.
+ * \par Remarks: + * The value set for the second argument ( obj ) is passed to the callback function as an argument.
+ * For information about the other arguments of the callback function, refer to + * the description of ::CriAtomExVoiceInfoCbFunc.
+ *
+ * By specifying NULL for func, the registered function will be unregistered.
+ * \attention + * Only information about voices that have sufficient voice resources to be played + * is returned to the callback.
+ * (Information about the virtualized voices is not returned.)
+ * \sa CriAtomExVoiceInfoCbFunc + */ +void CRIAPI criAtomEx_EnumerateVoiceInfos(CriAtomExVoiceInfoCbFunc func, void *obj); + +/*EN + * \brief Registering a callback function for monitoring a voice stop + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] func Callback function for monitoring a voice stop + * \param[in] obj User specified object + * \par Description: + * Registers a callback function for monitoring a voice stop.
+ *
+ * When you execute this function, the callback function specified at the first argument (func) is called + * when a played voice is stopped in the monitored playback ID.
+ * Information about the stopped voice is passed to the callback function + * as the CriAtomExMonitoringVoiceStopInfo structure.
+ * \par Note: + * The value that is set at the second argument (obj) is passed as an argument of the callback function.
+ * For other arguments of the callback function, + * refer to the description of ::CriAtomExMonitoringVoiceStopCbFunc.
+ * \sa CriAtomExMonitoringVoiceStopCbFunc + */ +void CRIAPI criAtomEx_SetMonitoringVoiceStopCallback(CriAtomExMonitoringVoiceStopCbFunc func, void *obj); + +/*EN + * \brief Registering a playback ID for monitoring a voice stop + * \ingroup ATOMEXLIB_GLOBAL + * \param[in] playback_id Playback ID for monitoring a voice stop + * \par Description: + * Registers a playback ID for monitoring a voice stop.
+ *
+ * Only one playback ID can be monitored.
+ * If this function is called when the playback ID has already been set, the monitoring playback ID information is overwritten.
+ * For monitoring, register a callback function for using the ::criAtomEx_SetMonitoringVoiceStopCallback function for notification.
+ * \sa criAtomEx_SetMonitoringVoiceStopCallback + */ +void CRIAPI criAtomEx_SetMonitoringVoiceStopPlaybackId(CriAtomExPlaybackId playback_id); + +/*========================================================================== + * CRI AtomEx Sound Object API + *=========================================================================*/ +/*EN + * \brief Calculate the size of the buffer required to create a sound object + * \ingroup ATOMEXLIB_SOUND_OBJECT + * \param[in] config Configuration structure used to create a sound object + * \return CriSint32 Work buffer size + * \retval 0 or greater Process finished normally + * \retval -1 Error occurred. + * \par Description: + * Calculates the size of the work buffer required to create a sound object.
+ * If you create a sound object without having registered a user-allocator, + * a memory buffer having the size returned by this function + * must be passed to ::criAtomExSoundObject_Create.
+ *
+ * The size of the work buffer needed to create a 3D listener depends + * on the value of the parameters in the configuration structure ( ::CriAtomExSoundObjectConfig ).
+ *
+ * When NULL is specified for the structure, the default settings + * (the same than the ones set by the ::criAtomExSoundObject_SetDefaultConfig macro) are used + * to calculate the size of the work buffer. + *
+ * If this function fails to calculate the size of the work buffer, it will return -1.
+ * To know the reason of the failure, refer to the error callback message.
+ * \par Remarks: + * The information in the configuration structure is only used during the initialization and is + * not referenced after that. Therefore, it is safe to release it once the function has returned. + * \attention + * The library must be initialized before this function is executed.
+ * \sa CriAtomExSoundObjectConfig, criAtomExSoundObject_Create + */ +CriSint32 CRIAPI criAtomExSoundObject_CalculateWorkSize( + const CriAtomExSoundObjectConfig *config); + +/*EN + * \brief Create a sound object + * \ingroup ATOMEXLIB_SOUND_OBJECT + * \param[in] config Configuration structure used to create a sound object + * \param[in] work Work buffer + * \param[in] work_size Work buffer size + * \return CriAtomExSoundObjectHn Sound object handle + * \par Description: + * Creates a sound object.
+ * \sa CriAtomExSoundObjectConfig, criAtomExSoundObject_CalculateWorkSize, + * CriAtomExSoundObjectHn, criAtomExSoundObject_Destroy + */ +CriAtomExSoundObjectHn CRIAPI criAtomExSoundObject_Create( + const CriAtomExSoundObjectConfig *config, void *work, CriSint32 work_size); + +/*EN + * \brief Destroys a sound object + * \ingroup ATOMEXLIB_SOUND_OBJECT + * \param[in] sound_object Sound object + * \par Description: + * Destroys a sound object.
+ * The memory allocated when you created the sound object is released when you execute this function.
+ * Also, the sound object handle is disabled.
+ * \sa criAtomExSoundObject_Create, CriAtomExSoundObjectHn + */ +void CRIAPI criAtomExSoundObject_Destroy(CriAtomExSoundObjectHn sound_object); + +/*EN + * \brief Add an AtomEx player to a sound object + * \ingroup ATOMEXLIB_SOUND_OBJECT + * \param[in] sound_object sound object + * \param[in] player AtomEx player + * \par Description: + * Adds an AtomEx player to a sound object.
+ * The AtomEx player associated with the sound object + * will be affected in the following ways:
+ * - Simultaneous sound playback limits and event functions will be limited to the affected scope. + * - Playback control (stop, pause, etc.) + * - Parameter control + * . + * To remove an AtomEx player from a sound object, call the ::criAtomExSoundObject_DeletePlayer + * function.
+ * \attention + * Only call this function when the AtomEx player you want to add is not playing any sound.
+ * If an AtomEx player with a status other than ::CRIATOMEXPLAYER_STATUS_STOP is specified, + * the sound playback will be stopped via the ::criAtomExPlayer_StopWithoutReleaseTime function when the player is added. + * \sa criAtomExSoundObject_DeletePlayer, criAtomExSoundObject_DeleteAllPlayers + */ +void CRIAPI criAtomExSoundObject_AddPlayer(CriAtomExSoundObjectHn sound_object, CriAtomExPlayerHn player); + +/*EN + * \brief Remove an AtomEx player from a sound object + * \ingroup ATOMEXLIB_SOUND_OBJECT + * \param[in] sound_object sound object + * \param[in] player AtomEx player + * \par Description: + * Removes an AtomEx player from the sound object.
+ * The AtomEx player will no longer be associated with the sound object + * and will therefore not be affected by it in any way.
+ * \attention + * Only call this function when the AtomEx player you want to remove is not playing any sound.
+ * If an AtomEx player with a status other than ::CRIATOMEXPLAYER_STATUS_STOP is specified, + * the sound playback will be stopped via the ::criAtomExPlayer_StopWithoutReleaseTime function when the player is removed. + * \sa criAtomExSoundObject_AddPlayer, criAtomExSoundObject_DeleteAllPlayers + */ +void CRIAPI criAtomExSoundObject_DeletePlayer(CriAtomExSoundObjectHn sound_object, CriAtomExPlayerHn player); + +/*EN + * \brief Remove all AtomEx players + * \ingroup ATOMEXLIB_SOUND_OBJECT + * \param[in] sound_object sound object + * \par Description: + * Removes all AtomEx players associated with the specified sound object.
+ * These AtomEx players will no longer be associated with the sound object + * and will therefore not be affected by it in any way.
+ * \attention + * Only call this function when the AtomEx players are not playing any sound.
+ * If any of the AtomEx players have a status other than ::CRIATOMEXPLAYER_STATUS_STOP, + * the sound playback will be stopped via the ::criAtomExPlayer_StopWithoutReleaseTime function when the player is removed. + * \sa criAtomExSoundObject_AddPlayer, criAtomExSoundObject_DeletePlayer + */ +void CRIAPI criAtomExSoundObject_DeleteAllPlayers(CriAtomExSoundObjectHn sound_object); + +/*************************************************************************** + * Tentative API (Please don't use) + ***************************************************************************/ +/* The tentative functions declared below are for Atom's internal processing, + * integration with game engines, etc. + * Because they are subject to change or deletion without prior notice, please refrain from using them. +*/ +typedef void (CRIAPI *CriAtomExAcbReleasedCbFunc)(void *obj); +void CRIAPI criAtomExAcb_ReleaseAsync( + CriAtomExAcbHn acb_hn, CriAtomExAcbReleasedCbFunc func, void *obj); +CriBool CRIAPI criAtomExPlayer_IsReadyToStartAsync(CriAtomExPlayerHn player); +CriBool CRIAPI criAtomExPlayer_StartAsync(CriAtomExPlayerHn player); +void CRIAPI criAtomExPlayer_UpdateAllAsync(CriAtomExPlayerHn player); +CriSint64 CRIAPI criAtomExPlayer_GetTimeReal(CriAtomExPlayerHn player); +CriSint64 CRIAPI criAtomExPlayback_GetTimeReal(CriAtomExPlaybackId id); +void CRIAPI criAtomExPlayback_EnumerateAtomPlayers( + CriAtomExPlaybackId id, CriAtomPlayerCbFunc func, void* obj); +void CRIAPI criAtomEx3dListener_GetFocusPoint(CriAtomEx3dListenerHn ex_3d_listener, CriAtomExVector *focus_point); +CriFloat32 CRIAPI criAtomEx3dListener_GetDistanceFocusLevel(CriAtomEx3dListenerHn ex_3d_listener); +CriFloat32 CRIAPI criAtomEx3dListener_GetDirectionFocusLevel(CriAtomEx3dListenerHn ex_3d_listener); +CriAtomExAcbHn CRIAPI criAtomExAcb_GetCurrentAcb(void); +CriBool CRIAPI criAtomExAcb_IsParameterPalletAssignedByName(CriAtomExAcbHn acb_hn, const CriChar8 *cue_name); +void CRIAPI criAtomEx3dSource_SetAttenuationDistanceSetting(CriAtomEx3dSourceHn ex_3d_source, CriBool sw); +CriBool CRIAPI criAtomEx3dSource_GetAttenuationDistanceSetting(const CriAtomEx3dSourceHn ex_3d_source); + + +#ifdef __cplusplus +} +#endif + +/*************************************************************************** + * For compatibility with older versions + ***************************************************************************/ +/** + * \cond + */ + +typedef CriAtomExConfig CriAtomExLibraryConfig; +typedef CriAtomExFormatInfo CriAtomExPlaybackFormatInfo; +typedef CriAtomExSourceType CriAtomExPlaybackSourceType; +typedef CriAtomExSourceInfo CriAtomExPlaybackSource; +typedef CriAtomExVoiceControlMethod CriAtomExControlMethod; +typedef CriAtomExVoiceAllocationMethod CriAtomExPlayerVoiceAllocationMethod; +typedef CriAtomExSequencerEventCbFunc CriAtomExSequencer_EventCbFunc; +#define criAtomExPlayer_SetDefaultPlayerConfig(p_config) \ + criAtomExPlayer_SetDefaultConfig(p_config) +#define criAtomExPlayer_SetPriority(player, priority) \ + criAtomExPlayer_SetVoicePriority((player), (priority)) +#define criAtomExPlayer_SetControlMethod(player, method) \ + criAtomExPlayer_SetVoiceControlMethod((player), (method)) +#define criAtomExPlayer_GetPlaybackStatus(player, id) \ + criAtomExPlayback_GetStatus(id) +#define criAtomExVoicePool_SetDefaultHcaMxVoicePoolConfig(p_config) \ + criAtomExVoicePool_SetDefaultConfigForHcaMxVoicePool(p_config) +#define criAtomEx_RegisterAcfFromConfig(config, work, work_size) \ + criAtomEx_RegisterAcfConfig(config, work, work_size) +#define criAtomEx_CalculateWorkSizeForHcaMxVoicePool(p_config) \ + criAtomExVoicePool_CalculateWorkSizeForHcaMxVoicePool(p_config) +#define criAtomEx_AllocateHcaMxVoicePool(p_config, work, work_size) \ + criAtomExVoicePool_AllocateHcaMxVoicePool(p_config, work, work_size) +#define criAtomEx_FreeVoicePool(pool) \ + criAtomExVoicePool_Free(pool) + +#define criAtomExPlayer_SetAisacById(player, control_id, control_value) \ + criAtomExPlayer_SetAisacControlById(player, control_id, control_value) +#define criAtomExPlayer_SetAisacByName(player, control_name, control_value) \ + criAtomExPlayer_SetAisacControlByName(player, control_name, control_value) +#define criAtomExPlayer_GetAisacById(player, control_id) \ + criAtomExPlayer_GetAisacControlById(player, control_id) +#define criAtomExPlayer_GetAisacByName(player, control_name) \ + criAtomExPlayer_GetAisacControlByName(player,control_name) +#define criAtomExPlayback_GetAisacById(playback_id, control_id, control_value) \ + criAtomExPlayback_GetAisacControlById(playback_id, control_id, control_value) +#define criAtomExPlayback_GetAisacByName(playback_id, control_name, control_value) \ + criAtomExPlayback_GetAisacControlByName(playback_id, control_name, control_value) +#define criAtomExCategory_SetAisacById(id, control_id, control_value) \ + criAtomExCategory_SetAisacControlById(id, control_id, control_value) +#define criAtomExCategory_SetAisacByName(name, control_name, control_value) \ + criAtomExCategory_SetAisacControlByName(name, control_name, control_value) +#define criAtomExPlayer_SetPan(player, ch, pan) \ + criAtomExPlayer_SetPanAdx1Compatible((player), (ch), (pan)) +/* The following function is disabled. */ +#define criAtomEx_SetDownmixMode(downmix_mode) + +#define CRIATOMEXPLAYBACK_STATUS_STOP ((CriAtomExPlaybackStatus)0) +#define CRIATOMEXPLAYBACK_STATUS_PLAYEND (CRIATOMEXPLAYBACK_STATUS_REMOVED) +#define CRIATOMEXPLAYBACK_STATUS_ERROR ((CriAtomExPlaybackStatus)4) +#define CRIATOMEXPLAYBACK_SOURCE_TYPE_NONE (CRIATOMEX_SOURCE_TYPE_NONE) +#define CRIATOMEXPLAYBACK_SOURCE_TYPE_CUE_ID (CRIATOMEX_SOURCE_TYPE_CUE_ID) +#define CRIATOMEXPLAYBACK_SOURCE_TYPE_CUE_NAME (CRIATOMEX_SOURCE_TYPE_CUE_NAME) +#define CRIATOMEXPLAYBACK_SOURCE_TYPE_CUE_INDEX (CRIATOMEX_SOURCE_TYPE_CUE_INDEX) +#define CRIATOMEXPLAYBACK_SOURCE_TYPE_DATA (CRIATOMEX_SOURCE_TYPE_DATA) +#define CRIATOMEXPLAYBACK_SOURCE_TYPE_FILE (CRIATOMEX_SOURCE_TYPE_FILE) +#define CRIATOMEXPLAYBACK_SOURCE_TYPE_CONTENT_ID (CRIATOMEX_SOURCE_TYPE_CONTENT_ID) +#define CRIATOMEXPLAYBACK_SOURCE_TYPE_WAVE_ID (CRIATOMEX_SOURCE_TYPE_WAVE_ID) +#define CRIATOMEXPLAYER_ALLOCATE_VOICE_ONCE (CRIATOMEX_ALLOCATE_VOICE_ONCE) +#define CRIATOMEXPLAYER_RETRY_VOICE_ALLOCATION (CRIATOMEX_RETRY_VOICE_ALLOCATION) + +#ifdef __cplusplus +extern "C" { +#endif + +/*EN + * \deprecated + * Deprecated API to be removed. + */ +#define criAtomEx_SetDefaultConfigForAcf(p_config) \ +{\ + (p_config)->num_groups = 0;\ + (p_config)->voices_per_group = NULL;\ + (p_config)->num_category_groups = 8;\ + (p_config)->num_categories = 64;\ +} + +/*EN + * \deprecated + * Deprecated API to be removed. + */ +typedef struct CriAtomExAcfConfigTag { + CriSint32 num_groups; /*EN< Number of Voice Limit Groups */ + const CriSint32 *voices_per_group; /*EN< Maximum number of voices that can be played back simultaneously per group */ + CriSint32 num_category_groups; /*EN< Number of category groups */ + CriSint32 num_categories; /*EN< Number of categories */ +} CriAtomExAcfConfig; + +/*EN + * \deprecated + * Deprecated API to be removed. + * Please use ::criAtomExHcaMx_SetBusSendLevelByName function. + */ +void CRIAPI criAtomExHcaMx_SetBusSendLevel( + CriSint32 mixer_id, CriSint32 bus_index, CriFloat32 level); + +/*EN + * \deprecated + * Deprecated API to be removed. + * Please use ::criAtomExPlayer_SetBusSendLevelByName function. + */ +void CRIAPI criAtomExPlayer_SetBusSendLevel( + CriAtomExPlayerHn player, CriSint32 bus_index, CriFloat32 level); + +/*EN + * \deprecated + * Deprecated API to be removed. + * Please use ::criAtomExPlayer_SetBusSendLevelOffsetByName function. + */ +void CRIAPI criAtomExPlayer_SetBusSendLevelOffset( + CriAtomExPlayerHn player, CriSint32 bus_index, CriFloat32 level_offset); + +/*EN + * \deprecated + * Deprecated API to be removed. + * Please use ::criAtomExDebug_GetResourcesInfo function. + */ +void CRIAPI criAtomEx_GetNumUsedVirtualVoices(CriSint32 *cur_num, CriSint32 *limit); + +/*EN + * \deprecated + * Deprecated API to be removed. + * Please use ::criAtomExDebug_GetResourcesInfo function. + */ +void CRIAPI criAtomEx_GetNumUsedSequences(CriSint32 *cur_num, CriSint32 *limit); + +/*EN + * \deprecated + * Deprecated API to be removed. + * Please use ::criAtomExDebug_GetResourcesInfo function. + */ +void CRIAPI criAtomEx_GetNumUsedSequenceTracks(CriSint32 *cur_num, CriSint32 *limit); + +/*EN + * \deprecated + * Deprecated API to be removed. + * Please use ::criAtomExDebug_GetResourcesInfo function. + */ +void CRIAPI criAtomEx_GetNumUsedSequenceTrackItems(CriSint32 *cur_num, CriSint32 *limit); + +/*EN + * \deprecated + * Deprecated API to be removed. + * Consider using the ::criAtomEx3dListener_SetDopplerMultiplier function. + * However, the value specified for the second argument needs to be changed to the reciprocal of distance_factor. + */ +void CRIAPI criAtomEx3dListener_SetDistanceFactor(CriAtomEx3dListenerHn ex_3d_listener, CriFloat32 distance_factor); + + +/*EN + * \deprecated + * Deprecated API to be removed. + * Calling has no effect. + */ +void CRIAPI criAtomEx_GetNumUsedAisacAutoModulations(CriSint32 *cur_num, CriSint32 *limit); + +/*EN + * \deprecated + * Deprecated API to be removed. + * Please use ::criAtomEx3dSource_SetOrientation function. + */ +void CRIAPI criAtomEx3dSource_SetConeOrientation(CriAtomEx3dSourceHn ex_3d_source, const CriAtomExVector *cone_orient); + +/*EN + * \deprecated + * Deprecated API to be removed. + * Calling has no effect. + */ +CriSint32 CRIAPI criAtomEx_CalculateWorkSizeForRegisterAcfConfig( + const CriAtomExAcfConfig *config); + +/*EN + * \deprecated + * Deprecated API to be removed. + * Calling has no effect. + */ +void CRIAPI criAtomEx_RegisterAcfConfig( + const CriAtomExAcfConfig *config, void *work, CriSint32 work_size); + +#ifdef __cplusplus +} +#endif + +/** + * \endcond + */ + +#endif /* CRI_INCL_CRI_ATOM_EX_H */ + +/* --- end of file --- */ diff --git a/3rdParty/cri2019/pc/include/cri_atom_ex_monitor.h b/3rdParty/cri2019/pc/include/cri_atom_ex_monitor.h new file mode 100644 index 00000000..944e992f --- /dev/null +++ b/3rdParty/cri2019/pc/include/cri_atom_ex_monitor.h @@ -0,0 +1,392 @@ +/**************************************************************************** + * + * CRI Middleware SDK + * + * Copyright (c) 2010 CRI Middleware Co., Ltd. + * + * Library : CRI AtomEx Monitor Library + * Module : Monitor Library C Interface Header + * File : cri_atom_ex_monitor.h + * + ****************************************************************************/ +/*! + * \file cri_atom_ex_monitor.h + */ + +#ifndef CRI_INCL_CRI_ATOMEX_MONITOR_H +#define CRI_INCL_CRI_ATOMEX_MONITOR_H + +/*************************************************************************** + * Include files + ***************************************************************************/ + +#include "cri_xpt.h" +#include "cri_atom_ex.h" + +/*************************************************************************** + * Macro Constants + ***************************************************************************/ +/* Version Number */ +#define CRIATOMEX_MONITOR_VERSION (0x01110300) +#define CRIATOMEX_MONITOR_VER_NUM "1.11.03.00" +#define CRIATOMEX_MONITOR_VER_NAME "CRI AtomEx Monitor" +#define CRIATOMEX_MONITOR_VER_OPTION + +/*EN + * \brief Default number of preview objects + * \ingroup ATOMEXMONITORLIB_GLOBAL + * \par Description: + * Default number of preview objects.
+ * \sa criAtomExMonitor_SetDefaultConfig + */ +#define CRIATOMX_MONITOR_DEFAULT_NUM_PUREVIEW_OBJECTS (200) + +/*EN + * \brief Default communication buffer size + * \ingroup ATOMEXMONITORLIB_GLOBAL + * \par Description: + * Default communication buffer size.
+ * \sa criAtomExMonitor_SetDefaultConfig + */ +#define CRIATOMX_MONITOR_DEFAULT_COMMUNICATION_BUFFER_SIZE (2*1024*1024) + +/*EN + * \brief Default playback position update interval + * \ingroup ATOMEXMONITORLIB_GLOBAL + * \par Description: + * Default playback position update interval.
+ * \sa criAtomExMonitor_SetDefaultConfig + */ +#define CRIATOMX_MONITOR_DEFAULT_PLAYBACK_POSITION_UPDATE_INTERVAL (8) + +/*EN + * \brief Different types of logs + * \ingroup ATOMEXMONITORLIB_GLOBAL + * \par Description: + * Different types of logs available.
+ * \sa criAtomExMonitor_SetLogMode + */ +#define CRIATOMEX_MONITOR_LOG_MODE_OFF (0) +#define CRIATOMEX_MONITOR_LOG_MODE_PLAYBACK (1) +#define CRIATOMEX_MONITOR_LOG_MODE_ERROR (1 << 1) +#define CRIATOMEX_MONITOR_LOG_MODE_LOW_LEVEL_PLAYBACK (1 << 2) +#define CRIATOMEX_MONITOR_LOG_MODE_SYSTEM_INFORMATION (1 << 3) +#define CRIATOMEX_MONITOR_LOG_MODE_HANDLE_INFORMATION (1 << 4) +#define CRIATOMEX_MONITOR_LOG_MODE_CUE_LIMIT (1 << 5) +#define CRIATOMEX_MONITOR_LOG_MODE_PROBABILITY (1 << 6) +#define CRIATOMEX_MONITOR_LOG_MODE_CATEGORY (1 << 7) +#define CRIATOMEX_MONITOR_LOG_MODE_EXECUTING_INFORMATION (1 << 8) +#define CRIATOMEX_MONITOR_LOG_MODE_3D_INFO (1 << 9) +#define CRIATOMEX_MONITOR_LOG_MODE_USER_LOG (1 << 10) + +#define CRIATOMEX_MONITOR_LOG_MODE_ALL (0xFFFFFFFF) + + +/*************************************************************************** + * Macro Functions + ***************************************************************************/ + +/*EN + * \brief Assign the default values to the configuration structure of the Monitor library + * \ingroup ATOMEXMONITORLIB_GLOBAL + * \par Description: + * Assign the default values to the configuration structure of the Monitor library. + * \sa CriAtomExMonitorConfig + */ +#define criAtomExMonitor_SetDefaultConfig(p_config) \ +{\ + (p_config)->max_preivew_object = CRIATOMX_MONITOR_DEFAULT_NUM_PUREVIEW_OBJECTS;\ + (p_config)->communication_buffer_size = CRIATOMX_MONITOR_DEFAULT_COMMUNICATION_BUFFER_SIZE;\ + (p_config)->additional_buffer = 0;\ + (p_config)->additional_buffer_size = 0;\ + (p_config)->playback_position_update_interval = CRIATOMX_MONITOR_DEFAULT_PLAYBACK_POSITION_UPDATE_INTERVAL;\ +} + +/*************************************************************************** + * Data Type Declarations + ***************************************************************************/ +/*EN + * \brief Configuration structure used to initialize the Monitor library + * \ingroup ATOMEXMONITORLIB_GLOBAL + * \par Description: + * This structure is used to specify the behavior of the Monitor library.
+ * It is passed as an argument to the ::criAtomExMonitor_Initialize function.
+ * \sa criAtomExMonitor_Initialize, criAtomExMonitor_SetDefaultConfig + */ +typedef struct CriAtomExMonitorConfigTag { + /*EN + \brief max_preview_object + */ + CriUint32 max_preivew_object; + /*EN + \brief communication_buffer_size + \par Description: + Specify the buffer size to be used for communication between the monitor library and the authoring tool.
+ There are two buffers, one for sending and one for receiving, and each has an extension area that is half of the setting value.
+ Therefore, the buffer size actually required is three times the set value.
+ */ + CriUint32 communication_buffer_size; + /*EN + \brief additional_buffer + */ + CriUintPtr additional_buffer; + /*EN + \brief additional_buffer_size + */ + CriUint32 additional_buffer_size; + /*EN + \brief Playback position update interval + \par Description: + This variable specifies the interval at which to send the playback positions + when the server processing is executed.
+ By changing the value of playback_position_update_interval, + the frequency at which the playback positions are sent can be lowered + without changing the execution frequency of the server process.
+
+ In playback_position_update_interval, specify how many times the server process + should be executed before the playback position information is sent.
+ For example, if playback_position_update_interval is set to 2, + the playback position information is sent each time + the server process has been executed twice.
+ (The frequency of sending the playback position information is 1/2.)
+ */ + CriSint32 playback_position_update_interval; +} CriAtomExMonitorConfig; + +/*EN + * \brief Date Update Type + * \ingroup ATOMEXMONITORLIB_GLOBAL + * \par Description: + * It is the target of data update by CRI Atom Craft (authoring tool) at in-game preview.
+ * \sa CriAtomExMonitorDataUpdateNotificationInfo + */ +typedef enum CriAtomExMonitorDataUpdateTargetTag { + CRIATOMEXMONITOR_DATA_UPDATE_TARGET_ACF = 0, /*EN< ACF Update */ + CRIATOMEXMONITOR_DATA_UPDATE_TARGET_ACB = 1, /*EN< ACB Update */ + /* enum size is 4bytes */ + CRIATOMEXMONITOR_DATA_UPDATE_TARGET_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomExMonitorDataUpdateTarget; + +/*EN + * \brief Date Update Status + * \ingroup ATOMEXMONITORLIB_GLOBAL + * \par Description: + * It is the state of data update by CRI Atom Craft (authoring tool) at in-game preview.
+ * \sa CriAtomExMonitorDataUpdateNotificationInfo + */ +typedef enum CriAtomExMonitorDataUpdateEventTag { + CRIATOMEXMONITOR_DATA_UPDATE_EVENT_BEGIN = 0, /*EN< Start Event */ + CRIATOMEXMONITOR_DATA_UPDATE_EVENT_END = 1, /*EN< End Event */ + /* enum size is 4bytes */ + CRIATOMEXMONITOR_DATA_UPDATE_EVENT_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriAtomExMonitorDataUpdateEvent; + +/*EN + * \brief Date Update Info + * \ingroup ATOMEXMONITORLIB_GLOBAL + * \par Description: + * It is the infomation of data update by CRI Atom Craft (authoring tool) at in-game preview.
+ * \sa criAtomExMonitor_SetDataUpdateNotificationCallback + */ +typedef struct CriAtomExMonitorDataUpdateNotificationInfoTag { + CriAtomExMonitorDataUpdateTarget target; /*EN< Target */ + CriAtomExMonitorDataUpdateEvent event; /*EN< Event */ + CriAtomExAcbHn acb_hn; /*EN< ACB handle */ + const CriChar8* name; /*EN< Name */ +} CriAtomExMonitorDataUpdateNotificationInfo; + +/*EN + * \brief Get the data update notification information by authoring tool Callback function + * \ingroup ATOMEXLIB_ACB + * \par Description: + * \param[in] obj User specified object + * \param[in] info Data update notification information + * \return None + * \par Description: + * This is a callback function to be called when data update processing from the authoring tool occurs during in-game preview.
+ * Use this when you want to obtain the data update status on the application side during in-game preview.
+ *
+ * Use the ::criAtomExMonitor_SetDataUpdateNotificationCallback function to register the callback function.
+ * The registered callback function is executed at the timing before and after data update from the authoring tool during in-game preview.
+ * \attention + * Basically, please do not use the Atom API within the callback function.
+ * If you block long processing within this callback function, problems such as out of sound will occur, so please be careful.
+ * Please refer to the CriAtomExMonitorDataUpdateNotificationInfo structure passed as an argument to the callback function only within the callback function.
+ * Before referring outside the callback function, save the contents in a separate area beforehand. + * \sa criAtomExMonitor_SetDataUpdateNotificationCallback, CriAtomExMonitorDataUpdateNotificationInfo + */ +typedef void (CRIAPI *CriAtomExMonitorDataUpdateNotificationCbFunc)( + void *obj, const CriAtomExMonitorDataUpdateNotificationInfo* info); + +/* Log Callback Function type */ +typedef void (*CriAtomExMonitorLogCbFunc)(void* obj, const CriChar8 *log_string); + +/*************************************************************************** + * Prototype Variables + ***************************************************************************/ + +/*************************************************************************** + * Prototype Functions + ***************************************************************************/ +#ifdef __cplusplus +extern "C" { +#endif + +/*EN + * \brief Calculate the size of the work buffer required to initialize the monitoring feature + * \ingroup ATOMEXMONITORLIB_GLOBAL + * \param[in] config configuration structure for initialization + * \return CriSint32 work buffer size + * \par Description: + * This function retrieves the size of the work buffer needed to use the monitoring feature.
+ *
+ * If the calculation of the size of the work buffer fails, this function returns -1.
+ * The reason why the calculation failed can be determined + * by checking the error callback message.
+ * \par Remarks: + * The work buffer size needed by the monitoring feature depends on + * the values of the parameters in the ::CriAtomExMonitorConfig structure.
+ *
+ * If you specify NULL for the argument, the default settings + * (i.e., the same parameters than when ::criAtomExMonitor_SetDefaultConfig is used) + * are used for calculating the size of the work buffer. + *
+ * The information passed in the config argument is only referenced within the function.
+ * Therefore the memory it uses can be released after executing the function. + * \sa criAtomExMonitor_SetDefaultConfig, criAtomExMonitor_Initialize, CriAtomExMonitorConfig + */ +CriSint32 CRIAPI criAtomExMonitor_CalculateWorkSize(const CriAtomExMonitorConfig* config); + +/*EN + * \brief Initialize the monitoring feature + * \ingroup ATOMEXMONITORLIB_GLOBAL + * \param[in] config configuration structure for initialization + * \param[in] work work buffer + * \param[in] work_size work buffer size + * \par Description: + * This function initializes the monitoring feature.
+ * Before using the monitoring feature, always execute this function.
+ * (Once this function is executed, the monitoring feature will be available + * until the ::criAtomExMonitor_Finalize function is called.)
+ * This function should be called after the ::criAtomEx_Initialize function and + * before the ::criAtomEx_Finalize function.
+ * \sa criAtomExMonitor_Finalize, CriAtomExMonitorConfig + */ +void CRIAPI criAtomExMonitor_Initialize( + const CriAtomExMonitorConfig *config, void *work, CriSint32 work_size); + +/*EN + * \brief Finalize the monitoring feature + * \ingroup ATOMEXMONITORLIB_GLOBAL + * \par Description: + * This function finalizes the monitoring feature.
+ * \attention + * This function cannot be called before executing the ::criAtomExMonitor_Initialize function.
+ * \sa criAtomExMonitor_Initialize + */ +void CRIAPI criAtomExMonitor_Finalize(void); + +/*EN + * \brief Get the server IP address string + * \ingroup ATOMEXMONITORLIB_GLOBAL + * \par Description: + * Get the server IP address string.
+ * \attention + * This function cannot be called before executing the ::criAtomExMonitor_Initialize function.
+ * \sa criAtomExMonitor_Initialize, criAtomExMonitor_GetClientIpString + */ +const CriChar8* CRIAPI criAtomExMonitor_GetServerIpString(void); + +/*EN + * \brief Get the client IP address string + * \ingroup ATOMEXMONITORLIB_GLOBAL + * \par Description: + * Get the client IP address string.
+ * \attention + * This function cannot be called before executing the ::criAtomExMonitor_Initialize function.
+ * \sa criAtomExMonitor_Initialize, criAtomExMonitor_GetServerIpString + */ +const CriChar8* CRIAPI criAtomExMonitor_GetClientIpString(void); + +/*EN + * \brief Get the tool connection status + * \ingroup ATOMEXMONITORLIB_GLOBAL + * \return CriBool connection status (CRI_TRUE: connected, CRI_FALSE: not connected) + * \par Description: + * Determines if the tool is connected or not.
+ * \attention + * This function cannot be called before executing the ::criAtomExMonitor_Initialize function.
+ * \sa criAtomExMonitor_Initialize + */ +CriBool CRIAPI criAtomExMonitor_IsConnected(void); + +/*EN + * \brief Register the log retrieval callback function + * \ingroup ATOMEXMONITORLIB_GLOBAL + * \param cbf callback function + * \param obj user specified object + * \par Description: + * Registers a callback function for getting log.
+ * The log retrieval process is started by registering a callback function + * and stopped by setting it to NULL.
+ * To change the log mode, call the ::criAtomExMonitor_SetLogMode function.
+ * \attention + * This function cannot be called before executing the ::criAtomExMonitor_Initialize function.
+ * \sa criAtomExMonitor_Initialize, criAtomExMonitor_SetLogMode + */ +void CRIAPI criAtomExMonitor_SetLogCallback(CriAtomExMonitorLogCbFunc cbf, void* obj); + +/*EN + * \brief Specify log mode + * \ingroup ATOMEXMONITORLIB_GLOBAL + * \param mode Log output mode + * \par Description: + * Specify the log retrieval mode.
+ * The log retrieval callback function (registered + * by the ::criAtomExMonitor_SetLogCallback function) will be called + * depending on the mode specified by this function.
+ * \sa criAtomExMonitor_SetLogCallback + */ +void CRIAPI criAtomExMonitor_SetLogMode(CriUint32 mode); + +/*EN + * \brief User log output + * \ingroup ATOMEXMONITORLIB_GLOBAL + * \param message User log message + * \par Description: + * Outputs the user log.
+ * The log output can be obtained and displayed by using a log acquisition callback or profiler. + * \sa criAtomExMonitor_SetLogCallback + */ +void CRIAPI criAtomExMonitor_OutputUserLog(const CriChar8* message); + +/*EN + * \brief Set data update notification callback function + * \ingroup ATOMEXMONITORLIB_GLOBAL + * \param[in] func Data update notification callback function + * \param[in] obj user specified object + * \par Description: + * Register a callback function to be called when data update processing from the authoring tool occurs during in-game preview.
+ * \attention + * Please do not use the Atom API within the callback function.
+ * The callback function is also executed from server processing in the AtomMonitor library.
+ * Therefore, if you execute an API that does not consider interrupts to server processing, errors may occur or deadlock may occur.
+ *
+ * If you block long processing within the callback function, problems such as out of sound will occur, so please be careful.
+ *
+ * Only one callback function can be registered.
+ * If you perform a registration operation more than once, the already registered callback function will be overwritten by the callback function registered later.
+ *
+ * Registering registered functions can be canceled by specifying NULL for func.
+ * \attention + * This function can not be executed before the ::criAtomExMonitor_Initialize function is executed.
+ * \sa CriAtomExMonitorDataUpdateNotificationCbFunc, CriAtomExMonitorDataUpdateNotificationInfo + */ +void CRIAPI criAtomExMonitor_SetDataUpdateNotificationCallback( + CriAtomExMonitorDataUpdateNotificationCbFunc func, void *obj); + +#ifdef __cplusplus +} +#endif + +#endif // CRI_INCL_CRI_ATOMEX_MONITOR_H diff --git a/3rdParty/cri2019/pc/include/cri_atom_pc.h b/3rdParty/cri2019/pc/include/cri_atom_pc.h new file mode 100644 index 00000000..c169b833 --- /dev/null +++ b/3rdParty/cri2019/pc/include/cri_atom_pc.h @@ -0,0 +1,557 @@ +/**************************************************************************** + * + * CRI Middleware SDK + * + * Copyright (c) 2010-2015 CRI Middleware Co., Ltd. + * + * Library : CRI Atom + * Module : Library User's Header for PC + * File : cri_atom_pc.h + * + ****************************************************************************/ +/*! + * \file cri_atom_pc.h + */ + +/* Prevent redefinitions */ +#ifndef CRI_INCL_CRI_ATOM_PC_H +#define CRI_INCL_CRI_ATOM_PC_H + +/*************************************************************************** + * Include files + ***************************************************************************/ +#include +#include +#include +#include "cri_atom.h" +#include "cri_atom_ex.h" +#include "cri_atom_asr.h" + +/*************************************************************************** + * Macro Constants + ***************************************************************************/ + +/*************************************************************************** + * Macro Functions + ***************************************************************************/ +/*========================================================================== + * CRI Atom API + *=========================================================================*/ +/*EN + * \brief Assign the default values to the configuration structure used for the library's initialization. + * \ingroup ATOMLIB_PC + * \param[out] p_config pointer to the configuration structure used for the library's initialization. + * \par Description: + * Assign the default values to the configuration structure (::CriAtomConfig_PC) + * that is passed to the ::criAtom_Initialize_PC function.
+ * \attention + * This macro is for the low level API.
+ * When using the functions of the AtomEx layer, use the + * ::criAtomEx_SetDefaultConfig_PC macro instead. + * \sa CriAtomConfig_PC + */ +#define criAtom_SetDefaultConfig_PC(p_config) \ +{ \ + criAtom_SetDefaultConfig(&(p_config)->atom); \ + criAtomAsr_SetDefaultConfig(&(p_config)->asr); \ + criAtomHcaMx_SetDefaultConfig(&(p_config)->hca_mx); \ +} + +/*========================================================================== + * CRI AtomEx API + *=========================================================================*/ +/*EN + * \brief Assign the default values to the configuration structure used for the library's initialization. + * \ingroup ATOMLIB_PC + * \param[out] p_config pointer to the configuration structure used for the library's initialization. + * \par Description: + * Assign the default values to the configuration structure ( ::CriAtomExConfig_PC ) that is is passed to the ::criAtomEx_Initialize_PC function. + *
+ * \sa CriAtomExConfig_PC + */ +#define criAtomEx_SetDefaultConfig_PC(p_config) \ +{ \ + criAtomEx_SetDefaultConfig(&(p_config)->atom_ex); \ + criAtomExAsr_SetDefaultConfig(&(p_config)->asr); \ + criAtomExHcaMx_SetDefaultConfig(&(p_config)->hca_mx); \ +} + +/*************************************************************************** + * Data Type Declarations + ***************************************************************************/ +/*========================================================================== + * CRI Atom API + *=========================================================================*/ +/*EN + * \brief Configuration structure used for the initialization of the Atom library + * \ingroup ATOMLIB_PC + * \par Description: + * This configuration structure is used to specify the behavior of the CRI Atom library.
+ * It is passed as an argument to the ::criAtom_Initialize_PC function.
+ * \attention + * This structure is used for low level API.
+ * When using the functions of the AtomEx layer, use the + * use the ::CriAtomExConfig_PC structure instead. + * \sa criAtom_Initialize_PC, criAtom_SetDefaultConfig_PC + */ +typedef struct CriAtomConfigTag_PC { + CriAtomConfig atom; /*EN< Configuration structure for the intialization of the Atom library */ + CriAtomAsrConfig asr; /*EN< Configuration structure for the intialization of ASR */ + CriAtomHcaMxConfig hca_mx; /*EN< Configuration structure for the intialization of HCA-MX */ +} CriAtomConfig_PC; + +/*========================================================================== + * CRI AtomEx API + *=========================================================================*/ +/*EN + * \brief Configuration structure used for the initialization of the Atom library + * \ingroup ATOMLIB_PC + * \par Description: + * This configuration structure is used to specify the behavior of the CRI Atom library.
+ * It is passed as an argument to the ::criAtomEx_Initialize_PC function.
+ * \sa criAtomEx_Initialize_PC, criAtomEx_SetDefaultConfig_PC + */ +typedef struct CriAtomExConfigTag_PC { + CriAtomExConfig atom_ex; /*EN< Configuration structure for the intialization of AtomEx */ + CriAtomExAsrConfig asr; /*EN< Configuration structure for the intialization of ASR */ + CriAtomExHcaMxConfig hca_mx; /*EN< Configuration structure for the intialization of HCA-MX */ +} CriAtomExConfig_PC; + +/*************************************************************************** + * Prototype Variables + ***************************************************************************/ + +/*************************************************************************** + * Prototype Functions + ***************************************************************************/ +#ifdef __cplusplus +extern "C" { +#endif + +/*========================================================================== + * CRI Atom API + *=========================================================================*/ +/*EN + * \brief Calculate the size of the work buffer required to initialize the library + * \ingroup ATOMLIB_PC + * \param[in] config configuration structure for the initialization + * \return CriSint32 work buffer size + * \par Description: + * This function retrieves the size of the work buffer needed to use the library.
+ * \par Remarks: + * The size of the work buffer needed by the library's initialization depends on the values of the parameters in + * the ::CriAtomConfig_PC structure.
+ *
+ * The information passed in the config argument is only referenced within this function.
+ * Therefore the memory it uses can be released after executing the function. + * \attention + * This function is for the low level API.
+ * When using the functions of the AtomEx layer, call + * ::criAtomEx_CalculateWorkSize_PC instead. + * \sa CriAtomConfig_PC, criAtom_Initialize_PC + */ +CriSint32 CRIAPI criAtom_CalculateWorkSize_PC(const CriAtomConfig_PC *config); + +/*EN + *\brief Initialize the library + * \ingroup ATOMLIB_PC + * \param[in] config initialization configuration structure + * \param[in] work work buffer + * \param[in] work_size work buffer size + * \par Description: + * This function initializes the library.
+ * In order to be able to use the features of the library, you must first call this function.
+ * (Once this function is called, the features of the library are available until the ::criAtom_Finalize_PC function + * is called.)
+ *
+ * To initialize the library, you must allocate a memory area (work buffer) + * that will be used internally by the library.
+ * The size of the work buffer needed by the library depends on the values of the parameters in the configuration structure + * used for initialization.
+ * Use the ::criAtom_CalculateWorkSize_PC function to calculate + * the work buffer size.
+ * \par Remarks: + * If an allocator has already been registered with the ::criAtom_SetUserAllocator macro, + * the work buffer size does not need to be specified.
+ * (By passing NULL for work and 0 for work_size, the amount of memory corresponding to the work buffer size + * is dynamically allocated by the registered allocator.) + *
+ * The information passed in the config argument is only referenced within this function.
+ * Therefore the memory it uses can be released after executing the function. + * \attention + * This function internally calls:
+ * - ::criAtom_Initialize + * - ::criAtomAsr_Initialize + * - ::criAtomHcaMx_Initialize + * . + * Therefore, if you call this function, do not call the functions listed above.
+ *
+ * If call this function, you must always call the ::criAtom_Finalize_PC function later.
+ * Do not call this function again until you have called the ::criAtom_Finalize_PC function.
+ *
+ * This function is for the low level API.
+ * When using the functions of the AtomEx layer, call + * ::criAtomEx_Initialize_PC instead. + * \sa CriAtomConfig_PC, criAtom_Finalize_PC, + * criAtom_SetUserAllocator, criAtom_CalculateWorkSize_PC + */ +void CRIAPI criAtom_Initialize_PC( + const CriAtomConfig_PC *config, void *work, CriSint32 work_size); + +/*EN + * \brief Finalize the library + * \ingroup ATOMLIB_PC + * \par Description: + * This function finalizes the library.
+ * \attention + * This function calls the following functions internally:
+ * - ::criAtom_Finalize + * - ::criAtomAsr_Finalize + * - ::criAtomHcaMx_Finalize + * . + * Therefore, if you call this function, do not call the functions above.
+ *
+ * This function cannot be called before the ::criAtom_Initialize_PC function is called.
+ *
+ * This function is for the low level API.
+ * When using the functions of the AtomEx layer, call + * ::criAtomEx_Finalize_PC instead. + * \sa criAtom_Initialize_PC + */ +void CRIAPI criAtom_Finalize_PC(void); + +/*EN + * \brief Change the priority of the thread on which runs the server process + * \ingroup ATOMLIB_PC + * \param[in] prio thread priority + * \par Description: + * This function changes the priority of the thread executing the server process (the library's internal process).
+ * By default (when this function is not executed), the priority of the server process thread is set to + * THREAD_PRIORITY_HIGHEST.
+ * \attention: + * This function is only effective when the threading model is set to + * multithreading ( ::CRIATOM_THREAD_MODEL_MULTI ) during the library initialization.
+ * If a different threading model is selected, this function does not do anything.
+ * (An error callback occurs.)
+ *
+ * This function must be executed between the initialization and finalization processes.
+ * It will have no effect if it is executed before initialization or after finalization.
+ * (An error callback occurs.)
+ * The server process thread is used by the CRI File System library as well.
+ * Note that if you already changed the priority of the server process thread + * through the API of the CRI File System library, + * it will be overwritten when calling this function.
+ * \sa criAtom_Initialize_PC, criAtom_GetThreadPriority_PC + */ +void CRIAPI criAtom_SetThreadPriority_PC(int prio); + +/*EN + * \brief Get the priority of the thread on which runs the server process + * \ingroup ATOMLIB_PC + * \return int thread priority + * \par Description: + * This function gets the priority of the thread executing the server process (the library's internal process).
+ * If successful, this function returns the priority.
+ * Otherwise, it returns THREAD_PRIORITY_ERROR_RETURN.
+ * \attention: + * This function is only effective when the threading model is set to + * multithreading ( ::CRIATOM_THREAD_MODEL_MULTI ) during the library initialization.
+ * If a different threading model is selected, this function does not do anything.
+ * (An error callback occurs.)
+ *
+ * This function must be executed between the initialization and finalization processes.
+ * It will have no effect if it is executed before initialization or after finalization.
+ * (An error callback occurs.)
+ * \sa criAtom_Initialize_PC, criAtom_SetThreadPriority_PC + */ +int CRIAPI criAtom_GetThreadPriority_PC(void); + +/*EN + * \brief Change the affinity mask of the thread on which the server process runs + * \ingroup ATOMLIB_PC + * \param[in] mask thread affinity mask + * \par Description: + * This function changes the affinity mask of the thread executing the server process (the library's internal process).
+ * By default (when this function is not executed), the processor running the server process + * is unrestricted.
+ * \attention: + * This function is only effective when the threading model is set to + * multithreading ( ::CRIATOM_THREAD_MODEL_MULTI ) during the library initialization.
+ * If a different threading model is selected, this function does not do anything.
+ * (An error callback occurs.)
+ *
+ * This function must be executed between the initialization and finalization processes.
+ * It will have no effect if it is executed before initialization or after finalization.
+ * (An error callback occurs.)
+ * The server process thread is used by the CRI File System library as well.
+ * Note that if you already changed the affinity mask of the server process thread + * through the API of the CRI File System library, + * it will be overwritten when calling this function.
+ * \sa criAtom_Initialize_PC, criAtom_GetThreadAffinityMask_PC + */ +void CRIAPI criAtom_SetThreadAffinityMask_PC(DWORD_PTR mask); + +/*EN + * \brief Get the affinity mask of the thread on which runs the server process + * \ingroup ATOMLIB_PC + * \return DWORD_PTR thread affinity mask + * \par Description: + * This function gets the affinity mask of the thread executing the server process (the library's internal process).
+ * If successful, this function returns the affinity mask of the thread.
+ * Otherwise, it returns 0.
+ * \attention: + * This function is only effective when the threading model is set to + * multithreading ( ::CRIATOM_THREAD_MODEL_MULTI ) during the library initialization.
+ * If a different threading model is selected, this function does not do anything.
+ * (An error callback occurs.)
+ *
+ * This function must be executed between the initialization and finalization processes.
+ * It will have no effect if it is executed before initialization or after finalization.
+ * (An error callback occurs.)
+ * \sa criAtom_Initialize_PC, criAtom_SetThreadAffinityMask_PC + */ +DWORD_PTR CRIAPI criAtom_GetThreadAffinityMask_PC(void); + +/*========================================================================== + * CRI AtomEx API + *=========================================================================*/ +/*EN + * \brief Calculate the size of the work buffer required to initialize the library + * \ingroup ATOMLIB_PC + * \param[in] config configuration structure for the initialization + * \return CriSint32 work buffer size + * \par Description: + * This function retrieves the size of the work buffer needed to use the library.
+ * \par Remarks: + * The size of the work buffer needed by the library's initialization depends on the values of the parameters in + * the ::CriAtomExConfig_PC structure.
+ *
+ * The information passed in the config argument is only referenced within this function.
+ * Therefore the memory it uses can be released after executing the function. + * \sa CriAtomExConfig_PC, criAtomEx_Initialize_PC + */ +CriSint32 CRIAPI criAtomEx_CalculateWorkSize_PC(const CriAtomExConfig_PC *config); + +/*EN + *\brief Initialize the library + * \ingroup ATOMLIB_PC + * \param[in] config configuration structure for the initialization + * \param[in] work work buffer + * \param[in] work_size work buffer size + * \par Description: + * Initializes the library.
+ * Before using the features of the library, always execute this function.
+ * (After this function is executed, the features of the library are available until the ::criAtomEx_Finalize_PC function + * is executed.)
+ *
+ * To initialize the library, you must allocate a memory area (work buffer) + * that will be used internally by the library.
+ * The size of the work buffer needed by the library depends on the values of the parameters in the configuration structure + * used for initialization.
+ * Use the ::criAtomEx_CalculateWorkSize_PC function to calculate + * the size of the work buffer.
+ * \par Remarks: + * If an allocator has already been registered with the ::criAtom_SetUserAllocator macro, + * the work buffer size does not need to be specified.
+ * (By passing NULL for work and 0 for work_size, the amount of memory corresponding to the work buffer size + * is dynamically allocated by the registered allocator.) + *
+ * The information passed in the config argument is only referenced within this function.
+ * Therefore the memory it uses can be released after executing the function. + * \attention + * This function internally calls:
+ * - ::criAtomEx_Initialize + * - ::criAtomExAsr_Initialize + * - ::criAtomExHcaMx_Initialize + * . + * Therefore, if you call this function, do not call the functions listed above.
+ *
+ * If you call this function, you must always call the ::criAtomEx_Finalize_PC function later.
+ * Do not call this function again until you have called the ::criAtomEx_Finalize_PC function.
+ * \sa CriAtomExConfig_PC, criAtomEx_Finalize_PC, + * criAtomEx_SetUserAllocator, criAtomEx_CalculateWorkSize_PC + */ +void CRIAPI criAtomEx_Initialize_PC( + const CriAtomExConfig_PC *config, void *work, CriSint32 work_size); + +/*EN + * \brief Finalize the library + * \ingroup ATOMLIB_PC + * \par Description: + * This function finalizes the library.
+ * \attention + * This function internally calls.
+ * - ::criAtomEx_Finalize + * - ::criAtomExAsr_Finalize + * - ::criAtomExHcaMx_Finalize + * . + * Therefore, when calling this function, do not call the functions above.
+ *
+ * This function cannot be called before the ::criAtomEx_Initialize_PC function is called.
+ * \sa criAtomEx_Initialize_PC + */ +void CRIAPI criAtomEx_Finalize_PC(void); + +/*EN + * \brief Change the priority of the thread on which runs the server process + * \ingroup ATOMLIB_PC + * \param[in] prio thread priority + * \par Description: + * This function changes the priority of the thread executing the server process (the library's internal process).
+ * By default (when this function is not executed), the priority of the server process thread is set to + * THREAD_PRIORITY_HIGHEST.
+ * \attention: + * This function is only effective when the threading model is set to + * multithreading ( ::CRIATOM_THREAD_MODEL_MULTI ) during the library initialization.
+ * If a different threading model is selected, this function does not do anything.
+ * (An error callback occurs.)
+ *
+ * This function must be executed between the initialization and finalization processes.
+ * It will have no effect if it is executed before initialization or after finalization.
+ * (An error callback occurs.)
+ * The server process thread is used by the CRI File System library as well.
+ * Note that if you already changed the priority of the server process thread + * through the API of the CRI File System library, + * it will be overwritten when calling this function.
+ * \sa criAtomEx_Initialize_PC, criAtomEx_GetThreadPriority_PC + */ +#define criAtomEx_SetThreadPriority_PC(prio) \ + criAtom_SetThreadPriority_PC(prio) + +/*EN + * \brief Get the priority of the thread on which runs the server process + * \ingroup ATOMLIB_PC + * \return int thread priority + * \par Description: + * This function gets the priority of the thread executing the server process (the library's internal process).
+ * If successful, this function returns the priority.
+ * Otherwise, it returns THREAD_PRIORITY_ERROR_RETURN.
+ * \attention: + * This function is only effective when the threading model is set to + * multithreading ( ::CRIATOM_THREAD_MODEL_MULTI ) during the library initialization.
+ * If a different threading model is selected, this function does not do anything.
+ * (An error callback occurs.)
+ *
+ * This function must be executed between the initialization and finalization processes.
+ * It will have no effect if it is executed before initialization or after finalization.
+ * (An error callback occurs.)
+ * \sa criAtomEx_Initialize_PC, criAtomEx_SetThreadPriority_PC + */ +#define criAtomEx_GetThreadPriority_PC() \ + criAtom_GetThreadPriority_PC() + +/*EN + * \brief Change the affinity mask of the thread on which the server process runs + * \ingroup ATOMLIB_PC + * \param[in] mask thread affinity mask + * \par Description: + * This function changes the affinity mask of the thread executing the server process (the library's internal process).
+ * By default (when this function is not executed), the processor running the server process + * is unrestricted.
+ * \attention: + * This function is only effective when the threading model is set to + * multithreading ( ::CRIATOM_THREAD_MODEL_MULTI ) during the library initialization.
+ * If a different threading model is selected, this function does not do anything.
+ * (An error callback occurs.)
+ *
+ * This function must be executed between the initialization and finalization processes.
+ * It will have no effect if it is executed before initialization or after finalization.
+ * (An error callback occurs.)
+ * The server process thread is used by the CRI File System library as well.
+ * Note that if you already changed the affinity mask of the server process thread + * through the API of the CRI File System library, + * it will be overwritten when calling this function.
+ * \sa criAtomEx_Initialize_PC, criAtomEx_GetThreadAffinityMask_PC + */ +#define criAtomEx_SetThreadAffinityMask_PC(mask) \ + criAtom_SetThreadAffinityMask_PC(mask) + +/*EN + * \brief Get the affinity mask of the thread on which runs the server process + * \ingroup ATOMLIB_PC + * \return DWORD_PTR thread affinity mask + * \par Description: + * This function gets the affinity mask of the thread executing the server process (the library's internal process).
+ * If successful, this function returns the affinity mask of the thread.
+ * Otherwise, it returns 0.
+ * \attention: + * This function is only effective when the threading model is set to + * multithreading ( ::CRIATOM_THREAD_MODEL_MULTI ) during the library initialization.
+ * If a different threading model is selected, this function does not do anything.
+ * (An error callback occurs.)
+ *
+ * This function must be executed between the initialization and finalization processes.
+ * It will have no effect if it is executed before initialization or after finalization.
+ * (An error callback occurs.)
+ * \sa criAtomEx_Initialize_PC, criAtomEx_SetThreadAffinityMask_PC + */ +#define criAtomEx_GetThreadAffinityMask_PC() \ + criAtom_GetThreadAffinityMask_PC() + +/*========================================================================== + * Functions for PCM Output + *=========================================================================*/ +/*EN + * \brief Calculate the size of the work buffer required for the user PCM output method + * \ingroup ATOMLIB_PC + * \param[in] config configuration structure for the initialization + * \return CriSint32 work buffer size + * \par Description: + * Calculate the size of the work buffer required to initialize the library in the user PCM output mode.
+ * \par Remarks: + * The size depends on the values of the parameters in the ::CriAtomExConfig_PC structure.
+ * The information passed in the config argument is only referenced within this function.
+ * Therefore the memory it uses can be released after executing the function. + * \attention + * This function is used when initializing the library with the ::criAtomEx_InitializeForUserPcmOutput_PC function.
+ * Note that when you use the ::criAtomEx_Initialize_PC function, + * you should call the ::criAtomEx_CalculateWorkSize_PC function to get the size of the work buffer.
+ * \sa CriAtomExConfig_PC, criAtomEx_InitializeForUserPcmOutput_PC + */ +#define criAtomEx_CalculateWorkSizeForUserPcmOutput_PC(config) \ + criAtomEx_CalculateWorkSizeForUserPcmOutput(config) + +/*EN + * \brief Initialize the user PCM output library + * \ingroup ATOMLIB_PC + * \param[in] config configuration structure for the initialization + * \param[in] work work buffer + * \param[in] work_size work buffer size + * \par Description: + * Initializes the library in the user PCM output mode.
+ *
+ * When initialized using this function, the Atom library does not perform sound output.
+ * Instead, the application must get the PCM data periodically from the library + * using the ::criAtomExAsr_GetPcmDataFloat32 function and perform the sound output itself.
+ * \attention + * This function cannot be used conjointly with:
+ * - ::criAtom_Initialize + * - ::criAtomAsr_Initialize + * - ::criAtomHcaMx_Initialize + * - ::criAtom_Initialize_PC + * . + * \sa CriAtomExConfig_PC, criAtomEx_FinalizeForUserPcmOutput_PC, + * criAtomExAsr_GetPcmDataFloat32, criAtomEx_CalculateWorkSizeForUserPcmOutput_PC + */ +#define criAtomEx_InitializeForUserPcmOutput_PC(config, work, work_size) \ + criAtomEx_InitializeForUserPcmOutput(config, work, work_size) + +/*EN + * \brief Finalize the user PCM output library + * \ingroup ATOMLIB_PC + * \par Description: + * Performs the finalization of the library initialized in the user PCM output mode.
+ * \attention + * This function should be used to finalize the library if it was initialized with ::criAtomEx_InitializeForUserPcmOutput_PC.
+ * Note that if the library was initialized using the ::criAtomEx_Initialize_PC function, + * you must use the ::criAtomEx_Finalize_PC function instead.
+ * \sa criAtomEx_InitializeForUserPcmOutput_PC + */ +#define criAtomEx_FinalizeForUserPcmOutput_PC() \ + criAtomEx_FinalizeForUserPcmOutput() + +#ifdef __cplusplus +} +#endif + +#endif /* CRI_INCL_CRI_ATOM_PC_H */ diff --git a/3rdParty/cri2019/pc/include/cri_atom_wasapi.h b/3rdParty/cri2019/pc/include/cri_atom_wasapi.h new file mode 100644 index 00000000..08fe96ec --- /dev/null +++ b/3rdParty/cri2019/pc/include/cri_atom_wasapi.h @@ -0,0 +1,533 @@ +/**************************************************************************** + * + * CRI Middleware SDK + * + * Copyright (c) 2013 CRI Middleware Co., Ltd. + * + * Library : CRI Atom + * Module : Library User's Header for WASAPI + * File : cri_atom_wasapi.h + * + ****************************************************************************/ +/*! + * \file cri_atom_wasapi.h + */ + +/* Prevent redefinition */ +#ifndef CRI_INCL_CRI_ATOM_WASAPI_H +#define CRI_INCL_CRI_ATOM_WASAPI_H + +/*************************************************************************** + * Include files + ***************************************************************************/ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/*************************************************************************** + * Macro Constants + ***************************************************************************/ + +/*************************************************************************** + * Macro Functions + ***************************************************************************/ +/*========================================================================== + * CRI Atom API + *=========================================================================*/ +/*EN + * \brief Assign the default values to the configuration structure used for the library's initialization. + * \ingroup ATOMLIB_WASAPI + * \param[out] p_config Pointer to the configuration structure used for the library's initialization. + * \par Description: + * Assign the default values to the configuration structure (::CriAtomConfig_WASAPI) + * that is passed to the ::criAtom_Initialize_WASAPI function.
+ * \attention + * This macro is for the low level API.
+ * When using the functions of the AtomEx layer, call the + * ::criAtomEx_SetDefaultConfig_WASAPI macro instead. + * \sa CriAtomConfig_WASAPI + */ +#define criAtom_SetDefaultConfig_WASAPI(p_config) \ +{ \ + criAtom_SetDefaultConfig(&(p_config)->atom); \ + criAtomAsr_SetDefaultConfig(&(p_config)->asr); \ + criAtomHcaMx_SetDefaultConfig(&(p_config)->hca_mx); \ +} + +/*EN + * \brief Audio endpoint enumeration callback + * \ingroup ATOMLIB_WASAPI + * \param[in] object User Object + * \param[in] device IMMDevice instance + * \par Description: + * The type of the callback function used to notify the audio endpoint.
+ * By registering this function type callback function in the ::criAtom_EnumAudioEndpoints_WASAPI function,
+ * it is possible to receive an IMMDevice instance via a callback.
+ * \attention + * IMMDevice instances MUST NOT be discarded within the callback function.
+ * \sa criAtom_EnumAudioEndpoints_WASAPI + */ +typedef void (CRIAPI *CriAtomAudioEndpointCbFunc_WASAPI)(void *object, IMMDevice *device); + +/*EN + * \brief Device update notification callback + * \ingroup ATOMLIB_WASAPI + * \param[in] object User Object + * \par Description: + * The type of callback function used for device update notification.
+ * By registering this function type callback function in the ::criAtom_SetDeviceUpdateCallback_WASAPI function, + * it is possible to receive notification via callback when the device is updated.
+ * \sa criAtom_SetDeviceUpdateCallback_WASAPI + */ +typedef void (CRIAPI *CriAtomDeviceUpdateCbFunc_WASAPI)(void *object); + +/*========================================================================== + * CRI AtomEx API + *=========================================================================*/ +/*EN + * \brief Assign the default values to the configuration structure used for the library's initialization. + * \ingroup ATOMLIB_WASAPI + * \param[out] p_config Pointer to the configuration structure used for the library's initialization. + * \par Description: + * Assign the default values to the configuration structure (::CriAtomExConfig_WASAPI) + * that is passed to the ::criAtomEx_Initialize_WASAPI function.
+ * \sa CriAtomExConfig_WASAPI + */ +#define criAtomEx_SetDefaultConfig_WASAPI(p_config) \ +{ \ + criAtomEx_SetDefaultConfig(&(p_config)->atom_ex); \ + criAtomExAsr_SetDefaultConfig(&(p_config)->asr); \ + criAtomExHcaMx_SetDefaultConfig(&(p_config)->hca_mx); \ +} + +/*************************************************************************** + * Data Type Declarations + ***************************************************************************/ +/*========================================================================== + * CRI Atom API + *=========================================================================*/ +/*EN + * \brief Configuration structure used for the initialization of the Atom library + * \ingroup ATOMLIB_WASAPI + * This configuration structure is used to specify the behavior of the CRI Atom library.
+ * It is passed as an argument to the ::criAtom_Initialize_WASAPI function.
+ * \attention + * This structure is used for low level API.
+ * When using the functions of the AtomEx layer, use the + * ::CriAtomExConfig_WASAPI structure instead. + * \sa criAtom_Initialize_WASAPI, criAtom_SetDefaultConfig_WASAPI + */ +typedef struct CriAtomConfigTag_WASAPI { + CriAtomConfig atom; /*EN< Configuration structure for the intialization of the Atom library */ + CriAtomAsrConfig asr; /*EN< Configuration structure for the intialization of ASR */ + CriAtomHcaMxConfig hca_mx; /*EN< Configuration structure for the intialization of HCA-MX */ +} CriAtomConfig_WASAPI; + +/*========================================================================== + * CRI AtomEx API + *=========================================================================*/ +/*EN + * \brief Configuration structure used for the initialization of the Atom library + * \ingroup ATOMLIB_WASAPI + * This configuration structure is used to specify the behavior of the CRI Atom library.
+ * It is passed as an argument to the ::criAtomEx_Initialize_WASAPI function.
+ * \sa criAtomEx_Initialize_WASAPI, criAtomEx_SetDefaultConfig_WASAPI + */ +typedef struct CriAtomExConfigTag_WASAPI { + CriAtomExConfig atom_ex; /*EN< Configuration structure for the intialization of AtomEx */ + CriAtomExAsrConfig asr; /*EN< Configuration structure for the intialization of ASR */ + CriAtomExHcaMxConfig hca_mx; /*EN< Configuration structure for the intialization of HCA-MX */ +} CriAtomExConfig_WASAPI; + +/*************************************************************************** + * Prototype Variables + ***************************************************************************/ + +/*************************************************************************** + * Prototype Functions + ***************************************************************************/ +#ifdef __cplusplus +extern "C" { +#endif + +/*========================================================================== + * CRI Atom API + *=========================================================================*/ +/*EN + * \brief Calculate the size of the work buffer required to initialize the library + * \ingroup ATOMLIB_WASAPI + * \param[in] config Configuration structure for initialization + * \return CriSint32 Work buffer size + * \par Description: + * This function retrieves the size of the work buffer needed to use the library.
+ * \par Remarks: + * The work buffer size needed by the library's initialization depends on the values of the parameters in + * the ::CriAtomConfig_WASAPI structure.
+ *
+ * The information passed in the config argument is only referenced within this function.
+ * Therefore the memory it uses can be released after executing the function. + * \attention + * This function is for the low level API.
+ * When using the functions of the AtomEx layer, call + * ::criAtomEx_CalculateWorkSize_WASAPI instead. + * \sa CriAtomConfig_WASAPI, criAtom_Initialize_WASAPI + */ +CriSint32 CRIAPI criAtom_CalculateWorkSize_WASAPI(const CriAtomConfig_WASAPI *config); + +/*EN + * \brief Library initialization + * \ingroup ATOMLIB_WASAPI + * \param[in] config Configuration structure for initialization + * \param[in] work Work buffer + * \param[in] work_size Work buffer size + * \par Description: + * Initializes the library.
+ * In order to be able to use the features of the library, you must first call this function.
+ * (Once this function is called, the features of the library are available until the ::criAtom_Finalize_WASAPI function + * is called.)
+ *
+ * To initialize the library, you must allocate a memory area (work buffer) + * that will be used internally by the library.
+ * The size of the work buffer needed by the library depends on the values of the parameters in the configuration structure + * used for initialization.
+ * Use the ::criAtom_CalculateWorkSize_WASAPI function to calculate + * the work buffer size.
+ * \par Remarks: + * If an allocator has already been registered with the ::criAtom_SetUserAllocator macro, + * the work buffer size does not need to be specified.
+ * (By passing NULL for work and 0 for work_size, the amount of memory corresponding to the work buffer size + * is dynamically allocated by the registered allocator.) + *
+ * The information passed in the config argument is only referenced within this function.
+ * Therefore the memory it uses can be released after executing the function. + * \attention + * This function calls the following functions internally:
+ * - ::criAtom_Initialize + * - ::criAtomAsr_Initialize + * - ::criAtomHcaMx_Initialize + * . + * Therefore, if you call this function, do not call the functions listed above.
+ *
+ * If you call this function, you must always call the ::criAtom_Finalize_WASAPI function later.
+ * Do not call this function again until you have called the ::criAtom_Finalize_WASAPI function.
+ *
+ * This function is for the low level API.
+ * When using the functions of the AtomEx layer, call + * ::criAtomEx_Initialize_WASAPI instead. + * \sa CriAtomConfig_WASAPI, criAtom_Finalize_WASAPI, + * criAtom_SetUserAllocator, criAtom_CalculateWorkSize_WASAPI + */ +void CRIAPI criAtom_Initialize_WASAPI( + const CriAtomConfig_WASAPI *config, void *work, CriSint32 work_size); + +/*EN + * \brief Finalize the library + * \ingroup ATOMLIB_WASAPI + * \par Description: + * This function finalizes the library.
+ * \attention + * This function calls the following functions internally:
+ * - ::criAtom_Finalize + * - ::criAtomAsr_Finalize + * - ::criAtomHcaMx_Finalize + * . + * Therefore, if you call this function, do not call the functions above.
+ *
+ * This function cannot be called before the ::criAtom_Initialize_WASAPI function is called.
+ *
+ * This function is for the low level API.
+ * When using the functions of the AtomEx layer, call + * ::criAtomEx_Finalize_WASAPI instead. + * \sa criAtom_Initialize_WASAPI + */ +void CRIAPI criAtom_Finalize_WASAPI(void); + +/*EN + * \brief Get the mixer format + * \ingroup ATOMLIB_WASAPI + * \param[out] format Mixer format + * \return CriBool Was the mixer format acquired? (CRI_TRUE = Success, CRI_FALSE = Failure) + * \par Description: + * Gets the mixer format used in Shared Mode.
+ * \par Remarks: + * This function is a wrapper around the IAudioClient::GetMixFormat function.
+ * When it is called, an AudioClient is created within the function and the GetMixFormat function is executed.
+ * \attention + * This function can only be used before the library's initialization.
+ *
+ * The usable formats differ between Shared Mode and Exclusive Mode.
+ * The WAVEFORMATEXTENSIBLE structure returned by this function corresponds to the IEEE float PCM data format, + * but this format is mostly unusable in Exclusive Mode.
+ */ +CriBool CRIAPI criAtom_GetAudioClientMixFormat_WASAPI(WAVEFORMATEXTENSIBLE *format); + +/*EN + * \brief Check whether the specified format is usable or not + * \ingroup ATOMLIB_WASAPI + * \param[in] format Format to be used + * \return CriBool Is the specified format usable? (CRI_TRUE = Usable, CRI_FALSE = Not Usable) + * \par Description: + * Checks whether the format specified in the argument is usable in Exclusive Mode or not.
+ * \par Remarks: + * This function is a wrapper around the IAudioClient::IsFormatSupported function.
+ * When it is called, an AudioClient is created within the function and the IsFormatSupported function is executed.
+ * \attention + * This function can only be used before the library's initialization.
+ *
+ * On some devices and for some parameters, the WASAPI initialization may fail + * even if this function returns successfully.
+ * If the library fails to initialize even when this function returns CRI_TRUE, + * change the specified format or use the Shared Mode.
+ */ +CriBool CRIAPI criAtom_GetAudioClientIsFormatSupported_WASAPI(const WAVEFORMATEX *format); + +/*EN + * \brief Sharing mode specification + * \ingroup ATOMLIB_WASAPI + * \param[in] mode Mode to be used + * \par Description: + * Specifies whether to use WASAPI in Shared Mode or Exclusive Mode.
+ *
+ * If this function is not executed (or if it is executed by specifying AUDCLNT_SHAREMODE_SHARED), + * the Atom library will initialize WASAPI in Shared Mode.
+ * If this function is executed by specifying AUDCLNT_SHAREMODE_EXCLUSIVE, + * the Atom library will initialize WASAPI in Exclusive Mode.
+ * \attention + * You must execute this function before initializing the library.
+ *
+ * To use the Exclusive Mode, the mode must be specified with this function and the + * format must also be specified via the ::criAtom_SetAudioClientFormat_WASAPI function.
+ * \sa criAtom_SetAudioClientFormat_WASAPI + */ +void CRIAPI criAtom_SetAudioClientShareMode_WASAPI(AUDCLNT_SHAREMODE mode); + +/*EN + * \brief Output format specification + * \ingroup ATOMLIB_WASAPI + * \par Description: + * \param[in] format Format to be used + * \par Description: + * Specifies the format to be used in Exclusive Mode.
+ * \par Remarks: + * The format specified is passed to the IAudioClient::Initialize function.
+ * \attention + * You must call this function before initializing the library.
+ *
+ * To use the Exclusive Mode, the format must be specified with this function and the + * mode must also be specified via the ::criAtom_SetAudioClientShareMode_WASAPI function.
+ * \sa criAtom_SetAudioClientShareMode_WASAPI + */ +void CRIAPI criAtom_SetAudioClientFormat_WASAPI(const WAVEFORMATEX *format); + +/*EN + * \brief Set the buffering time + * \ingroup ATOMLIB_WASAPI + * \param[in] ref_time Buffering time + * \par Description: + * Specifies the buffering time (before the WASAPI initialization).
+ * The Atom library will allocate a sound buffer large enough to hold data for the amount of time specified by this function.
+ * \par Remarks: + * The buffering time is passed to the IAudioClient::Initialize function.
+ *
+ * If this function is not used, the Atom library will calculate the appropriate buffering time based on the + * server process frequency specified during initialization.
+ * \attention + * You must call this function before initializing the library.
+ *
+ * If the buffering time is too short, problems such as audio dropouts may occur.
+ */ +void CRIAPI criAtom_SetAudioClientBufferDuration_WASAPI(REFERENCE_TIME ref_time); + +/*EN + * \brief Get the AudioClient + * \ingroup ATOMLIB_WASAPI + * \return IAudioClient AudioClient + * \par Description: + * Get the AudioClient created within the Atom library. + * \par Remarks: + * This function will return NULL if executed on a PC that does not + * have a sound device. + * \par Note: + * You must initialize the library before calling this function. + */ +IAudioClient * CRIAPI criAtom_GetAudioClient_WASAPI(void); + +/*EN + * \brief Check if the audio device is disabled + * \ingroup ATOMLIB_WASAPI + * \return CriBool Has the device been disabled? (CRI_TRUE = Disabled, CRI_FALSE = Operating Normally) + * \par Description: + * Returns whether or not the audio device has been disabled. + * \par Remarks: + * This function only returns CRI_TRUE when the sound device has been disabled while the application was running.
+ * This function will return CRI_FALSE if executed on a PC that does not have a sound device at all.
+ * (Use the ::criAtom_GetAudioClient_WASAPI function to check whether or not a sound device exists.) + * \sa criAtom_GetAudioClient_WASAPI + */ +CriBool CRIAPI criAtom_IsDeviceInvalidated_WASAPI(void); + +/*EN + * \brief Set sound device + * \ingroup ATOMLIB_WASAPI + * \param[in] type Sound renderer type + * \param[in] device_id Device ID + * \par Description: + * Link the sound renderer type to the sound device.
+ *
+ * If set the device ID for the sound renderer with this function, + * all sounds specified by specifying the sound renderer will be output + * from the sound device that matches the specified ID. + *
+ * The following values can be specified for "type".
+ * - CRIATOM_SOUND_RENDERER_HW1 + * - CRIATOM_SOUND_RENDERER_HW2 + * - CRIATOM_SOUND_RENDERER_HW3 + * - CRIATOM_SOUND_RENDERER_HW4 + * . + * If NULL or a character string of length 0 is specified for "device_id", + * the link between the sound renderer and the device ID is canceled. + * \par Remarks: + * The ID of the sound device needs to be acquired with IMMDevice::GetId.
+ * If a sound device that matches the specified ID can not be found, + * the sound that was played with the device specified is output from the default device.
+ * \attention + * This function must be executed before library initialization.
+ */ +void CRIAPI criAtom_SetDeviceId_WASAPI(CriAtomSoundRendererType type, LPCWSTR device_id); + +/*EN + * \brief Enumerate audio endpoints + * \ingroup ATOMLIB_WASAPI + * \param[in] callback Audio endpoint callback function + * \param[in] object User Object + * \return CriSint32 Number of enumerated ACB handles + * \par Description: + * Enumerate audio endpoints.
+ *
+ * When this function is executed, the callback function set in "call_back" is called up by the number of audio endpoints.
+ * An IMMDevice instance is passed as an argument to the callback function.
+ * \par Remarks: + * The value set for "object" is passed as the argument of the callback function.
+ * For other arguments of the callback function, see the explanation of ::CriAtomAudioEndpointCbFunc_WASAPI .
+ *
+ * The return value is the number of enumerated audio endpoints (the number of times the registered callback function was called).
+ * If there is no audio endpoint, this function returns 0.
+ * If an error occurs, -1 is returned.
+ * \attention + * IMMDevice instances MUST NOT be discarded within the callback function.
+ * \sa CriAtomAudioEndpointCbFunc_WASAPI + */ +CriSint32 CRIAPI criAtom_EnumAudioEndpoints_WASAPI(CriAtomAudioEndpointCbFunc_WASAPI callback, void *object); + +/*EN + * \brief Register device update notification + * \ingroup ATOMLIB_WASAPI + * \param[in] callback Device Update callback function + * \param[in] object User Object + * \par Description: + * Set up a callback to receive device update notifications.
+ *
+ * When this function is executed, when the device is updated, the callback function set with the first argument (callback) will be called.
+ * \par Remarks: + * The value set for the second argument (object) is passed as the argument of the callback function.
+ * \sa CriAtomAudioEndpointCbFunc_WASAPI + */ +void CRIAPI criAtom_SetDeviceUpdateCallback_WASAPI(CriAtomDeviceUpdateCbFunc_WASAPI callback, void *object); + +/*========================================================================== + * CRI AtomEx API + *=========================================================================*/ +/*EN + * \brief Calculate the size of the work buffer required to initialize the library + * \ingroup ATOMLIB_WASAPI + * \param[in] config Configuration structure for initialization + * \return CriSint32 Work buffer size + * \par Description: + * This function retrieves the size of the work buffer needed to use the library.
+ * \par Remarks: + * The work buffer size needed by the library's initialization depends on the values of the parameters in + * the ::CriAtomExConfig_WASAPI structure.
+ * The information passed in the config argument is only referenced within this function.
+ * Therefore the memory it uses can be released after executing the function. + * \sa CriAtomExConfig_WASAPI, criAtomEx_Initialize_WASAPI + */ +CriSint32 CRIAPI criAtomEx_CalculateWorkSize_WASAPI(const CriAtomExConfig_WASAPI *config); + +/*EN + * \brief Library initialization + * \ingroup ATOMLIB_WASAPI + * \param[in] config Configuration structure for initialization + * \param[in] work Work area + * \param[in] work_size Work area size + * \par Description: + * Initializes the library.
+ * In order to be able to use the features of the library, you must first call this function.
+ * (Once this function is called, the features of the library are available until the ::criAtomEx_Finalize_WASAPI function + * is called.)
+ *
+ * To initialize the library, you must allocate the memory (work buffer) + * used internally by the library.
+ * The size of the work buffer needed by the library depends on the values of the parameters in the configuration structure + * used for initialization.
+ * Use the ::criAtomEx_CalculateWorkSize_WASAPI function to calculate + * the size of the work buffer.
+ * \par Remarks: + * If an allocator has already been registered by using the ::criAtomEx_SetUserAllocator macro, + * you do not need to specify a work buffer to this function.
+ * (By passing NULL for work and 0 for work_size, the amount of memory corresponding to the work buffer size + * is dynamically allocated by the registered allocator.) + *
+ * The information passed in the config argument is only referenced within this function.
+ * Therefore the memory it uses can be released after executing the function. + * \attention + * This function internally calls:
+ * - ::criAtomEx_Initialize + * - ::criAtomExAsr_Initialize + * - ::criAtomExHcaMx_Initialize + * . + * Therefore, if you call this function, do not call the functions listed above.
+ *
+ * If you call this function, you must always call the ::criAtomEx_Finalize_WASAPI function later.
+ * Do call this function again before having called ::criAtomEx_Finalize_WASAPI.
+ * \sa CriAtomExConfig_WASAPI, criAtomEx_Finalize_WASAPI, + * criAtomEx_SetUserAllocator, criAtomEx_CalculateWorkSize_WASAPI + */ +void CRIAPI criAtomEx_Initialize_WASAPI( + const CriAtomExConfig_WASAPI *config, void *work, CriSint32 work_size); + +/*EN + * \brief Finalize the library + * \ingroup ATOMLIB_WASAPI + * \par Description: + * This function finalizes the library.
+ * \attention + * This function internally calls:
+ * - ::criAtomEx_Finalize + * - ::criAtomExAsr_Finalize + * - ::criAtomExHcaMx_Finalize + * . + * Therefore, if you call this function, do not call the functions above.
+ *
+ * This function cannot be executed before the ::criAtomEx_Initialize_WASAPI function is called.
+ * \sa criAtomEx_Initialize_WASAPI + */ +void CRIAPI criAtomEx_Finalize_WASAPI(void); + +#ifdef __cplusplus +} +#endif + +/*************************************************************************** + * For compatibility with older versions + ***************************************************************************/ +#define criAtom_ControlComInitialization_WASAPI(sw) + +#endif /* CRI_INCL_CRI_ATOM_WASAPI_H */ + +/* --- end of file --- */ diff --git a/3rdParty/cri/XboxOne/include/cri_error.h b/3rdParty/cri2019/pc/include/cri_error.h similarity index 64% rename from 3rdParty/cri/XboxOne/include/cri_error.h rename to 3rdParty/cri2019/pc/include/cri_error.h index 6152a7b5..16c2cf2c 100644 --- a/3rdParty/cri/XboxOne/include/cri_error.h +++ b/3rdParty/cri2019/pc/include/cri_error.h @@ -1,10 +1,10 @@ -#ifndef _CRI_ERROR_H_INCLUDED -#define _CRI_ERROR_H_INCLUDED +#ifndef CRI_INCL_CRI_ERROR_H +#define CRI_INCL_CRI_ERROR_H /**************************************************************************** * * CRI Middleware SDK * - * Copyright (c) 2006-2009 CRI Middleware Co., Ltd. + * Copyright (c) 2006 CRI Middleware Co., Ltd. * * Library : CRI Error * Module : @@ -14,10 +14,6 @@ /*! * \file cri_error.h */ -/*JP - * \addtogroup CRI_ERROR G[nhOp֐Q - * @{ - */ /*EN * \addtogroup CRI_ERROR Functions for error handling * @{ @@ -32,53 +28,36 @@ * MACRO CONSTANT * ****************************************************************************/ -/* o[Wԍ */ -/* Version number */ +/* Version Number */ #define CRIERROR_VER_NAME "CRI Error" -#define CRIERROR_VER_NUM "1.04.00" +#define CRIERROR_VER_NUM "1.04.04" #define CRIERROR_VER_OPTION -/*JP - * \brief G[R[h - */ /*EN * \brief Error codes */ typedef enum { - CRIERR_OK = 0, /*JP< I */ - /*EN< Succeeded */ - CRIERR_NG = -1, /*JP< G[ */ - /*EN< Error occurred */ - CRIERR_INVALID_PARAMETER = -2, /*JP< s */ - /*EN< Invalid argument */ - CRIERR_FAILED_TO_ALLOCATE_MEMORY = -3, /*JP< ̊mۂɎs */ - /*EN< Failed to allocate memory */ - CRIERR_UNSAFE_FUNCTION_CALL = -4, /*JP< XbhZ[t֐̕s */ - /*EN< Parallel execution of thread-unsafe function */ - CRIERR_FUNCTION_NOT_IMPLEMENTED = -5, /*JP< ֐̎s */ - /*EN< Function not implemented */ - CRIERR_LIBRARY_NOT_INITIALIZED = -6, /*JP< Cu */ - /*EN< Library not initialized */ + CRIERR_OK = 0, /*EN< Succeeded */ + CRIERR_NG = -1, /*EN< Error occurred */ + CRIERR_INVALID_PARAMETER = -2, /*EN< Invalid argument */ + CRIERR_FAILED_TO_ALLOCATE_MEMORY = -3, /*EN< Failed to allocate memory */ + CRIERR_UNSAFE_FUNCTION_CALL = -4, /*EN< Parallel execution of thread-unsafe function */ + CRIERR_FUNCTION_NOT_IMPLEMENTED = -5, /*EN< Function not implemented */ + CRIERR_LIBRARY_NOT_INITIALIZED = -6, /*EN< Library not initialized */ /* enum be 4bytes */ CRIERR_ENUM_BE_SINT32 = 0x7FFFFFFF } CriError; -/*JP - * \brief G[ʒmx - */ /*EN * \brief Error notification level */ typedef enum { - CRIERR_NOTIFY_ALL = 0, /*JP< SẴG[ʒm */ - /*EN< Notify all errors */ - CRIERR_NOTIFY_FATAL = 1, /*JP< G[̂ݒʒmix͖j */ - /*EN< Notify error (Disregards warning) */ + CRIERR_NOTIFY_ALL = 0, /*EN< Report all errors */ + CRIERR_NOTIFY_FATAL = 1, /*EN - * \attention - * ̊֐͋dl̊֐łB
- * ::criErr_ConvertIdToMessage ֐gpĂB - * \sa criErr_ConvertIdToMessage - */ /*EN - * \brief Convert error ID to error message + * \brief Convert error ID to error message * \ingroup CRI_ERROR * \param[in] errid error ID * \return error message - * \par Explanation: - * This function converts error ID to detailed error message.
+ * \par Description: + * This function converts an error ID into a detailed error message.
* \attention - * This function is an obsolete one.
- * Please use the ::criErr_ConvertIdToMessage function instead. + * This function is an obsolete one.
+ * Use the ::criErr_ConvertIdToMessage function instead. * \sa criErr_ConvertIdToMessage */ const CriChar8* CRIAPI criErr_ConvertIdToMsg(const CriChar8 *errid); -/*JP - * \brief G[ID񂩂G[bZ[W֕ϊ - * \ingroup CRI_ERROR - * \param[in] errid G[ID - * \param[in] p1 ⑫1 - * \param[in] p2 ⑫2 - * \return G[bZ[W - * \par : - * G[ID񂩂ڍׂȃG[bZ[W֕ϊ܂B
- * \par p: - * \code - * void user_error_callback_func(const CriChar8 *errid, CriUint32 p1, CriUint32 p2, CriUint32 *parray); - * { - * const CriChar8 *errmsg; - * errmsg = criErr_ConvertIdToMessage(errid, p1, p2); - * printf("%s\n", errmsg); - * } - * \endcode - */ /*EN - * \brief Convert error ID to error message + * \brief Convert error ID to error message * \ingroup CRI_ERROR * \param[in] errid error ID * \param[in] p1 supplementary information 1 * \param[in] p2 supplementary information 2 * \return error message - * \par Explanation: - * This function converts error ID to detailed error message.
+ * \par Description: + * This function converts error ID to detailed error message.
* \par Example: * \code * void user_error_callback_func(const CriChar8 *errid, CriUint32 p1, CriUint32 p2, CriUint32 *parray); @@ -217,42 +158,16 @@ const CriChar8* CRIAPI criErr_ConvertIdToMsg(const CriChar8 *errid); */ const CriChar8* CRIAPI criErr_ConvertIdToMessage(const CriChar8 *errid, CriUint32 p1, CriUint32 p2); -/*JP - * \brief G[R[obN֐̓o^ - * \ingroup CRI_ERROR - * \param[in] cbf G[R[obN֐ - * \return Ȃ - * \par : - * G[R[obN֐o^܂B
- * o^ꂽ֐́ACRI~hEGACuŃG[ƂɌĂяo܂B
- * ɓo^łG[R[obN֐͂P‚łB
- * o^ɍēx{֐Ăяoꍇ݂͌̓o^㏑܂B - * \par p: - * \code - * void user_error_callback_func(const CriChar8 *errid, CriUint32 p1, CriUint32 p2, CriUint32 *parray); - * { - * const CriChar8 *errmsg; - * errmsg = criErr_ConvertIdToMessage(errid, p1, p2); - * printf("%s\n", errmsg); - * } - * - * void main(int ac, char *av[]) - * { - * F - * // G[R[obN̓o^ - * criErr_SetCallback(user_error_callback_func); - * F - * } - * \endcode - */ /*EN * \brief Register error callback function * \ingroup CRI_ERROR * \param[in] cbf error callback function * \return NONE - * \par Explanation: - * This function registers an error callback function.
- * The registered function is called if an error occurs within the CRI middleware library. + * \par Description: + *This function registers an error callback function.
+ * The registered function is called if an error occurs within the CRI middleware library.
+ * Only one error callback function can be registered at a time.
+ * If this function is called again after being registered, the current registration is overwritten. * \par Example: * \code * void user_error_callback_func(const CriChar8 *errid, CriUint32 p1, CriUint32 p2, CriUint32 *parray); @@ -273,61 +188,36 @@ const CriChar8* CRIAPI criErr_ConvertIdToMessage(const CriChar8 *errid, CriUint3 */ void CRIAPI criErr_SetCallback(CriErrCbFunc cbf); -/*JP - * \brief G[ʒmx̕ύX - * \ingroup CRI_ERROR - * \param[in] level G[ʒmx - * \return Ȃ - * \par : - * G[R[obNɒʒmG[̃xύX܂B - */ /*EN - * \brief Change error notification level + * \brief Change error notification level * \ingroup CRI_ERROR * \param[in] level error notification level * \return NONE - * \par Explanation: + * \par Description: * This function changes the level of error information that is notified to the error callback. */ void CRIAPI criErr_SetErrorNotificationLevel(CriErrorNotificationLevel level); -/*JP - * \brief G[񐔂̎擾 - * \ingroup CRI_ERROR - * \param[in] level G[x - * \return G[ - * \par : - * G[񐔂擾܂B - */ /*EN - * \brief Retrieve error count + * \brief Retrieve error count * \ingroup CRI_ERROR * \param[in] level error level - * \return number of errors occured - * \par Explanation: - * This function retrieves the number of errors occured. + * \return number of errors occurred + * \par Description: + * This function retrieves the number of errors occurred. */ CriUint32 CRIAPI criErr_GetErrorCount(CriErrorLevel level); -/*JP - * \brief G[񐔂̃Zbg - * \ingroup CRI_ERROR - * \param[in] level G[x - * \return Ȃ - * \par : - * G[񐔂̃JE^0ɖ߂܂B - */ /*EN - * \brief Resets error count + * \brief Resets error count * \ingroup CRI_ERROR * \param[in] level error level * \return NONE - * \par Explanation: - * This function resets the counter for number of errors occured. + * \par Explanation: + * This function resets the counter for the number of error occurred. */ void CRIAPI criErr_ResetErrorCount(CriErrorLevel level); -/* G[R[obN𔭐 (֐) */ /* Error notification (Internal functions) */ void CRIAPI criErr_Notify(CriErrorLevel level, const CriChar8 *errid); void CRIAPI criErr_Notify1(CriErrorLevel level, const CriChar8 *errid, CriUintPtr p1); @@ -342,7 +232,6 @@ void CRIAPI criErr_NotifyWarningSimple(void); #endif /* __cplusplus */ /*************************************************************************** - * o[WƂ̌݊p * For compatibility with old versions ***************************************************************************/ #define criErr_Invoke(errid) criErr_Notify(CRIERR_LEVEL_ERROR, errid) @@ -359,10 +248,7 @@ void CRIAPI criErr_NotifyWarningSimple(void); /*EN * @} */ -/*JP - * @} - */ -#endif // _CRI_ERROR_H_INCLUDED +#endif // _CRI_INCL_CRI_ERROR_H /* --- end of file --- */ diff --git a/3rdParty/cri2019/pc/include/cri_file_system.h b/3rdParty/cri2019/pc/include/cri_file_system.h new file mode 100644 index 00000000..0d9b5c9c --- /dev/null +++ b/3rdParty/cri2019/pc/include/cri_file_system.h @@ -0,0 +1,4728 @@ +/**************************************************************************** + * + * CRI Middleware SDK + * + * Copyright (c) 2006-2017 CRI Middleware Co., Ltd. + * + * Library: CRI File System + * Module : Library User's Header + * File : cri_file_system.h + * + ****************************************************************************/ +/*! + * \file cri_file_system.h + */ + +/* Prevention of redefinition */ +#ifndef CRI_FILE_SYSTEM_H_INCLUDED +#define CRI_FILE_SYSTEM_H_INCLUDED + +/*************************************************************************** + * Include files + ***************************************************************************/ +#include "cri_xpt.h" +#include "cri_error.h" + +#ifdef __cplusplus +#if defined(XPT_TGT_TBCG) +#if !defined(XPT_DISABLE_FSV1API) + /* Old version API */ + #include "cri_file_system_ver1api.h" +#endif +#endif +#endif + +/*************************************************************************** + * Macro Constants + ***************************************************************************/ +/* Version Number */ +#define CRI_FS_VERSION (0x02780700) +#define CRI_FS_VER_NUM "2.78.07" +#define CRI_FS_VER_NAME "CRI File System" + +/*EN + * \brief Configuration defaults + */ +#if defined(XPT_TGT_NITRO) +#define CRIFS_CONFIG_DEFAULT_THREAD_MODEL CRIFS_THREAD_MODEL_MULTI +#define CRIFS_CONFIG_DEFAULT_NUM_BINDERS (8) +#define CRIFS_CONFIG_DEFAULT_NUM_LOADERS (32) +#define CRIFS_CONFIG_DEFAULT_NUM_GROUP_LOADERS (2) +#define CRIFS_CONFIG_DEFAULT_NUM_STDIO_HANDLES (4) +#define CRIFS_CONFIG_DEFAULT_NUM_INSTALLERS (0) +#define CRIFS_CONFIG_DEFAULT_MAX_BINDS (8) +#define CRIFS_CONFIG_DEFAULT_MAX_FILES (32) +#define CRIFS_CONFIG_DEFAULT_MAX_PATH (128) +#elif defined(XPT_TGT_3DS) +#define CRIFS_CONFIG_DEFAULT_THREAD_MODEL CRIFS_THREAD_MODEL_MULTI +#define CRIFS_CONFIG_DEFAULT_NUM_BINDERS (8) +#define CRIFS_CONFIG_DEFAULT_NUM_LOADERS (32) +#define CRIFS_CONFIG_DEFAULT_NUM_GROUP_LOADERS (2) +#define CRIFS_CONFIG_DEFAULT_NUM_STDIO_HANDLES (4) +#define CRIFS_CONFIG_DEFAULT_NUM_INSTALLERS (0) +#define CRIFS_CONFIG_DEFAULT_MAX_BINDS (8) +#define CRIFS_CONFIG_DEFAULT_MAX_FILES (32) +#define CRIFS_CONFIG_DEFAULT_MAX_PATH (256) +#elif defined(XPT_TGT_TBCG) +#define CRIFS_CONFIG_DEFAULT_THREAD_MODEL CRIFS_THREAD_MODEL_MULTI +#define CRIFS_CONFIG_DEFAULT_NUM_BINDERS (8) +#define CRIFS_CONFIG_DEFAULT_NUM_LOADERS (32) +#define CRIFS_CONFIG_DEFAULT_NUM_GROUP_LOADERS (16) +#define CRIFS_CONFIG_DEFAULT_NUM_STDIO_HANDLES (1) +#define CRIFS_CONFIG_DEFAULT_NUM_INSTALLERS (0) +#define CRIFS_CONFIG_DEFAULT_MAX_BINDS (16) +#define CRIFS_CONFIG_DEFAULT_MAX_FILES (32) +#define CRIFS_CONFIG_DEFAULT_MAX_PATH (256) +#elif defined(XPT_TGT_EMSCRIPTEN) +#define CRIFS_CONFIG_DEFAULT_THREAD_MODEL CRIFS_THREAD_MODEL_SINGLE +#define CRIFS_CONFIG_DEFAULT_NUM_BINDERS (8) +#define CRIFS_CONFIG_DEFAULT_NUM_LOADERS (32) +#define CRIFS_CONFIG_DEFAULT_NUM_GROUP_LOADERS (16) +#define CRIFS_CONFIG_DEFAULT_NUM_STDIO_HANDLES (1) +#define CRIFS_CONFIG_DEFAULT_NUM_INSTALLERS (0) +#define CRIFS_CONFIG_DEFAULT_MAX_BINDS (16) +#define CRIFS_CONFIG_DEFAULT_MAX_FILES (32) +#define CRIFS_CONFIG_DEFAULT_MAX_PATH (256) +#elif defined(CRI_USE_FILESYSTEM_PLATFORM_HEADER) +#include "cri_file_system_platform.h" +#else +#define CRIFS_CONFIG_DEFAULT_THREAD_MODEL CRIFS_THREAD_MODEL_MULTI +#define CRIFS_CONFIG_DEFAULT_NUM_BINDERS (16) +#define CRIFS_CONFIG_DEFAULT_NUM_LOADERS (16) +#define CRIFS_CONFIG_DEFAULT_NUM_GROUP_LOADERS (2) +#define CRIFS_CONFIG_DEFAULT_NUM_STDIO_HANDLES (16) +#define CRIFS_CONFIG_DEFAULT_NUM_INSTALLERS (0) +#define CRIFS_CONFIG_DEFAULT_MAX_BINDS (16) +#define CRIFS_CONFIG_DEFAULT_MAX_FILES (16) +#define CRIFS_CONFIG_DEFAULT_MAX_PATH (256) +#endif + +/*EN + * \brief Default device ID + */ +#define CRIFS_DEVICE_DEFAULT (CRIFS_DEVICE_00) +/*EN + * \brief Memory file system device ID + */ +#define CRIFS_DEVICE_MEMORY (CRIFS_DEVICE_07) + +/*EN + * \brief Old definition of default device ID + * \par Note: + * This definition is deprecated. Use ::CRIFS_DEVICE_DEFAULT instead. + * \sa CRIFS_DEVICE_DEFAULT + */ +#define CRIFS_DEFAULT_DEVICE (CRIFS_DEVICE_DEFAULT) + +/*EN + * \brief Maximum length of the memory file path + * \ingroup FSLIB_CRIFS + * \par Description: + * Maximum length of the memory file path. This includes the number of NULL characters.
+ * The length of the memory file path does not exceed this value. br> + * \attention + * This value may be larger in the future. br> + * \sa criFs_AddressToPath + */ +#define CRIFS_MAX_MEMORY_FILE_PATH (44) + +/*EN + * \brief Invalid bind ID + * \ingroup FSLIB_BINDER + * \par Description: + * This is the ID to be given to an unused binder. The value may be returned when binding fails.
+ * \sa CriFsBindId, criFsBinder_BindCpk, criFsBinder_BindFile, criFsBinder_BindFiles, criFsBinder_BindDirectory + */ +#define CRIFSBINDER_BID_NULL (0) + +/*EN + * \brief Start number of valid bind ID + * \ingroup FSLIB_BINDER + * \par Description: + * This is the start number of a valid bind ID.
+ * IDs returned in the bind functions are valid if they are larger than this ID. br> + * \sa CriFsBindId, criFsBinder_BindCpk, criFsBinder_BindFile, criFsBinder_BindFiles, criFsBinder_BindDirectory + */ +#define CRIFSBINDER_BID_START (1) + +/*************************************************************************** + * Macro functions +***************************************************************************/ +/*EN + * \brief Register user's allocator + * \ingroup FSLIB_CRIFS + * \param[in] p_malloc_func Memory allocation function + * \param[in] p_free_func Memory release function + * \param[in] p_obj User-specified object + * \par Description: + * This function registers the memory allocator (memory allocation/release function) in the CRI File System library.
+ * Use these functions to replace the memory release processing that the CRI File System library performs in the library + * with user's own memory release processing. + */ +#define criFs_SetUserAllocator(p_malloc_func, p_free_func, p_obj) \ +{\ + criFs_SetUserMallocFunction(p_malloc_func, p_obj);\ + criFs_SetUserFreeFunction(p_free_func, p_obj);\ +} + +/*************************************************************************** + * Data Type Declarations + ***************************************************************************/ +/*========================================================================== + * CRI File System API + *=========================================================================*/ +/*EN + * \brief Thread model + * \par Description: + * This function shows the thread model in which the CRI File System library operates.
+ * Specify this in the ::CriFsConfig structure when initializing the library (::criFs_InitializeLibrary function). + * \sa CriFsConfig + * \sa criFs_InitializeLibrary + */ +typedef enum CriFsThreadModelTag { + /*EN + * \brief Multithread + * \par Description: + * The library creates threads inside and operates in multithread environment.
+ * A thread is created when the ::criFs_InitializeLibrary function is called. + */ + /*EN Multithread */ + CRIFS_THREAD_MODEL_MULTI = 0, + + /*EN + * \brief Multithread (user-driven) + * \par Description: + * The library creates threads inside and operates in multithread environment.
+ * A thread is created when the ::criFs_InitializeLibrary function is called.
+ * The server processing is executed on the created thread; + * however, unlike CRIFS_THREAD_MODEL_MULTI, the processing is not automatically executed.
+ * The user must explicitly execute the processing on the server using the ::criFs_ExecuteMain function.
+ *(Executing the ::criFs_ExecuteMain function starts the thread to execute the processing on the server.)
+ */ + CRIFS_THREAD_MODEL_MULTI_USER_DRIVEN = 3, + + /*EN + * \brief User multithread + * \par Description: + * No thread is created but exclusion control is performed inside the library for the server processing functions (::criFs_ExecuteFileAccess, ::criFs_ExecuteDataDecompression) to be able to be called from a user-created thread. + */ + /*EN User multithread */ + CRIFS_THREAD_MODEL_USER_MULTI = 1, + + /*EN + * \brief Single thread + * \par Description: + * No thread is created inside the library. Exclusion control is not performed inside the library either.
+ * When selecting this model, call the APIs and server processing functions (::criFs_ExecuteFileAccess, ::criFs_ExecuteDataDecompression) from the same thread. + */ + /*EN Single thread */ + CRIFS_THREAD_MODEL_SINGLE = 2, + + /* enum be 4bytes */ + CRIFS_THREAD_MODEL_ENUM_BE_SINT32 = 0x7FFFFFFF +} CriFsThreadModel; + +/*EN + * \brief Configuration + * \par Description: + This is a structure to specify the specifications of the CRI File System library.
+ * When initializing the library (::criFs_InitializeLibrary function), specify this structure as an argument.
+ * \par + * The CRI File System library allocates the necessary number of internal sources according to the configuration specified at the time of initialization.
+ * The smaller a value you specify in the configuration, the smaller the memory size the library requires.
+ * Note that because the number of handles cannot be more than the number specified in the configuration, if a value specified is too small, allocation of handles may fail.
+ * \par Note: + * When using the default settings, set the default parameter using the ::criFs_SetDefaultConfig function, and specify it in the ::criFs_InitializeLibrary function.
+ * \attention + * In consideration of future increases in the number of members, initialize the parameter using the :criFs_SetDefaultConfig function before making setting.
+ * \sa criFs_InitializeLibrary, criFs_SetDefaultConfig + */ +typedef struct CriFsConfigTag { + /*EN + \brief Thread model + \par Description: + Specify the thread model of CRI File System.
+ \sa CriFsThreadModel + */ + CriFsThreadModel thread_model; + + /*EN + \brief Number of CriFsBinder binders to be used + \par Description: + Specify the number of binders (CriFsBinder) you want to use in the application.
+ When creating a binder using the ::criFsBinder_Create function in the application, + you must specify the number of binders to use in this parameter.
+
+ Specify the "maximum number of binders to use simultaneously" for num_binders.
+ For example, in the case where the ::criFsBinder_Create and ::criFsBinder_Destroy functions are executed alternately and continuously, + the maximum simultaneous number of binder to be used is one; this lets you specify 1 for um_binders regardless how many times the functions are called.
+ On the other hand, for a case where 10 binders are used, even if no binder is used in other situations, + you must specify 10 for num_binders.
+ \par Note: + At the time of initialization, the CRI File System library makes a request for memory allocation for the number of binders to be used.
+ This reduces the memory size required by the library by setting num_binders to the minimum necessary value.
+ \sa criFsBinder_Create, criFsBinder_Destroy + */ + CriSint32 num_binders; + + /*EN + \brief Number of CriFsLoader loaders to use + \par Description: + Specify the number of loaders (CriFsLoader) you want to use in the application.
+ When creating a loader using the ::criFsLoader_Create function in the application, + you must specify the number of loaders to use in this parameter.
+
+ Specify the "maximum number of loaders to use simultaneously" for num_loaders.
+ For example, in the case where the ::criFsLoader_Create and ::criFsLoader_Destroy functions are executed alternately and continuously, + the maximum simultaneous number of loader to be used is one; this lets you specify 1 for um_loaders regardless how many times the functions are called.
+ On the other hand, for a case where 10 loaders are used, even if no loader is used in other situations, + you must specify 10 for num_loaders.
+ \par Note: + At the time of initialization, the CRI File System library makes a request for memory allocation for the number of loaders to be used.
+ This reduces the memory size required by the library by setting num_loaders to the minimum necessary value.
+ \sa criFsLoader_Create, criFsLoader_Destroy + */ + CriSint32 num_loaders; + + /*EN + \brief Number of CriFsGroupLoader loaders to be used + \par Description: + Specify the number of group loaders (CriFsGroupLoader) you want to use in the application.
+ When creating a group loader using the ::criFsGroupLoader_Create function in the application, + you must specify the number of group loaders to use in this parameter.
+
+ Specify the "maximum number of group loaders to use simultaneously" for num_group_loaders.
+ For example, in the case where the ::criFsGoupLoader_Create and ::criFsGroupLoader_Destroy functions are executed alternately and continuously, + the maximum simultaneous number of group loaders to be used is one; this lets you specify 1 for num_group_loaders regardless how many times the functions are called.
+ On the other hand, for a case where 10 group loaders are used, even if no group loader is used in other situations, + you must specify 10 for num_group_loaders.
+ \par Note: + At the time of initialization, the CRI File System library makes a request for memory allocation for the number of group loaders to be used.
+ This reduces the memory size required by the library by setting num_group_loaders to the minimum necessary value.
+ \sa criFsGroupLoader_Create, criFsGroupLoader_Destroy + */ + CriSint32 num_group_loaders; + + /*EN + \brief Number of CriFsStdio handles to use + \par Description: + This function specifies the number of CriFsStdio handles you want to use in the application.
+ When creating a CriFsStdio handle using the ::criFsStdio_OpenFile function in the application, + you must specify the number of CriFsStdio handles to use in this parameter.
+
+ Specify the "maximum number of CriFsStdio handles to use simultaneously" for num_stdio_handles.
+ For example, in the case where the :criFsStdio_OpenFile and ::criFsStdio_CloseFile functions are executed alternately and continuously, + the maximum simultaneous number of CriFsStdio handles to be used is one; this lets you specify 1 for num_stdio_handles regardless how many times the functions are called.
+ On the other hand, for a case where 10 CriFsStdio handles are used, even if no CriFsStdio handle is used in other situations, + you must specify 10 for num_stdio_handles.
+ \par Note: + At the time of initialization, the CRI File System library makes a request for memory allocation for the number of CriFsStdio handles to be used.
+ This reduces the memory size required by the library by setting num_stdio_handles to the minimum necessary value.
+ \attention + When using the ADX library together with the CRI Vibe library or other libraries using the bridge library, + The ADXT or criSsPly handle internally creates the CriFsStdio handle.
+ Therefore, to use the bridge library, + specify for num_stdio_handles the number of the CriFsStdio handles plus the number of ADXT or criSsPly handles when initializing the CRI File System library.
+ \sa criFsStdio_OpenFile, criFsStdio_CloseFile + */ + CriSint32 num_stdio_handles; + + /*EN + \brief Number of CriFsInstaller installers to use + \par Description: + Specify the number of installers (CriFsInstaller) you want to use in the application.
+ When creating a CriFsInstaller installer using the ::criFsInstaller_Create function in the application, + you must specify the number of the installers to use in this parameter.
+
+ Specify the "maximum number of installers to use simultaneously" for num_installers.
+ For example, in the case where the ::criFsInstaller_Create and ::criFsInstaller_Destroy functions are executed alternately and continuously, + the maximum simultaneous number of the installers to be used is one; this lets you specify 1 for num_installers regardless how many times the functions are called.
+ On the other hand, for a case where 10 of the installers are used, even if this installer is not used in other situations, + you must specify 10 for num_installers.
+ \par Note: + At the time of initialization, the CRI File System library makes a request for memory allocation for the number of the installers to be used.
+ This reduces the memory size required by the library by setting num_installers to the minimum necessary value.
+ \attention + When the ::criFs_SetDefaultConfig macro is used to initialize the configuration, the num_installers is set to 0.
+ Therefore, to use the installer, you must explicitly specify a value for num_installers in the application.
+ \sa criFsInstaller_Create, criFsInstaller_Destroy + */ + CriSint32 num_installers; + + /*EN + \brief Maximum simultaneous number of bind processes + \par Description: + Perform the bind processing in the application and specify the number of bind IDs (CriFsBindId) to retain.
+ When performing bind processing using the ::criBinder_BindCpk function in the application, + you must specify the number of bind IDs to use in this parameter.
+
+ Specify the "maximum number of bind IDs to use simultaneously" for max_binds.
+ For example, in the case where the ::criFsBinder_BindCpk and ::criFsBinder_Unbind functions are executed alternately and continuously, + the maximum simultaneous number of bind IDs to be used is one; this lets you specify 1 for max_binds regardless how many times the functions are called.
+ On the other hand, for a case where 10 bind IDs are used, even if no bind is used in other situations, + you must specify 10 for max_binds.
+ \par Note: + At the time of initialization, the CRI File System library makes a request for memory allocation for the number of bind IDs to be used.
+ This reduces the memory size required by the library by setting max_binds to the minimum necessary value.
+ \sa criFsBinder_BindCpk, criFsBinder_BindFile, criFsBinder_BindFiles, criFsBinder_BindDirectory, criFsBinder_Unbind + */ + CriSint32 max_binds; + + /*EN + \brief Maximum simultaneous number of files to open + \par Description: + Specify the number of files you want to open in the application.
+ When opening a file using the ::criFsStdio_OpenFile or other functions in the application, + you must specify the number of files to open in this parameter.
+
+ Specify the "maximum number of files to open simultaneously" for max_files.
+ For example, in the case where the :criFsStdio_OpenFile and ::criFsStdio_CloseFile functions are executed alternately and continuously, + the maximum simultaneous number files to be opened is one; this lets you specify 1 for max_files regardless how many times the functions are called.
+ On the other hand, for a case where 10 files are opened, even if only one file is opened in other situations, + you must specify 10 for max_files.
+ \par Additional information: + The CRI File System library opens a file when executing the following functions.
+ \table "Cases where a file is opened" align=center border=1 cellspacing=0 cellpadding=4 + {Function |Notes } + [criFsBinder_BindCpk |One file is opened.
Until the criFsBinder_Unbind function is executed, the file is kept open. ] + [criFsBinder_BindFile |One file is opened.
Until the criFsBinder_Unbind function is executed, the file is kept open. ] + [criFsBinder_BindFiles |Files for the number included in the list are opened.
Until the criFsBinder_Unbind function is executed, the files are kept open. ] + [criFsLoader_Load |One file is opened.
Until the load is completed, the file is kept open.
With a binder specified, no file is opened (Because the binder has already opened a file). ] + [criFsStdio_OpenFile |One file is opened.
Until the criFsStdio_CloseFile function is executed, the file is kept open.
With a binder specified, no file is opened (Because the binder has already opened a file). ] + [criFsInstaller_Copy |Two files are opened.
Until the file copy is completed, the files are kept open.
With a binder specified, one file will be opened (Because the binder has already opened the other file). ] + \endtable + \attention + When using the ADX library together with the CRI Vibe library or other libraries using the bridge library, + The ADXT or criSsPly handle internally creates the CriFsStdio handle.
+ Therefore, to use the bridge library, specify for max_files the number of the CriFsStdio handles plus the number of ADXT or criSsPly handles + when initializing the CRI File System library.
+ */ + CriSint32 max_files; + + /*EN + \brief Maximum length of the path (in bytes) + \par Description: + Specify the maximum length of the file path you want to specify in the application.
+ When accessing a file using the ::criFsLoader_Load or other functions in the application, + you must specify in this parameter the maximum length of a path string you want to use in the application.
+
+ Specify the "maximum length of a path string to use" for max_path.
+ For a case where a 256-byte file path is used, you must specify 256 for max_path + even if only a 32-byte file path is used in other cases.
+ \par Note: + For the maximum length of a path, you must specify a value that includes the number of NULL characters located at the end.
+ (The value of "the number of characters + 1 byte" must be specified.)
+ \attention + Note that when a user can install an application in a desired location such as a PC, the assumed maximum size must be specified in the max_path.
+ */ + CriSint32 max_path; + + /*EN + \brief Library version number + \par Description: + This is the version number of the CRI File System library.
+ The version number defined in this header is set by the ::criFs_SetDefaultConfig function.
+ \attention + Do not change this value in the application.
+ */ + CriUint32 version; + + /*EN + \brief Whether to perform CRC check of CPK file + \par Description: + This flag is used to switch whether to perform data integrity check using CRC information in the CPK file.
+ When this flag is set to CRI_TRUE, CRC check is performed at the following timing. + - CRC check of TOC information at CPK bind + - CRC check in content file unit when loading content file + An error will occur if the CRC information attached to the CPK does not match the CRC of the actually read data. + */ + CriBool enable_crc_check; +} CriFsConfig; + +/*EN + * \brief How to retry when a file open error occurs + */ +typedef enum CriFsOpenRetryModeTag { + CRIFS_OPEN_RETRY_NONE = 0, /*EN< No retry */ + CRIFS_OPEN_RETRY_INFINITE = -1, /*EN< Retry infinitely */ + /* enum be 4bytes */ + CRIFS_OPEN_RETRY_ENUM_BE_SINT32 = 0x7FFFFFFF +} CriFsOpenRetryMode; + +/*EN + * \brief How to retry when a file read error occurs + */ +typedef enum CriFsReadRetryModeTag { + CRIFS_READ_RETRY_NONE = 0, /*EN< No retry */ + CRIFS_READ_RETRY_INFINITE = -1, /*EN< Retry infinitely */ + /* enum be 4bytes */ + CRIFS_READ_RETRY_ENUM_BE_SINT32 = 0x7FFFFFFF +} CriFsReadRetryMode; + +/*EN + * \brief Set the default path delimiter + */ +typedef enum CriFsDefaultPathSeparatorTag { + CRIFS_DEFAULT_PATH_SEPARATOR_PLATFORM_COMPATIBLE = 0, /*EN< Convert to the platform standard path delimiter */ + CRIFS_DEFAULT_PATH_SEPARATOR_NONE = 1, /*EN< Use the current path delimiter without conversion */ + CRIFS_DEFAULT_PATH_SEPARATOR_ENUM_BE_SINT32 = 0x7FFFFFFF +} CriFsDefaultPathSeparator; + +/*EN + * \brief Set file I/O mode + */ +typedef enum CriFsFileIoModeTag { + CRIFS_FILE_IO_MODE_DEFAULT = 0, /*EN< Default I/O mode for the model */ + CRIFS_FILE_IO_MODE_SHARE_FILE_HANDLE = 1, /*EN< Share the file handle */ + CRIFS_FILE_IO_MODE_OPEN_EVERY_TIME = 2, /*EN< Open the file for each file access */ + /* enum is 4 bytes */ + CRIFS_FILE_IO_MODE_ENUM_BE_SINT32 = 0x7FFFFFFF +} CriFsFileIoMode; + +/*EN + * \brief Memory allocation function + * \ingroup FSLIB_CRIFS + * \param[in] obj User-specified object + * \param[in] size Requested memory size (In byte) + * \return void* Address of allocated memory (If failed, NULL) + * \par Description: + * Interface for registering the memory allocation function
+ * Use this function to replace the memory allocation processing that the CRI File System library performs in the library + * with user's own memory allocation processing.
+ * \par Note: + * When the callback function is executed, the size of memory required for "size" + * is set.
+ * Allocate the memory for the size in the callback function and return the address of the allocated memory + * as the return value.
+ * Note that the user-specified object registered in the ::criFs_SetUserMallocFunction function + * is passed to the "obj" argument.
+ * If you need to refer to the memory manager or other programs when allocating memory, + * first set this object for the argument of the ::criFs_SetUserMallocFunction function, + * and refer to the program through the argument of this callback function.
+ * \attention + * Note that if memory allocation fails, an error callback may be returned + * or the caller function may fail. + * \sa CriFsFreeFunc, criFs_SetUserMallocFunction + */ +typedef void *(CRIAPI *CriFsMallocFunc)(void *obj, CriUint32 size); + +/*EN + * \brief Memory release function + * \ingroup FSLIB_CRIFS + * \param[in] obj User-specified object + * \param[in] mem Memory address to release + * \return Note + * \par Description: + * Interface for registering the memory release function
+ * Use these functions to replace the memory release processing that the CRI File System library performs in the library + * with user's own memory release processing.
+ * \par Note: + * When the callback function is executed, the "mem" has already been set to + * the address of the memory to release.
+ * Release the memory in the mem area within the callback function. + * Note that the user-specified object registered using the ::criFs_SetUserFreeFunction function + * is passed to the "obj" argument.
+ * If you need to refer to the memory manager or other programs when allocating memory, + * first set this object for the argument of the ::criFs_SetUserFreeFunction function, + * and refer to the program through the argument of this callback function.
+ * \sa criFsMallocFunc, criFs_SetUserFreeFunction + */ +typedef void (CRIAPI *CriFsFreeFunc)(void *obj, void *mem); + +/*EN + * \brief CPK content file ID + * \ingroup FSLIB_CRIFS + * \par Description: + * The CPK content file ID is used to identify the individual content files stored in a CPK file.
+ * For a CPK file having both a file name and ID, a 32-bit ID can be used. + * For a CPK file without a file name, a 16-bit ID can be used. + * In either case, a positive value can be used as a valid ID. + */ +typedef CriSint32 CriFsFileId; + +/*========================================================================== + * CriFsIo API + *=========================================================================*/ +/*EN + * \brief Device ID + */ +typedef enum CriFsDeviceIdTag { + CRIFS_DEVICE_00 = 0, /*EN< Default device */ + CRIFS_DEVICE_01, + CRIFS_DEVICE_02, + CRIFS_DEVICE_03, + CRIFS_DEVICE_04, + CRIFS_DEVICE_05, + CRIFS_DEVICE_06, + CRIFS_DEVICE_07, /*EN< Memory */ + CRIFS_DEVICE_MAX, + + CRIFS_DEVICE_INVALID = -1, /*EN< Invalid */ + + /* enum be 4bytes */ + CRIFS_DEVICE_ENUM_BE_SINT32 = 0x7fffffff +} CriFsDeviceId; + +/*EN + * \brief Device information + */ +typedef struct CriFsDeviceInfoTag { + CriBool can_read; /*EN< Whether the device can be read */ + CriBool can_write; /*EN< Whether the device can be written */ + CriBool can_seek; /*EN< Whether the device can be sought */ + CriSint32 minimum_read_size; /*EN< Minimum read size */ + CriSint32 minimum_write_size; /*EN< Minimum write size */ + CriSint32 minimum_seek_size; /*EN< Minimum seek size */ + CriSint32 read_buffer_alignment; /*EN< Alignment required for the buffer from which data is read */ + CriSint32 write_buffer_alignment; /*EN< Alignment required for the buffer to which data is written */ +} CriFsDeviceInfo; + +/*EN + * \brief File open mode + */ +typedef enum { + CRIFS_FILE_MODE_APPEND = 0, /*EN< Appends to an existing file */ + CRIFS_FILE_MODE_CREATE = 1, /*EN< Creates a new file always (Or overwrites the existing file) */ + CRIFS_FILE_MODE_CREATE_NEW = 2, /*EN< Creates a new file (Can not overwrite) */ + CRIFS_FILE_MODE_OPEN = 3, /*EN< Opens an existing file */ + CRIFS_FILE_MODE_OPEN_OR_CREATE = 4, /*EN< Opens a file if available (Or create a new file) */ + CRIFS_FILE_MODE_TRUNCATE = 5, /*EN< Opens an existing file and truncates it to zero bytes */ + + /* Special case*/ + CRIFS_FILE_MODE_OPEN_WITHOUT_DECRYPTING = 10, /*EN< Opens a file (Without decrypting) */ + + /* enum be 4bytes */ + CRIFS_FILE_MODE_ENUM_BE_SINT32 = 0x7FFFFFFF +} CriFsFileMode; + +/*EN + * \brief Kind of File Access + */ +typedef enum { + CRIFS_FILE_ACCESS_READ = 0, /*EN< Read Only */ + CRIFS_FILE_ACCESS_WRITE = 1, /*EN< Write Only */ + CRIFS_FILE_ACCESS_READ_WRITE = 2, /*EN< Read and Write */ + + /* enum be 4bytes */ + CRIFS_FILE_ACCESS_ENUM_BE_SINT32 = 0x7FFFFFFF +} CriFsFileAccess; + +/*EN + * \brief Error code of I/O interface + */ +typedef enum { + CRIFS_IO_ERROR_OK = 0, /*EN< No error */ + CRIFS_IO_ERROR_NG = -1, /*EN< General error */ + CRIFS_IO_ERROR_TRY_AGAIN = -2, /*EN< Must retry */ + + /* Special cases */ + CRIFS_IO_ERROR_NG_NO_ENTRY = -11, /*EN< Individual error (Without file) */ + CRIFS_IO_ERROR_NG_INVALID_DATA = -12, /*EN< Individual error (Invalid data) */ + + /* enum be 4bytes */ + CRIFS_IO_ERROR_ENUM_BE_SINT32 = 0x7FFFFFFF +} CriFsIoError; + +/*EN + * \brief File handle + */ +typedef void *CriFsFileHn; + +/*EN + * \brief I/O interface + */ +typedef struct CriFsIoInterfaceTag { + /*EN + * \brief Check for a file + * \param[in] path Path of the file + * \param[out] result Whether the file exists + * \return CriFsIoError Error code + * \par Description: + * This function checks for the specified file.
+ * The "result" must be set to CRI_TRUE if the file exists, + * and to CRI_FALSE if not. br> + */ + CriFsIoError (CRIAPI *Exists)(const CriChar8 *path, CriBool *result); + + /*EN + * \brief Delete a file + * \param[in] path Path of the file + * \return CriFsIoError Error code + * \par Description: + * This function deletes the specified file.
+ * \par Note: + * If the file is not written with the device, you can specify CRI_NULL as the member of the structure + * instead of implementing this function.
+ */ + CriFsIoError (CRIAPI *Remove)(const CriChar8 *path); + + /*EN + * \brief Change a file name + * \param[in] path Path of a file before rename + * \param[in] path Path of a file after rename + * \return CriFsIoError Error code + * \par Description: + * This function changes a file name.
+ * Rename the file specified for the old_path to the file specified for new_path.
+ * \par Note: + * If the file is not written with the device, you can specify CRI_NULL as the member of the structure + * instead of implementing this function.
+ */ + CriFsIoError (CRIAPI *Rename)(const CriChar8 *old_path, const CriChar8 *new_path); + + /*EN + * \brief Open a file + * \param[in] path Path of the file + * \param[in] mode File open mode + * \param[in] access Type of file access + * \param[out] filehn File handle + * \return CriFsIoError Error code + * \par Description: + * This function opens the specified file.
+ * When the file has been successfully opened, the file handle in the CriFsFileHn type must be returned.
+ * \par Supplemental information: + * CriFsFileHn is defined as the void pointer.
+ * Define your own file information structure, and return its address by casting it to the CriFsFileHn type.
+ * If memory must be allocated when the file is opened, dynamically allocate memory within this function.
+ * \attention + * Only when an error occurs within the function and the operation cannot continue due to the error, + * set the error code for the return value (CriFsIoError) to CRIFS_IO_ERROR_NG.
+ * (Even if the file failed to open, when the operation can continue with the application, + * you must set filehn to NULL and return CRIFS_IO_ERROR_OK.)
+ * When the function is executed, if open processing cannot be executed when the function is executed while + * waiting for a disk to be inserted and returns CRIFS_IO_ERROR_TRY_AGAIN as an error code, + * you can reopen the file after a certain period of time (about after 10 ms).
+ * (The function can be executed later.) + */ + CriFsIoError (CRIAPI *Open)( + const CriChar8 *path, CriFsFileMode mode, CriFsFileAccess access, CriFsFileHn *filehn); + + /*EN + * \brief Close a file + * \param[in] filehn File handle + * \return CriFsIoError Error code + * \par Description: + * This function closes the specified file handle.
+ * If memory was dynamically allocated when the file was opened, release the memory when closing the file.
+ */ + CriFsIoError (CRIAPI *Close)(CriFsFileHn filehn); + + /*EN + * \brief Get file size + * \param[in] filehn File handle + * \param[out] file_size File size + * \return CriFsIoError Error code + * \par Description: + * This function retrieves the file size from the specified file handle.
+ * \attention + * This function may be executed directly from the main thread.
+ * Because of this, you must avoid blocking the processing for a long time in this function.
+ * If it takes time to acquire the file size from the file handle, + * implement the function so that the file size is acquired in advance when the file is opened (the size retained in the file handle), + * and the acquired value is returned when this function is executed.
+ */ + CriFsIoError (CRIAPI *GetFileSize)(CriFsFileHn filehn, CriSint64 *file_size); + + /*EN + * \brief Start to read + * \param[in] filehn File handle + * \param[in] offset Start position of read + * \param[in] read_size Read size + * \param[in] buffer Read buffer + * \param[in] buffer_size Buffer size + * \return CriFsIoError Error code + * \par Description: + * This function starts reading data.
+ * From the position specified for offset, read into the buffer + * the data for the size specified for read_size.
+ * For the interface of the function, implementation by asynchronous I/O processing is assumed to be used. + * However, when using a thread (when specifying CRIFS_THREAD_MODEL_MULTI for the thread model), + * you can implement this function using synchronous I/O processing.
+ * (There will be no problem in waiting for the file read to be completed in the function.)
+ * \attention + * The size actually read must be returned by the GetReadSize function.
+ * Even if this function is implemented using the synchronous I/O processing, the read size must be kept in the file handle + * in the file handle until the GetWriteSize function is executed.
+ */ + CriFsIoError (CRIAPI *Read)(CriFsFileHn filehn, CriSint64 offset, CriSint64 read_size, void *buffer, CriSint64 buffer_size); + + /*EN + * \brief Check completion of read + * \param[in] filehn File handle + * \param[out] result Whether the file read is complete + * \return CriFsIoError Error code + * \par Description: + * This is the function to check whether the file read is complete.
+ * When the file read is complete, the "result" must be set to CRI_TRUE, + * and when the file is being read, to CRI_FALSE.
+ * \attention + * When the read processing is completed (when the access to the device is finished), + * the "result" must be set to CRI_TRUE regardless of whether the write processing is successful or not.
+ * Even if a read error occurs, set the "result" to CRI_TRUE, and + * return CRIFS_IO_ERROR_OK as the return value of the function.
+ * (The GetReadSize function is used to determine whether the read processing is successful.)
+ *As long as CRI_FALSE is returned to the "result,h the CRI File System library + * does not proceed with the other read requests at all.
+ * (When a read error occurs, if the "result" remains set to CRI_FALSE, + * the file may not be able to be loaded or the processing + * may not return from the Destroy function of the handle.
+ */ + CriFsIoError (CRIAPI *IsReadComplete)(CriFsFileHn filehn, CriBool *result); + + /*EN + * \brief Issue cancellation of the file read + * \param[in] filehn File handle + * \return CriFsIoError Error code + * \par Description: + *This function issues cancellation for the file read performed by the device, and then returns immediately. + * Return CRIFS_IO_ERROR_OK as the return value.
+ * Although a value other than CRIFS_IO_ERROR_OK is returned, + * the CRI File System operates in the same way as when CRIFS_IO_ERROR_OK is returned.
+ */ + CriFsIoError (CRIAPI *CancelRead)(CriFsFileHn filehn); + + /*EN + * \brief Get read size + * \param[in] filehn File handle + * \param[out] read_size Size of the read data + * \return CriFsIoError Error code + * \par Description: + * This is the function to return the size of the data that was actually read to the buffer by the read processing.
+ * Data for the size specified in the Read function cannot always be read at the end of the file or such other location.
+ * \attention + * When a read error occurs, set read_size to -1, and + * return CRIFS_IO_ERROR_OK as the return value of the function. + */ + CriFsIoError (CRIAPI *GetReadSize)(CriFsFileHn filehn, CriSint64 *read_size); + + /*EN + * \brief Start to write + * \param[in] filehn File handle + * \param[in] offset Start position of write + * \param[in] write_size Write size + * \param[in] buffer Write buffer + * \param[in] buffer_size Buffer size + * \return CriFsIoError Error code + * \par Description: + * This is the function to start writing data.
+ * From the position specified for offset, write data from the buffer + * for the size specified for write_size.
+ * For the interface of the function, implementation by asynchronous I/O processing is assumed to be used. + * However, when using a thread (when specifying CRIFS_THREAD_MODEL_MULTI for the thread model), + * you can implement this function using synchronous I/O processing.
+ * (There will be no problem in waiting for the file write to be completed in the function.)
+ * \attention + * The size actually written must be returned by the GetWriteSize function.
+ * Even if this function is implemented using the synchronous I/O processing, the size of the written data must be kept + * in the file handle until the GetWriteSize function is executed.
+ * \par Note: + * If the file is not written with the device, you can specify CRI_NULL as the member of the structure + * instead of implementing this function.
+ */ + CriFsIoError (CRIAPI *Write)(CriFsFileHn filehn, CriSint64 offset, CriSint64 write_size, void *buffer, CriSint64 buffer_size); + + /*EN + * \brief Check completion of write + * \param[in] filehn File handle + * \param[out] result Whether the file write is complete + * \return CriFsIoError Error code + * \par Description: + * This is the function to check whether the file write is complete.
+ * When the file write is complete, the "result" must be set to CRI_TRUE, + * and when the file is being written, to CRI_FALSE.
+ * \attention + * If a write error occurs, set the "result" to CRI_TRUE, and + * return CRIFS_IO_ERROR_OK as the return value of the function. + * \par Note: + * If the file is not written with the device, you can specify CRI_NULL as the member of the structure + * instead of implementing this function.
+ * \attention + * When the write processing is completed (when the access to the device is finished), + * the "result" must be set to CRI_TRUE regardless of whether the write processing is successful or not.
+ * Even if a write error occurs, set the "result" to CRI_TRUE, and + * return CRIFS_IO_ERROR_OK as the return value of the function.
+ * (The GetReadSize function is used to determine whether the write processing is successful.)
+ *As long as CRI_FALSE is returned to the "result,h the CRI File System library + * does not proceed with the other read requests at all.
+ * (When a write error occurs, if the "result" remains set to CRI_FALSE, + * the file may not be able to be loaded or the processing + * may not return from the Destroy function of the handle.
+ */ + CriFsIoError (CRIAPI *IsWriteComplete)(CriFsFileHn filehn, CriBool *result); + + /*EN + * \brief Issue cancellation of the file write + * \param[in] filehn File handle + * \return CriFsIoError Error code + * \par Description: + *This function issues cancellation for the file write performed by the device, and then returns immediately. + * Return CRIFS_IO_ERROR_OK as the return value.
+ * Although a value other than CRIFS_IO_ERROR_OK is returned, + * the CRI File System operates in the same way as when CRIFS_IO_ERROR_OK is returned.
+ */ + CriFsIoError (CRIAPI *CancelWrite)(CriFsFileHn filehn); + + /*EN + * \brief Get write size + * \param[in] filehn File handle + * \param[out] write_size Size of the written data + * \return CriFsIoError Error code + * \par Description: + * This function returns the size of the data that was actually written to the buffer by the write processing.
+ * \attention + * If a write error occurs, set the write_size to -1, and + * return CRIFS_IO_ERROR_OK as the return value of the function. + * \par Note: + * If the file is not written with the device, you can specify CRI_NULL as the member of the structure + * instead of implementing this function.
+ */ + CriFsIoError (CRIAPI *GetWriteSize)(CriFsFileHn filehn, CriSint64 *write_size); + + /*EN + * \brief Execute flash + * \param[in] filehn File handle + * \return CriFsIoError Error code + * \par Description: + * This function forcibly writes to a device + * the data buffered for being written.
+ * (The processing equivalent to the fflush function for the ANSI C standard API.)
+ * \par Note: + * If the file is not written with the device, you can specify CRI_NULL as the member of the structure + * instead of implementing this function.
+ */ + CriFsIoError (CRIAPI *Flush)(CriFsFileHn filehn); + + /*EN + * \brief Change file size + * \param[in] filehn File handle + * \param[out] size File size + * \return CriFsIoError Error code + * \par Description: + * This function changes the file size to the specified size.
+ * \par Supplemental information: + * Use this function to correct the file size when the data cannot be written in bytes to a device + * due to the limit of the DMA transfer size or other reasons.
+ * Therefore, for a device where data can be written in bytes, you can specify CRI_NULL for the member of the structure + * instead of implementing this function.
+ * \par Note: + * If the file is not written with the device, you can specify CRI_NULL as the member of the structure + * instead of implementing this function.
+ */ + CriFsIoError (CRIAPI *Resize)(CriFsFileHn filehn, CriSint64 size); + + /*EN + * \brief Get native file handle + * \param[in] filehn File handle + * \param[out] native_filehn Native file handle + * \return CriFsIoError Error code + * \par Description: + * This function retrieves the handle of a file to be used for a platform SDK.
+ * For example, if you open a file using the fopen function in the ANSI C standard, + * you must return the file pointer (FILE *) as native_filehn.
+ * \par Note: + * Currently, you do not have to implement this function for models other than PlayStation 3.
+ */ + CriFsIoError (CRIAPI *GetNativeFileHandle)(CriFsFileHn filehn, void **native_filehn); + + /*EN + * \brief Set the read progress addition callback + * \param[in] filehn File handle + * \param[in] callback Read progress addition callback + * \param[in] obj Internal object + * \par Description: + * This function sets the read progress addition callback for the progress acquired by ::criFsLoader_GetProgress + * to be updated more granularly than the unit size than the read unit size.
+ * When not implementing this function or not using the callback function passed by this function, + *the progress acquired by ::criFsLoader_GetProgress is updated basically in the read unit size.
+ * To implement this function, call the passed callback function within the Read function. + * Note that when calling the function, pass obj to the first argument, and the size of the data read to the memory to the second argument + * in bytes.
+ * For example, when reading data, in response to a read request, in the unit of 8192 bytes, + * call the function by passing 8192 to the second argument every time the reading data of 8192 bytes is completed.
+ * The progress that can be acquired by ::criFsLoader_GetProgress + * is updated by this call of the read progress addition callback. * By being updated more granularly than in the read unit size, + * the progress acquired by ::criFsLoader_GetProgress becomes more granular.
+ * \par Note: + * When the read progress cannot be acquired more granularly than the requested read unit size, + * there is no benefit to implementing this function. + * \sa ::criFsLoader_GetProgress + */ + CriFsIoError (CRIAPI *SetAddReadProgressCallback)(CriFsFileHn filehn, void(*callback)(void*, CriSint32), void* obj); +} CriFsIoInterface, *CriFsIoInterfacePtr; + +/*EN + * \brief I/O selection callback function + * \param[in] path Path of the file + * \param[out] device_id Device ID + * \param[out] ioif I/O interface + * \par Description: + * Use the I/O selection callback function to replace the I/O processing + * of the CRI File System library with the user's own I/O interface.
+ * Specifically, the user must implement the ::CriFsSelectIoCbFunc type function, + * and set the function in the ::criFs_SetSelectIoCallback function.
+ * The ::CriFsSelectIoCbFunc function must analyze the path of the input file (path of the argument), and + * return the ID of the device where the file exists (device_id of the argument) + * and the I/O interface (ioif of the argument) to access the device.
+ * \par Supplemental information: + * The I/O interface the library uses by default can be acquired by the ::criFs_GetDefaultIoInterface function.
+ * To process only a specific file using a unique interface, + * process all the other files using the I/O interface acquired by the ::criFs_GetDefaultIoInterface function.
+ * \code + * CriError + * \endcode + * \sa criFs_SetSelectIoCallback, criFs_GetDefaultIoInterface + */ +typedef CriError (CRIAPI *CriFsSelectIoCbFunc)( + const CriChar8 *path, CriFsDeviceId *device_id, CriFsIoInterfacePtr *ioif); + +/*========================================================================== + * CriFsBinder API + *=========================================================================*/ +struct CriFsBinderHnObjTag; +/*EN + * \brief CriFsBinder handle + * \ingroup FSLIB_BINDER + * \par Description: + * The binder is a database to handle files efficiently.
+ * - CriFsBinderHn (binder handle) and bind
+ * To use the binder, create a binder handle (CriFsBinderHn), and + * bind a CPK file/file/directory to the binder. + * This binding to the binder is called bind.
+ * When a binder is created, the binder handle (CriFsBinderHn) is acquired.
+ * - CriFsBindId (Bind ID)
+ * When the binder is bound, a bind ID is created. Use bind IDs to identify individual binds.
+ * - Bind and unbind of files
+ * You can bind any combination of CPK file, files and directories to the binder.
+ * Releasing the bound items is called unbind.
+ * - Number of available binds
+ * Specify the number of binds that can be created for num_binders (number of binds), + * and the maximum number of simultaneous binds for max_binds (maximum number of simultaneous binds).
+ * - Bind of a CPK file
+ * To access individual files (content files) stored in a CPK file, + * you must bind the CPK file.
+ * You can bind also the content files of the CPK file. When the original CPK file is unbound, + * the bound content files are also unbound (Implicit unbind).
+ * - Priority of the binder
+ * The binder searches for the bind ID with which the target file is associated.
+ * The order of searching for this bind ID is basically the order of binding the items; + * however, you can change the search order by operating the priority of the bind IDs.
+ * - Binder and API of CriFs
+ * CriFsLoader, CriFsGroupLoader, and CriFsBinder have an API having the binder as an argument. + * In that case, note that which one, CriFsBinderHn or CriFsBindId, should be specified. + */ +typedef struct CriFsBinderHnObjTag *CriFsBinderHn; + +/*EN + * \brief CriFsBinder ID + * \ingroup FSLIB_BINDER + * \par Description: + * When the binder is bound, CriFsBindId (bind ID) is created.
+ * The bind ID is used to identify individual binds, taking a 32-bit unsigned + * value.
+ * The variable of this type may take the special value, CRIFSBINDER_BID_NULL (zero), + * indicating that the bind ID is invalid.
+ */ +typedef CriUint32 CriFsBindId; + +/*EN + * \brief File information structure + * \ingroup FSLIB_BINDER + * \par Description: + * This is the output of the criFsBinder_Find(ById) function. + * This structure stores the information to access the found file.
+ * If this is a content file of the CPK file, the "path" indicates the CPK file name, and + * the "offset" indicates the offset position from the beginning of the CPK file.
+ * \sa criFsBinder_Find(), criFsBinder_FindById() + */ +typedef struct CriFsBinderFileInfoTag { + CriFsFileHn filehn; /*EN< File handle */ + CriChar8 *path; /*EN< Path name */ + CriSint64 offset; /*EN< Offset position from the beginning of the file */ + CriSint64 read_size; /*EN< Read size (Compressed file size) */ + CriSint64 extract_size; /*EN< Development size (Original file size; If uncompressed, the same value as read_size) */ + CriFsBindId binderid; /*EN< Bind ID (Indicate the bind from which bind the file is found) */ + CriUint32 reserved[1]; /*EN< Reserved area */ +} CriFsBinderFileInfo; + +/*EN + * \brief Content file information structure + * \ingroup FSLIB_BINDER + * \par Description: + * This is the output of the criFsBinder_GetContentsFileInfoById function.
+ * This structure stores the information to access the found content file of the CPK file.
+ * \sa criFsBinder_GetContentsFileInfoById() + */ +typedef struct CriFsBinderContentsFileInfoTag { + CriChar8 *directory; /*EN< Directory name */ + CriChar8 *filename; /*EN< File name */ + CriUint32 read_size; /*EN< Read size (file size) */ + CriUint32 extract_size; /*EN< Expansion size (If uncompressed, the same value as read_size) */ + CriUint64 offset; /*EN< Offset position from the beginning of the file */ + CriFsFileId id; /*EN< File ID */ + CriChar8 *ustr; /*EN< User string (unsupported) */ +} CriFsBinderContentsFileInfo; + +/*EN + * \brief Binder status + * \ingroup FSLIB_BINDER + * \par Description: + * This is the status of the bind ID acquired by the criFsBinder_GetStatus function.
+ * You cannot access the bound items until the bind is completed.
+ * If the bind target does not exist or the resource necessary for the bind is insufficient, + * the bind will fail.
+ * Get the details on the bind failure using the error callback function. + * \sa criFsBinder_GetStatus() + */ +typedef enum { + CRIFSBINDER_STATUS_NONE = 0, + CRIFSBINDER_STATUS_ANALYZE, /*EN< Binding */ + CRIFSBINDER_STATUS_COMPLETE, /*EN< Bound */ + CRIFSBINDER_STATUS_UNBIND, /*EN< Unbinding */ + CRIFSBINDER_STATUS_REMOVED, /*EN< Unbound */ + CRIFSBINDER_STATUS_INVALID, /*EN< Invalid bind */ + CRIFSBINDER_STATUS_ERROR, /*EN< Bind failed */ + + /* enum be 4bytes */ + CRIFSBINDER_STATUS_ENUM_BE_SINT32 = 0x7FFFFFFF +} CriFsBinderStatus; + +/*EN + * \brief Bind type + * \ingroup FSLIB_BINDER + * \par Description: + * This indicates what are bound.
+ */ +typedef enum { + CRIFSBINDER_KIND_NONE = 0, /*EN< None */ + CRIFSBINDER_KIND_DIRECTORY, /*EN< Directory bind */ + CRIFSBINDER_KIND_CPK, /*EN< CPK bind */ + CRIFSBINDER_KIND_FILE, /*EN< File bind */ + CRIFSBINDER_KIND_FILES, /*EN< Multiple files bind */ + CRIFSBINDER_KIND_FILE_SECTION, /*EN< File section bind */ + CRIFSBINDER_KIND_SYSTEM, /*EN< Related to binder system */ + + /* enum be 4bytes */ + CRIFSBINDER_KIND_ENUM_BE_SINT32 = 0x7FFFFFFF +} CriFsBinderKind; + +/*EN + * \brief Error type when the CPK bind is invalid + * \ingroup FSLIB_BINDER + * \par Description: + * This shows why the CPK bind is invalid.
+ */ +typedef enum { + CRIFS_BINDCPK_ERROR_NONE = 0, /*EN< No error */ + CRIFS_BINDCPK_ERROR_DATA, /*EN< Data inconsistency */ + CRIFS_BINDCPK_ERROR_CANNOT_READ, /*EN< Cannot read (No media or other reasons) */ + CRIFS_BINDCPK_ERROR_NONEXISTENT, /*EN< No (CPK) file exists (while a media exists) */ + /* enum be 4bytes */ + CRIFS_BINDCPK_ENUM_BE_SINT32 = 0x7FFFFFFF +} CriFsBindCpkError; + +/*EN + * \brief Binder information + * \ingroup FSLIB_BINDER + * \par Description: + * This is the output of the binder information getting API.
+ * \sa criFsBinder_GetBinderIdInfo() +*/ +typedef struct CriFsBinderInfoTag { + CriFsBinderKind kind; /*EN< Binder type */ + CriFsBinderStatus status; /*EN< Binder status */ + CriSint32 priority; /*EN< Priority setting */ + CriSint32 nfiles; /*EN< Number of files
+ Binder type
+ ::CRIFSBINDER_KIND_FILES: Number of bound files
+ ::CRIFSBINDER_KIND_CPK: Number of content files
+ Others: 0 + */ + const CriChar8 *path; /*EN< Path name passed when the Bind function was called */ + const CriChar8 *real_path; /*EN< Path name of the item actually bound */ + const CriChar8 *current_directory; /*EN< Current directory setting */ + CriFsBindId bndrid; /*EN< Bind ID referred to when other binder is referred to
+ When a content file of the CPK file is bound, + this item is set to the bind ID of the CPK. */ +} CriFsBinderInfo; + +/* Invalid value of ROM address */ +#define CRIFS_ROM_ADDRESS_INVALID 0xFFFFFFFFFFFFFFFF + +/*========================================================================== + * CriFsLoader API + *=========================================================================*/ +struct CriFsLoaderObjTag; +/*EN + * \brief CriFsLoader handle + */ +typedef struct CriFsLoaderObjTag *CriFsLoaderHn; + +/*EN + * \brief Load end callback function + */ +typedef void (CRIAPI *CriFsLoaderLoadEndCbFunc)(void *obj, CriFsLoaderHn loader); + +/*EN + * \brief Decryption callback function + * \sa criFsLoader_SetInplaceDecryptionCbFunc + */ +typedef CriError (*CriFsInplaceDecryptionCbFunc)( + void* user_data, CriUint8* data, CriUint64 data_size); + +/*EN + * \brief Loading status + */ +typedef enum { + CRIFSLOADER_STATUS_STOP, /*EN< Stopping */ /*EN< Stopping */ + CRIFSLOADER_STATUS_LOADING, /*EN< Loading */ /*EN< Loading */ + CRIFSLOADER_STATUS_COMPLETE, /*EN< Complete */ /*EN< Complete */ + CRIFSLOADER_STATUS_ERROR, /*EN< Error */ /*EN< Error */ + /* enum be 4bytes */ + CRIFSLOADER_STATUS_ENUM_BE_SINT32 = 0x7FFFFFFF +} CriFsLoaderStatus; + +/*EN + * \brief Loader priority + */ +typedef enum { + CRIFSLOADER_PRIORITY_HIGHEST = 2, /*EN< Highest */ /*EN< Highest */ + CRIFSLOADER_PRIORITY_ABOVE_NORMAL = 1, /*EN< Above normal */ /*EN< Above normal */ + CRIFSLOADER_PRIORITY_NORMAL = 0, /*EN< Normal */ /*EN< Normal */ + CRIFSLOADER_PRIORITY_BELOW_NORMAL = -1, /*EN< Below normal */ /*EN< Below normal */ + CRIFSLOADER_PRIORITY_LOWEST = -2, /*EN< Lowest */ /*EN< Lowest */ + /* enum be 4bytes */ + CRIFSLOADER_PRIORITY_ENUM_BE_SINT32 = 0x7FFFFFFF +} CriFsLoaderPriority; + +/*========================================================================== + * Group Loader API + *=========================================================================*/ + +/*EN + * \brief Special value indicating "Unlimited" for the API where the maximum number of prepared files are set + * \ingroup FSLIB_GROUPLOADER + * \par Description: + * When this value is specified in the criFsGroupLoader_LimitNumPreparingFiles function or + *when the criFsGroupLoader_LimitNumPreparingFiles is not used, + * this function completes the preparation processing within the criFsGroupLoader_LoadBulk function.
+ * \sa criFsGroupLoader_LimitNumPreparingFiles() + */ +#define CRIFS_GROUPLOADER_NO_PREPARATION_LIMIT 0 + +/*EN + * \brief CriFsGroupLoader handle + * \ingroup FSLIB_GROUPLOADER + * \par Description: + * To use the group information of a CPK file, you must create a group loader.
+ * When a group loader is created, a group loader handle is returned.
+ * To access the group loader, use the group loader handle. + */ +struct _CriFsGroupLoaderHnObj; +typedef struct _CriFsGroupLoaderHnObj *CriFsGroupLoaderHn; + +/*EN + * \brief Group file information structure + * \ingroup FSLIB_GROUPLOADER + * \par Description: + * This is the information on individual files handled by a group loader. +*/ +typedef struct CriFsGroupFileInfoTag { + CriChar8 *directory; /*EN< Directory name of a content file */ + CriChar8 *filename; /*EN< Content file name */ + CriUint32 filesize; /*EN< Content file size */ + void *datapointer; /*EN< Data pointer of a content file */ + CriUint32 gfinfotag; /*EN< General-purpose tag of a content file */ + CriFsFileId id; /*EN< ID of a content file */ + CriUint32 continue_num; /*EN< Number of continuous content files */ +} CriFsGroupFileInfo; + +/*EN + * \brief Group load callback function + * \ingroup FSLIB_GROUPLOADER + * \param[in] obj User-registered object + * \param[in] gfinfo Information on the file to load + * \return Pointer to the buffer area where the file indicated by gfinfo is loaded (NULL: load is skipped) + * \par Description: + * The group load callback function is set for each group loader.
+ * At the time of group load, this function is called immediately before the loading of each file.
+ * The file information including the name and size of the file to load is passed by gfinfo.
+ * The return value of the callback function is the pointer to the buffer where the file indicated by gfinfo is loaded. + * If this return value is NULL, the file will not be loaded.
+ * If the group load callback function is set, the load address of the group information + * set in the CPK file will not be used. + * \sa criFsGroupLoader_SetLoadStartCallback() + */ +typedef void *(CRIAPI *CriFsGroupLoaderLoadStartCbFunc)(void *obj, const CriFsGroupFileInfo *gfinfo); + +/*========================================================================== + * Log Output API + *=========================================================================*/ +/*EN + * \brief Access log output mode + */ +typedef enum { + CRIFS_LOGOUTPUT_MODE_DEFAULT, + /* enum be 4bytes */ + CRIFS_LOGOUTPUT_MODE_ENUM_BE_SINT32 = 0x7FFFFFFF +} CriFsLogOutputMode; + +/*EN + * \brief Log output function + */ +typedef void (CRIAPI *CriFsLogOutputFunc)(void *obj, const char* format,...); + +/*========================================================================== + * CriFsStdio API + *=========================================================================*/ +/*EN + * \brief CriFsStdio handle + */ +struct CriFsStdioObjTag; +typedef struct CriFsStdioObjTag *CriFsStdioHn; + +/*EN + * \brief Seek start position on a file + */ +typedef enum { + CRIFSSTDIO_SEEK_SET = 0, /*EN< Beginning of file */ + CRIFSSTDIO_SEEK_CUR = 1, /*EN< Current load position */ + CRIFSSTDIO_SEEK_END = 2, /*EN< End of file */ + /* enum be 4bytes */ + CRIFSSTDIO_SEEK_ENUM_BE_SINT32 = 0x7FFFFFFF +} CRIFSSTDIO_SEEK_TYPE; + +/*EN + * \brief Result of file deletion + */ +typedef enum { + CRIFSSTDIO_NOT_EXECUTED = 0, /*EN< Not deleted */ + CRIFSSTDIO_FILE_REMOVED = 1, /*EN< Deleted */ + CRIFSSTDIO_IO_ERROR_OCCURRD =2, /*EN< I/O error occurred */ + /* enum is 4bytes */ + CRIFSSTDIO_REMOVE_RESULT_ENUM_IS_4BYTE = 0x7FFFFFFF +} CriFsStdioRemoveResult; + + +/*========================================================================== + * Load Limiter API + *=========================================================================*/ +/*EN + * \brief Load limiter number + * \par Description: + * By default, all the loader handles are assigned to the limiter No. 0 (no limit of the limiter).
+ * To use the limiter, set the limiter No. 1 for the handles of the loader, group loader, and batch loader to which limitation is applied.
+ * Then, set the limiter size of the limiter No. 1.
+ * \attention + * For gaming machines, the load limiter function is not supported.
+ */ +typedef enum { + CRIFS_LOADLIMITER_NO_0_DEFAULT = 0, /* Load limiter No. 0 (by default, no limit of the limiter ) */ + CRIFS_LOADLIMITER_NO_1 = 1, /* Load limiter No. 1 */ + /* enum be 4bytes */ + CRIFS_LOADLIMITER_NO_ENUM_BE_SINT32 = 0x7FFFFFFF +} CriFsLoadLimiterNo; + +/*EN + * \brief Special value indicating "no limit of the limiter" of the load limiter size + * \par Description: + * The limiter size of Limiter No. 0 is fixed to "no limit of the limiter."
+ * The limiter size of Limiter No. 1 is set, by default, to "no limit of the limiter."
+ * \attention + * For gaming machines, the load limiter function is not supported.
+ */ +#define CRIFS_LOADLIMITER_SIZE_UNLIMITED 0x7FFFFFFF + +/*EN + * \brief Default value of the load limiter size (no limit of the limiter) + * \attention + * For gaming machines, the load limiter function is not supported.
+ */ +#define CRIFS_LOADLIMITER_SIZE_DEFAULT CRIFS_LOADLIMITER_SIZE_UNLIMITED + +/*EN + * \brief Special value indicating "no limit" of the read request count (default) + */ +#define CRIFS_READ_REQUEST_NUM_UNLIMITED 0x7FFFFFFF + +/*************************************************************************** + * Prototype Variables + ***************************************************************************/ + +/*************************************************************************** + * Prototype Functions + ***************************************************************************/ +#ifdef __cplusplus +extern "C" { +#endif + +/*========================================================================== + * CRI File System API + *=========================================================================*/ +/*EN + * \brief Set the default configuration + * \ingroup FSLIB_CRIFS + * \param[in] config Configuration + * \par Description: + * Set the default values for the configuration (::CriFsConfig) that is to be set in the ::criFs_InitializeLibrary function.
+ * \par Supplemental information: + * By adjusting the parameters set for the configuration according to the number of handles used for the application, + * you can reduce the memory size necessary for the library.
+ * However, at the early stages of development where the number of handles to be used in the application has not yet been determined or when the memory is not tight, + * using this macro enables you to simplify the initialization process.
+ * \attention: + *This macro sets greater values for the parameters of the configuration for the required sufficient number of handles to be able to be allocated for most cases.
+ * Because of this, note that the size for the work area required by the library will increase.
+ * (If the memory is tight, it is recommended to individually adjust the parameters after initializing the configuration using this macro.)
+ * \sa + * CriFsConfig +*/ +#define criFs_SetDefaultConfig(p_config) \ +{\ + (p_config)->thread_model = CRIFS_CONFIG_DEFAULT_THREAD_MODEL;\ + (p_config)->num_binders = CRIFS_CONFIG_DEFAULT_NUM_BINDERS;\ + (p_config)->num_loaders = CRIFS_CONFIG_DEFAULT_NUM_LOADERS;\ + (p_config)->num_group_loaders = CRIFS_CONFIG_DEFAULT_NUM_GROUP_LOADERS;\ + (p_config)->num_stdio_handles = CRIFS_CONFIG_DEFAULT_NUM_STDIO_HANDLES;\ + (p_config)->num_installers = CRIFS_CONFIG_DEFAULT_NUM_INSTALLERS;\ + (p_config)->max_binds = CRIFS_CONFIG_DEFAULT_MAX_BINDS;\ + (p_config)->max_files = CRIFS_CONFIG_DEFAULT_MAX_FILES;\ + (p_config)->max_path = CRIFS_CONFIG_DEFAULT_MAX_PATH;\ + (p_config)->version = CRI_FS_VERSION;\ + (p_config)->enable_crc_check = CRI_FALSE;\ +} + +/*EN + * \brief Calculate work area size + * \ingroup FSLIB_CRIFS + * \param[in] config Configuration + * \param[out] nbyte Work area size + * \return CriError Error code + * \par Description: + * This function retrieves the size of a work area required to use the CRI File System library.
+ * \par Note: + * The size of the work area varies depending on the configuration (::CriFsConfig) details.
+ * To reduce the size of the memory to be allocated to the library, adjust the parameters of the configuration as needed.
+ * When NULL is specified for "config,h the default configuration is applied. + * \sa CriFsConfig + */ +CriError CRIAPI criFs_CalculateWorkSizeForLibrary(const CriFsConfig *config, CriSint32 *nbyte); + +/*EN + * \brief Initialize CRI File System + * \ingroup FSLIB_CRIFS + * \param[in] config Configuration + * \param[in] buffer Work area + * \param[in] size Work area size + * \return CriError Error code + * \par Description: + * This function initializes the CRI File System library.
+ * To use the functions of the library, you must execute this function.
+ * (The functions of the library are available from when this function is executed until when the ::criFs_FinalizeLibrary is executed.)
+ * When initializing the library, you must allocate a memory area (work area) + * that the library internally uses.
+ * There are following two ways of allocating a work area.
+ * (a) User Allocator method: Use a user-provided function to allocate/release memory.
+ * (b) Fixed Memory method: Pass the required memory area directly to the library.
+ *
+ * To use the User Allocator method, the user in advance registers the memory allocation function in the CRI File System library.
+ * When this function is called with "work" set to NULL and "size" to 0, + * the library uses the registered memory allocation function to automatically allocate necessary memory.
+ * The user does not have to allocate work area.
+ * The memory allocated at the time of initialization is released at the time of end processing (when executing the ::criFs_FinalizeLibrary function).
+ *
+ * To use the Fixed Memory method, you must set the memory area + * separately allocated as work area in this function.
+ * You can get the size of the work area using the ::criFs_CalculateWorkSizeForLibrary function.
+ * Before initialization, allocate memory for the size you got using the ::criFs_CalculateWorkSizeForLibrary function. + * After that, set the memory size in this function.
+ * Note that when the Fixed Memory method is used, the work area is used in the library until the end processing + * (::criFs_FinalizeLibrary function) of the library is executed.
+ * Do not release the memory for the work area before executing the end processing of the library.
+ * \par Example: + * [Initialization of the library by the User Allocator method]
+ *For the User Allocator method, the procedure for the initialization and end of the library is as follows:
+ * -#Before executing initialization, use the ::criFs_SetUserMallocFunction function + * and the ::criFs_SetUserFreeFunction function to register the memory allocation/release functions.
+ * -# Set the parameters in the configuration structure for initialization.
+ * -# Use the ::criFs_InitializeLibrary function to perform initialization.
+ * (Specify NULL for "work" and 0 for "size".)
+ * -# At the end of the application, use the ::criFs_FinalizeLibrary function to perform the end processing.
+ * . + *
The specific code is as follows:
+ * \code + * // User's own memory allocation function + * void *user_malloc(void *obj, CriUint32 size) + * { + * void *mem; + * + * // Allocate memory + * mem = malloc(size); + * + * return (mem); + * } + * + * // Provide user's own memory release function + * void user_free(void *obj, void *mem) + * { + * // Release the memory + * free(mem); + * + * return; + * } + * + * main() + * { + * CriFsConfig config; // Config structure for library initialization + * : + * // Register user's own memory allocation function + * criFs_SetUserMallocFunction(user_malloc, NULL); + * + * // Register user's own memory release function + * criFs_SetUserFreeFunction(user_free, NULL); + * + * // Set the default values in the Config structure for library initialization + * criFs_SetDefaultConfig(&config); + * + * // Initialize the library + * // Specify NULL and 0 in the work area. + * // -> Necessary memory is allocated by the registered memory allocation function. + * criFs_InitializeLibrary(&config, NULL, 0); + * : + * // Main processing of the application + * : + * // Perform the end processing when exiting the application + * // -> The memory allocated at the time of initialization is released by the registered memory release function. + * criFs_FinalizeLibrary(); + * : + * } + * \endcode + *
+ * [Initialization of the library by the Fixed Memory method]
+ *For the Fixed Memory method, the procedure for the initialization and end of the library is as follows:
+ * -# Set the parameters in the configuration structure for initialization.
+ * -# Calculate the size of the work area required for library initialization + * by using the ::criFs_CalculateWorkSizeForLibrary function.
+ * -# Allocate the memory for the size of the work area.
+ * -# Use the ::criFs_InitializeLibrary function to perform initialization.
+ * (Specify the address of the allocated memory for "work" and the size of the work area for "size".)
+ * -# At the end of the application, use the ::criFs_FinalizeLibrary function to perform the end processing.
+ * -# Release the memory of the work area.
+ * . + *
The specific code is as follows:
+ * \code + * main() + * { + * CriFsConfig config; // Config structure for library initialization + * void *work; // Work area address + * CriSint32 size; // Work area size + * : + * // Set the default values in the Config structure for library initialization + * criFs_SetDefaultConfig(&config); + * + * // Calculate the size of the work area required for library initialization + * criFs_CalculateWorkSizeForLibrary(&config, &size); + * + * // Allocate memory for the work area + * work = malloc((size_t)size); + * + * // Initialize the library + * // -> Specify the allocated work area + * criFs_InitializeLibrary(&config, work, size); + * : + * // Main processing of the application + * //-> During this processing, the allocated memory is retained. + * : + * // Perform the end processing when exiting the application + * criFs_FinalizeLibrary(); + * + * // Release unnecessary work area + * free(work); + * : + * } + * \endcode + + * \par Note: + * Use the initialization setting configuration (config argument) to specify the number of handles (CriFsBinder or CriFsLoader) + * that can be allocated while the library is being used.
+ *The size of the work area required by the library varies according to the configuration details.
+ * (The more the number of handles is used, the larger the required memory size becomes.)
+ * When NULL is specified for "config,h the default configuration is applied. + * \attention + * After executing this function, make sure to execute the corresponding ::criFs_FinalizeLibrary function.
+ * Note that you cannot re-execute this function before executing the ::criFs_FinalizeLibrary function.
+ * \sa CriFsConfig, criFs_CalculateWorkSizeForLibrary, criFs_FinalizeLibrary + * \sa criFs_SetUserMallocFunction, criFs_SetUserFreeFunction + */ +CriError CRIAPI criFs_InitializeLibrary(const CriFsConfig *config, void *buffer, CriSint32 size); + +/*EN + * \brief Finalize the CRI File System + * \ingroup FSLIB_CRIFS + * \return CriError Error code + * \par Description: + * This function finalizes the CRI File System library.
+ * \attention + * Note that you cannot execute this function before executing the ::criFs_InitializeLibrary function.
+ * \sa criFs_InitializeLibrary + */ +CriError CRIAPI criFs_FinalizeLibrary(void); + +/*EN + * \brief Register the memory allocation function + * \ingroup FSLIB_CRIFS + * \param[in] func Memory allocation function + * \param[in] obj User-specified object + * \par Description: + * Register the memory allocation function in the CRI File System library.
+ *Use this function to replace the memory allocation processing performed by the CRI File System library in the library + * with user's own memory allocation processing.
+ *
+ * The procedure for using this function is as follows:
+ * (1) Provide the memory allocation function according to the ::CriFsMallocFunc interface.
+ * (2) Use the ::criFs_SetUserMallocFunction function to register the memory allocation function + * for the CRI File System library.
+ *
+ * The specific code is as follows: + * \par Example: + * \code + * // Provide user's own memory allocation function + * void *user_malloc(void *obj, CriUint32 size) + * { + * void *mem; + * + * // Allocate memory + * mem = malloc(size); + * + * return (mem); + * } + * + * main() + * { + * : + * // Register the memory allocation function + * criFs_SetUserMallocFunction(user_malloc, NULL); + * : + * } + * \endcode + * \par Note: + * The value specified for the obj argument is passed as an argument to ::CriFsMallocFunc.
+ * If you need to refer to the memory manager or other objects when allocating memory, + * set the object in the argument of this function, and refer to that + * through the argument using the callback function.
+ * \attention + * The memory allocation function must be registered together with + * the memory release function (::CriFsFreeFunc). + * \sa CriFsMallocFunc, criFs_SetUserFreeFunction + */ +void CRIAPI criFs_SetUserMallocFunction(CriFsMallocFunc func, void *obj); + +/*EN + * \brief Register the memory release function + * \ingroup FSLIB_CRIFS + * \param[in] func Memory release function + * \param[in] obj User-specified object + * \par Description: + * Register the memory release function in the CRI File System library.
+ * Use these functions to replace the memory release processing that the CRI File System library performs in the library + * with user's own memory release processing.
+ *
+ * The procedure for using this function is as follows:
+ * (1) Provide the memory release function according to the ::CriFsFreeFunc interface.
+ * (2) Use the ::criFs_SetUserFreeFunction function to register the memory + * release function for the CRI File System library.
+ *
+ * The specific code is as follows: + * \par Example: + * \code + * // Provide user's own memory release function + * void user_free(void *obj, void *mem) + * { + * // Release the memory + * free(mem); + * + * return; + * } + * + * main() + * { + * : + * // Register the memory release function + * criFs_SetUserFreeFunction(user_free, NULL); + * : + * } + * \endcode + * \par Note: + * The value specified for the obj argument is passed as an argument to ::CriFsFreeFunc.
+ * If you need to refer to the memory manager or other objects when allocating memory, + * set the object in the argument of this function, and refer to that + * through the argument using the callback function.
+ * \attention + * The memory release function must be registered together with + * the memory allocation function (::CriFsMallocFunc). + * \sa CriFsFreeFunc, criFs_SetUserMallocFunction + */ +void CRIAPI criFs_SetUserFreeFunction(CriFsFreeFunc func, void *obj); + +/*EN + * \brief Execute server processing + * \ingroup FSLIB_CRIFS + * \return CriError Error code + * \par Description: + * This function updates the internal state of the CRI File System library.
+ * The application must periodically (about once per frame) executes this function.
+ * \attention + * If criFs_ExecuteMain is not executed, such a problem that file loading stops may occur.
+ */ +CriError CRIAPI criFs_ExecuteMain(void); + +/*EN + * \brief Execute file access processing (for a non-thread environment) + * \ingroup FSLIB_CRIFS + * \return CriError Error code + * \par Description: + * Execute the file access processing of the CRI File System library.
+ * \attention + * You must call this function using the CRI File System library in an environment where no thread is used.
+ * In an environment where threads are used, execute the criFs_ExecuteMain function instead of this function.
+ * \sa + * criFs_ExecuteMain() + */ +CriError CRIAPI criFs_ExecuteFileAccess(void); + +/*EN + * \brief Execute data development processing (for a non-thread environment) + * \ingroup FSLIB_CRIFS + * \return CriError Error code + * \par Description: + * Execute the data development processing of the CRI File System library.
+ * \attention + * You must call this function using the CRI File System library in an environment where no thread is used.
+ * In an environment where threads are used, execute the criFs_ExecuteMain function instead of this function.
+ * \sa + * criFs_ExecuteMain() + */ +CriError CRIAPI criFs_ExecuteDataDecompression(void); + +/*EN + * \brief Set how to retry when a file open error occurs + * \ingroup FSLIB_CRIFS + * \param[in] mode How to retry + * \return CriError Error code + * \par Description: + * This function specifies whether to try opening the file again in the CRI File System library when file open fails.
+ * With CRIFS_OPEN_RETRY_INFINITE specified for the retry method, the CRI File System library keeps retrying the open processing until the file is ready to open.
+ *With CRIFS_OPEN_RETRY_NONE specified, the CRI File System library shifts the status of the handle to the error status instead of retrying the open processing. + */ +CriError CRIAPI criFs_SetOpenRetryMode(CriFsOpenRetryMode mode); + +/*EN + * \brief Set how to retry when a file read error occurs + * \ingroup FSLIB_CRIFS + * \param[in] mode How to retry + * \return CriError Error code + * This function specifies whether to try reading the file again in the CRI File System library when file read fails.
+ * With CRIFS_READ_RETRY_INFINITE specified for the retry method, the CRI File System library keeps retrying the read processing until the file is ready to read.
+ *With CRIFS_READ_RETRY_NONE specified, the CRI File System library shifts the status of the handle to the error status instead of retrying the read processing. + */ +CriError CRIAPI criFs_SetReadRetryMode(CriFsReadRetryMode mode); + +/*EN + * \brief Start of the group priority section + * \ingroup FSLIB_CRIFS + * \return CriError Error code + * \param[in] groupname Group name + * \param[in] attrname Attribute name + * \par Description: + * This function indicates the start of the group priority section.
+ * After this function is executed, the files in the specified group are given priority for being loaded until the ::criFs_EndGroup function is executed.
+ * (Even if a file having the same name exists in the binder, the file in the specified group is selected first.)
+ * Using this function enables the files to benefit to the group load even when a normal loader is used.
+ * \attention + * Multiple group priority sections cannot be overlapped.
+ * After executing this function, make sure to execute the corresponding ::criFs_EndGroup function. + * This function cannot be used with the ::criFs_BeginLoadRegion function.
+ * (From CRI File System Ver.2.02.00, the macro calling this function has been used instead of the ::criFs_BeginLoadRegion function.)
+ * \sa criFs_EndGroup, criFs_BeginLoadRegion + */ +CriError CRIAPI criFs_BeginGroup(const CriChar8 *groupname, const CriChar8 *attrname); + +/*EN + * \brief End of the group priority section + * \ingroup FSLIB_CRIFS + * \return CriError Error code + * \par Description: + * This function indicates the end of the group priority section.
+ * \attention + * This function cannot be used with the :criFs_EndLoadRegion function.
+ * (From CRI File System Ver.2.02.00, the macro calling this function has been used instead of the ::criFs_EndLoadRegion function.)
+ * \sa criFs_BeginGroup + */ +CriError CRIAPI criFs_EndGroup(void); + +/*EN + * \brief Get the number of binders used + * \ingroup FSLIB_CRIFS + * \param[out] cur_num Number of binders being used + * \param[out] max_num Maximum number of binders that were simultaneously used + * \param[out] limit Upper limit of the available binders + * \return CriError Error code + * \par Description: + * This function retrieves the information on the number of binders used.
+ */ +CriError CRIAPI criFs_GetNumUsedBinders(CriSint32 *cur_num, CriSint32 *max_num, CriSint32 *limit); + +/*EN + * \brief Get the number of loaders used + * \ingroup FSLIB_CRIFS + * \param[out] cur_num Number of loaders being used + * \param[out] max_num Number of maximum loaders that were simultaneously used + * \param[out] limit Upper limit of the available loaders + * \return CriError Error code + * \par Description: + * This function retrieves the information on the number of loaders used.
+ * \par Note + * Binders and installers internally use loaders.
+ * Therefore, the CRI File System must create loaders more than the number specified for the configuration ( ::CriFsConfig) + * at the time of the initialization.
+ * This may cause the upper limit of the loaders (limit) acquired by this function to differ from the value specified at the time of the initialization.
+ */ +CriError CRIAPI criFs_GetNumUsedLoaders(CriSint32 *cur_num, CriSint32 *max_num, CriSint32 *limit); + +/*EN + * \brief Get the number of group loaders used + * \ingroup FSLIB_CRIFS + * \param[out] cur_num Number of group loaders being used + * \param[out] max_num Number of maximum group loaders that were simultaneously used + * \param[out] limit Upper limit of the available group loaders + * \return CriError Error code + * \par Description: + * This function retrieves the information on the number of group loaders used.
+ */ +CriError CRIAPI criFs_GetNumUsedGroupLoaders(CriSint32 *cur_num, CriSint32 *max_num, CriSint32 *limit); + +/*EN + * \brief Get the number of CriFsStdio handles used + * \ingroup FSLIB_CRIFS + * \param[out] cur_num Number of CriFsStdio handles being used + * \param[out] max_num Number of maximum CriFsStdio handles that were simultaneously used + * \param[out] limit Upper limit of the available CriFsStdio handles + * \return CriError Error code + * \par Description: + * This function retrieves the information on the number of CriFsStdio handles used.
+ */ +CriError CRIAPI criFs_GetNumUsedStdioHandles(CriSint32 *cur_num, CriSint32 *max_num, CriSint32 *limit); + +/*EN + * \brief Get the number of installers used + * \ingroup FSLIB_CRIFS + * \param[out] cur_num Number of installers being used + * \param[out] max_num Number of maximum installers that were simultaneously used + * \param[out] limit Upper limit of the available installers + * \return CriError Error code + * \par Description: + * This function retrieves the information on the number of installers used.
+ */ +CriError CRIAPI criFs_GetNumUsedInstallers(CriSint32 *cur_num, CriSint32 *max_num, CriSint32 *limit); + +/*EN + * \brief Get the number of binds + * \ingroup FSLIB_CRIFS + * \param[out] cur_num Number of binds being used + * \param[out] max_num Number of maximum binds that were simultaneously used + * \param[out] limit Upper limit of available binds + * \return CriError Error code + * \par Description: + * This function retrieves the information on the number of binds.
+ */ +CriError CRIAPI criFs_GetNumBinds(CriSint32 *cur_num, CriSint32 *max_num, CriSint32 *limit); + +/*EN + * \brief Get the number of files opened + * \ingroup FSLIB_CRIFS + * \param[out] cur_num Number of files currently open + * \param[out] max_num Number of maximum files that were simultaneously open + * \param[out] limit Upper limit of available files to be opened + * \return CriError Error code + * \par Description: + * This function retrieves the information on the number of files to be opened.
+ */ +CriError CRIAPI criFs_GetNumOpenedFiles(CriSint32 *cur_num, CriSint32 *max_num, CriSint32 *limit); + +/*EN + * \brief Register I/O selection callback + * \ingroup FSLIB_CRIFS + * \param[in] func I/O selection callback + * \return CriError Error code + * \par Description: + * This function registers the I/O selection callback function (::CriFsSelectIoCbFunc).
+ * When the CRI File System library accesses a file, first it selects the ID (::CriFsDeviceId) of the device containing the file + * and the I/O interface (::CriFsIoInterface) to access the device.
+ * By default, the device ID and the I/O interface are implicitly performed in the library; however, + * by using this function, you can specify a desired device ID and I/O interface.
+ * This enables you to use a user-created I/O interface to access files.
+ * \code + * // Defines a unique I/O interface. + * // Note: The member functions of the structure are implemented uniquely by the user. + * static CriFsIoInterface g_userIoInterface = { + * userExists, + * userRemove, + * userRename, + * userOpen, + * userClose, + * userGetFileSize, + * userRead, + * userIsReadComplete, + * userGetReadSize, + * userWrite, + * userIsWriteComplete, + * userGetWriteSize, + * userFlush, + * userResize, + * userGetNativeFileHandle + * }; + * + * // I/O selection callback function + * CriError user_select_io_callback( + * const CriChar8 *path, CriFsDeviceId *device_id, CriFsIoInterfacePtr *ioif) + * { + * // Analyze the path to identify the device ID + * if (strncmp(path, c) == 0) { + * (*device_id) = CRIFS_DEVICE_`; + * } else { + * (*device_id) = CRIFS_DEFAULT_DEVICE; + * } + * + * // Specify the I/O interface to use for file access + * (*ioif) = g_userIoInterface; + * + * return (CRIERR_OK); + * } + * + * int main(c) + * { + * : + * // Register I/O selection callback + * criFs_SetSelectIoCallback(user_select_io_callback); + * : + * } + * \endcode + * \attention + * You can register only one callback function.
+ * When you register the function multiple times, the registered callback + * function is overwritten by a newly registered callback function.
+ *
+ * Specifying NULL for func cancels the registration of the registered function.
+ * \sa CriFsSelectIoCbFunc, criFs_GetDefaultIoInterface + */ +CriError CRIAPI criFs_SetSelectIoCallback(CriFsSelectIoCbFunc func); + +/*EN + * \brief Get the default I/O interface + * \ingroup FSLIB_CRIFS + * \param[out] ioif I/O interface + * \return CriError Error code + * \par Description: + * This function retrieves the I/O interface the CRI File System library uses by default.
+ * To make the function perform the default processing within the I/O selection callback (::CriFsSelectIoCbFunc), + * return the I/O interface acquired by this function as the output value.
+ * \code + * // Defines a unique I/O interface. + * // Note: The member functions of the structure are implemented uniquely by the user. + * static CriFsIoInterface g_userIoInterface = { + * userExists, + * userRemove, + * userRename, + * userOpen, + * userClose, + * userGetFileSize, + * userRead, + * userIsReadComplete, + * userGetReadSize, + * userWrite, + * userIsWriteComplete, + * userGetWriteSize, + * userFlush, + * userResize, + * userGetNativeFileHandle + * }; + * + * // I/O selection callback function + * CriError user_select_io_callback( + * const CriChar8 *path, CriFsDeviceId *device_id, CriFsIoInterfacePtr *ioif) + * { + * // Analyze the path to identify the device ID + * if (strncmp(path, c) == 0) { + * (*device_id) = CRIFS_DEVICE_`; + * } else { + * (*device_id) = CRIFS_DEFAULT_DEVICE; + * } + * + * // Use a unique interface to process sample.bin only + * if (strcmp(path, "sample.bin") == 0) { + * (*ioif) = g_userIoInterface; + * } else { + * // Use the default I/O interface to process the other files + * criFs_GetDefaultIoInterface(ioif); + * } + * + * return (CRIERR_OK); + * } + * + * int main(c) + * { + * : + * // Register I/O selection callback + * criFs_SetSelectIoCallback(user_select_io_callback); + * : + * } + * \endcode + * \sa CriFsSelectIoCbFunc, criFs_SetSelectIoCallback + */ +CriError CRIAPI criFs_GetDefaultIoInterface(CriFsIoInterfacePtr *ioif); + +/*EN + * \brief Get device information + * \ingroup FSLIB_CRIFS + * \param[in] id Device ID + * \param[out] info Device information + * \return CriError Error code + * \par Description: + * This function retrieves the information on the specified device.
+ * You can check whether the specified device supports writing to files or + * if the alignment of the buffer used for reading and writing needs adjustment.
+ * \sa CriFsDeviceId, CriFsDeviceInfo, criFs_SetDeviceInfo + */ +CriError CRIAPI criFs_GetDeviceInfo(CriFsDeviceId id, CriFsDeviceInfo *info); + +/*EN + * \brief Set device information + * \ingroup FSLIB_CRIFS + * \param[in] id Device ID + * \param[in] info Device information + * \return CriError Error code + * \par Description: + * This function changes the information on the specified device.
+ * Use this function when replacing the I/O layer or when the restriction of the device can be eased on the I/O layer side.
+ * \sa CriFsDeviceId, CriFsDeviceInfo, criFs_GetDeviceInfo + */ +CriError CRIAPI criFs_SetDeviceInfo(CriFsDeviceId id, CriFsDeviceInfo info); + +/*EN + * \brief Create a memory file path + * \ingroup FSLIB_CRIFS + * \param[in] buffer Data address + * \param[in] buffer_size Data size + * \param[out] path Path string storing area + * \param[in] length Path string sorting area size (in byte) + * \return CriError Error code + * \par Description: + * This function creates a path string to access the data allocated on the memory as a file.
+ * The path to handle the data as a file is stored in the third argument (path) when you specify the storage address and data size + * for the first argument (buffer) and the second argument (buffer_size).
+ * For the fourth argument (length), specify the size of the area where the path string is stored.
+ * \par Note: + * Use this function to bind a CPK file loaded on the memory.
+ * After the CPK file is loaded on the memory, use this function to convert the address and size of the file loaded area into a path string, + * and specify the converted path string in the ::criFsBinder_BindCpk function or other functions. This enables the on-memory CPK data to be bound.
+ * \par Example: + * \code + * F + * // Load the CPK file onto the memory + * criFsLoader_Load(loader_hn, NULL, "sample.cpk" + * 0, cpk_file_size, buffer, buffer_size); + * + * // Wait for the file loading to be completed + * for (;;) { + * criFsLoader_GetStatus(loader_hn, &loader_status); + * if (loader_status == CRIFSLOADER_STATUS_COMPLETE) { + * break; + * } + * F + * } + * + * // Convert the address and size of the on-memory CPK data into a path string + * criFs_AddressToPath(buffer, buffer_size, path, length); + * + * // Bind the on-memory CPK + * criFsBinder_BindCpk(binder_hn, NULL, path, + * bind_work, bind_work_size, &bind_id); + * : + * \endcode + * \attention + * If the path string storage area size is too small, this function fails and returns an error.
+ * Currently, in an environment with only 32-bit memory, the area of 28 bytes is required to store a path string.
+ * In an environment with 64-bit memory, the area of 44 bytes is required to store a path string.
+ * \sa CriFsDeviceId, CriFsDeviceInfo, criFs_GetDeviceInfo + */ +CriError CRIAPI criFs_AddressToPath( + const void *buffer, CriSint64 buffer_size, CriChar8 *path, CriSint32 length); + +/*EN + * \brief Set the upper limit of the size of synchronous copy for the memory file system + * \ingroup FSLIB_CRIFS + * \param[in] limit Upper limit of the size of synchronous copy + * \return CriError Error code + * \par Description: + * This function makes setting for the memory copy of a certain size or less to be performed in the main thread.
+ *
+ * When the memory file system is used (when the path created by the + * ::criFs_AddressToPath function is accessed), the data transfer ( copying the memory) is performed + * in the thread exclusive for copying the memory with low priority.
+ * (For models other than the multithread model, the memory is copied in the server processing.)
+ *
+ * This mechanism prevents the CPU time from being occupied by the copy processing even if huge data are copied, + * and thus you can avoid the issue where the main loop is blocked by the copy processing.
+ * On the other hand, this polls copy processing executed in another thread, + * so even when small amounts of data are copied, a delay depending on the polling interval occurs.
+ *
+ * With the upper limit of the size of synchronous copy set in this function, + * the data of specified size or less are copied in the thread instead of another thread.
+ *(Although the load of the copy is applied to the main thread, the time taken to complete the load decreases.)
+ * \par Note: + * By default, all the copy processing is performed in another thread.
+ *
+ * When the synchronous copy processing is enabled in this function, the operation of each module changes as follows:
+ *
+ * ECriFsLoader
+ *Immediately after the ::criFsLoader_Load function is executed, the status of the loader shifts to CRIFSLOADER_STATUS_COMPLETE.
+ * (Copy is performed in the ::criFsLoader_Load function.)
+ *
+ * ECriFsStdio
+ * No sleep occurs in the ::criFsStdio_ReadFile function.
+ * (Copy is performed in the ::criFsStdio_ReadFile function.)
+ * \attention + * When a huge file is loaded with higher upper limit, + * the ::criFsLoader_Load or other functions may block the processing for a long time.
+ *
+ * The threshold is determined according to the requested load size.
+ * Because of this, even when the data size that can be actually copied is the same or less than + * the specified limit, if the requested load size specified + * in the ::criFsLoader_Load or ::criFsStdio_ReadFile function exceeds the limit, the copy is performed in another thread.
+ * \sa + * criFs_AddressToPath + */ +CriError CRIAPI criFs_SetMemoryFileSystemSyncCopyLimit(CriSint64 limit); + +/*EN + * \brief Set the size of the load limiter + * \ingroup FSLIB_CRIFS_EMB + * \param[in] limiter_no Load limiter number + * \param[in] limiter_size Load limiter size (byte/1 server cycle) + * \return CriError Error code + * \par Description: + * This function sets the limit of the read size per server cycle.
+ * The total read size of all the loaders, group loaders, and batch loaders to which a common limiter number is applied is limited to the size set here.
+ * The load processing with the limiter number that has reached the limit is temporarily suspended, and then automatically resumes when the next server cycle starts.
+ * Numerical values accumulated in the limiter are rounded up to the unit size of the load limiter.
+ * When loading compressed data, add the compressed data size, not the original data size, to the limiter.
+ * In an environment where a compressed file cannot be divided to be read, the read size of the file may exceed the upper limit of the limiter. In that environment, note that the limiter cannot practically control a huge compressed file.
+ * The limiter size can be changed while the file is being read. You can also suspend the read operation by setting the limiter to zero.
+ * You cannot set the size of the limiter No. 0. The No. 0 is assigned to the normal load processing without limitation.
+ * Currently, only the limiter No. 1 is settable.
+ * By default, the limiter size is CRIFS_LOADLIMITER_SIZE_DEFAULT (without limit of the limiter).
+ * \attention + * For gaming machines, the load limiter function is not supported. Do not call this function.
+ * \sa CriFsLoadLimiterNo criFs_SetLoadLimiterSize criFs_SetLoadLimiterUnit criFsLoader_SetLoadLimiter criFsGroupLoader_SetLoadLimiter criFsBatchLoader_SetLoadLimiter + */ +CriError CRIAPI criFs_SetLoadLimiterSize(CriFsLoadLimiterNo limiter_no, CriSint32 limiter_size); + +/*EN + * \brief Set the unit size of the load limiter + * \ingroup FSLIB_CRIFS_EMB + * \param[in] limiter_no Load limiter number + * \param[in] limiter_unit Load limiter unit size (byte) + * \return CriError Error code + * \par Description: + * Set the minimum size, such as DMA transfer unit size or ROM page size, that allows the file to be divided for being read.
+ * You cannot set the unit size of the limiter No. 0. The No. 0 is assigned to the normal load processing without limitation.
+ * Currently, only the limiter No. 1 is settable.
+ * \attention + * For gaming machines, the load limiter function is not supported. Do not call this function.
+ * \sa CriFsLoadLimiterNo criFs_SetLoadLimiterSize criFs_SetLoadLimiterUnit criFsLoader_SetLoadLimiter criFsGroupLoader_SetLoadLimiter criFsBatchLoader_SetLoadLimiter + */ +CriError CRIAPI criFs_SetLoadLimiterUnit(CriFsLoadLimiterNo limiter_no, CriSint32 limiter_unit); + +/*EN + * \brief Upper limit of the number of read requests + * \ingroup FSLIB_CRIFS_EMB + * \param[in] limit_num_read_request Upper limit of the number of read requests per server cycle + * \return CriError Error code + * \par Description: + * This function sets the upper limit of the number of read requests per server cycle.
+ * The default is CRIFS_READ_REQUEST_NUM_UNLIMITED (without limit).
+ * On a platform where the CPU load on each read request is high, + * using this function can limit the CPU time consumed by the file system, + * enabling the CPU time to be allocated to processing with high load.
+ * As a trade-off, using the this function decreases the throughput + * when many small files are read. br> + */ +CriError CRIAPI criFs_LimitNumReadRequest(CriSint32 limit_num_read_request); + +/*EN + * \brief Set the default path delimiter + * \ingroup FSLIB_CRIFS + * \param[in] default_path_separator Default path delimiter setting + * \return CriError Error code + * \par Description: + * This function sets the path delimiter to be treated as the standard inside the CRI File System library.
+ *Setting ::CRIFS_DEFAULT_PATH_SEPARATOR_PLATFORM_COMPATIBLE + * automatically converts the path delimiter into one that is treated as the standard on the platform.
+ * Setting ::CRIFS_DEFAULT_PATH_SEPARATOR_NONE uses the given path + * instead of converting the path delimiter.
+ * When nothing is specified (default of the CRI File System library), ::CRIFS_DEFAULT_PATH_SEPARATOR_PLATFORM_COMPATIBLE is assumed. + * \sa CriFsDefaultPathSeparator + */ +CriError CRIAPI criFs_SetDefaultPathSeparator(CriFsDefaultPathSeparator default_path_separator); + +/*EN + * \brief Set file I/O mode + * \ingroup FSLIB_CRIFS + * \param[in] io_mode File I/O mode + * \return CriError Error code + * \par Description: + * This function sets the file I/O mode of the overall CRI File System library.
+ *Setting ::CRIFS_FILE_IO_MODE_SHARE_FILE_HANDLE shares a file handle inside the library, + * increasing the efficiency of file access.
+ * Specifically, a file handle created when the ::criFsBinder_BindCpk or ::criFsBinder_BindFile function is called + * is retained in the library until it is unbound. + * Accessing the retained file does not open any file.
+ *
+ * Setting ::CRIFS_FILE_IO_MODE_OPEN_EVERY_TIME does not share a file handle + * and opens a file every time the file is accessed.
+ * Although the performance of file read decreases for the load on file open, a file handle is created only when the file needs to be opened, + * and thus the consumption of the resources including the file descriptor can be minimized.
+ *
+ * When nothing is specified (default of the CRI File System library), the setting varies depending on the model.
+ * Unless otherwise specified in the model-specific manual, the default is ::CRIFS_FILE_IO_MODE_SHARE_FILE_HANDLE.
+ * \par Note: + * Call this function before initializing the library.
+ * This function cannot be called after the library is initialized. + * + * \sa CriFsFileIoMode + */ +CriError CRIAPI criFs_ControlFileIoMode(CriFsFileIoMode io_mode); + +/*========================================================================== + * CriFsIo API + *=========================================================================*/ + +/*========================================================================== + * CriFsBinder API + *=========================================================================*/ +/*EN + * \brief CRI File System - Binder object + * \ingroup FSLIB_BINDER + * \par Description: + * CriFsBinder is the module to make file data into a database. + */ + +/*EN + * \brief Register/delete the memory management function used in the binder module function + * \ingroup FSLIB_BINDER + * \param[in] allocfunc Memory allocation function + * \param[in] freefunc Memory release function + * \param[in] obj Memory management object + * \return CriError Error code + * \par Description: + *This function registers the memory management function internally called when NULL is specified in the work area specified using the argument of the CriFsBinder function.
+ * When a value other than NULL is specified for the CriFsBinder function, this function uses the passed area.
+ *
+ * This function enables you to dynamically manage the work area necessary for the CriFsBinder function by using your unique memory management function.
+ * When setting the memory management function using this function, call this function immediately after the criFs_InitializeLibrary function.
+ * When the allocfunc and freefunc arguments of this function are specified with NULL, the registered memory management function is deleted.
+ *The CriFsBinder function uses the currently registered memory management function; therefore, to delete or change the once registered memory management function, + * check that there is no memory area allocated using the registered memory management function.
+ * \par Relationship with the ::criFs_SetUserMallocFunction function: + * The memory management function registered by this function is limited to the use in the CriFsBinder function.
+ * When the memory management function is registered by the ::criFs_SetUserMallocFunction function, not by this function, + * the function registered by the ::criFs_SetUserMallocFunction function is called when memory is allocated.
+ * If there is a function registered by this function, the memory allocation function registered by this function is called.
+ * \par CPK bind: + * As described in the section of the criFsBinder_GetWorkSizeForBindCpk function, at the time of CPK bind, the size of the work area required for CPK analysis + depends on the configuration of the CPK, which makes it difficultto estimate the necessary work size beforehand.
+ * This function enables you to manage the memory requested by the CPK analysis engine by using your unique memory management function.
+ * \par Example: + * \code + * void *u_alloc(void *obj, CriUint32 size) + * { + * : + * } + * void u_free(void *obj, void *ptr) + * { + * : + * } + * void bind_cpk(void) + * { + * CriFsBindId id; + * CriSint32 wksize; + * void *work; + * // Register the memory management function + * criFsBinder_SetUserHeapFunc(u_alloc, u_free, u_mem_obj); + * + * // CPK bind + * criFsBinder_BindCpk(NULL, NULL, "sample.cpk,h NULL, 0, &id); + * : + * + * // When specifying work, use the specified work. + * criFsBinder_GetWorkSizeForBindFile(NULL, "sample.cpk,h &wksize); + * work = malloc(wksize); + * criFsBinder_BindFile(NULL, NULL, "sample.cpk,h work, wksize, &id); + * : + * + * //When a CPK is bound, criFsBinder_GetWorkSizeForBindCpk returns + * // the minimum necessary work size required for binding other than CPK analysis, + * // so it is also possible to dynamically allocate only unconfirmed area. + * criFsBinder_GetWorkSizeForBindCpk(NULL, "sample.cpk,h &wksize); + * work = malloc(wksize); + * // CPK bind + * criFsBinder_BindCpk(NULL, NULL, "sample.cpk,h work, wksize, &id); + * : + * } + * \endcode + */ +CriError CRIAPI criFsBinder_SetUserHeapFunc(CriFsMallocFunc allocfunc, CriFsFreeFunc freefunc, void *obj); + +/*EN + * \brief Generate a binder + * \ingroup FSLIB_BINDER + * \param[out] bndrhn Binder handle + * \return CriError Error code + * \par Description: + * This function generates a binder and returns a binder handle.
+ * \par Example: + * \code + * CriFsBinderHn bndrhn; + * criFsBinder_Create(&bndrhn); + * : + * criFsBinder_Destroy(bndrhn); + * \endcode + * \sa criFsBinder_Destroy() + */ +CriError CRIAPI criFsBinder_Create(CriFsBinderHn *bndrhn); + +/*EN + * \brief Destroy a binder + * \ingroup FSLIB_BINDER + * \param[in] bndrhn Binder handle + * \return CriError Error code + * \par Description: + This function disposes of a binder.
+ * \par Note: + * The bind ID bound to the binder to be disposed of is also disposed of at the same time.
+ * This function can dispose of only the binder handles generated by the ::criFsBinder_Create function.
+ * You cannot dispose of the binder handles acquired from CriFsBindId by the ::criFsBinder_GetHandle function.
+ * For CriFsBindId, use the ::criFsBinder_Unbind function. + * + * \sa criFsBinder_Create() criFsBinder_Unbind() + */ +CriError CRIAPI criFsBinder_Destroy(CriFsBinderHn bndrhn); + +/*EN + * \brief Get the work size for binding the CPK file + * \ingroup FSLIB_BINDER + * \param[in] srcbndrhn Binder handle to access the CPK file to bind + * \param[in] path Path name of the CPK file to bind + * \param[out] worksize Necessary work size (bytes) + * \return CriError Error code + * \par Description: + * This function retrieves the work size to be specified in the criFsBinder_BindCpk function.
+ * This function can get the minimum necessary work size to analyze the information on a CPK.
+ * A CPK file consisting of the small number of content files can be bound with the value acquired by this function.
+ * If the work memory runs short while binding a CPK, the insufficient size is shown by the error callback function.
+ *
+ * *** To get the work size required for CPK bind, use any of the following methods: ***

+ * P. Use error callback.
+ * If the work memory runs short while binding a CPK, the insufficient size is shown by the error callback function.
+ * Add the size acquired by error callback to the size of the currently allocated work area, and then reallocate the work area. After that, bind again the CPK.
+ * When binding again the CPK, you must unbind the binder ID that caused the error callback for the insufficient memory.
+ *
+ * Q. Use the memory allocation/release callback function (::criFsBinder_SetUserHeapFunc).
+ * Register the callback function to be called when the work memory needs to be allocated/released at the time of CPK bind.
+ * When the memory callback function is timely called at the time of the bind, the requested memory is allocated and returned as the return value of the error callback function.
+ *
+ * R. Use the necessary work size acquisition API (::criFsBinder_AnalyzeWorkSizeForBindCpk).
+ * Get the information from the CPK to bind, and use the function for calculating necessary work size.
+ * This function, which returns when the processing is completed, reads information from the CPK file within the function. Because of this, it take time to complete the function.
+ *
+ * S. Use the CPK packing tool.
+ * Drag and drop a CPK file into the packing tool, and add the number of bytes shown + * in the "Enable Filename info.,h "Enable ID info.,h and "Enable Group info." items + * to the necessary work size acquired by this function.
+ * Note that the work size acquired by this method is just a guideline, so error callback for insufficient memory may occur.
+ * \sa criFsBinder_BindCpk() criFsBinder_SetUserHeapFunc() criFsBinder_AnalyzeWorkSizeForBindCpk() + */ +CriError CRIAPI criFsBinder_GetWorkSizeForBindCpk(CriFsBinderHn srcbndrhn, const CriChar8 *path, CriSint32 *worksize); + + /*EN + * \brief Get the work area size required for CPK bind + * \ingroup FSLIB_BINDER + * \param[in] srcbndrhn Binder handle + * \param[in] path CPK file path + * \param[in] work Work area for CPK header analysis + * \param[in] wksize Size of the work area for CPK header analysis + * \param[out] rqsize Size of the work area required for CPK bind + * \return CriError Error code + * \par Description: + * This function analyzes the CPK file specified by "srcbndrhn" and "path,h and + * gets the size of the work area required for CPK bind.
+ * This function returns when the processing is completed.
+ * This function reads the header information of the specified CPK file, and analyzes it. Therefore, + *the function waits for the information to be read within the function. + * Allocate the work area of the size acquired by the criFsBinder_GetWorkSizeForBindCpk function + * and pass it to this function. + * \par Example: + * \code + * // ---- Allocate the minimum necessary memory for CPK analysis + * criFsBinder_GetWorkSizeForBindCpk(bndrhn, path, &wksz) + * work = malloc(wksz); + * // Analyze the memory size required for CPK bind + * criFsBinder_AnalyzeWorkSizeForBindCpk(bndrhn, path, work, wksz, &nbyte); + * free(work); + * // ---- + * // Allocate the memory for CPK bind + * bindwork = malloc(nbyte); + * // CPK bind + * criFsBinder_BindCpk(srcbndr, path, bindwork, nbyte, &bndrid); + * \endcode + */ +CriError CRIAPI criFsBinder_AnalyzeWorkSizeForBindCpk( + CriFsBinderHn srcbndrhn, const CriChar8 *path, void *work, CriSint32 wksize, CriSint32 *rqsize); + +/*UNDESCRIBED + * \brief Get the work area size required for CPK bind + * \ingroup FSLIB_BINDER + * \param[in] tocsize Size of the TOC information of the CPK file (CPK_TOC_INFO_SIZE) + * \param[in] tocsize Size of the ITOC information of the CPK file (CPK_ITOC_INFO_SIZE) + * \param[in] gtocsize Size of the GTOC information of the CPK file(CPK_GTOC_INFO_SIZE) + * \param[out] rqsize Size of the work area required for CPK bind (bytes) + * \return CriError Error code + * \par Description: + * This function retrieves the size of the work area required to bind the CPK file.
+ * For the argument of this function, specify the value defined in the + * CPK_TOC_INFO_SIZE, CPK_ITOC_INFO_SIZE, and CPK_GTOC_INFO_SIZE, the symbols of the CPK header file + * that is output when the CPK is built.
+ * Specify 0 for an undefined symbol.
+ * For example, for a CPK with ID only, CPK_TOC_INFO_SIZE or CPK_GTOC_INFO_SIZE is not defined, + * so specify 0 for "tocsize" and "gtosize."
+ * \par Example: + * \code + * + * // Analyze the memory size required for CPK bind + * criFsBinder_CalculateWorkSizeForBindCpk(CPK_TOC_INFO_SIZE, CPK_ITOC_INFO_SIZE, CPK_GTOC_INFO_SIZE,&nbyte); + * // ---- + * // Allocate the memory for CPK bind + * bindwork = malloc(nbyte); + * // CPK bind + * criFsBinder_BindCpk(srcbndr, path, bindwork, nbyte, &bndrid); + * \endcode + */ +CriError CRIAPI criFsBinder_CalculateWorkSizeForBindCpk(CriSint32 tocsize, CriSint32 itocsize, CriSint32 gtocsize, CriSint32 *rqsize); + +/*EN + * \brief Get the work size for binding a file + * \ingroup FSLIB_BINDER + * \param[in] srcbndrhn Binder handle to access the file to bind + * \param[in] path Path name of the file to bind + * \param[out] worksize Necessary work size (bytes) + * \return CriError Error code + * \par Description: + * This function retrieves the work size to be specified in the criFsBinder_BindFile function. + * \sa criFsBinder_BindFile() + */ +CriError CRIAPI criFsBinder_GetWorkSizeForBindFile(CriFsBinderHn srcbndrhn, const CriChar8 *path, CriSint32 *worksize); + +/*EN + * \brief Get the work size for binding multiple files + * \ingroup FSLIB_BINDER + * \param[in] srcbndrhn Binder handle to access the file to bind + * \param[in] filelist List of the names of files to bind (Separator: ',''\\t''\\n' Terminator: '\\0') + * \param[out] worksize Necessary work size (bytes) + * \return CriError Error code + * \par Description: + * This function retrieves the work size to be specified in the criFsBinder_BindFiles function. + * \sa criFsBinder_BindFiles() + */ +CriError CRIAPI criFsBinder_GetWorkSizeForBindFiles(CriFsBinderHn srcbndrhn, const CriChar8 *filelist, CriSint32 *worksize); + +/*EN + * \brief Get the work size for binding the file section + * \ingroup FSLIB_BINDER + * \param[in] srcbndrhn Binder handle to access the file to bind + * \param[in] path Path name of the file to bind + * \param[in] section_name Section name + * \param[out] worksize Necessary work size (bytes) + * \return CriError Error code + * \par Description: + * This function retrieves the work size that is to be specified in the criFsBinder_BindFileSection function. + * \sa criFsBinder_BindFileSection() + */ +CriError CRIAPI criFsBinder_GetWorkSizeForBindFileSection( + CriFsBinderHn srcbndrhn, const CriChar8 *path, + const CriChar8 *section_name, CriSint32 *worksize); + +/*EN + * \brief Get the work size for binding the directory + * \ingroup FSLIB_BINDER + * \param[in] srcbndrhn Binder handle to access the directory to bind + * \param[in] path Path name of the directory to bind + * \param[out] worksize Necessary work size (bytes) + * \return CriError Error code + * \par Description: + * This function retrieves the work size to be specified in the criFsBinder_BindDirectory function. + * \sa criFsBinder_BindDirectory() + */ +CriError CRIAPI criFsBinder_GetWorkSizeForBindDirectory(CriFsBinderHn srcbndrhn, const CriChar8 *path, CriSint32 *worksize); + +/*EN + * \brief Bind the CPK file + * \ingroup FSLIB_BINDER + * \param[in] bndrhn Binder handle of the bind destination + * \param[in] srcbndrhn Binder handle to access the CPK file to bind + * \param[in] path Path name of the CPK file to bind + * \param[in] work Work area for bind (mainly for CPK analysis) + * \param[in] worksize Size of the work area (bytes) + * \param[out] bndrid Bind ID + * \return CriError Error code + * \par Description: + * To use the CPK file, you must bind it.
+ * This function binds the CPK file (path) to the binder (bndrhn) and returns the bind ID (bndrid).
+ * For srcbndrhn, specify a binder to search for the CPK file. + * If this argument is NULL, the default device is used.
+ * You can get the size of the work area (work) using criFsBinder_GetWorkSizeForBindCpk. + * Retain the work area until the bind ID is destroyed.
+ * When the memory allocation/release callback function is registered, if NULL (work size is 0) is set for the work area, + * this function uses the memory allocation/release callback function to dynamically allocate the necessary work area.
+ * If binding cannot be started,CRIFSBINDER_BID_NULL is returned as the bind ID.
+ * If other than CRIFSBINDER_BID_NULL is the returned as the bind ID, internal resources are allocated. + * Unbind the bind ID that is no longer necessary regardless of whether the bind is successful or failed.

+ * The bound CPK file is kept open. + * This causes CriFsLoader to be created inside the binder.

+ * This is the non-blocking function. Immediately after the processing returns from this function, binding is not completed. + * You cannot access the CPK file yet.
+ * After the bind status shifts to Complete (CRIFSBINDER_STATUS_COMPLETE), the CPK becomes accessible.
+ * You can get the bind status using the criFsBinder_GetStatus function.
+ * \par Example: + * \code + * void *work; + * CriSint32 wksz; + * CriFsBindId bndrid; + * criFsBinder_GetWorkSizeForBindCpk(NULL, "smp.cpk,h &wksz); + * work = malloc(wksz); + * criFsBinder_BindCpk(bndrhn, NULL, "smp.cpk,h work, wksz, &bndrid); + * for (;;) { + * CriFsBinderStatus status; + * criFsBinder_GetStatus(bndrid, &status); + * if (status == CRIFSBINDER_STATUS_COMPLETE) break; + * } + * \endcode + * \sa criFsBinder_GetWorkSizeForBindCpk(), criFsBinder_SetUserHeapFunc(), criFsBinder_GetStatus(), criFsBinder_Unbind() +*/ +CriError CRIAPI criFsBinder_BindCpk(CriFsBinderHn bndrhn, CriFsBinderHn srcbndrhn, const CriChar8 *path, void *work, CriSint32 worksize, CriFsBindId *bndrid); + +/*EN + * \brief Bind the file + * \ingroup FSLIB_BINDER + * \param[in/out] bndrhn Binder handle to bind file + * \param[in] srcbndrhn Binder handle to search for files to bind + * \param[in] path Path name of the file to bind + * \param[in] work Work area for bind + * \param[in] worksize Size of the work area (bytes) + * \param[out] bndrid Bind ID + * \return CriError Error code + * \par Description: + * This function binds a file and returns a bind ID.
+ * The function searches the binder set to srcbndrhn for the file specified for "path" and binds the found file to bndrhn. + * If srcbndrhn is set to NULL, the default device is searched.
+ * You can get the size of the work area (work) using criFsBinder_GetWorkSizeForBindFile. + * Retain the work area until the bind ID is disposed of.
+ * When the memory allocation/release callback function is registered, if NULL (work size is 0) is set for the work area, + * this function uses the memory allocation/release callback function to dynamically allocate the necessary work area.
+ * If binding cannot be started,CRIFSBINDER_BID_NULL is returned as the bind ID. + * If other than CRIFSBINDER_BID_NULL is the returned as the bind ID, internal resources are allocated. + * Unbind the bind ID that is no longer necessary regardless of whether the bind is successful or failed.

+ * The bound file is retained in the open state. + * This causes CriFsLoader to be internally created.

+ * This is the immediate return function. Immediately after the return from this function, binding is not completed. + * You cannot use the binding ID to access the file yet.
+ * After the status of the bind ID shifts to Complete (CRIFSBINDER_STATUS_COMPLETE), + * the file becomes accessible.
+ * You can get the bind status using the criFsBinder_GetStatus function.
+ * \par Example: + * \code + * void *work; + * CriSint32 wksz; + * CriFsBindId bndrid; + * criFsBinder_GetWorkSizeForBindFile(NULL, "sample.txt,h &wksz); + * work = malloc(wksz); + * criFsBinder_BindFile(bndrhn, NULL, "sample.txt,h work, wksz, &bndrid); + * for (;;) { + * CriFsBinderStatus status; + * criFsBinder_GetStatus(bndrid, &status); + * if (status == CRIFSBINDER_STATUS_COMPLETE) break; + * } + * // Load data (Access in file open state) + * criFsBinder_GetFileSize(binder, "sample.txt", &fsize); + * criFsLoader_Load(loader, binder, "sample.txt", 0, fsize, buffer, buffer_size); + * // Waiting for load ... + * \endcode + * \sa criFsBinder_GetWorkSizeForBindFile(), criFsBinder_SetUserHeapFunc(), criFsBinder_GetStatus(), criFsBinder_Unbind() + */ +CriError CRIAPI criFsBinder_BindFile(CriFsBinderHn bndrhn, CriFsBinderHn srcbndrhn, const CriChar8 *path, void *work, CriSint32 worksize, CriFsBindId *bndrid); + +/*EN + * \brief Bind multiple files + * \ingroup FSLIB_BINDER + * \param[in/out] bndrhn Binder handle to bind file + * \param[in] srcbndrhn Binder handle to search for files to bind + * \param[in] filelist List of the names of files to bind (Separator: ',''\\t''\\n' Terminator: '\\0') + * \param[in] work Work area for bind + * \param[in] worksize Size of the work area + * \param[out] bndrid Bind ID + * \return CriError Error code + * \par Description: + * This function binds the flies listed in the file list (filelist).
+ * The file is searched for in the item set for srcbndrhn, but if srcbndrhn is set to NULL, the default device is searched.
+ * You can get the size of the work area using criFsBinder_GetWorkSizeForBindFiles. + * Retain the work area until the bind ID is disposed of.

+ * When the memory allocation/release callback function is registered, if NULL (work size is 0) is set for the work area, + * this function uses the memory allocation/release callback function to dynamically allocate the necessary work area. br> + * If binding cannot be started,CRIFSBINDER_BID_NULL is returned as the bind ID. + * If other than CRIFSBINDER_BID_NULL is the returned as the bind ID, internal resources are allocated. + * Unbind the bind ID that is no longer necessary regardless of whether the bind is successful or failed.

+ * The bound files are retained in the open state. + * Internally, one CriFsLoader is created for the bind ID, and file handles for the number of files to be bound are used.

+ * This is the non-blocking function. Immediately after the return from this function, binding is not completed. + * You cannot use a binder to access the files.
+ * After the bind status shifts to Complete (CRIFSBINDER_STATUS_COMPLETE), the files become accessible.
+ * You can get the bind status using the criFsBinder_GetStatus function.
+ * \par Example: + * \code + * void *work; + * CriSint32 wksz; + * CriFsBindId bndrid; + * CriChar8 *flist = "a.txt,b.txt,c.txt"; + * criFsBinder_GetWorkSizeForBindFiles(NULL, flist, &wksz); + * work = malloc(wksz); + * criFsBinder_BindFiles(bndrhn, NULL, flist, work, wksz, &bndrid); + * for (;;) { + * CriFsBinderStatus status; + * criFsBinder_GetStatus(bndrid, &status); + * if (status == CRIFSBINDER_STATUS_COMPLETE) break; + * } + * \endcode + * \sa criFsBinder_GetWorkSizeForBindFiles(), criFsBinder_SetUserHeapFunc(), criFsBinder_GetStatus(), criFsBinder_Unbind() + */ +CriError CRIAPI criFsBinder_BindFiles(CriFsBinderHn bndrhn, CriFsBinderHn srcbndrhn, const CriChar8 *filelist, void *work, CriSint32 worksize, CriFsBindId *bndrid); + +/*EN + * \brief Bind file section + * \ingroup FSLIB_BINDER + * \param[in/out] bndrhn Binder handle to do file section binding + * \param[in] srcbndrhn Binder handle to search for files to bind + * \param[in] path Path name of the file to bind + * \param[in] offset Start position of data (bytes) + * \param[in] size Data size (bytes) + * \param[in] section_name Section name + * \param[in] work Work area for bind + * \param[in] worksize Size of the work area (bytes) + * \param[out] bndrid Bind ID + * \return CriError Error code + * \par Description: + * This function binds part of a file and sets the part to be able to be treaded as a virtual file.
+ * The function searches the binder set to srcbndrhn for the file specified for "path,h and binds the found file. + * If srcbndrhn is set to NULL, the default device is searched.
+ * You can get the size of the work area (work) using criFsBinder_GetWorkSizeForBindFileSection. + * Retain the work area until the bind ID is disposed of.
+ * When the memory allocation/release callback function is registered, if NULL (work size is 0) is set for the work area, + * this function uses the memory allocation/release callback function to dynamically allocate the necessary work area. br> + * If binding cannot be started,CRIFSBINDER_BID_NULL is returned as the bind ID. + * If other than CRIFSBINDER_BID_NULL is the returned as the bind ID, internal resources are allocated. + * Unbind the bind ID that is no longer necessary regardless of whether the bind is successful or failed.

+ * The bound file is retained in the open state. + * This causes CriFsLoader to be internally created.

+ * This is the immediate return function. Immediately after the return from this function, binding is not completed. + * You cannot use the binding ID to access the file yet.
+ * After the status of the bind ID shifts to Complete (CRIFSBINDER_STATUS_COMPLETE), + * the file becomes accessible.
+ * You can get the bind status using the criFsBinder_GetStatus function.
+ * \par Example: + * \code + * CriFsBindId binder_id; + * CriFsBinderStatus status; + * : + * // Bind the 5,000 bytes of sample.txt from the 100th byte under the name, STAGE1. + * // Note: With an allocator already registered, the work area size does not need to be specified. + * criFsBinder_BindFileSection(binder_hn, NULL, "sample.txt,h 100, 5000, "STAGE1,h NULL, 0, &binder_id); + * + * // Wait for the binding to be completed + * for (;;) { + * // Check the bind status + * criFsBinder_GetStatus(binder_id, &status); + * if (status == CRIFSBINDER_STATUS_COMPLETE) { + * break; + * } + * + * // Execute the server processing + * criFs_ExecuteMain(); + * + * // Wait for Vsync or other processing + * c + * } + * + * // Read the data from the bound section + * // Note: Specify the section name for the path for loading. + * criFsLoader_Load(loader_hn, binder_hn, "STAGE1,h 0, 5000, buffer, buffer_size); + * F + * \endcode + * \sa criFsBinder_GetWorkSizeForBindFileSection, criFsBinder_GetStatus, criFsBinder_Unbind + */ +CriError CRIAPI criFsBinder_BindFileSection( + CriFsBinderHn bndrhn, CriFsBinderHn srcbndrhn, const CriChar8 *path, + CriUint64 offset, CriSint32 size, const CriChar8 *section_name, + void *work, CriSint32 worksize, CriFsBindId *bndrid); + +/*EN + * \brief Bind of the directory path + * \ingroup FSLIB_BINDER + * \param[in] bndrhn Binder handle + * \param[in] srcbndrhn Binder to access the file using the bound directory + * \param[in] path Path name of the directory to bind + * \param[in] work Work area for bind + * \param[in] worksize Size of the work area (bytes) + * \param[out] bndrid Bind ID + * \return CriError Error code + * \par Description: + * This function binds a directory path name.
+ * Specify the target directory name as an absolute path. + * At binding, whether the specified directory exists is not checked.
+ * This function binds only the directory path; it does not make a file + * in the specified directory enter the open state. Therefore, unless binding fails, the bind status of the bind ID + * becomes Complete (CRIFSBINDER_STATUS_COMPLETE) when the processing returns from the function.
+ * For srcbndrhn, specify the binder in which you search for files + * using the directory bound by this function.
+ * You can get the size of the work area (work) using criFsBinder_GetWorkSizeForBindDirectory. + * Retain the work area until the bind ID is disposed of.
+ * When the memory allocation/release callback function is registered, if NULL (work size is 0) is set for the work area, + * this function uses the memory allocation/release callback function to dynamically allocate the necessary work area.
+ * If binding cannot be started,CRIFSBINDER_BID_NULL is returned as the bind ID. + * If other than CRIFSBINDER_BID_NULL is the returned as the bind ID, internal resources are allocated. + * Unbind the bind ID that is no longer necessary regardless of whether the bind is successful or failed.
+ * \par Note: + * The upper limit is set for the number of directories to be able to be simultaneously bound.
+ * Specifically, even if the value set for num_binders or max_binds of CriFsConfig is large enough, + * currently only up to 16 directories (64 for PC) can be bound.
+ * \attention + * This function is a debugging function to support development.
+ * Using this function may cause the following problems:
+ * - Processing in the :criFsLoader_Load or criFsBinder_GetFileSize function is blocked for a long time.
+ * - When a file in the bound directory is accessed, streaming playback of a sound or a movie is interrupted.
+ *. + *
+ * Note that you must not use this function in a finalized application.
+ * (Make a CPK file using data in the directory and bind the file by the criFsBinder_BindCpk function, or bind all the files in the directory by the criFsBinder_BindFiles function.)
+ * \par Example: + * \code + * void *work; + * CriSint32 wksz; + * CriFsBindId bndrid; + * criFsBinder_GetWorkSizeForBindDirectory(bndrhn, "/cri/samples/,h &wksz); + * work = malloc(wksz); + * criFsBinder_BindDirectory(bndrhn, bndrhn, "/cri/samples/,h work, wksz, &bndrid); + * \endcode + * \sa criFsBinder_GetWorkSizeForBindDirectory(), criFsBinder_SetUserHeapFunc(), criFsBinder_GetStatus(), criFsBinder_Unbind(), criFsBinder_BindCpk(), criFsBinder_BindFiles() + */ +CriError CRIAPI criFsBinder_BindDirectory(CriFsBinderHn bndrhn, CriFsBinderHn srcbndrhn, const CriChar8 *path, void *work, CriSint32 worksize, CriFsBindId *bndrid); + +/*EN + * \brief Delete bind ID (Unbind): Blocking function + * \ingroup FSLIB_BINDER + * \param[in] bndrid Bind ID + * \return CriError Error code + * \par Description: + * This function deletes the bind ID from a binder.
+ * This function returns when the processing is completed. + * When the function cannot delete the specified bind ID, it returns CRIERR_NG.
+ * \par Supplemental information: + * Files are closed as needed, and this may take a few msecs depending on the execution environment.
+ * This function also unbinds the other bind IDs depending on the bind ID to be unbound (implicit unbind).
+ * For example, the implicit unbind is performed for the bind ID that binds the content files of a CPK bind ID + * when the referrer CPK bind ID is unbound. + * The implicitly unbound items are added to the Implicit Unbind List.
+ * The implicitly unbound bind ID must be unbound as usual by the criFsBinder_Unbind function, + * or the Implicit Unbind List must be cleared by the criFsBinder_CleanImplicitUnbindList function. + * \par Example: + * \code + * // Bind the CPK file + * criFsBinder_BindCpk(bndrhn, NULL, cpkpath, cpkwk, cpkwksz, &cpkid); + * : + * // fileid binds the content files of cpkid + * criFsBinder_BindFile(bndrhn, bndrhn, cntspath, filewk, filewksz, &fileid); + * : + * // Unbind the CPK bind ID + * criFsBinder_Unbind(cpkid); // fileid is implicitly unbound here. + * // Unbind the File bind ID + * criFsBinder_Unbind(fileid); + * \endcode + * \sa criFsBinder_BindCpk(), criFsBinder_BindFile(), criFsBinder_SetUserHeapFunc(), criFsBinder_CleanImplicitUnbindList() + */ +CriError CRIAPI criFsBinder_Unbind(CriFsBindId bndrid); + +/*EN + * \brief Delete bind ID (Unbind): Non-blocking function + * \ingroup FSLIB_BINDER + * \param[in] bndrid Bind ID + * \return CriError Error code + * + * \par Description: + * This function deletes the bind ID from a binder.
+ * This is the immediate return function.
+ * When the function cannot delete the specified bind ID, it returns CRIERR_NG.
+ *To proceed with the unbind processing, you must call the criFsExecuteMain and criFsBinder_GetStatus functions + * for server processing.
+ * + * \par Detect the completion of unbind: + * The completion of the unbind processing is determined by the status acquired by the criFsBinder_GetStatus function.
+ * The CRIFSBINDER_STATUS_UNBIND status indicates that the unbind is in progress.
+ * The CRIFSBINDER_STATUS_REMOVED status indicates that the unbind is complete.
+ * + * \par Supplemental information: + *When you specify a value that can be a bind ID and not used at the time, the status will become CRIFSBINDER_STATUS_REMOVED. + * The status will become CRIFSBINDER_STATUS_REMOVED.
+ * This function also unbinds the other bind IDs depending on the bind ID to be unbound (implicit unbind).
+ * For example, the implicit unbind is performed for the bind ID that binds the content files of a CPK bind ID + * when the referrer CPK bind ID is unbound.
+ * The implicitly unbound items are added to the Implicit Unbind List.
+ * The implicitly unbound bind ID must be unbound as usual by the criFsBinder_Unbind function, + * or the Implicit Unbind List must be cleared by the criFsBinder_CleanImplicitUnbindList function.
+ * + * \par Example: + * \code + * // Bind the CPK file + * criFsBinder_BindCpk(bndrhn, NULL, cpkpath, cpkwk, cpkwksz, &bndrid); + * : + * // Unbind the CPK bind ID + * criFsBinder_UnbindAsync(bndrid); + * // Wait for the unbinding to be completed + * while (1) { + * CriFsBinderStatus status; + * criFsBinder_GetStatus(bndrid, &status); + * // Unbinding complete + * if (status==CRIFSBINDER_STATUS_REMOVED) + break; + * // Execute the server processing + * criFs_ExecuteMain(); + * } + * \endcode + * \sa criFsBinder_BindCpk(), criFsBinder_BindFile(), criFsBinder_SetUserHeapFunc(), criFsBinder_CleanImplicitUnbindList() + */ +CriError CRIAPI criFsBinder_UnbindAsync(CriFsBindId bndrid); + +/*EN + * \brief Clear the Implicit Unbind List + * \ingroup FSLIB_BINDER + * \return CriError Error code + * \par Description: + * This function returns all the bind IDs registered in the Implicit Unbind List to the unused list.
+ * A bind ID is implicitly unbound in the following cases:
+ * - When a file depending on another bind ID is bound (content files of CPK, etc.)
+ * - When the parent bind ID is unbound + * \sa criFsBinder_Unbind() + */ +CriError CRIAPI criFsBinder_CleanImplicitUnbindList(void); + +/*EN + * \brief Get the bind status + * \ingroup FSLIB_BINDER + * \param[in] bndrid Bind ID + * \param[out] status CriFsBinderStatus binder status + * \return CriError Error code + * \par Description: + * This function retrieves the bind status of the specified bind ID.
+ * You cannot access files using the bind ID + * until the bind status shifts to CRIFSBINDER_STATUS_COMPLETE.
+ * \par Example: + * \code + * CriFsBinderStatus status; + * criFsBinder_GetStatus(bndrid, &status); + * \endcode + * \sa criFsBinder_BindCpk(), criFsBinder_BindFile(), criFsBinder_BindFiles() + */ +CriError CRIAPI criFsBinder_GetStatus(CriFsBindId bndrid, CriFsBinderStatus *status); + +/*EN + * \brief Get the file information (by specifying file name) + * \ingroup FSLIB_BINDER + * \param[in] bndrhn Binder handle + * \param[in] filepath Full path of the file + * \param[out] finfo File information structure + * \param[out] exist File search result (CRI_TRUE: Retrieved, CRI_FALSE: Failed) + * \return CriError Error code + * \par Description: + * This function searches the binder for the specified file, and returns the information.
+ * Only the bind IDs with the RIFSBINDER_STATUS_COMPLETE bind status are to be searched for.
+ * When the file is found, the function sets the "exist" to CRI_TRUE, and the file information structure "finfo" to the file information.
+ * If the file is not found, the function sets the "exist" to CRI_FALSE.
+ * When the "finfo" is NULL, the function sets the "exist" to only the result of the file search. + * \par Example: + * \code + * CriFsBinderFileInfo finfo; + * CriBool exist; + * criFsBinder_Find(bndrhn, "a.txt", &finfo, &exist); + * if (exist == CRI_TRUE) { // File is found. + * } + * else {// File cannot found. + * } + * \endcode + * * \sa criFsBinder_GetStatus() +*/ +CriError CRIAPI criFsBinder_Find(CriFsBinderHn bndrhn, const CriChar8 *filepath, CriFsBinderFileInfo *finfo, CriBool *exist); + +/*EN + * \brief Get the file information (by specifying ID) + * \ingroup FSLIB_BINDER + * \param[in] bndrhn Binder handle + * \param[in] id CPK content file ID + * \param[out] finfo File information structure + * \param[out] exist File search result (CRI_TRUE: Retrieved, CRI_FALSE: Failed) + * \return CriError Error code + * \par Description: + * This function searches the binder for the specified file, and returns the information.
+ * A CPK with ID needs to be bound beforehand.
+ * Only the bind IDs with the RIFSBINDER_STATUS_COMPLETE bind status are to be searched for.
+ * When the file is found, the function sets the "exist" to CRI_TRUE, and the file information structure "finfo" to the file information.
+ * If the file is not found, the function sets the "exist" to CRI_FALSE.
+ * When the "finfo" is NULL, the function sets the "exist" to only the result of the file search (CRI_TRUE/CRI_FALSE). + * \par Example: + * \code + * CriFsBinderFileInfo finfo; + * CriBool exist; + * criFsBinder_FindById(bndrhn, 10, &finfo, &exist); + * if (exist == CRI_TRUE) { // File is found. + * } + * else { // File cannot found. + * } + * \endcode + * \sa criFsBinder_GetStatus() criFsBinder_BindCpk() +*/ +CriError CRIAPI criFsBinder_FindById(CriFsBinderHn bndrhn, CriFsFileId id, CriFsBinderFileInfo *finfo, CriBool *exist); + +/*EN + * \brief Get CriFsBinderHn + * \ingroup FSLIB_BINDER + * \param[in] bndrid Bind ID + * \param[out] bndrhn Binder handle + * \return CriError Error code + * \par Description: + * This function converts CriFsBindId into CriFsBinderHn.
+ * This should be considered that CriFsBinderHn is not newly created but the type is converted.
+ * Therefore, the same entity is specified, and this function does not consume the resources of CriFsBinderHn.
+ * The original CriFsBindId can be used as CriFsBindId without change.
+ * To get the information on the bound file, the bound bind ID is searched sequentially.
+ * Therefore, to access a file with a specific bind ID, + * getting and using a binder handle enables you to streamline the search.
+ * \par Note: + * The CriFsBinderHn acquired by this function cannot be disposed of by the ::criFsBinder_Destroy function. + * Unbind the original CriFsBindId by the ::criFsBinder_Unbind function.
+ * \par Example: + * \code + * // Bind the CPK + * criFsBinder_BindCpk(parent_bndrhn, NULL, cpkpath, work, worksize, &cpk_bndrid); + * // Get the binder handle from the bind ID + * criFsBinder_GetHandle(cpk_bndrid, &cpk_bndrhn); + * // Get the file information using this handle + * criFsBinder_Find(cpk_bndrhn, filepath, &finfo, &exist); + * : + * // Unbind the bind ID The acquired binder handle also cannot be used. + * criFsBinder_Unbind(cpk_bndrid); + * \endcode + * \sa criFsBinder_Unbind + */ +CriError CRIAPI criFsBinder_GetHandle(CriFsBindId bndrid, CriFsBinderHn *bndrhn); + +/*EN + * \brief Get the file size (by specifying file name) + * \ingroup FSLIB_BINDER + * \param[in] bndrhn Binder handle + * \param[in] filepath Full path of the file + * \param[out] size File size + * \return CriError Error code + * \par Description: + * This function retrieves the size of the specified file.
+ * First, search the bndrhn binder for the target file.
+ * If the target file is not found in bndrhn, this function searches the default device for the file. + * At this time, the file may be waited for being opened.
+ * The bind IDs with the RIFSBINDER_STATUS_COMPLETE bind status are to be searched for.
+ * If the specified file is not found, a negative value is set for the "size". + * \par Note: + * This function internally executes the ::criFsBinder_Find function, + * and if the file is not registered in the binder, the function accesses + * the file I/O to check for the file.
+ * (If this function is executed for a file not registered in the binder or a file that does not exist, + * access to the file I/O occurs, possibly causing the processing to be blocked for a long time.)
+ *
+ * To check whether the file is registered in the binder, + * use the ::criFsBinder_Find function instead of this function.
+ * \attention + * In the following cases, processing may be blocked for a long time in this function. + * - When specifying NULL for the binder handle + * - When specifying a file not registered in the binder + * - When specifying an invalid path (path that does not exist) + * - When specifying a handle with the directory bound by the criFsBinder_BindDirectory function + * . + * \sa criFsBinder_GetFileSizeById, criFsBinder_Find + */ +CriError CRIAPI criFsBinder_GetFileSize(CriFsBinderHn bndrhn, const CriChar8 *filepath, CriSint64 *size); + +/*EN + * \brief Get the file size (by specifying ID) + * \ingroup FSLIB_BINDER + * \param[in] bndrhn Binder handle + * \param[in] id File ID + * \param[out] size File size + * \return CriError Error code + * \par Description: + * This function retrieves the file size.
+ * A CPK file with an ID needs to be bound beforehand.
+ * Search the bndrhn binder for the target file. + * Only the CPK bind IDs with the RIFSBINDER_STATUS_COMPLETE bind status are to be searched for.
+ * \sa criFsBinder_GetFileSize + */ +CriError CRIAPI criFsBinder_GetFileSizeById(CriFsBinderHn bndrhn, CriFsFileId id, CriSint64 *size); + +/*EN + * \brief Get the ROM address (by specifying file name) + * \ingroup FSLIB_BINDER_EMB + * \param[in] bndrhn Binder handle + * \param[in] filepath Full path of the file + * \param[out] rom_address ROM address + * \return CriError Error code + * \par Description: + * This function retrieves the ROM address of the specified file.
+ * Search the bndrhn binder for the target file.
+ * The bind IDs with the RIFSBINDER_STATUS_COMPLETE bind status are to be searched for.
+ * Using the binder is required. For the binder, NULL cannot be specified. + * Directory bind is not supported. The handle used for criFsBinder_BindDirectory cannot be specified. + * If the specified file is not found, CRIFS_ROM_ADDRESS_INVALID is set for the "rom_address". + * \attention + * This function is not supported for gaming machines. Do not call this function.
+ * \sa criFsBinder_GetRomAddress() criFsBinder_GetRomAddressById() + */ +CriError CRIAPI criFsBinder_GetRomAddress(CriFsBinderHn bndrhn, const CriChar8 *filepath, CriUint64Adr *rom_address); + +/*EN + * \brief Get the ROM address (by specifying ID) + * \ingroup FSLIB_BINDER_EMB + * \param[in] bndrhn Binder handle + * \param[in] id File ID + * \param[out] rom_address ROM address + * \return CriError Error code + * \par Description: + * This function retrieves the ROM address of the specified file.
+ * A CPK file with an ID needs to be bound beforehand.
+ * Search the bndrhn binder for the target file. + * Only the CPK bind IDs with the RIFSBINDER_STATUS_COMPLETE bind status are to be searched for.
+ * If the specified file ID is not found, CRIFS_ROM_ADDRESS_INVALID is set for the "rom_address". + * \attention + * This function is not supported for gaming machines. Do not call this function.
+ * \sa criFsBinder_GetRomAddress() criFsBinder_GetRomAddressById() + */ +CriError CRIAPI criFsBinder_GetRomAddressById(CriFsBinderHn bndrhn, CriFsFileId id, CriUint64Adr *rom_address); + +/*EN + * \brief Get the priority value + * \ingroup FSLIB_BINDER + * \param[in] bndrid Bind ID + * \param[out] prio Priority value + * \return CriError Error code + * \par Description: + * This function retrieves the priority value of the bind ID.
+ * Using the priority enables you to control the order of searching the bind IDs in a binder handle.
+ * The priority value of the ID is 0 when bound, and IDs are searched in the binding order of them with the same priority.
+ The larger the priority value is, the higher the priority with higher search order is. + * \sa criFsBinder_SetPriority() + */ +CriError CRIAPI criFsBinder_GetPriority(CriFsBindId bndrid, CriSint32 *priority); + +/*EN + * \brief Set the priority value + * \ingroup FSLIB_BINDER + * \param[in] bndrid Bind ID + * \param[in] prio Priority value + * \return CriError Error code + * \par Description: + * This function sets the priority value for the bind ID.
+ * Using the priority enables you to control the order of searching the bind IDs in a binder handle.
+ * The priority value of the ID is 0 when bound, and IDs are searched in the binding order of them with the same priority.
+ The larger the priority value is, the higher the priority with higher search order is. + * \par Example: + * \code + * // Bind in the order of a.cpk(a_id) and b.cpk(b_id) + * criFsBinder_BindCpk(bndrhn, NULL, "a.cpk,h a_wk, a_wksz, a_id); + * criFsBinder_BindCpk(bndrhn, NULL, "b.cpk,h a_wk, a_wksz, b_id); + * // At this time, the ID is searched in the order of a_id and b_id. + * : + * criFsBinder_SetPriority(b_id, 1); + * // The priority of b_id is raised higher than the default value, + * // so the search is performed in the order of b_id and a_id. + * \endcode + * \sa criFsBinder_GetPriority() +*/ +CriError CRIAPI criFsBinder_SetPriority(CriFsBindId bndrid, CriSint32 priority); + +/*EN + * \brief Set the current directory + * \ingroup FSLIB_BINDER + * \param[in] bndrId Bind ID + * \param[in] path Current directory + * \param[in] work Work area for saving the current directory name + * \param[in] worksize Size of the work area for saving the current directory name + * \return CriError Error code + * \par Description: + * This function sets the current directory for the bind ID.
+ * If required work area cannot be allocated, the current directory will fail to be set.
+ * In that case, the already set current directory setting will be disposed of.
+ * When you refer to the file using the bind ID, the current directory is added before the path name.
+ * The specified size of the work area is used to store the current directory name to be set.
+ * Allocate and pass at least the area of strlen (path) + 1 byte. + * When the memory allocation/release callback function is registered, if NULL (work size is 0) is set for the work area, + * this function uses the memory allocation/release callback function to dynamically allocate the necessary work area.
+ * \par Example: + * \code + * // Immediately after the bind, the current directory is not set. + * criFsBinder_BindCpk(bndrhn, NULL, "cpk.cpk,h wk, wksz, bndrid); + * : + * criFsBinder_Find(bndrhn, "a.txt,h NULL, &exist); // Searched by "a.txt" + * : + * \brief Set the current directory, "/folder/" + * worksz = strlen("/folder/")+1; + * work = malloc(worksz); + * criFsBinder_SetCurrentDirectory(bndrid, "/folder/,h work, worksz); + * criFsBinder_Find(bndrhn, "a.txt,h NULL, &exist); // Searched by "/folder/a.txt" + * \endcode + * \sa criFsBinder_SetUserHeapFunc() + */ +CriError CRIAPI criFsBinder_SetCurrentDirectory(CriFsBindId bndrId, const CriChar8 *path, void *work, CriSint32 worksize); + +/*EN + * \brief Get the CPK content file information + * \ingroup FSLIB_BINDER + * \param[in] bndrhn Binder handle + * \param[in] path Content file path name + * \param[out] cfinf Pointer to the CriFsBinderContentsFileInfo structure + * \return CriError Error code + * \par Description: + * This function retrieves the information on the file having the specified content file name from the CPK file with file name information.
+ * The CPK storing the specified content file must be the CPK with file name information.
+ * When multiple files with the same name exist in the specified binder handle, + * the CPK storing the file first found is selected.
+ * To directly specify a specific CPK file, use the criiFsBinder_GetHandle function to get the binder handle from the binder ID of the CPK file, + * and use the binder handle as the argument of this function.
+ * \par Note: + * To use this function, you must use the CPK with file name information created + * by using "CPK File Builder Ver.1.03 or later." + * \par Example: + * \code + * CriFsBinderContentsFileInfo cfinf; + * // Bind the CPK + * criFsBinder_BindCpk(parent_bndrhn, NULL, cpkpath, work, worksize, &cpk_bndrid); + * // Get the information on the content file + * criFsBinder_GetContentsFileInfo(parent_bndrhn, CPK_CONTENTS_FILENAME, &cfinf); + * \endcode + */ +CriError criFsBinder_GetContentsFileInfo(CriFsBinderHn bndrhn, const CriChar8 *path, CriFsBinderContentsFileInfo *cfinf); + +/*EN + * \brief Get the CPK content file information + * \ingroup FSLIB_BINDER + * \param[in] bndrhn Binder handle + * \param[in] id File ID + * \param[out] cfinf Pointer to the CriFsBinderContentsFileInfo structure + * \return CriError Error code + * \par Description: + * This function retrieves the information on the file with the specified file ID from the CPK file with ID + file name information.
+ * The CPK storing the specified file must be the CPK with ID + file name information.
+ * When multiple files with the same ID exist in the specified binder handle, + * the CPK storing the file first found is selected.
+ * To directly specify a specific CPK file, use the criiFsBinder_GetHandle function to get the binder handle from the bind ID of the CPK file, + * and use the binder handle as the argument of this function.
+ * \par Note: + * To use this function, you must use the CPK with ID + file name information created + * by using "CPK File Builder Ver.1.03 or later." + * \par Example: + * \code + * CriFsBinderContentsFileInfo cfinf; + * // Bind the CPK + * criFsBinder_BindCpk(parent_bndrhn, NULL, cpkpath, work, worksize, &cpk_bndrid); + * // Get the file information of ID 0x00000010 + * criFsBinder_GetContentsFileInfoById(parent_bndrhn, 0x00000010, &cfinf); + * \endcode + */ +CriError CRIAPI criFsBinder_GetContentsFileInfoById(CriFsBinderHn bndrhn, CriFsFileId id, CriFsBinderContentsFileInfo *cfinf); + +/*EN + * \brief Get the CPK content file information by specifying Index + * \ingroup FSLIB_BINDER + * \param[in] bndrhn Bind ID + * \param[in] index Beginning index of the content file from which information is acquired + * \param[out] cfinf CriFsBinderContentsFileInfo structure array + * \param[in] n Number of the content files from which information is acquired + * \return CriError Error code + * \par Description: + * This function retrieves the file information of n content files of the CPK file from the index.
+ * When a CPK is created, the index is assigned from 0 to the content files.
+ * The upper limit of n for the index is the number of files acquired by the criFsBinder_GetBinderIdInfo function. + * + * \par Example: Get information on all the content files of the CPK + * \code + * CriFsBinderInfo binf; + * CriFsBinderContentsFileInfo *cfinf; + * // Bind the CPK + * criFsBinder_BindCpk(parent_bndrhn, NULL, cpkpath, work, worksize, &cpk_bndrid); + * : // Wait for the CPK bind to be completed. + * : + * // Get the number of content files of the CPK. + * criFsBinder_GetBinderIdInfo(cpk_bndrid, &binf); + * // Allocate the information storage area from which the information on all the content files are acquired. + * cfinf = malloc(sizeof(CriFsBinderContentsFileInfo)*binf.nfiles); + * // Get information on all the content files of the CPK + * criFsBinder_GetContentsFileInfoByIndex(cpk_bndrid, 0, cfinf, binf.nfiles); + * \endcode + * \par Example: Get information on part of the content files of CPK (10 files from the file with Index No. 5) + * \code + * #define CNTNTS_INDX (5) // From Index 5 + * #define CNTNTS_N (10) // 10 content files + * CriFsBinderInfo binf; + * CriFsBinderContentsFileInfo *cfinf; + * // Bind the CPK + * criFsBinder_BindCpk(parent_bndrhn, NULL, cpkpath, work, worksize, &cpk_bndrid); + * : // Wait for the CPK bind to be completed. + * : + * // Allocate the information storage area from which the information for the number of content files to be acquired is acquired. + * cfinf = malloc(sizeof(CriFsBinderContentsFileInfo)*CNTNTS_N); + * // Get information on all the content files of the CPK + * criFsBinder_GetContentsFileInfoByIndex(cpk_bndrid, CNTNTS_INDX, cfinf, CNTNTS_N); + * \endcode + * \par Note: + * Even if getting information failed, the function may not return an error value.
+ * Even in that case, because the file name and ID of the content file information are invalid, + * failure of information acquisitioncan be detected.
+ */ +CriError CRIAPI criFsBinder_GetContentsFileInfoByIndex(CriFsBindId bndrid, CriSint32 index, CriFsBinderContentsFileInfo *cfinf, CriSint32 n); + +/*EN + * \brief Get bind ID information + * \ingroup FSLIB_BINDER + * \param[in] bndrid Bind ID + * \param[out] binf Acquisition information + * \return CriError Error code + * \par Description: + * This function retrieves the information such as the bind type (CPK, file, directory, etc.) of the specified bind ID, name of the bound file, + * and priority setting.
+ */ +CriError CRIAPI criFsBinder_GetBinderIdInfo(CriFsBindId bndrid, CriFsBinderInfo *binf); + +/*EN + * \brief Get the number of group files + * \ingroup FSLIB_BINDER + * \param[in] bndrid Bind ID + * \param[in] groupname Group name + * \param[in] attrname Attribute name + * \param[out] groupfiles Number of group files + * \return CriError Error code + * \par Description: + * This function retrieves the number of files that match the specified bind ID, group name and attribute name.
+ * If no file that matches the specified items is found, the number of file will be 0.
+ * You must specify the bind ID used for binding the CPK file with group information.
+ * If an invalid bind ID is specified, an error callback occurs.
+ * When NULL is specified for the attribute name, all the files belonging to the specified group are to be loaded in a group.
+ * When "none" is specified for the attribute of the packing tool, also specify NULL for the attribute name here.
+ */ +CriError CRIAPI criFsBinder_GetNumberOfGroupFiles(CriFsBindId bndrid, const CriChar8 *groupname, const CriChar8 *attrname, CriSint32 *groupfiles); + +/*EN + * \brief Get the group load size + * \ingroup FSLIB_BINDER + * \param[in] bndrid Bind ID + * \param[in] groupname Group name + * \param[in] attrname Attribute name + * \param[out] datasize Group load size + * \return CriError Error code + * \par Description: + * This function retrieves the size of the read area required for loading the group that matches the specified bind ID, group name and attribute name.
+ * The data size takes alignment or other factors into account.
+ * If no file that matches the specified items is found, the group load size will be 0.
+ * You must specify the bind ID used for binding the CPK file with group information.
+ * If an invalid bind ID is specified, an error callback occurs.
+ * When NULL is specified for the attribute name, all the files belonging to the specified group are to be loaded in a group.
+ * When "none" is specified for the attribute of the packing tool, also specify NULL for the attribute name here.
+ */ +CriError CRIAPI criFsBinder_GetTotalGroupDataSize(CriFsBindId bndrid, const CriChar8 *groupname, const CriChar8 *attrname, CriSint64 *datasize); + +/*EN + * \brief Get the work size for creating access information table of the CPK with ID information + * \ingroup FSLIB_BINDER + * \param[in] binderid Bind ID + * \param[in] steps Interval of creating an access information table + * \param[out] worksize Size of the work area for creating an access information table + * \return CriError Error code + * \par Description: + * This function retrieves the work area size required for creating the access information table of the CPK with ID information.
+ * The access information table is used to perform in advance the processing for accessing the content files of a CPK + * to increase the access speed.
+ * The access table is unnecessary for a CPK without ID information. + * This function is enabled only for a CPK with ID information.
+ * This function returns when the processing is completed.
+ * As long as the CPK is bound, do not release the access information table area or use it for other processing.
+ * \par About creation interval of access information tables + * When 1 is specified for steps, an access information table is created for all the content files. + * In this case, the number of elements in the access information table is the same as the number of content files.
+ * When a number larger than 1 is specified for steps, an access information table is created for content files at every specified step. + * The number of elements in the access information table varies depending on the steps.
+ *A table is not prepared for all the content files, so although it takes more time for the processing when files are accessed + * compared with when steps is set to 1, the access information table requires a less area. + */ +CriError CRIAPI criFsBinder_GetWorkSizeForCpkIdAccessTable(CriFsBindId bindrid, CriSint32 steps, CriSint32 *worksize); + +/*EN + * \brief Create an access information table of CPK with ID information + * \ingroup FSLIB_BINDER + * \param[in] binderid Bind ID + * \param[in] steps Interval of creating an access information table + * \param[in] work Work area for creating an access information table + * \param[in] worksize Size of the work area for creating an access information table + * \return CriError Error code + * \par Description: + * This function creates an access information table of a CPK with ID information.
+ * Creating an access information table increases the speed of access to the content files of the CPK. + * This function returns when the processing is completed. When the CPK has many content files, it may take time for the function to return.
+ * No access table is created for a CPK without ID information.
+ * This function is enabled only for a CPK with ID information.
+ * As long as the CPK is bound, do not release the access information table area or use it for other processing.
+ * Release the access information table area after unbinding the CPK.
+ */ +CriError CRIAPI criFsBinder_SetupCpkIdAccessTable(CriFsBindId binderid, CriSint32 steps, void *work, CriSint32 worksize); + +/*EN + * \brief Temporarily close a bound file + * \ingroup FSLIB_BINDER + * \param[in] bind_id Bind ID + * \param[out] internal_loader_status Internal loader status + * \return CriError Error code + * \par Description: + * This function temporarily closes a bound file.
+ * Unlike the ::criFsBinder_Unbind function, + * this function closes only the file with the TOC information of the CPK file kept on the memory.
+ * (The handle of the native file associated with the bind ID is closed.)
+ * \par Note: + *This function is used to temporarily release the file handle + * to open other files while the CPK file needs to be kept bound.
+ * * Unless the hardware resources including file handles reach the upper limit of available resources on the platform, + * this function is unnecessary.
+ *
+ * This function is synchronous API.
+ * Executing this function blocks the processing until the file open is completed.
+ * To asynchronously perform the open processing, use the + * ::criFsBinder_CloseFileAsync function instead of this function.
+ * \attention + * When the CPK file closed by this function is accessed, a read error occurs.
+ * After executing this function and until executing the ::criFsBinder_ReopenFile function, + * you must control the processing to prevent the CPK file from being accessed.
+ *
+ * This function is available only when a CPK file is directly bound.
+ * This function cannot be used in the following cases: the directly bind is used, + * the file bind is used, and a content file in a CPK file is bound.
+ * \sa criFsBinder_ReopenFile + */ +CriError CRIAPI criFsBinder_CloseFile( + CriFsBindId bind_id, CriFsLoaderStatus *internal_loader_status); + +/*EN + * \brief Reopen the temporarily closed file + * \ingroup FSLIB_BINDER + * \param[in] bind_id Bind ID + * \param[out] internal_loader_status Internal loader status + * \return CriError Error code + * \par Description: + * This function reopens the file closed by the ::criFsBinder_CloseFile or other functions.
+ * \par Note: + * This function is synchronous API.
+ * Executing this function blocks the processing until the file open is completed.
+ * To asynchronously perform the open processing, use the + * ::criFsBinder_ReopenFileAsync function instead of this function.
+ * \attention + * If this function fails to reopen the file, for example, due to a read error, + * the status of the second argument (internal_loader_status) shifts to ::CRIFSLOADER_STATUS_ERROR.
+ * \sa criFsBinder_CloseFile + */ +CriError CRIAPI criFsBinder_ReopenFile( + CriFsBindId bind_id, CriFsLoaderStatus *internal_loader_status); + +/*EN + * \brief Temporarily close a bound file + * \ingroup FSLIB_BINDER + * \param[in] bind_id Bind ID + * \param[out] internal_loader Internal loader handle + * \return CriError Error code + * \par Description: + * This function temporarily closes a bound file.
+ * This function performs the same operation as the ::criFsBinder_CloseFile function except that the processing is asynchronous.
+ * \par Note: + * This function is API for asynchronous processing.
+ * When this function is executed, the processing returns without waiting for the file close to be completed.
+ *
+ * Check whether the file close is complete using the loader handle + * returned by the second argument (internal_loader).
+ * (When the close processing is completed, the status of the loader + * handle shifts to ::CRIFSLOADER_STATUS_COMPLETE.)
+ * \attention + * The loader handle returned by the second argument (internal_loader) + * is the internal resource used for file access inside the library.
+ * Do not destroy this handle in the application.
+ * \sa criFsBinder_CloseFile + */ +CriError CRIAPI criFsBinder_CloseFileAsync( + CriFsBindId bind_id, CriFsLoaderHn *internal_loader); + +/*EN + * \brief Reopen the temporarily closed file + * \ingroup FSLIB_BINDER + * \param[in] bind_id Bind ID + * \param[out] internal_loader Internal loader handle + * \return CriError Error code + * \par Description: + * This function reopens the file closed by the ::criFsBinder_CloseFile or other functions.
+ * This function performs the same operation as the ::criFsBinder_ReopenFile function except that the processing is asynchronous.
+ * \par Note: + * This function is API for asynchronous processing.
+ * When this function is executed, the processing returns without waiting for the file open to be completed.
+ *
+ * Check whether the file open is complete using the loader handle + * returned by the second argument (internal_loader).
+ * (When the open processing is completed, the status of the loader + * handle shifts to ::CRIFSLOADER_STATUS_COMPLETE.)
+ * After checking that the file open is complete, use the ::criFsBinder_CompleteAsyncFileReopen function
+ * to complete the reopen of the file for the bind ID. + * \attention + * The loader handle returned by the second argument (internal_loader) + * is the internal resource used for file access inside the library.
+ * Do not dispose of this handle in the application.
+ *
+ * If this function fails to reopen the file, for example, due to a read error, + * the status of the loader handle returned by the second argument (internal_loader_status) + * shifts to ::CRIFSLOADER_STATUS_ERROR.
+ * \sa criFsBinder_ReopenFile + */ +CriError CRIAPI criFsBinder_ReopenFileAsync( + CriFsBindId bind_id, CriFsLoaderHn *internal_loader); + +/*EN + * \brief Reflect reopen of the temporarily closed file + * \ingroup FSLIB_BINDER + * \param[in] bind_id Bind ID + * \return CriError Error code + * \par Description: + * This function reflects the information on the file reopened by the ::criFsBinder_ReopenFileAsync function to the bind ID,
+ * and completes the reopen processing.
+ * Check that the status of the loader handle acquired by the ::criFsBinder_ReopenFileAsync function shifts to
+ * ::CRIFSLOADER_STATUS_COMPLETE before executing this function.
+ * If you load the file without executing this function for the bind ID + * that reopened the file, the loading will fail. + * \par + * You need not execute this function for the ::criFsBinder_ReopenFile function.
+ * \attention + * If this function is executed with the status of the loader handle
+ * for file reopen in other than ::CRIFSLOADER_STATUS_COMPLETE,
+ * this function returns an error.
+ */ +CriError CRIAPI criFsBinder_CompleteAsyncFileReopen(CriFsBindId bind_id); + +/*EN + * \brief Specifying a path separator for multiple files binding + * \ingroup FSLIB_BINDER + * \param[in] filter A list of characters to use as a separator + * \return CriError Error code + * \par Description: + * Change the character that the ::criFsBinder_BindFiles function interprets as a separator.
+ *
+ * When binding multiple files using the ::criFsBinder_BindFiles function, + * you need to specify a character string combining file paths with separators.
+ * By default, the CRI File System library uses + * "," "\\t" and "\\n" as separators.
+ * If you want to use a different character as separator, + * you can use this function.
+ *
+ * For the "filter" (first argument) specify a character string that + * stores a list of characters to use as separators.
+ * For example, if you specify "@+-*", four characters, + * "@", "+", "-" and "*", will be handled as separators.
+ * \par Remarks: + * If you specify an empty string ("") for "filter", the separator becomes invalid.
+ * If NULL is specified for "filter", the setting returns to the default state.
+ * \attention + * If you pass a path containing a separator to a function other than the ::criFsBinder_BindFiles function, + * the CRI File System library will consider the path as incorrect.
+ * (Paths after the separator become invalid.)
+ * Even when not using the ::criFsBinder_BindFiles function, + * when handling a path including "," "\\ t" "\ \ n" in an application, + * it is necessary to change to a separator beforehand with this function.
+ *
+ * Up to 7 characters can be specified in the filter string.
+ */ +CriError CRIAPI criFsBinder_SetPathSeparatorForBindFiles(const CriChar8 *filter); + +/*========================================================================== + * CriFsLoader API + *=========================================================================*/ +/*EN + * \brief CRI File System - Loader object + * \ingroup FSLIB_BASIC + * \par Description: + * CriFsBinder is the module to read file data simply and easily. + */ + +/*EN + * \brief Create CriFsLoader + * \ingroup FSLIB_BASIC + * \param[out] loader CriFsLoader handle + * \return CriError Error code + * \par Description: + * This function creates CriFsLoader. + */ +CriError CRIAPI criFsLoader_Create(CriFsLoaderHn *loader); + +/*EN + * \brief Destroys CriFsLoader + * \ingroup FSLIB_BASIC + * \param[in] loader CriFsLoader handle + * \return CriError Error code + * \par Description: + * This function destroys CriFsLoader. + * \attention + * Do not execute this function in the load complete callback. + * \sa criFsLoader_Create + */ +CriError CRIAPI criFsLoader_Destroy(CriFsLoaderHn loader); + +/*EN + * \brief Register load complete callback + * \ingroup FSLIB_BASIC + * \param[in] loader CriFsLoader handle + * \param[in] func Callback function + * \param[in] obj Argument passed to the callback function + * \return CriError Error code + * \par Description: + * This function registers the callback function to be executed when loading is completed.
+ * The load complete callback is called immediately after the status of the loader shifts + * from CRIFSLOADER_STATUS_LOADING to another status.
+ * (The callback is executed when the status shifts to CRIFSLOADER_STATUS_STOP or + * CRIFSLOADER_STATUS_ERROR in addition to CRIFSLOADER_STATUS_COMPLETE.)
+ * \par Note: + * Please note that another processing could technically occur between the time of the status change and when the callback is executed, + * so that the timings of the status change and the callback execution may actually not coincide with eachother.
+ * \attention + * The load complete callback is called only when the + * ::criFsLoader_Load function returns CRIERR_OK.
+ * If the load processing itself does not start + * (the loader status does not become CRIFSLOADER_STATUS_LOADING) because, for example, an invalid argument is + * passed to the ::criFsLoader_Load function, the load completion callback itself is not executed.
+ *
+ * Calling load processing and load completion callbacks may be done in a thread different from the thread that called the ::criFsLoader_Load function.
+ * In most cases, processing will be restored from ::criFsLoader_Load function before completion of file reading by another thread.
+ * But if for some reason the thread executing ::criFsLoader_Load function lags behind, processing will be restored after the load completion callback is called.
+ *
+ * The load complete callback function to be called after the loading is completed is + * "the registered callback function when the loading started."
+ * Because of this, even if the load complete callback is registered between when the loading starts and when the loading is completed, + * the function to be called is not changed.
+ * (The newly-registered load complete callback function will be used when the next loading operation is completed.)
+ *
+ * Even if the status of the loader changes to Completed (or Suspended), + * do not release the object referred to in the load complete callback + * until the load complete callback is executed.
+ * (After the status changes and until the load complete callback is + * executed, the registered callback parameter may be referred to.)
+ *
+ * When using the ::criFsLoader_Destroy function to dispose of the + * loader performing the load processing with the callback registered, the load complete callback + * may be executed in the ::criFsLoader_Destroy function.
+ *
+ While the load complete callback is executed, the loading of the other files are blocked.
+ * Therefore, note that heavy processing should not be executed in the load complete callback.
+ *
+ * In the load complete callback, do not perform any processing waiting for the status of the loader to change.
+ * The status of the loading is updated on the same thread as the load complete callback.
+ * Because of this, if processing waiting for the status to change is executed in the load complete callback, + * a deadlock occurs, preventing the processing from proceeding.
+ *
+ * The callback function is registered for the memory area in the loader.
+ * Therefore, the loader cannot be disposed of in the load complete callback.
+ * (When executing the ::criFsLoader_Destroy function in the load complete callback, + * an error occurs.)
+ *
+ * You can register only one callback function.
+ * When you register the function multiple times, the registered callback + * function is overwritten by the callback function registered the most recently.
+ *
+ * Specifying NULL for func cancels the registration of the currently registered function.
+ * \sa criFsLoader_Destroy + */ +CriError CRIAPI criFsLoader_SetLoadEndCallback( + CriFsLoaderHn loader, CriFsLoaderLoadEndCbFunc func, void *obj); + +/*EN + * \brief Register decryption callback + * \ingroup FSLIB_BASIC + * \param[in] loader CriFsLoader handle + * \param[in] func Callback function + * \param[in] obj User data passed to the callback function + * \return CriError Error code + * + * \par Description: + * This function registers the decryption function called back during loading.
+ * When the decryption function is registered, + * the loader calls back the decryption function once for every loaded file.
+ * On the application side, perform the decryption as needed for the data passed by the decryption function + * (overwrite the data area with the decryption result).
+ * + * \par Note: + *To pass information such as the file name and offset in the file + * at the time of loading to the decryption function,
+ * register the information as user data in obj. + *
+ * Specifying NULL for func cancels the registration of the currently registered function.
+ * + * \attention + * The decryption function may be called by multiple threads and cores.
+ * Therefore, the application must implement the decryption function + * to be multithread safe/multi-core safe.
+ * In particular, when a temporary area is allocated from the heap at the time of decryption, + * check if access to the heap is multithread-safe or not before implementing the function.
+ * When the decryption function returns CRIERR_OK, the loader + * proceeds with the processing on the assumption that the decryption + * is successful regardless of whether the decryption has succeeded or not.
+ * If the processing proceeds to data decompression without decrypting the encrypted data, + * a data access violation may occur trying to process invalid data.
+ * To avoid this, make sure to execute the decryption for the encrypted data.
+ * In the case of the failure during decryption, return CRIERR_NG.
+ * Returning CRIERR_NG can make the loader switch to the error state, + * enabling the application to handle the error.
+ * \sa CriFsInplaceDecryptionCbFunc + */ +CriError CRIAPI criFsLoader_SetInplaceDecryptionCbFunc( + CriFsLoaderHn loader, CriFsInplaceDecryptionCbFunc func, void *obj); + +/*EN + * \brief Load data + * \ingroup FSLIB_BASIC + * \param[in] loader CriFsLoader handle + * \param[in] binder CriFsBinder handle + * \param[in] path File path name + * \param[in] offset Offset position from the beginning of the file + * \param[in] load_size Load size + * \param[in] buffer Pointer to buffer + * \param[in] buffer_size Buffer size + * \return CriError Error code + * \par Description: + * This function starts loading data using the specified binder and file name.
+ * The load_size bytes of data are loaded from the offset-th byte in the file.
+ * This is the non-blocking function.
To get the load completion status, use the criFsLoader_GetStatus function.
+ * \attention + * When reading compressed content, specifying an offset position greater than 0 results in an error.
+ * Also, it is not possible to read compressed content partially. Please load the entire content. + * \sa criFsLoader_GetStatus + */ +CriError CRIAPI criFsLoader_Load(CriFsLoaderHn loader, + CriFsBinderHn binder, const CriChar8 *path, CriSint64 offset, + CriSint64 load_size, void *buffer, CriSint64 buffer_size); + +/*EN + * \brief Load data (by specifying the file ID in the CPK file) + * \ingroup FSLIB_BASIC + * \param[in] loader CriFsLoader handle + * \param[in] binder CriFsBinder handle + * \param[in] id File ID + * \param[in] offset Offset position from the beginning of the file + * \param[in] load_size Load size + * \param[in] buffer Pointer to buffer + * \param[in] buffer_size Buffer size + * \return CriError Error code + * \par Description: + * The specified binder and file ID are used to start loading the data.
+ * The load_size bytes of data are loaded from the offset-th byte in the file.
+ * This is the non-blocking function.
To get the load completion status, use the criFsLoader_GetStatus function.
+ * \sa criFsLoader_GetStatus + */ +CriError CRIAPI criFsLoader_LoadById(CriFsLoaderHn loader, + CriFsBinderHn binder, CriFsFileId id, CriSint64 offset, + CriSint64 load_size, void *buffer, CriSint64 buffer_size); + +/*EN + * \brief Load the compressed data on the load without decompression + * \ingroup FSLIB_BASIC + * \param[in] loader CriFsLoader handle + * \param[in] binder CriFsBinder handle + * \param[in] path File path name + * \param[in] offset Offset position from the beginning of the file + * \param[in] load_size Load size + * \param[in] buffer Pointer to buffer + * \param[in] buffer_size Buffer size + * \return CriError Error code + * \par Description: + * This function starts loading data using the specified binder and file name.
+ * Unlike the ::criFsLoader_Load function, even if data are compressed, + * this function loads the date on the memory without decompression.
+ *
+ * This is the non-blocking function.
+ * To get the load completion status, use the criFsLoader_GetStatus function.
+ * \sa criFsLoader_GetStatus + */ +CriError CRIAPI criFsLoader_LoadWithoutDecompression(CriFsLoaderHn loader, + CriFsBinderHn binder, const CriChar8 *path, CriSint64 offset, + CriSint64 load_size, void *buffer, CriSint64 buffer_size); + +/*EN + * \brief Load compressed data on the memory without decompression (by specifying file ID in the CPK file) + * \ingroup FSLIB_BASIC + * \param[in] loader CriFsLoader handle + * \param[in] binder CriFsBinder handle + * \param[in] id File ID + * \param[in] offset Offset position from the beginning of the file + * \param[in] load_size Load size + * \param[in] buffer Pointer to buffer + * \param[in] buffer_size Buffer size + * \return CriError Error code + * \par Description: + * The specified binder and file ID are used to start loading the data.
+ * Unlike the ::criFsLoader_Load function, even if data are compressed, + * this function loads the date in memory without decompression.
+ *
+ * This is the immediate return function.
+ * To get the load completion status, use the criFsLoader_GetStatus function.
+ * \sa criFsLoader_GetStatus + */ +CriError CRIAPI criFsLoader_LoadWithoutDecompressionById(CriFsLoaderHn loader, + CriFsBinderHn binder, CriFsFileId id, CriSint64 offset, + CriSint64 load_size, void *buffer, CriSint64 buffer_size); + +/*EN + * \brief Decompress the compressed data allocated on the memory + * \ingroup FSLIB_BASIC + * \param[in] loader CriFsLoader handle + * \param[in] src Compressed data address + * \param[in] src Compressed data size + * \param[in] dst Destination memory address + * \param[in] dst_size Destination memory area size + * \return CriError Error code + * \par Description: + * This function decompresses the compressed data allocated on the memory on a different memory area.
+ *
+ * This is the non-blocking function.
+ * To get the load completion status, use the criFsLoader_GetStatus function.
+ * \par Note: + * If input data are not compressed, + * this function copies the input data without change to the output address.
+ * \attention + * To use this function, you must use CRI File System Tools + * Ver. 2.19.21 or later to create data.
+ * (If the tool used for data creation is old, the data are not developed.)
+ *
+ * This function supports only the CRI unique software codec.
+ * When using a hardware decoder or platform specific codec, + * this function cannot decompress the data. br> + * \sa criFsLoader_GetStatus + */ +CriError CRIAPI criFsLoader_DecompressData(CriFsLoaderHn loader, + void *src, CriSint64 src_size, void *dst, CriSint64 dst_size); + +/*EN + * \brief Stop loading + * \ingroup FSLIB_BASIC + * \param[in] loader CriFsLoader handle + * \return CriError Error code + * \par Description: + * This function stops loading. br> + * This is the non-blocking function. To get the stop status, use the ::criFsLoader_GetStatu function.
+ * \attention + * Even if this function is executed, the data may keep being transferred to the buffer until the status of the loader changes to CRIFSLOADER_STATUS_STOP.
+ * Do not release the buffer where data are loaded until the status is updated.
+ * \sa criFsLoader_GetStatus + */ +CriError CRIAPI criFsLoader_Stop(CriFsLoaderHn loader); + +/*EN + * \brief Get the load status + * \ingroup FSLIB_BASIC + * \param[in] loader CriFsLoader handle + * \param[out] status Load status + * \return CriError Error code + * \par Description: + * This function retrieves the load status. + * \image html fs_state_transition.png State transition diagram of the file loader + */ +CriError CRIAPI criFsLoader_GetStatus(CriFsLoaderHn loader, CriFsLoaderStatus *status); + +/*EN + * \brief Get the I/O error code + * \ingroup FSLIB_BASIC + * \param[in] loader CriFsLoader handle + * \param[out] io_err I/O error code + * \return CriError Error code + * \par Description: + * This function retrieves the I/O error code.
+ * If the ::criFsLoader_GetStatus function enters the error state, + *executing this function retrieves the error code + * returned from the I/O interface. + * \sa criFsLoader_GetStatus + */ +CriError CRIAPI criFsLoader_GetIoError(CriFsLoaderHn loader, CriFsIoError *io_err); + +/*EN + * \brief Get the load size + * \ingroup FSLIB_BASIC + * \param[in] loader CriFsLoader handle + * \param[out] size Load size + * \return CriError Error code + * \par Description: + * This function retrieves the size of the loaded data.
+ */ +CriError CRIAPI criFsLoader_GetLoadSize(CriFsLoaderHn loader, CriSint64 *size); + +/*EN + * \brief Get the progress of the load + * \ingroup FSLIB_BASIC + * \param[in] loader CriFsLoader handle + * \param[out] progress Load progress (Size of read data) + * \param[out] request_size Load request size + * \return CriError Error code + * \par Description: + * This function retrieves the progress of loading. br> + * You can use the values acquired by this function to check the load progress or resume the processing if the load fails. + * \sa ::CriFsIoInterface.SetAddReadProgressCallback + */ +CriError CRIAPI criFsLoader_GetProgress(CriFsLoaderHn loader, CriSint64* progress, CriSint64* request_size); + +/*EN + * \brief Get the priority + * \ingroup FSLIB_BASIC + * \param[in] loader CriFsLoader handle + * \param[out] prio Read priority + * \return CriError Error code + * \par Description: + * This function retrieves the priority of the data load. + * \sa criFsLoader_SetPriority + */ +CriError CRIAPI criFsLoader_GetPriority(CriFsLoaderHn loader, CriFsLoaderPriority *prio); + +/*EN + * \brief Set the priority + * \ingroup FSLIB_BASIC + * \param[in] loader CriFsLoader handle + * \param[in] priority Read priority + * \return CriError Error code + * \par Description: + * This function sets the priority of the data load.
+ * When using the ::criFsLoader_Load function to perform load for multiple loaders simultaneously, + * the loader with higher priority performs load first.
+ * Even while a loader with lower priority is loading huge data, + * if a loader with higher priority starts loading data, this loader interrupts the processing of the loader with lower priority, and the processing of + * the loader with high priority is executed instead of the current loading.
+ * \per Note: + * If all the multiple loaders have the same priority, + * the data are loaded in the order of the data for which the ::criFsLoader_Load function was executed.
+ * \attention + * When loading is started without file load executed, + * the load processing immediately starts regardless of the priority.
+ * Therefore, when you start loading data using a loader with lower priority without the file loaded, + * the data will be loaded to some extent even if a loader with higher + * priority starts loading data immediately after this loading.
+ * (Until the data for the load unit size is finished with processing, the processing is not switched to another loader.)
+ * \sa criFsLoader_GetPriority, criFsLoader_Load, criFsLoader_SetReadUnitSize + */ +CriError CRIAPI criFsLoader_SetPriority(CriFsLoaderHn loader, CriFsLoaderPriority prio); + +/*EN + * \brief Set the load unit size + * \ingroup FSLIB_BASIC + * \param[in] loader CriFsLoader handle + * \param[in] unit_size Load unit size + * \return CriError Error code + * \param err Error code + * \par Description: + * This function sets the load unit size. + * To handle a request to load large data, CriFsLoader divides the read processing into multiple processing to read smaller data.
+ * You can use this function to change the load unit size.
+ * Cancellation of a read request and the interrupt by a high-priority load are handled only at the boundary between the load unit sizes.
+ * Therefore, a smaller unit size improves the I/O response. * Meanwhile, a larger unit size accelerates file loading. + */ +CriError CRIAPI criFsLoader_SetReadUnitSize(CriFsLoaderHn loader, CriSint64 unit_size); + +/*EN + * \brief Set the load limiter number + * \ingroup FSLIB_BASIC_EMB + * \param[in] loader CriFsLoader handle + * \param[in] limiter_no Load limiter number + * \return CriError Error code + * \par Description: + * This function assigns a load limiter number to the CriFsLoader handle.
+ * The total read size of all the loaders, group loaders, and batch loaders to which a common limiter number is applied is limited.
+ * \attention + * For gaming machines, the load limiter function is not supported. Do not call this function.
+ * \sa CriFsLoadLimiterNo criFs_SetLoadLimiterSize criFs_SetLoadLimiterUnit criFsLoader_SetLoadLimiter criFsGroupLoader_SetLoadLimiter criFsBatchLoader_SetLoadLimiter + */ +CriError CRIAPI criFsLoader_SetLoadLimiter(CriFsLoaderHn loader, CriFsLoadLimiterNo limiter_no); + +/*========================================================================== + * CriFsGroupLoader API + *=========================================================================*/ +/*EN + * \brief CRI File System - Group Loader object + * \ingroup FSLIB_GROUPLOADER + * \par Description: + * CriFsGroupLoader is the module to collectively load the files + * associated as a group in a CPK file. + */ + +/*EN + * \brief Create a group loader + * \ingroup FSLIB_GROUPLOADER + * \param[in] binder_id Bind ID + * \param[in] groupname Group name + * \param[in] attrname Attribute name + * \param[out] grouploaderhn Group loader handle + * \return CriError Error code + * \par Description: + * This function creates a group loader from the bind ID, and returns a group loader handle.
+ * This function returns when the processing is completed.

+ *The bind ID used for binding the CPK file with group information is required.
+ * If the specified group name or attribute name does not exist, a group loader is not created.
+ * After creating a group loader, you cannot change the group name or attribute name + * handled by the group loader.
+ * To handle another group and attribute, create a different group loader.

+ * When NULL is specified for the attribute name, all the files belonging to the specified group are to be loaded in a group.
+ * When "none" is specified for the attribute of the packing tool, also specify NULL for the attribute name here.
+ * \par Example: + * \code + * CriFsBindId bndrid; + * CriFsGroupLoaderHn gldrhn; + * // Bind the CPK file with group information, "group.cpk" + * criFsBinder_BindCpk(bndrhn, NULL, "group.cpk,h wk, wksz, &bndrid); + * : + * // Create a group loader handling the group "GROUP1" and attribute "IMG" + * criFsGroupLoader_Create(bndrid, "GROUP1,h "IMG,h &gldrhn); + * \endcode + * \code + * // Create a group loader handling all the files in the group "GROUP" + * criFsGroupLoader_Create(bndrid, "GROUP,h NULL, &gldrhn); + * \endcode + * \sa criFsGroupLoader_Destroy() + */ +CriError CRIAPI criFsGroupLoader_Create(CriFsBindId binder_id, const CriChar8 *groupname, const CriChar8 *attrname, CriFsGroupLoaderHn *grouploaderhn); + +/*EN + * \brief Create a group loader supporting a binder handle + * \ingroup FSLIB_GROUPLOADER + * \param[in] bndrhn Binder handle (binder binding multiple CPK files) + * \param[in] groupname Group name (NULL is unavailable) + * \param[in] attrname Attribute (NULL is available) + * \param[out] grouploaderhn Group loader handle + * \return CriError Error code + * \par Description: + * This function creates a group loader from the binder handle, and returns a group loader handle.
+ * Using this function enables you to use the group load function together with the multi-bind function.
+ * Multi-binding a CPK file fully built and a CPK file built with differentials can reduce the time taken to build a CPK or transfer a CPK file when part of the content is updated.
+ * Any one of the CPK files is loaded per group load. This restriction maintains the batch processing, which is the greatest advantage of the group load.
+ * Therefore, to create differential CPK file using updated content files and multi-bind it, the files must be included in the differential CPK file in a group (including the content files without change).
+ * Based on the information on the differential CPK file, you cannot know whether all the files in the group have been deleted or there was no change in the group. The group that must have been removed by deletion or rename is successfully loaded from the fully built CPK file. If you do not want this operation to happen, re-create a fully built CPK.
+ * To use this function, it is recommended to explicitly set the priority using the criFsBinder_SetPriority function. To multi-bind a fully built CPK and a differential CPK, give the differential CPK a higher priority.
+ */ +CriError CRIAPI criFsGroupLoader_CreateFromBinderHn( + CriFsBinderHn bndrhn, const CriChar8 *groupname, const CriChar8 *attrname, CriFsGroupLoaderHn *grouploaderhn); + +/*EN + * \brief Destroy a group loader + * \ingroup FSLIB_GROUPLOADER + * \param[in] grouploaderhn Group loader handle + * \return CriError Error code + * \par Description: + * This function disposes of a group loader.
+ * This function returns when the processing is completed.
+ * When called during group loading, this function stops loading the data and + * releases the ::CriFsLoaderHn held in the group loader for loading. br> + * When the group loader during group load is disposed of, the function waits for the internal ::CriFsLoaderHn to stop, + * so it may take time for the processing to return from this function. br> + * To avoid this issue, check that the status of the group loader is not ::CRIFSLOADER_STATUS_LOADING + * before calling this function. + * \sa criFsGroupLoader_Create() criFsGroupLoader_GetStatus() + */ +CriError CRIAPI criFsGroupLoader_Destroy(CriFsGroupLoaderHn grouploaderhn); + +/*EN + * \brief Set the callback function to start loading + * \ingroup FSLIB_GROUPLOADER + * \param[in] grouploaderhn Group loader handle + * \param[in] func Group loader callback function + * \param[in] func Argument of the group loader callback function + * \return CriError Error code + * \par Description: + * This function sets the callback function to be called for each file when group load is performed.
+ * The callback function set in this function is called for each file before a load request is made. + * (This means that the callback is called as many times as the number of files.)
+ * When the group load callback function is set, the callback function is called for each file, + * and thus multiple files cannot be collectively loaded. br> + * When the group load callback function is set to NULL, the setting of the callback function is canceled.
+ *
+ * - Callback function
+ *To the callback function, obj and gfinfo are passed as the arguments; + * obj is the object specified by the user, and gfinfo is the information structure of the file to load.
+ * The return value of the callback function is the pointer to the buffer where the file is loaded.
+ * To not load the file, return NULL as the return value.
+ * \attention + * You can register only one callback function.
+ * When you register the function multiple times, the registered callback + * function is overwritten by a newly registered callback function.
+ *
+ * Specifying NULL for func cancels the registration of the registered function.
+ * \sa criFsGroupLoader_LoadBulk() + */ +CriError CRIAPI criFsGroupLoader_SetLoadStartCallback( + CriFsGroupLoaderHn grouploaderhn, CriFsGroupLoaderLoadStartCbFunc func, void *obj); + +/*EN + * \brief Get the number of group files + * \ingroup FSLIB_GROUPLOADER + * \param[in] grouploaderhn Group loader handle + * \param[out] nfiles Number of group files + * \return CriError Error code + * \par Description: + This function retrieves the number of files belonging to the specified group.
+ * The number of elements in the array of the gfinf argument of the ::criFsGroupLoader_LoadBulk function is + * the number of the group files acquired by this function. + * \sa criFsGroupLoader_GetTotalGroupDataSize(), criFsGroupLoader_LoadBulk() + */ +CriError CRIAPI criFsGroupLoader_GetNumberOfGroupFiles( + CriFsGroupLoaderHn grouploaderhn, CriSint32 *nfiles); + +/*EN + * \brief Get the group data size + * \ingroup FSLIB_GROUPLOADER + * \param[in] grouploaderhn Group loader handle + * \param[out] datasize Data size + * \return CriError Error code + * \par Description: + * This function retrieves the size of the load area required for group load.
+ * The data size takes alignment or other factors into account. + * \sa criFsGroupLoader_GetNumberOfGroupFiles(), criFsGroupLoader_LoadBulk() + */ +CriError CRIAPI criFsGroupLoader_GetTotalGroupDataSize( + CriFsGroupLoaderHn grouploaderhn, CriSint64 *datasize); + +/*EN + * \brief Get the group file information + * \ingroup FSLIB_GROUPLOADER + * \param[in] grouploaderhn Group loader handle + * \param[out] gfinf[] Array of the CriFsGroupFileInfo structure + * \param[in] numginf Number of the elements in the array (gfinf[]) + * \return CriError Error code + * \par Description: + * This function retrieves the information on the data of grouped multiple files.
+ * You must specify the arrays of the ::CriFsGroupFileInfo structure for the number of the files.
+ * For the group with the attribute of the packing tool set to "none," specify NULL for the attribute + * for creating a group loader that is specified in this function.
+ * Among the acquired group file information (::CriFsGroupileInfo), the load destination specified by datapointer is NULL. + * \par Example: + * \code + * CriSint32 nfiles; + * CriFsGroupFileInfo *gfinf; + * // Allocate the array area of group file information structures + * criFsGroupLoader_GetNumberOfGroupFiles(gldrhn, &nfiles); + * gfinf = malloc( sizeof(CriFsGroupFileInfo) * nfiles ); + * // Allocate the group file loading area + * criFsGroupLoader_GetTotalGroupDataSize(gldrhn, &datasize); + * databuff = malloc(datasize); + * // Get the group load information + * criFsGroupLoader_GetGroupFileInfos(gldrhn, gfinf, nfiles); + * \endcode +*/ +CriError CRIAPI criFsGroupLoader_GetGroupFileInfos( + CriFsGroupLoaderHn grouploaderhn, CriFsGroupFileInfo gfinf[], CriSint32 numgfinf); + +/*EN + * \brief Start group load + * \ingroup FSLIB_GROUPLOADER + * \param[in] grouploaderhn Group loader handle + * \param[out] buffer Pointer to the load destination buffer + * \param[in] buffer_size Size of the load destination buffer + * \param[out] gfinf[] Array of the CriFsGroupInfo structures + * \param[in] numginf Number of the elements in the array (gfinf[]) + * \return CriError Error code + * \par Description: + * This function starts loading the data of grouped multiple files.
+ * You must specify the arrays of the ::CriFsGroupFileInfo structure for the number of the files.
+ * This function requires the load area where the specified group file can be loaded.
+ * This is the non-blocked function.
To get the load completion status, use the ::criFsGroupLoader_GetStatus function.

+ * When loading the group with the attribute of the packing tool set to "none," + * specify NULL for the attribute when creating a group loader that is specified in this function.

+ * When the group load callback function is set, the return value of the callback function is used as the load address, + * so the buffer and buffer_size arguments of this function are not referred to.
+ * Note that after the group is loaded the specified gfinf will still be referred to from the library by the information acquisition function such as the ::criFsGroupLoader_GetGroupFileInfoIndex function.
+ This basically requires the area to be retained until the handle is destroyed.

+ * Inside the group loader, multiple ::CriFsLoaderHn functions are used to perform loading. If no ::CriFsLoaderHn can be created, + * an error callback is called. The ::CriFsLoaderHn created by the group loader is + * disposed of when the group load is completed. + * \par Example: + * \code + * CriSint32 nfiles; + * CriFsGroupFileInfo *gfinf; + * CriSint64 datasize; + * void *databuff; + * // Allocate the array area of group file information structures + * criFsGroupLoader_GetNumberOfGroupFiles(gldrhn, &nfiles); + * gfinf = malloc( sizeof(CriFsGroupFileInfo) * nfiles ); + * // Allocate the group file loading area + * criFsGroupLoader_GetTotalGroupDataSize(gldrhn, &datasize); + * databuff = malloc(datasize); + * // Group load + * criFsGroupLoader_LoadBulk(gldrhn, databuff, datasize, gfinf, nfiles); + * // Wait for the group load to be completed + * for (;;) { + * CriFsLoaderStatus status; + * criFsGroupLoader_GetStatus(gldrhn, &status); + * if (status == CRIFSLOADER_STATUS_COMPLETE) break; + * } + * \endcode + * \sa criFsGroupLoader_GetStatus() criFsGroupLoader_SetLoadStartCallback() criFsGroupLoader_Stop() criFsGroupLoader_Create() + */ +CriError CRIAPI criFsGroupLoader_LoadBulk(CriFsGroupLoaderHn gourploaderhn, void *buffer, CriSint64 buffer_size, CriFsGroupFileInfo gfinf[], CriSint32 numgfinf); + +/*EN + * \brief Stop (interrupt) group load + * \ingroup FSLIB_GROUPLOADER + * \param[in] grouploaderhn Group loader handle + * \return CriError Error code + * \par Description: + * This function interrupts the file loading performed in the group loader.
+ * The number of files and content of the files already loaded before the group load is interrupted are retained without change.
+ *
+ * This is the non-blocked function.
+ * At the time of group load, ::CriFsLoaderHn is created inside the group loader for the files to be loaded. + *When this function is called, the function returns after issuing an interruption (Stop) instruction to the ::CriFsLoaderHn used + * for the group load. br> + * Because of this, when this function returns, the file loading may be in progress. br> + The group loader checks that the load by internally used ::CriFsLoaderHn is stopped, and then releases the ::CriFsLoaderHn. + * After that, the group loader shifts to the ::CRIFSLOADER_STATUS_STOP status. br> + * This series of processing is performed when the ::criFsGroupLoader_GetStatus function is called, so after this function is called, + * check that the status of the group loader is not ::CRIFSLOADER_STATUS_LOADING.
+ Otherwise, the ::CriFsLoaderHn used in the group loader is not released, + * and this may prevent another group loader from allocating ::CriFsLoaderHn. + *
+ * \sa criFsGroupLoader_GetStatus() criFsGroupLoader_LoadBulk() + */ +CriError CRIAPI criFsGroupLoader_Stop(CriFsGroupLoaderHn grouploaderhn); + +/*EN + * \brief Get the load status + * \ingroup FSLIB_GROUPLOADER + * \param[in] grouploaderhn Group loader handle + * \param[out] status CriFsGroupLoaderStatus load status + * \return CriError Error code + * \par Description: + * This function returns the load status of the group loader.
+ * When all the files for group load have been loaded, + * the function returns ::CRIFSLOADER_STATUS_COMPLETE. + * \sa criFsGroupLoader_LoadBulk() + */ +CriError CRIAPI criFsGroupLoader_GetStatus(CriFsGroupLoaderHn grouploaderhn, CriFsLoaderStatus *status); + +/*EN + * \brief Get the number of loaded files + * \ingroup FSLIB_GROUPLOADER + * \param[in] grouploaderhn Group loader handle + * \param[out] nfiles Number of loaded files + * \return CriError Error code + * \par Description: + * This function returns the number of files already loaded by the ::criFsGroupLoader_LoadBulk function. + * \sa criFsGroupLoader_LoadBulk() + */ +CriError CRIAPI criFsGroupLoader_GetLoadedFiles(CriFsGroupLoaderHn grouploaderhn, CriSint32 *nfiles); + +/*EN + * \brief Get the load status of the file + * \ingroup FSLIB_GROUPLOADER + * \param[in] gfinfo Pointer to the CriFsGroupFileInfo structure of the file whose load status is to be acquired + * \param[out] result Load status of the file (CRI_TRUE: Loaded, CRI_FALSE: Not loaded) + * \return CriError Error code + * \par Description: + * This function gets the information on whether the specified file has been loaded.
+ * The function uses the ::criFsGroupLoader_GetGroupFileInfoIndex or ::criFsGroupLoader_GetGroupFileInfo function + * to get the pointer to the CriFsGroupFileInfo structure of + * the file whose load status is to be acquired. + * \sa criFsGroupLoader_GetGroupFileInfoIndex(), criFsGroupLoader_GetGroupFileInfo() + */ +CriError CRIAPI criFsGroupLoader_IsLoaded(const CriFsGroupFileInfo *gfinfo, CriBool *result); + +/*EN + * \brief Get the array index of the CriFsGroupFileInfo structure + * \ingroup FSLIB_GROUPLOADER + * \param[in] grouploaderhn Group loader handle + * \param[in] fpath Full path of the file + * \param[out] index Array index + * \return CriError Error code + * \par Description: + * This function retrieves the array index of the ::CriFsGroupFileInfo structure of the specified file.
+ * Specify the full path for the file name. The binary search is used to search for the specified file.
+ * If the specified file is not found, the return value is -1.
+ * The actual addresses of individual files loaded in a group are written + * in the ::CriFsGroupFileInfo structure.
+ * To access the loaded data, you must get the ::CriFsGroupFileInfo structure.
+ * There are two methods of getting the ::CriFsGroupFileInfo structure: + * one is specifying the name of the loaded file name or the content file ID to get the structure element, + * and the other one is accessing directly the structure array using the index acquired by this function. + * \sa criFsGroupLoader_GetNumberOfGroupFiles(), criFsGroupLoader_GetGroupFileInfo() + */ +CriError CRIAPI criFsGroupLoader_GetGroupFileInfoIndex(CriFsGroupLoaderHn grouploaderhn, const CriChar8 *fpath, CriSint32 *index); + +/*EN + * \brief Get the array index of the CriFsGroupFileInfo structure (by specifying ID) + * \ingroup FSLIB_GROUPLOADER + * \param[in] grouploaderhn Group loader handle + * \param[in] id Content file ID + * \param[out] index Array index + * \return CriError Error code + * \par Description: + * This function retrieves the array index of the ::CriFsGroupFileInfo structure of the specified file.
+ * Specify the file with the content file ID. The linear search is used to search for the specified file.
+ * If the specified file is not found, the return value is -1.
+ * The actual addresses of individual files loaded in a group are written + * in the ::CriFsGroupFileInfo structure.
+ *When the files have been already loaded in a group and the ::CriFsGroupFileInfo information has been acquired, considering the search method, + * searching directly for the ID of the ::CriFsGroupFileInfo information is more efficient than acquiring the index by this function.
+ * To access the loaded data, you must get the ::CriFsGroupFileInfo structure.
+ * There are two methods of getting the ::CriFsGroupFileInfo structure: + * one is specifying the name of the loaded file name or the content file ID to get the structure element, + * and the other one is accessing directly the structure array using the index acquired by this function. + * \sa criFsGroupLoader_GetNumberOfGroupFiles(), criFsGroupLoader_GetGroupFileInfoById() + */ +CriError CRIAPI criFsGroupLoader_GetGroupFileInfoIndexById(CriFsGroupLoaderHn grouploaderhn, CriFsFileId id, CriSint32 *index); + +/*EN + * \brief Get the CriFsGroupFileInfo structure + * \ingroup FSLIB_GROUPLOADER + * \param[in] grouploaderhn Group loader handle + * \param[in] fpath Full path of the file name + * \param[out] gfinfo Pointer to the pointer of the CriFsGroupFileInfo structure + * \return CriError Error code + * \par Description: + * This function retrieves the pointer to the ::CriFsGroupFileInfo structure of the specified file.
+ * Specify the full path for the file name.
+ * If the specified file is not found, the output value is NULL. + * \sa criFsGroupLoader_GetNumberOfGroupFiles(), criFsGroupLoader_GetGroupFileInfoIndex() + */ +CriError CRIAPI criFsGroupLoader_GetGroupFileInfo(CriFsGroupLoaderHn grouploaderhn, const CriChar8 *fpath, const CriFsGroupFileInfo **gfinfo); + +/*EN + * \brief Get the CriFsGroupFileInfo structure (by specifying ID) + * \ingroup FSLIB_GROUPLOADER + * \param[in] grouploaderhn Group loader handle + * \param[in] id Content file ID + * \param[out] gfinfo Pointer to the pointer of the CriFsGroupFileInfo structure + * \return CriError Error code + * \par Description: + * This function retrieves the pointer to the ::CriFsGroupFileInfo structure of the specified file.
+ * Specify the file with the content file ID.
+ * If the specified file is not found, the output value is NULL. + * \sa criFsGroupLoader_GetNumberOfGroupFiles(), criFsGroupLoader_GetGroupFileInfoIndexById() + */ +CriError CRIAPI criFsGroupLoader_GetGroupFileInfoById(CriFsGroupLoaderHn grouploaderhn, CriFsFileId id, const CriFsGroupFileInfo **gfinfo); + +/*EN + * \brief Get the group name + * \ingroup FSLIB_GROUPLOADER + * \param[in] grouploaderhn Group loader handle + * \param[out] groupname Group name + * \return CriError Error code + * \par Description: + * This function retrieves the group name of a group handled by a group loader. + */ +CriError CRIAPI criFsGroupLoader_GetGroupName(CriFsGroupLoaderHn grouploaderhn, const CriChar8 **groupname); + +/*EN + * \brief Get the group attribute + * \ingroup FSLIB_GROUPLOADER + * \param[in] grouploaderhn Group loader handle + * \param[out] attrname Group attribute + * \return CriError Error code + * \par Description: + * This function retrieves the group attribute of a group handled by a group loader. + */ +CriError CRIAPI criFsGroupLoader_GetAttributeName(CriFsGroupLoaderHn grouploaderhn, const CriChar8 **attrname); + +/*EN + * \brief Get the priority + * \ingroup FSLIB_GROUPLOADER + * \param[in] grouploader CriFsGroupLoader handle + * \param[out] prio Read priority + * \return CriError Error code + * \par Description: + * This function retrieves the priority of the loader (::CriFsLoaderHn) used in a group loader (the default is ::CRIFSLOADER_PRIORITY_NORMAL). + * For details on the priority of the loader, see the descriptions of ::criFsLoader_GetPriority and ::criFsLoader_SetPriority. + * \sa criFsGroupLoader_GetLoaderPriority, criFsLoader_GetPriority, criFsLoader_SetPriority + */ +CriError CRIAPI criFsGroupLoader_GetLoaderPriority(CriFsGroupLoaderHn grouploaderhn, CriFsLoaderPriority *prio); + +/*EN + * \brief Set the priority + * \ingroup FSLIB_GROUPLOADER + * \param[in] grouploader CriFsGroupLoader handle + * \param[in] priority Read priority + * \return CriError Error code + * \par Description: + * This function sets the priority of the loader (::CriFsLoaderHn) used in a group loader (the default is ::CRIFSLOADER_PRIORITY_NORMAL). + * For details on the priority of the loader, see the descriptions of ::criFsLoader_GetPriority and ::criFsLoader_SetPriority. + * \sa criFsGroupLoader_SetLoaderPriority, criFsLoader_SetPriority + */ +CriError CRIAPI criFsGroupLoader_SetLoaderPriority(CriFsGroupLoaderHn grouploaderhn, CriFsLoaderPriority prio); + +/*EN + * \brief Set the load unit size + * \ingroup FSLIB_GROUPLOADER + * \param[in] grouploader CriFsGroupLoader handle + * \param[in] unit_size Load unit size + * \return CriError Error code + * \param err Error code + * \par Description: + * This function sets the load unit size of the loader to be used in the group loader. + * To handle a request to load large data, CriFsLoader divides the read processing into multiple processing to read smaller data.
+ * You can use this function to change the load unit size.
+ * Cancellation of a read request and the interrupt by a high-priority load are handled only at the boundary between the load unit sizes.
+ * Therefore, a smaller unit size improves the I/O response. * Meanwhile, a larger unit size accelerates file loading. + */ +CriError CRIAPI criFsGroupLoader_SetReadUnitSize(CriFsGroupLoaderHn grouploaderhn, CriSint64 unit_size); + +/*EN + * \brief Set the load limiter number + * \ingroup FSLIB_GROUPLOADER_EMB + * \param[in] grouploader CriFsGroupLoader handle + * \param[in] limiter_no Load limiter number + * \return CriError Error code + * \par Description: + * This function assigns a load limiter number to the CriFsGroupLoader handle.
+ * The total read size of all the loaders, group loaders, and batch loaders to which a common limiter number is applied is limited.
+ * \attention + * For gaming machines, the load limiter function is not supported. Do not call this function.
+ * \sa CriFsLoadLimiterNo criFs_SetLoadLimiterSize criFs_SetLoadLimiterUnit criFsLoader_SetLoadLimiter criFsGroupLoader_SetLoadLimiter criFsBatchLoader_SetLoadLimiter + */ +CriError CRIAPI criFsGroupLoader_SetLoadLimiter(CriFsGroupLoaderHn grouploaderhn, CriFsLoadLimiterNo limiter_no); + +/*EN + * \brief Limit on the number of prepared files per server processing + * \ingroup FSLIB_GROUPLOADER + * \param[in] grouploaderhn Group loader handle + * \param[in] nfile_per_server Number of prepared files per server processing, or special value + * CRIFS_GROUPLOADER_NO_PREPARATION_LIMIT + * \return CriError Error code + * \par Description: + * This function sets how to prepare the group loader.
+ * When this function is not called or CRIFS_GROUPLOADER_NO_PREPARATION_LIMIT is specified, + * the preparation is completed in the criFsGroupLoader_LoadBulk. This method takes long time to process the criFsGroupLoader_LoadBulk function + * when the group contains many files, and dropped frames may occur.
+ * To avoid this problem, the function to distribute the preparation of the group loader to the server processing has been added.
+ * When a value other than the special value is specified, the preparation processing is transferred from the criFsGroupLoader_LoadBulk function to the server processing, + * and the number of files to be prepared per server processing is limited to the specified number.
+ * The server processing of the group loader is executed in the criFsGroupLoader_GetStatus function.
+ *
+ * The specific code is as follows: + * \par Example: + * \code + * { + * // The handle a is prepared in the LoadBulk function. + * criFsGroupLoader_LimitNumPreparingFiles(grouploaderhn_a, CRIFS_GROUPLOADER_NO_PREPARATION_LIMIT); + * // The handles b and c are prepared in the server processing for 500 files at a time. The processing volume is individually restricted for each handle. + * criFsGroupLoader_LimitNumPreparingFiles(grouploaderhn_b, 500); + * criFsGroupLoader_LimitNumPreparingFiles(grouploaderhn_c, 500); + * } + * \endcode + */ +CriError CRIAPI criFsGroupLoader_LimitNumPreparingFiles(CriFsGroupLoaderHn grouploaderhn, CriSint32 nfile_per_server); + +/*EN + * \brief Get the start offset of the CriFsGroupFileInfo structure array of the specific attribute + * \ingroup FSLIB_GROUPLOADER_EMB + * \param[in] group_all Group loader handle (entire group) + * \param[in] group_attr Group loader handle (specific attribute) + * \param[out] offset Offset started by the specific attribute for the array of the CriFsGroupFileInfo structures for the entire group. + * \return CriError Error code + * \par Description: + * When using the group loader under the following conditions, using this function can achieve better search efficiency.
+ * \par Applicable conditions: + * - Include multiple attribute files in the group.
+ * - Simultaneously load multiple attribute files in the group.
+ * - Separate transfer destinations with each other for each attribute.
+ * - Search for group file information by a file name or a file ID without having information to identify the attribute.
+ * - The hierarchy of the group (sub groups) is not used.
+ * - The additional information to be used by this API is written in the CPK file. (The support of this API depends on the environment.)
+ *
+ * When this function is not used, you cannot not know the attributes to which individual files belong, so you must perform the sequential search in all the group handles.
+ * Using this function enables you to find the target file by one search.
+ * Create a group loader handle for group loading with the group name and attribute name specified.
+ * Create an additional group loader handle for the entire group to be used only for search. At this time, specify only the group name, and for the attribute, specify CRI_NULL.
+ * For the CriFsGroupFileInfo structure array, allocate the array for the entire group as continuous memory.
+ * Divide the array for the entire group, and specify each divided array for the argument of its criFsGroupLoader_LoadBulk function.
+ * For the operation of the individual group loaders and the search operation for the entire group to be consistent, the array of the entire group must be appropriately divided.
+ * Use the "start offset of the specific attribute" output by this function to divide the array of the entire group.
+ * The specific code is shown as follows:
+ * \par Example: + * \code + * { + * criFsGroupLoader_Create(bindid, "GROUP1,h CRI_NULL, &group_all); + * criFsGroupLoader_Create(bindid, "GROUP1,h "RAM1,h &group_ram1); + * criFsGroupLoader_Create(bindid, "GROUP1,h "RAM2,h &group_ram2); + * criFsGroupLoader_GetNumberOfGroupFiles(group_all, &nfiles_all); + * criFsGroupLoader_GetNumberOfGroupFiles(group_ram1, &nfiles_ram1); + * criFsGroupLoader_GetNumberOfGroupFiles(group_ram2, &nfiles_ram2); + * criFsGroupLoader_GetGroupFileInfoStartOffset(group_all, group_ram1, &offset_ram1); + * criFsGroupLoader_GetGroupFileInfoStartOffset(group_all, group_ram2, &offset_ram2); + * gfinf_all = malloc(sizeof(CriFsGroupFileInfo) * nfiles_all); + * //memset(gfinf_all, 0, sizeof(CriFsGroupFileInfo) * nfiles_all);*For a case where zero clear is required, see below. + * criFsGroupLoader_LoadBulk(group_ram1, buffer_ram1, buffer_size_ram1, &gfinf_all[offset_ram1], nfiles_ram1); + * criFsGroupLoader_LoadBulk(group_ram2, buffer_ram2, buffer_size_ram2, &gfinf_all[offset_ram2], nfiles_ram2); + * for (;;) { + * criFsGroupLoader_GetStatus(group_ram1, &status_ram1); + * criFsGroupLoader_GetStatus(group_ram2, &status_ram2); + * if (status_ram1 == CRIFSLOADER_STATUS_COMPLETE && + * status_ram2 == CRIFSLOADER_STATUS_COMPLETE) { + * break; + * } + * } + * criFsGroupLoader_GetGroupFileInfoIndex(group_all, "sample.bmp,h &index); + * userDrawBitmap(gfinf_all[index].datapointer); + * } + * \endcode + * \attention + * *: You must note when you do not load all the attributes included in the group. + * Although the files not loaded are successfully searched for, the content of the CriFsGroupFileInfo structure + * that can be referred to by the acquired index is indefinite. + *If you may search for files not loaded, zero clear the array in advance + * so that you can identify that the content of the structure is invalid.
+ * \attention + The support of this API depends on the environment.
If this function is called in an unsupported environment, an error occurs. br> + */ +CriError CRIAPI criFsGroupLoader_GetGroupFileInfoStartOffset(CriFsGroupLoaderHn group_all, CriFsGroupLoaderHn group_attr, CriSint32 *offset); + +/*EN + * \brief Set the confirmation of the load of a single file + * \ingroup FSLIB_GROUPLOADER_EMB + * \param[in] use_flag CRI_TRUE or CRI_FALSE + * \par Description: + * This function sets whether to use the criFsGroupLoader_IsLoaded function.
+ * When CRI_TRUE is specified, the function is used, and when CRI_FALSE, the function is not used.
+ * When the criFsGroupLoader_IsLoaded function is not used, the processing at the time of load completion is faster, + * but the load of a single file cannot be checked. + * Call this function before executing the criFsGroupLoader_LoadBulk function. + * \sa criFsGroupLoader_IsLoaded criFsGroupLoader_LoadBulk + */ +void CRIAPI criFsGroupLoader_SetUseLoadedFlag(CriBool use_flag); + +/*========================================================================== + * Log Output API + *=========================================================================*/ +/*EN + * \brief Add the log output function + * \ingroup FSLIB_CRIFS + * \param[in] mode Log output mode + * \param[in] param Extension parameter + * \return CriError Error code + * \par Description: + * This function enables the log output function to start outputting the file access log.
+ * When this function is executed, the file access log is output to the debugger or other software when the file is accessed.
+ * \attention + * After executing this function, make sure to execute the corresponding ::criFs_DetachLogOutput function.
+ * Note that you cannot re-execute this function before executing the ::criFs_DetachLogOutput function.
+ * \sa criFs_DetachLogOutput + */ +CriError CRIAPI criFs_AttachLogOutput(CriFsLogOutputMode mode, void *param); + +/*EN + * \brief Delete the log output function + * \ingroup FSLIB_CRIFS + * \return CriError Error code + * \par Description: + * This function disables the log output function to stop outputting the file access log.
+ * Executing this function enables you to stop outputting the file access log to the debugger or other software.
+ * \attention + * Note that you cannot execute this function before executing the ::criFs_DetachLogOutput function.
+ * \sa criFs_AttachLogOutput + */ +CriError CRIAPI criFs_DetachLogOutput(void); + +/*EN + * \brief Register a user-defined log output function + * \ingroup FSLIB_CRIFS + * \param[in] func Log output function + * \param[in] obj Object to be passed to the log output function + * \return CriError Error code + * \par Description: + * This function replaces the log output function with a user-defined function.
+ * Using this function enables users to customize the method of + * outputting the file access log as needed. + * \par Note: + * When this function is not used or NULL is specified for the log output function (func), + * the default log output function of the CRI File System library is used. + */ +CriError CRIAPI criFs_SetUserLogOutputFunction(CriFsLogOutputFunc func, void *obj); + +/*EN + * \brief Start of the load section + * \ingroup FSLIB_CRIFS + * \param[in] name Load section name + * \return CriError Error code + * \par Description: + * This function declares the start of the load section.
+ * When the ::criFs_AttachLogOutput function is used to enable the file access log to be output, the load section name specified by the argument (name) of this function is output to the log.
+ * The load section is used as a guideline to optimally allocate the files.
+ * When you create a group based on the file access log using CPK File Builder, the load section defined by this function is converted into a group.
+ * (The files to be loaded in the same load section are likely to be allocated closely to each other at the time of optimal allocation.)
+ * \attention + * Multiple load sections cannot be overlapped.
+ * After executing this function, make sure to execute the corresponding ::criFs_EndLoadRegion function. + * This function cannot be used with the ::criFs_BeginGroup function.
+ * (From CRI File System Ver.2.02.00, the functions of this function have been integrated into the ::criFs_BeginGroup function, and the function itself has been changed to the macro that calls the ::criFs_BeginGroup function.)
+ * \sa criFs_EndLoadRegion, criFs_BeginGroup + */ +#define criFs_BeginLoadRegion(name) criFs_BeginGroup(name, NULL) + +/*EN + * \brief End of the load section + * \ingroup FSLIB_CRIFS + * \return CriError Error code + * \par Description: + * This function declares the end of the load section. + * \attention + * This function cannot be used with the ::criFs_EndGroup function.
+ * (From CRI File System Ver.2.02.00, the functions of this function have been integrated into the ::criFs_EndGroup function, and the function itself has been changed to the macro that calls the ::criFs_EndGroup function.)
+ * \sa criFs_BeginLoadRegion, criFs_EndGroup + */ +#define criFs_EndLoadRegion() criFs_EndGroup() + +/*========================================================================== + * CriFsStdio API + *=========================================================================*/ +/*EN + * \brief File open complying with ANSI C + * \ingroup FSLIB_CRIFSSTDIO + * \param[in] bndr CriFsBinder handle where the file to open is bound + * \param[in] fname Path of the file to open + * \param[in] mode Open mode (r: Read only mode, w: Write only mode) + * \return CriFsStdioHn When successful, a valid CriFsStdio handle is returned.
+ * If failed, NULL is returned. + * \par Description: + * This function opens the specified file.
+ * For the first argument, specify the binder where the file you want to open is bound.
+ * When you want to open a file from the platform's standard file path, specify NULL for the first argument.
+ * For the second argument, specify the string of the path of the file you want to open.
+ * The third argument is used to specify the file open mode. With "r" specified, the file is opened in the read only mode,
+ * and with "w," in the write only mode.
+ * The write only mode will operate normally only on the platform that supports writing to files. + * On the platform that does not support it, an error callback occurs and the file open fails.
+ * \par Note: + * Data are written a file under the following rules:
+ * - If the specified file does not exist, the file is newly created. + * - If the specified file already exists, edit the exiting file.
+ * (The existing file will not be deleted.) + *
+ * To delete the existing file and write the data to a new file, + * delete the existing file using the ::criFsStdio_RemoveFile function before executing this function. + * \sa criFsStdio_CloseFile, criFsStdio_RemoveFile + */ +CriFsStdioHn CRIAPI criFsStdio_OpenFile(CriFsBinderHn bndr, const char *fname, const char *mode); + +/*EN + * \brief File close complying with ANSI C + * \ingroup FSLIB_CRIFSSTDIO + * \param[in] stdhn CriFsStdio handle of the file to close + * \return CriError Error code
+ * \par Description: + * This function closes the specified file.
+ * For the first argument, specify the CriFsStdio handle of the file you want to close.
+ * \sa criFsStdio_OpenFile + */ +CriError CRIAPI criFsStdio_CloseFile(CriFsStdioHn stdhn); + +/*EN + * \brief Get the file size based on the API complying with ANSI C + * \ingroup FSLIB_CRIFSSTDIO + * \param[in] stdhn CriFsStdio handle of the file whose size you want to get + * \return CriSint64 If the specified handle is valid, the file size is returned. + * \par Description: + * This function retrieves the size of the specified file.
+ * For the first argument, specify the CriFsStdio handle of the file whose size you want to get.
+ */ +CriSint64 CRIAPI criFsStdio_GetFileSize(CriFsStdioHn stdhn); + +/*EN + * \brief Get the file read offset complying with ANSI C + * \ingroup FSLIB_CRIFSSTDIO + * \param[in] stdhn CriFsStdio handle of the file whose read offset you want to get + * \return CriSint64 If the specified handle is valid, the read offset (byte) is returned. + * \par Description: + * This function retrieves the read position of the specified file.
+ * For the first argument, specify the CriFsStdio handle of the file whose read position you want to get.
+ * \sa criFsStdio_SeekFile + */ +CriSint64 CRIAPI criFsStdio_TellFileOffset(CriFsStdioHn stdhn); + +/*EN + * \brief Seek the file read offset complying with ANSI C + * \ingroup FSLIB_CRIFSSTDIO + * \param[in] stdhn CriFsStdio handle of the file whose read offset you want to seek + * \param[in] offset Offset of seek (byte) + * \param[in] CRIFSSTDIO_SEEK_TYPE Specify the start position of seek + * \return CriSint64 Successful: 0
+ * Failed: -1
+ * \par Description: + * This function seeks the read offset of the specified file.
+ * For the first argument, specify the CriFsStdio handle of the file whose read offset you want to seek.
+ * For the second argument, specify the offset of seek. The unit is byte.
+ * \attention + * You cannot seek before the beginning of the file. If the seek offset is specified for the file read offset to be positioned + * before the beginning of the file, the file read offset of the seek result will be the beginning of the file.
+ * On the other hand, seek exceeding the end of the file is possible.
+ * When the specified riFsStdio handle has an intermediate buffer, + * if this function seeks outside the valid range of the intermediate buffer, the content of the intermediate buffer will be disposed of.
+ * \sa criFsStdio_TellFileOffset + * \sa criFsStdio_SetInterstageBuffer + */ +CriSint64 CRIAPI criFsStdio_SeekFile(CriFsStdioHn rdr, CriSint64 offset, CRIFSSTDIO_SEEK_TYPE seek_type); + +/*EN + * \brief Set an intermediate buffer exclusive for file load based on the API complying with ANSI C + * \ingroup FSLIB_CRIFSSTDIO + * \param[in] stdhn CriFsStdio handle where you want to set an intermediate buffer + * \param[in] temp_buffer Initial address of the intermediate buffer + * \param[in] temp_buffer_size Intermediate buffer size (byte) + * \return CriSint64 File load position after setting the intermediate buffer + * \par Description: + * This function sets an intermediate buffer for loading a specified file.
+ * For the first argument, specify the CriFsStdio handle where you want to set an intermediate buffer.
+ * For the second argument, specify the initial address of the memory area to be used as the intermediate buffer. + * When NULL is specified, no intermediate buffer is used.
+ * For the third argument, specify the size of the intermediate buffer. The unit is byte. + * With 0 specified for this argument, even if a valid address is specified for the second argument, no intermediate buffer is used.
+ * \attention + * The file handle acquired by criFsStdio_OpenFile() does not have an intermediate buffer by default.
+ * If an intermediate buffer is required, you must set it in this function.
+ * With an intermediate buffer set, data for up to temp_buffer_size + * will be loaded in the intermediate buffer.
+ * As long as data exist in the intermediate buffer, + * the file load by criFsStdio_ReadFile() is performed via memory copy. + * This reduces the occurrence of physical + * file accesses when continuously loading small files.
+ * Note that when criFsStdio_SeekFile() is used to seek outside of the valid range of the intermediate buffer, + * the content of the intermediate buffer will be disposed of. + * \sa criFsStdio_TellFileOffset + * \sa criFsStdio_SeekFile + * \sa criFsStdio_OpenFile + * \sa criFsStdio_ReadFile + */ +CriSint64 CRIAPI criFsStdio_SetInterstageBuffer(CriFsStdioHn stdhn, CriUint8 *temp_buffer, CriUint32 temp_buffer_size); + +/*EN + * \brief Load data from a file based on the API complying with ANSI C + * \ingroup FSLIB_CRIFSSTDIO + * \param[in] stdhn CriFsStdio handle of the load source + * \param[in] rsize Load request size (byte) + * \param[in] buffer Load destination buffer + * \param[in] bsize Load destination buffer size (byte) + * \return CriSint64 Loaded successfully: Size of loaded data (byte)
+ * Load failed: -1 + * \par Description: + * This function loads data from for the specified size (byte) from the file.
+ * For the first argument, specify the CriFsStdio handle of the file from which data are to be loaded.
+ * For the second argument, specify the load size.
+ * For the third argument, specify the buffer where the loaded data are to be written.
+ * For the fourth argument, specify the size of the buffer where the loaded data are to be written.
+ * \attention + * Note that the return value is always smaller than the load request size.
+ * For example, at the end of the file, the return value may be smaller than the load request size. + * This does not mean that the load failed. * If the load failed, NULL is returned. + */ +CriSint64 CRIAPI criFsStdio_ReadFile(CriFsStdioHn stdhn, CriSint64 rsize, void *buf, CriSint64 bsize); + +/*EN + * \brief Write data to a file based on the API complying with ANSI C + * \ingroup FSLIB_CRIFSSTDIO + * \param[in] stdhn CriFsStdio handle of the write destination + * \param[in] rsize Write request size (byte) + * \param[in] buffer Write origin buffer + * \param[in] bsize Write origin buffer size (byte) + * \return CriSint64 Written successfully: Size of written data (byte)
+ * Write failed: -1 + * \par Description: + * This function writes data for the specified size (byte) to the file.
+ * For the first argument, specify the CriFsStdio handle of the file to which data are to be written.
+ * For the second argument, specify the write size.
+ * For the third argument, specify the data buffer of write origin.
+ * For the third argument, specify the size of the data buffer of write origin.
+ * \attention + * The return value is the size of the data successfully written (byte).
+ * If the write failed, NULL is returned. + * This function is available only on the platform that supports writing to files.
+ * If this function is called on the platform that does not support writing to file,
+ * no symbol is not found at the time of linkage, and a build error occurs. + */ +CriSint64 CRIAPI criFsStdio_WriteFile(CriFsStdioHn stdhn, CriSint64 rsize, void *buf, CriSint64 bsize); + +/*EN + * \brief Change the priority of file loading of the CriFsStdio handle + * \ingroup FSLIB_CRIFSSTDIO + * \param[in] stdhn CriFsStdio handle whose priority you want to change + * \param[in] prio Priority value to change + * \return CriError CRIERR_OK Successful
+ * Others Failed + * \par Description: + * This function sets for each CriFsStdio handle, the priority of file loading using criFsStdio_ReadFile().
+ */ +CriError CRIAPI criFsStdio_SetReadPriority(CriFsStdioHn stdhn, CriFsLoaderPriority prio); + +/*EN + * \brief Delete a file + * \ingroup FSLIB_CRIFSSTDIO + * \param[in] path Path of the file to delete + * \param[out] result Deletion result + * \return CriError Error code + * \par Description: + * This function deletes the specified file.
+ * When the file deletion is successful, the output value (result) is set to CRIFSSTDIO_FILE_REMOVED.
+ * If the specified file does not exist or a read only file attempts to be deleted, + * the file deletion failed, and the output value (result) is set to CRIFSSTDIO_IO_ERROR_OCCURRD.
+ * \par Note: + * If the specified argument is invalid or a handle for deleting the file cannot be allocated, + * the output value (result) is set to CRIFSSTDIO_NOT_EXECUTED, + * and the return value of the function is an error value (value other than CRIERR_OK).
+ */ +CriError CRIAPI criFsStdio_RemoveFile( + CriFsBinderHn binder, const CriChar8 *path, CriFsStdioRemoveResult *result); + +#ifdef __cplusplus +} +#endif + +/*************************************************************************** + * For compatibility with old versions + ***************************************************************************/ +#define CriFsConfiguration CriFsConfig +#define criFs_InitializeConfiguration(config) criFs_SetDefaultConfig(&config) +#define criFs_CalculateWorkSize(config, nbyte) criFs_CalculateWorkSizeForLibrary(&config, nbyte) +#define criFs_Initialize(config, buffer, size) criFs_InitializeLibrary(&config, buffer, size) +#define criFs_Finalize() criFs_FinalizeLibrary() +#define CriFsBinderUserHeapAllocateCbFunc CriFsMallocFunc +#define CriFsBinderUserHeapFreeCbFunc CriFsFreeFunc +#define CRIFS_PRIMARYCPK_ERROR_NONE (CRIFS_BINDCPK_ERROR_NONE) +#define CRIFS_PRIMARYCPK_ERROR_CRC (CRIFS_BINDCPK_ERROR_DATA) +#define CRIFS_PRIMARYCPK_ERROR_CANNOT_READ (CRIFS_BINDCPK_ERROR_CANNOT_READ) +#define CRIFS_PRIMARYCPK_ERROR_NONEXISTENT (CRIFS_BINDCPK_ERROR_NONEXISTENT) +typedef CriFsBindCpkError CriFsPrimaryCpkError; +typedef CriFsBindId CriFsBinderId; + +#endif /* CRI_FILE_SYSTEM_H_INCLUDED */ + +/* --- end of file --- */ diff --git a/3rdParty/cri2019/pc/include/cri_file_system_pc.h b/3rdParty/cri2019/pc/include/cri_file_system_pc.h new file mode 100644 index 00000000..e6152116 --- /dev/null +++ b/3rdParty/cri2019/pc/include/cri_file_system_pc.h @@ -0,0 +1,449 @@ +/**************************************************************************** + * + * CRI Middleware SDK + * + * Copyright (c) 2006-2011 CRI Middleware Co., Ltd. + * + * Library : CRI File System + * Module : Library User's Header for PC + * File : cri_file_system_pc.h + * + ****************************************************************************/ +/*! + * \file cri_file_system_pc.h + */ + +/* Prevention of redefinition */ +#ifndef CRI_FILE_SYSTEM_PC_H_INCLUDED +#define CRI_FILE_SYSTEM_PC_H_INCLUDED + +/*************************************************************************** + * Include files + ***************************************************************************/ +#include +#include "cri_xpt.h" +#include "cri_error.h" + +/*************************************************************************** + * Macro Constants + ***************************************************************************/ + +/*************************************************************************** + * Macro Functions + ***************************************************************************/ + +/*************************************************************************** + * Data Type Declarations + ***************************************************************************/ + +/*************************************************************************** + * Prototype Variables + ***************************************************************************/ + +/*************************************************************************** + * Prototype Functions + ***************************************************************************/ +#ifdef __cplusplus +extern "C" { +#endif + +/*EN + * \brief Set the priority of the server processing thread + * \ingroup FSLIB_CRIFS_PC + * \param[in] prio Priority of the thread + * \return CriError Error code + * \par Description: + * This function sets the priority of the thread for server processing (internal processing of the library).
+ * For the prio argument, specify the thread priority level for the Win32 API (argument of the SetThreadPriority function).
+ * Specify higher priority than that of the main thread of the application.
+ * The default priority is THREAD_PRIORITY_HIGHEST.
+ * \attention: + * This function is effective only when the thread model is set + * for the multi-thread model (::CRIFS_THREAD_MODEL_MULTI) when the library is initialized.
+ * When another thread model is selected, this function performs no processing.
+ * (An error callback occurs.)
+ *
+ * This function must be executed between after initialization and before end processing.
+ * There is very little benefit to executing this function before initialization or after end processing.
+ * (An error callback occurs.)
+ *
+ * The server processing thread is the same as that used for (shared with) the CRI Atom library.
+ * Note that if the setting for the server processing thread has already been changed at the API of the CRI Atom library,
+ * the setting is overwritten when this function is called. + */ +CriError CRIAPI criFs_SetServerThreadPriority_PC(int prio); + +/*EN + * \brief Getting the priority of the server processing thread + * \ingroup FSLIB_CRIFS_PC + * \param[out] prio Priority of the thread + * \return CriError Error code + * \par Description: + * This function retrieves the priority of the thread for server processing (internal processing of the library).
+ * \attention: + * This function is effective when the thread model is set + * for the multi-thread model (::CRIFS_THREAD_MODEL_MULTI) when the library is initialized.
+ * When another thread model is selected, this function returns an error.
+ *
+ * This function must be executed between after initialization and before end processing.
+ * When executed before initialization or after end processing, this function returns an error.
+ */ +CriError CRIAPI criFs_GetServerThreadPriority_PC(int *prio); + +/*EN + * \brief Set the priority of the file access thread + * \ingroup FSLIB_CRIFS_PC + * \param[in] prio Priority of the thread + * \return CriError Error code + * \par Description: + * This function sets the priority of the file access thread.
+ * For the prio argument, specify the thread priority level for the Win32 API (argument of the SetThreadPriority function).
+ * Specify a higher priority than that of the main thread of the application.
+ * The default priority is THREAD_PRIORITY_HIGHEST.
+ * \attention: + * This function is effective only when the thread model is set + * for the multi-thread model (::CRIFS_THREAD_MODEL_MULTI) when the library is initialized.
+ * When another thread model is selected, this function performs no processing.
+ * (An error callback occurs.)
+ *
+ * This function must be executed between after initialization and before end processing.
+ * There is very little benefit to executing this function before initialization or after end processing.
+ * (An error callback occurs.)
+ */ +CriError CRIAPI criFs_SetFileAccessThreadPriority_PC(int prio); + +/*EN + * \brief Getting the priority of the file access thread + * \ingroup FSLIB_CRIFS_PC + * \param[out] prio Priority of the thread + * \return CriError Error code + * \par Description: + * This function retrieves the priority of the file access thread.
+ * \attention: + * This function is effective only when the thread model is set + * for the multi-thread model (::CRIFS_THREAD_MODEL_MULTI) when the library is initialized.
+ * When another thread model is selected, this function returns an error.
+ *
+ * This function must be executed between after initialization and before end processing.
+ * When executed before initialization or after end processing, this function returns an error.
+ */ +CriError CRIAPI criFs_GetFileAccessThreadPriority_PC(int *prio); + +/*EN + * \brief Set the priority of the memory file system thread + * \ingroup FSLIB_CRIFS_PC + * \param[in] prio Priority of the thread + * \return CriError Error code + * \par Description: + * This function sets the priority of the memory file system thread.
+ * For the prio argument, specify the thread priority level for the Win32 API (argument of the SetThreadPriority function).
+ * Specify a lower priority than that of the main thread of the application.
+ * The default priority is THREAD_PRIORITY_LOWEST.
+ * \attention: + * This function is effective only when the thread model is set + * for the multi-thread model (::CRIFS_THREAD_MODEL_MULTI) when the library is initialized.
+ * When another thread model is selected, this function performs no processing.
+ * (An error callback occurs.)
+ *
+ * This function must be executed between after initialization and before end processing.
+ * There is very little benefit to executing this function before initialization or after end processing.
+ * (An error callback occurs.)
+ */ +CriError CRIAPI criFs_SetMemoryFileSystemThreadPriority_PC(int prio); + +/*EN + * \brief Get the priority of the memory file system thread + * \ingroup FSLIB_CRIFS_PC + * \param[out] prio Priority of the thread + * \return CriError Error code + * \par Description: + * This function retrieves the priority of the memory file system thread.
+ * \attention: + * This function is effective only when the thread model is set + * for the multi-thread model (::CRIFS_THREAD_MODEL_MULTI) when the library is initialized.
+ * When another thread model is selected, this function returns an error.
+ *
+ * This function must be executed between after initialization and before end processing.
+ * When executed before initialization or after end processing, this function returns an error.
+ */ +CriError CRIAPI criFs_GetMemoryFileSystemThreadPriority_PC(int *prio); + +/*EN + * \brief Set the priority of the data decompression thread + * \ingroup FSLIB_CRIFS_PC + * \param[in] prio Priority of the thread + * \return CriError Error code + * \par Description: + * This function sets the priority of the data decompression thread.
+ * For the prio argument, specify the thread priority level for the Win32 API (argument of the SetThreadPriority function).
+ * Specify a lower priority than that of the main thread of the application.
+ * The default priority is THREAD_PRIORITY_LOWEST.
+ * \attention: + * This function is effective only when the thread model is set + * for the multi-thread model (::CRIFS_THREAD_MODEL_MULTI)when the library is initialized.
+ * When another thread model is selected, this function performs no processing.
+ * (An error callback occurs.)
+ *
+ * This function must be executed between after initialization and before end processing.
+ * There is very little benefit to executing this function before initialization or after end processing.
+ * (An error callback occurs.)
+ */ +CriError CRIAPI criFs_SetDataDecompressionThreadPriority_PC(int prio); + +/*EN + * \brief Get the priority of the data decompression thread + * \ingroup FSLIB_CRIFS_PC + * \param[out] prio Priority of the thread + * \return CriError Error code + * \par Description: + * This function retrieves the priority of the data decompression thread.
+ * \attention: + * This function is effective only when the thread model is set + * for the multi-thread model (::CRIFS_THREAD_MODEL_MULTI) when the library is initialized.
+ * When another thread model is selected, this function returns an error.
+ *
+ * This function must be executed between after initialization and before end processing.
+ * When executed before initialization or after end processing, this function returns an error.
+ */ +CriError CRIAPI criFs_GetDataDecompressionThreadPriority_PC(int *prio); + +/*EN + * \brief Set the priority of the installer thread + * \ingroup FSLIB_CRIFS_PC + * \param[in] prio Priority of the thread + * \return CriError Error code + * \par Description: + * This function sets the priority of the installer thread.
+ * For the prio argument, specify the thread priority level for the Win32 API (argument of the SetThreadPriority function).
+ * Specify a higher priority than that of the main thread of the application.
+ * The default priority is THREAD_PRIORITY_ABOVE_NORMAL.
+ * \attention: + * This function is effective only when the thread model is set + * for the multi-thread model (::CRIFS_THREAD_MODEL_MULTI) when the library is initialized.
+ * When another thread model is selected, this function performs no processing.
+ * (An error callback occurs.)
+ *
+ * This function must be executed between after initialization and before end processing.
+ * There is very little benefit to executing this function before initialization or after end processing.
+ * (An error callback occurs.)
+ */ +CriError CRIAPI criFs_SetInstallerThreadPriority_PC(int prio); + +/*EN + * \brief Get the priority of the installer thread + * \ingroup FSLIB_CRIFS_PC + * \param[out] prio Priority of the thread + * \return CriError Error code + * \par Description: + * This function retrieves the priority of the installer thread.
+ * \attention: + * This function is effective only when the thread model is set + * for the multi-thread model (::CRIFS_THREAD_MODEL_MULTI) when the library is initialized.
+ * When another thread model is selected, this function returns an error.
+ *
+ * This function must be executed between after initialization and before end processing.
+ * When executed before initialization or after end processing, this function returns an error.
+ */ +CriError CRIAPI criFs_GetInstallerThreadPriority_PC(int *prio); + +/*EN + * \brief Set the affinity mask of the server processing thread + * \ingroup FSLIB_CRIFS_PC + * \param[in] mask Affinity mask + * \return CriError Error code + * \par Description: + * This function sets the affinity mask of the thread for server processing (internal processing of the library).
+ * For the mask argument, specify the affinity mask for the Win32 API (argument of the SetThreadAffinityMask function).
+ * By default, the affinity mask is not set.
+ * \attention: + * This function is effective only when the thread model is set + * for the multi-thread model (::CRIFS_THREAD_MODEL_MULTI) when the library is initialized.
+ * When another thread model is selected, this function performs no processing.
+ * (An error callback occurs.)
+ *
+ * This function must be executed between after initialization and before end processing.
+ * There is very little benefit to executing this function before initialization or after end processing.
+ * (An error callback occurs.)
+ *
+ * The server processing thread is the same as that used for (shared with) the CRI Atom library.
+ * Note that if the setting of the server processing thread has already been changed at the API of the CRI Atom library,
+ * the setting is overwritten when this function is called. + */ +CriError CRIAPI criFs_SetServerThreadAffinityMask_PC(DWORD_PTR mask); + +/*EN + * \brief Get the affinity mask of the server processing thread + * \ingroup FSLIB_CRIFS_PC + * \param[out] mask Affinity mask + * \return CriError Error code + * \par Description: + * This function retrieves the affinity mask of the thread for server processing (internal processing of the library).
+ * \attention: + * This function is effective only when the thread model is set + * for the multi-thread model (::CRIFS_THREAD_MODEL_MULTI) when the library is initialized.
+ * When another thread model is selected, this function returns an error.
+ *
+ * This function must be executed between after initialization and before end processing.
+ * When executed before initialization or after end processing, this function returns an error.
+ */ +CriError CRIAPI criFs_GetServerThreadAffinityMask_PC(DWORD_PTR *mask); + +/*EN + * \brief Set the affinity mask of the file access thread + * \ingroup FSLIB_CRIFS_PC + * \param[in] mask Affinity mask + * \return CriError Error code + * \par Description: + * This function sets the affinity mask of the file access thread.
+ * For the mask argument, specify the affinity mask for the Win32 API (argument of the SetThreadAffinityMask function).
+ * By default, the affinity mask is not set.
+ * \attention: + * This function is effective only when the thread model is set + * for the multi-thread model (::CRIFS_THREAD_MODEL_MULTI) when the library is initialized.
+ * When another thread model is selected, this function performs no processing.
+ * (An error callback occurs.)
+ *
+ * This function must be executed between after initialization and before end processing.
+ * There is very little benefit to executing this function before initialization or after end processing.
+ * (An error callback occurs.)
+ */ +CriError CRIAPI criFs_SetFileAccessThreadAffinityMask_PC(DWORD_PTR mask); + +/*EN + * \brief Get the affinity mask of the file access thread + * \ingroup FSLIB_CRIFS_PC + * \param[out] mask Affinity mask + * \return CriError Error code + * \par Description: + * This function retrieves the affinity mask of the file access thread.
+ * \attention: + * This function is effective only when the thread model is set + * for the multi-thread model (::CRIFS_THREAD_MODEL_MULTI) when the library is initialized.
+ * When another thread model is selected, this function returns an error.
+ *
+ * This function must be executed between after initialization and before end processing.
+ * When executed before initialization or after end processing, this function returns an error.
+ */ +CriError CRIAPI criFs_GetFileAccessThreadAffinityMask_PC(DWORD_PTR *mask); + +/*EN + * \brief Set the affinity mask of the memory file system thread + * \ingroup FSLIB_CRIFS_PC + * \param[in] mask Affinity mask + * \return CriError Error code + * \par Description: + * This function sets the affinity mask of the memory file system thread.
+ * For the mask argument, specify the affinity mask for the Win32 API (argument of the SetThreadAffinityMask function).
+ * By default, the affinity mask is not set.
+ * \attention: + * This function is effective only when the thread model is set + * for the multi-thread model (::CRIFS_THREAD_MODEL_MULTI) when the library is initialized.
+ * When another thread model is selected, this function performs no processing.
+ * (An error callback occurs.)
+ *
+ * This function must be executed between after initialization and before end processing.
+ * There is very little benefit to executing this function before initialization or after end processing.
+ * (An error callback occurs.)
+ */ +CriError CRIAPI criFs_SetMemoryFileSystemThreadAffinityMask_PC(DWORD_PTR mask); + +/*EN + * \brief Get the affinity mask of the memory file system thread + * \ingroup FSLIB_CRIFS_PC + * \param[out] mask Affinity mask + * \return CriError Error code + * \par Description: + * This function retrieves the affinity mask of the memory file system thread.
+ * \attention: + * This function is effective only when the thread model is set + * for the multi-thread model (::CRIFS_THREAD_MODEL_MULTI) when the library is initialized.
+ * When another thread model is selected, this function returns an error.
+ *
+ * This function must be executed between after initialization and before end processing.
+ * When executed before initialization or after end processing, this function returns an error.
+ */ +CriError CRIAPI criFs_GetMemoryFileSystemThreadAffinityMask_PC(DWORD_PTR *mask); + +/*EN + * \brief Set the affinity mask of the data decompression thread + * \ingroup FSLIB_CRIFS_PC + * \param[in] mask Affinity mask + * \return CriError Error code + * \par Description: + * Set the affinity mask of the data decompression thread.
+ * For the mask argument, specify the affinity mask for the Win32 API (argument of the SetThreadAffinityMask function).
+ * By default, the affinity mask is not set.
+ * \attention: + * This function is effective only when the thread model is set + * for the multi-thread model (::CRIFS_THREAD_MODEL_MULTI) at the time of the initialization of the library.
+ * When another thread model is selected, this function performs no processing.
+ * (An error callback occurs.)
+ *
+ * This function must be executed between after initialization and before end processing.
+ * There is very little benefit to executing this function before initialization or after end processing.
+ * (An error callback occurs.)
+ */ +CriError CRIAPI criFs_SetDataDecompressionThreadAffinityMask_PC(DWORD_PTR mask); + +/*EN + * \brief Getting the affinity mask of the data decompression thread + * \ingroup FSLIB_CRIFS_PC + * \param[out] mask Affinity mask + * \return CriError Error code + * \par Description: + * This function retrieves the affinity mask of the data decompression thread.
+ * \attention: + * This function is effective only when the thread model is set + * for the multi-thread model (::CRIFS_THREAD_MODEL_MULTI) when the library is initialized.
+ * When another thread model is selected, this function returns an error.
+ *
+ * This function must be executed between after initialization and before end processing.
+ * When executed before initialization or after end processing, this function returns an error.
+ */ +CriError CRIAPI criFs_GetDataDecompressionThreadAffinityMask_PC(DWORD_PTR *mask); + +/*EN + * \brief Set the affinity mask of the installer thread + * \ingroup FSLIB_CRIFS_PC + * \param[in] mask Affinity mask + * \return CriError Error code + * \par Description: + * This function sets the affinity mask of the installer thread.
+ * For the mask argument, specify the affinity mask for the Win32 API (argument of the SetThreadAffinityMask function).
+ * By default, the affinity mask is not set.
+ * \attention: + * This function is effective only when the thread model is set + * for the multi-thread model (::CRIFS_THREAD_MODEL_MULTI)when the library is initialized.
+ * When another thread model is selected, this function performs no processing.
+ * (An error callback occurs.)
+ *
+ * This function must be executed between after initialization and before end processing.
+ * There is very little benefit to executing this function before initialization or after end processing.
+ * (An error callback occurs.)
+ */ +CriError CRIAPI criFs_SetInstallerThreadAffinityMask_PC(DWORD_PTR mask); + +/*EN + * \brief Get the affinity mask of the installer thread + * \ingroup FSLIB_CRIFS_PC + * \param[out] mask Affinity mask + * \return CriError Error code + * \par Description: + * This function retrieves the affinity mask of the installer thread.
+ * \attention: + * This function is effective only when the thread model is set + * for the multi-thread model (::CRIFS_THREAD_MODEL_MULTI) when the library is initialized.
+ * When another thread model is selected, this function returns an error.
+ *
+ * This function must be executed between after initialization and before end processing.
+ * When executed before initialization or after end processing, this function returns an error.
+ */ +CriError CRIAPI criFs_GetInstallerThreadAffinityMask_PC(DWORD_PTR *mask); + +#ifdef __cplusplus +} +#endif + +#endif /* CRI_FILE_SYSTEM_PC_H_INCLUDED */ + +/* --- end of file --- */ diff --git a/3rdParty/cri2019/pc/include/cri_framework.h b/3rdParty/cri2019/pc/include/cri_framework.h new file mode 100644 index 00000000..6e98b553 --- /dev/null +++ b/3rdParty/cri2019/pc/include/cri_framework.h @@ -0,0 +1,133 @@ +/**************************************************************************** + * + * CRI Middleware SDK + * + * Copyright (c) 2009-2015 CRI Middleware Co., Ltd. + * + * Library : CRI Framework + * Module : Library User's Header + * File : cri_framework.h + * + ****************************************************************************/ + /*! + * \file cri_framework.h + */ + +/* Prevention of redefinition */ +#ifndef CRI_FW_H_INCLUDED +#define CRI_FW_H_INCLUDED + +/*************************************************************************** + * Include files + ***************************************************************************/ +#include "cri_xpt.h" + +#if defined(XPT_TGT_ANDROID) +#include +#endif + +/*************************************************************************** + * Macro Constants + ***************************************************************************/ +/* Version Number */ +#define CRI_FW_VERSION (0x00700400) +#define CRI_FW_VER_NUM "0.70.04" +#define CRI_FW_VER_NAME "CRI Framework" + +#define CRIFWPAD_UP (0x0001) +#define CRIFWPAD_DOWN (0x0002) +#define CRIFWPAD_LEFT (0x0004) +#define CRIFWPAD_RIGHT (0x0008) +#define CRIFWPAD_BUTTON01 (0x0010) +#define CRIFWPAD_BUTTON02 (0x0020) +#define CRIFWPAD_BUTTON03 (0x0040) +#define CRIFWPAD_BUTTON04 (0x0080) +#define CRIFWPAD_BUTTON05 (0x0100) +#define CRIFWPAD_BUTTON06 (0x0200) +#define CRIFWPAD_BUTTON07 (0x0400) +#define CRIFWPAD_BUTTON08 (0x0800) +#define CRIFWPAD_BUTTON09 (0x1000) +#define CRIFWPAD_BUTTON10 (0x2000) + +/*************************************************************************** + * Macro Functions + ***************************************************************************/ +/* Avoid unused variable warnings */ +#ifndef CRIFW_UNUSED +#define CRIFW_UNUSED(arg) { if (&(arg) == &(arg)) {} } +#endif + +/*************************************************************************** + * Data Type Declarations + ***************************************************************************/ + typedef struct CriFwPadStickPosition { + CriFloat32 x; + CriFloat32 y; + } CriFwPadStickPosition; + +/* Input Data type declaration by pad */ +typedef struct CriFwPadStatus { + CriUint32 down; + CriUint32 up; + CriUint32 press; + CriUint32 num_triggers; + const CriFloat32 *triggers; + CriUint32 num_sticks; + const CriFwPadStickPosition *sticks; +} CriFwPadStatus; + +/*************************************************************************** + * Prototype Variables + ***************************************************************************/ + +/*************************************************************************** + * Prototype Functions + ***************************************************************************/ +#ifdef __cplusplus +extern "C" { +#endif + +/*========================================================================== + * CRI Fw API + *=========================================================================*/ + +CriBool CRIAPI criFw_Initialize(void); + +void CRIAPI criFw_Finalize(void); + +/*========================================================================== + * CRI Fw System API + *=========================================================================*/ +CriBool CRIAPI criFwSys_IsTerminated(void); +void CRIAPI criFwSys_WaitVsync(void); + +/*========================================================================== + * CRI Fw Memory allocater API + *=========================================================================*/ +void* CRIAPI criFwMem_Alloc(CriSint32 size, CriSint32 align); + +void CRIAPI criFwMem_Free(void *ptr); + +/*========================================================================== + * CRI Fw Print API + *=========================================================================*/ +void CRIAPI criFwPrt_DrawText(CriSint32 x, CriSint32 y, const CriChar8 *format, ...); + +void CRIAPI criFwPrt_DebugPrintf(const CriChar8 *format, ...); + +/*========================================================================== + * CRI Fw Pad API + *=========================================================================*/ +const CriFwPadStatus* CRIAPI criFwPad_GetStatus(CriSint32 port); + +const CriChar8* CRIAPI criFwPad_GetButtonName(CriUint32 button_code); + +CriSint32 CRIAPI criFwPad_GetMaxPort(void); + +#ifdef __cplusplus +} +#endif + +#endif /* CRI_FW_H_INCLUDED */ + +/* --- end of file --- */ diff --git a/3rdParty/cri2019/pc/include/cri_mana.h b/3rdParty/cri2019/pc/include/cri_mana.h new file mode 100644 index 00000000..ade8f15b --- /dev/null +++ b/3rdParty/cri2019/pc/include/cri_mana.h @@ -0,0 +1,3688 @@ +/**************************************************************************** + * + * CRI Middleware SDK + * + * Copyright (c) 2010-2019 CRI Middleware Co., Ltd. + * + * Library : CRI Mana (Sofdec2) + * Module : Library User's Header + * File : cri_mana.h + * Date : 2019-02-05 + * Version : (see CRIMANA_VERSION) + * + ****************************************************************************/ +/*! + * \file cri_mana.h + */ + +/* Prevention of redefinition */ +#ifndef CRI_INCL_CRI_MANA_H +#define CRI_INCL_CRI_MANA_H + +/*************************************************************************** + * Include files + ***************************************************************************/ +#include +#include +#include + +/*************************************************************************** + * Macro Constants + ***************************************************************************/ +/* Version Number */ +#define CRIMANA_VERSION (0x02180000) +#define CRIMANA_VER_NUM "2.18.00" +#define CRIMANA_VER_NAME "CRI Mana" +#define CRIMANA_VER_OPTION + + +/*EN + * \brief Maximum number of video streams in a movie file + * \ingroup MDL_MANALIB_PLAYER + * \par Description: + * + * \sa CriManaMovieInfo, criManaPlayer_GetMovieInfo + */ +#define CRIMANA_MAX_VIDEO_NUM (1) + +/*EN + * \brief Maximum number of audio streams in a movie file + * \ingroup MDL_MANALIB_PLAYER + * \par Description: + * + * \sa CriManaMovieInfo, criManaPlayer_GetMovieInfo + */ +#define CRIMANA_MAX_AUDIO_NUM (32) + +/*EN + * \brief Maximum number of alpha streams in a movie file + * \ingroup MDL_MANALIB_PLAYER + * \par Description: + * + * \sa CriManaMovieInfo, criManaPlayer_GetMovieInfo + */ +#define CRIMANA_MAX_ALPHA_NUM (1) + +/*EN + * \brief Specified value for turning off audio playback + * \ingroup MDL_MANALIB_PLAYER + * \par Description: + * + * \sa criManaPlayer_SetAudioTrack + */ +#define CRIMANA_AUDIO_TRACK_OFF (-1) + +/*EN + * \brief Default value for audio tracks + * \ingroup MDL_MANALIB_PLAYER + * \sa criManaPlayer_SetAudioTrack + */ +#define CRIMANA_AUDIO_TRACK_AUTO (100) + +/*EN + * \brief Maximum number of subtitle channels + * \ingroup MDL_MANALIB_PLAYER + * \sa CRIMANA_MAX_VIDEO_NUM, CRIMANA_MAX_AUDIO_NUM + */ +#define CRIMANA_MAX_SUBTITLE_NUM (16) + +/*EN + * \brief Specified value for turning off subtitle playback + * \ingroup + * \sa criManaPlayer_SetSubtitleChannel + */ +#define CRIMANA_SUBTITLE_CHANNEL_OFF (-1) + +/*EN + * \brief Maximum file name length that can be specified in the Mana player + * \ingroup MDL_MANALIB_PLAYER + * \sa criManaPlayer_SetFile + */ +#define CRIMANA_MAX_FILE_NAME (256) + +/* Number of platform-specific frame information items */ +#define CRIMANA_FRAME_DETAILS_NUM (2) + +/*************************************************************************** + * Macro Functions + ***************************************************************************/ +/* Replacement macro for retaining compatibility */ +#define criManaPlayer_CalculateHanldeWorkSize criManaPlayer_CalculateHandleWorkSize + +/*========================================================================== + * CRI Mana API + *=========================================================================*/ +/*EN + * \brief Set default values for the library initialization config structure + * \ingroup MDL_MANALIB_GLOBAL + * \param[out] p_config Pointer to the initialization config structure + * \par Description: + * Sets the default values for the config structure ( ::CriManaLibConfig ) + * that will be set to the ::criMana_Initialize function.
+ * \par Notes: + * Platform specific functions may exist on each platform. See the reference for each platform for more information. + * \sa + * CriManaLibConfig + */ +#define criMana_SetDefaultLibConfig(p_config) \ +{\ + (p_config)->max_decoder_handles = 4;\ + (p_config)->thread_model = CRIMANA_THREAD_MODEL_MULTI;\ + (p_config)->version = CRIMANA_VERSION;\ +} + +/*========================================================================== + * CRI Mana Player API + *=========================================================================*/ +/*EN + * \brief Set default values for the player creation config structure + * \ingroup MDL_MANALIB_PLAYER + * \param[out] p_config Pointer to the player creation config structure + * \par Description: + * Sets the default values for the config structure ( ::CriManaPlayerConfig ) + * that will be set to the ::criManaPlayer_CreateWithConfig function.
+ * \sa + * criManaPlayer_CreateWithConfig + */ +#define criManaPlayer_SetDefaultHandleConfig(p_config) \ +{\ + (p_config)->readbuf_size_byte = 0;\ + (p_config)->use_atomex_player = CRI_FALSE;\ +} + +/*************************************************************************** + * Enum Declarations + ***************************************************************************/ +/*EN + * \brief Player status + * \ingroup MDL_MANALIB_PLAYER + * \par Description: + * This value shows the status of the Mana player playback. + * You can get the handle status anytime with the ::criManaPlayer_GetStatus function.
+ * The handle will be in CRIMANAPLAYER_STOP status directly after creation.
+ *
+* The handle status will transition in order from CRIMANAPLAYER_STATUS_STOP to CRIMANAPLAYER_STATUS_PLAYEND.
+ * The application will not necessarily need to check the status of everything when playing a movie.
+ * As long as it at least checks CRIMANAPLAYER_STATUS_STOP, CRIMANAPLAYER_STATUS_PLAYING, CRIMANAPLAYER_STATUS_PLAYEND, and CRIMANAPLAYER_STATUS_ERROR, + * then the movie can be played back.
+ *
+* If the movie resolution has already been determined after the Mana player has been created, + * then the application can directly call the ::criManaPlayer_Start function. In this situation, the handle status will automatically transition to + * CRIMANAPLAYER_STATUS_PLAYEND.
+ *
+* When the ::criManaPlayer_DecodeHeader function is first called, the handle status will become + * CRIMANAPLAYER_STATUS_WAIT_PREP after header analysis is complete. The application will then wait until the ::criManaPlayer_Prepare function + * or the ::criManaPlayer_Start function can be called from the application.
+ *
+* You can get movie information using the ::criManaPlayer_GetMovieInfo function once it is in the CRIMANAPLAYER_STATUS_WAIT_PREP status.
+ * When calling the ::criManaPlayer_Prepare function, once header analysis and data buffering is complete + * the handle status will become CRIMANAPLAYER_STATUS_READY and it will wait until the ::criManaPlayer_Start function + * can be called from the application. You can use this to adjust the start playback timing.
+ *
+ * The status will automatically become CRIMANAPLAYER_STATUS_PLAYEND once playback is finished.
+ *
+* When the ::criManaPlayer_Stop function is called, it will become the CRIMANAPLAYER_STATUS_STOP status + * once the decoder has stopped. It will not always stop directly after the ::criManaPlayer_Stop function is finished.
+ *
+* If a problem such as insufficient memory or a data error occurs, it will become the CRIMANAPLAYER_STATUS_ERROR status.
+ * If it has become CRIMANAPLAYER_STATUS_ERROR status, call the ::criManaPlayer_Stop function and let the + * handle status transition to CRIMANAPLAYER_STATUS_STOP.
+ *
+ * The ::criManaPlayer_Destroy function can be called only when in the CRIMANAPLAYER_STATUS_STOP or + * CRIMANAPLAYER_STATUS_PLAYEND status. + * + * \sa criManaPlayer_GetStatus + */ +typedef enum { + CRIMANAPLAYER_STATUS_STOP = 0, /*EN< Stopped */ + CRIMANAPLAYER_STATUS_DECHDR = 1, /*EN< Header analysis */ + CRIMANAPLAYER_STATUS_WAIT_PREP = 2, /*EN< Buffering start or stop */ + CRIMANAPLAYER_STATUS_PREP = 3, /*EN< Preparing for playback */ + CRIMANAPLAYER_STATUS_READY = 4, /*EN< Waiting for playback */ + CRIMANAPLAYER_STATUS_PLAYING = 5, /*EN< Playing */ + CRIMANAPLAYER_STATUS_PLAYEND = 6, /*EN< Playback is finished */ + CRIMANAPLAYER_STATUS_ERROR = 7, /*EN< Error */ + + CRIMANAPLAYER_STATUS_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriManaPlayerStatus; + +/*EN + * \brief Timer type + * \ingroup MDL_MANALIB_PLAYER + * \par Description: + * The type of reference timer (master timer) that the Mana synchronizes as internal time. + * + * \sa criManaPlayer_SetMasterTimerType, criManaPlayer_GetMasterTimerType + */ +typedef enum { + CRIMANAPLAYER_TIMER_NONE =0, /*EN< It does not synchronize video frame times. */ + /* You can immediately retrieve a frame that has been decoded.*/ + CRIMANAPLAYER_TIMER_SYSTEM =1, /*EN< The video frame is synchronized to the system time used within the */ + /* Mana player. */ + CRIMANAPLAYER_TIMER_AUDIO =2, /*EN< The video frame is synchronized to the audio time played by the main audio track.*/ + + /* If there is no audio in the movie data, then the video will synchronize to the system time. */ + CRIMANAPLAYER_TIMER_USER =3, /*EN< Unsupported. Synchronizes to the user's own timer specified by the application.*/ + CRIMANAPLAYER_TIMER_MANUAL =4, /*EN< Manual type: This mode sets the unit of time advancement from the application */ + /* and advances time.*/ + + CRIMANAPLAYER_TIMER_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriManaTimerType; + +/*EN + * \brief Thread model + * \ingroup MDL_MANALIB_GLOBAL + * \par Description: + * Displays what kind of thread model the CRI Mana library operates on. + * + * \sa CriManaLibConfig, criMana_CalculateLibWorkSize, criMana_Initialize + */ +typedef enum { + CRIMANA_THREAD_MODEL_MULTI = 0, /*EN< Multi-thread operation model. */ + /* The library creates internal threads for multi-thread operation. */ + CRIMANA_THREAD_MODEL_SINGLE = 1, /*EN< Single thread operation model. */ + /* The library does not create internal threads. */ + + /* Keep enum 4bytes */ + CRIMANA_THREAD_MODEL_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriManaThreadModel; + +/*EN + * \brief Video codec types + * \ingroup MDL_MANALIB_PLAYER + * \par Description: + * Types of video codecs that can be included in movies that are played back. + * Only Sofdec.Prime (previously the Sofdec codec) is currently supported. + * + * \sa CriManaVideoInfo, CriManaMovieInfo, criManaPlayer_GetMovieInfo + */ +typedef enum { + CRIMANA_VIDEO_CODEC_UNKNOWN = 0, /*EN< Unknown */ + CRIMANA_VIDEO_CODEC_SOFDEC_PRIME = 1, /*EN< Sofdec.Prime */ + CRIMANA_VIDEO_CODEC_H264 = 5, /*EN< H.264/AVC */ + CRIMANA_VIDEO_CODEC_VP9 = 9, /*EN< VP9 */ + + /* Keep enum 4bytes */ + CRIMANA_VIDEO_CODEC_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriManaVideoCodecType; + +/*EN + * \brief Audio codec types + * \ingroup MDL_MANALIB_PLAYER + * \par Description: + * Types of audio codecs that can be included in movies that are played back. + * Only the ADX codec is currently supported. + * + * \sa CriManaAudioInfo, CriManaMovieInfo, criManaPlayer_GetMovieInfo + */ +typedef enum { + CRIMANA_AUDIO_CODEC_UNKNOWN = 0, /*EN< Unknown */ + CRIMANA_AUDIO_CODEC_ADX = 2, /*EN< Advanced ADX */ + CRIMANA_AUDIO_CODEC_HCA = 4, /*EN< HCA */ + + /* Keep enum 4bytes */ + CRIMANA_AUDIO_CODEC_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriManaAudioCodecType; + +/*EN + * \brief Alpha movie composition mode + * \ingroup MDL_MANALIB_PLAYER + * \par Description: + * + * \sa CriManaPlaybackAlphaParams, CriManaAlphaInfo, CriManaFrameInfo, + * criManaPlayer_IsFrameOnTime, criManaPlayer_ReferFrame, criManaPlayer_DiscardFrame + * criManaPlayer_CopyFrameToBufferARGB32, criManaPlayer_CopyFrameToBuffersYUV + */ +typedef enum { + CRIMANA_COMPO_OPAQ = 0, /*EN< Opaque, no alpha information */ + CRIMANA_COMPO_ALPHFULL = 1, /*EN< Full Alpha composition (alpha data is 8 bit) */ + CRIMANA_COMPO_ALPH3STEP = 2, /*EN< 3 alpha */ + CRIMANA_COMPO_ALPH32BIT = 3, /*EN< Full Alpha, (color and alpha data is 32 bit) */ + CRIMANA_COMPO_ALPH1BIT = 4, /*EN< Full Alpha, (color and alpha data is 32 bit, a value is 2) */ + CRIMANA_COMPO_ALPH2BIT = 5, /*EN< Full Alpha, (color and alpha data is 32 bit, a value is 4) */ + CRIMANA_COMPO_ALPH3BIT = 6, /*EN< Full Alpha, (color and alpha data is 32 bit, a value is 8) */ + CRIMANA_COMPO_ALPH4BIT = 7, /*EN< Full Alpha, (color and alpha data is 32 bit, a value is 16) */ + + /* Keep enum 4bytes */ + CRIMANA_COMPO_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriManaAlphaType; + +/*EN + * \brief Flags used by meta data [currently not supported] + * \ingroup MDL_MANALIB_PLAYER + * \par Description: + * These flags control what class of meta data you want to use. + *Currently control for each type of flag is not supported. When using seek play back or Cuepoints, + * specify the CRIMANA_META_FLAG_ALL. + * + * \sa criManaPlayer_SetMetaDataWorkAllocator + */ +typedef enum { + CRIMANA_META_FLAG_NONE = 0x0000, /*EN< Do not use meta data */ + CRIMANA_META_FLAG_CUE = 0x0001, /*EN< Unsupported */ + CRIMANA_META_FLAG_SEEK = 0x0002, /*EN< Unsupported */ + CRIMANA_META_FLAG_ALL = CRIMANA_META_FLAG_CUE | CRIMANA_META_FLAG_SEEK, /*EN< Use all meta data formats */ + + /* Keep enum 4bytes */ + CRIMANA_META_FLAG_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriManaMetaFlag; + +/*EN + * \brief ReferFrame frame reference results (debug information) + * \ingroup MDL_MANALIB_PLAYER + * \par Description: + * Displays reference results for decoded video frames. + * Use these parameters as references when debugging. + * + * \sa CriManaFrameInfo + * criManaPlayer_IsFrameOnTime, criManaPlayer_ReferFrame, criManaPlayer_DiscardFrame, + * criManaPlayer_CopyFrameToBufferARGB32, criManaPlayer_CopyFrameToBuffersYUV + */ +typedef enum { + CRIMANA_REFER_RESULT_OK = 0, /*EN< Successful frame reference */ + CRIMANA_REFER_RESULT_SHORT_INPUT = 1, /*EN< Insufficient data in input buffer */ + CRIMANA_REFER_RESULT_SHORT_CPUTIME = 2, /*EN< Insufficient CPU time for decoding */ + CRIMANA_REFER_RESULT_NO_MORE_KEEP = 3, /*EN< There are no frames that can be kept */ + + /* Keep enum 4bytes */ + CRIMANA_REFER_RESULT_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriManaReferFrameResult; + + +/*EN + * \brief Color conversion types + * \ingroup MDL_MANALIB_PLAYER + * \par Description: + * + * \sa CriManaVideoInfo,CriManaAlphaInfo,CriManaFrameInfo + */ +typedef enum { + CRIMANA_COLORSPACE_CONVERSION_TYPE_ITU_R_BT601_LIMITED = 0, + CRIMANA_COLORSPACE_CONVERSION_TYPE_ITU_R_BT601_FULLRANGE = 1, + + /* Keep enum 4bytes */ + CRIMANA_COLORSPACE_CONVERSION_TYPE_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriManaColorSpaceConversionType; + +/*EN + * \brief Decoder operation mode + * \ingroup MDL_MANALIB_GLOBAL + * \par Description: + * Displays the decoder operation mode + * + * \sa criManaPlayer_SetDecodeMode + */ +typedef enum { + /*EN + * \brief Normal decoding mode + * \par Description: + * Executes normal decoding.
+ * Default values for the Mana library and Mana player. + */ + CRIMANA_DECODE_MODE_NORMAL = 0, + + /*EN + * \brief Forced B picture skip mode + * \par Description: + * Decoding will not be executed on B pictures + * if they are included in the video stream of the movie data being played.
+ * Specify this operation mode if you want to decrease the load during movie play back. + * + * \par Notes: + * Only the Sofdec.Prime codec is supported. + */ + CRIMANA_DECODE_MODE_B_SKIP = 1, + + CRIMANA_DECODE_MODE_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF + +} CriManaDecodeMode; + +/* CriManaPlayerMovieEventSyncMode */ +/*EN + * \brief Sync mode for movie events (cue points, subtitles) + * \ingroup MDL_MANALIB_PLAYER + * \par Description: + * Sync mode for movie events. + * + * \sa criManaPlayer_SetMovieEventSyncMode + */ +typedef enum { + /* CriManaPlayerMovieEventSyncMode.CRIMANAPLAYER_EVENT_SYNC_FRAME_TIME */ + /*EN + * Movie events are synchronized to the frame time (getting video frame). + */ + CRIMANAPLAYER_EVENT_SYNC_FRAME_TIME = 0, + + /* CriManaPlayerMovieEventSyncMode.CRIMANAPLAYER_EVENT_SYNC_PLAYBACK_TIME */ + /*EN + * Movie events are synchronized to the playback time (playback time based on timer type). + */ + CRIMANAPLAYER_EVENT_SYNC_PLAYBACK_TIME = 1, + + CRIMANAPLAYER_EVENT_SYNC_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF +} CriManaPlayerMovieEventSyncMode; + +/*************************************************************************** + * Data Type Declarations + ***************************************************************************/ +/*========================================================================== + * CRI Mana API + *=========================================================================*/ +/*EN + * \brief Mana library initialization parameters + * \ingroup MDL_MANALIB_GLOBAL + * \par Description: + * Structure for specifying the CRI Mana library operation specifications. + * \par Notes: + * Each platform may have specific initialization parameters. See the reference for each platform for more information. + * \sa criMana_CalculateLibWorkSize, criMana_Initialize + */ +typedef struct { + CriUint32 max_decoder_handles; /*EN< Max number of decoder handles consumed. Two handle resources are consumed for alpha movie playback.*/ + CriManaThreadModel thread_model; /*EN< Thread model */ + CriUint32 version; /*EN< Header version number */ +} CriManaLibConfig; + +/*EN + * \brief Event point information + * \ingroup MDL_MANALIB_PLAYER + * \par Description: + * Individual timing information embedded in movie data using the Cuepoint function. + * \sa criManaPlayer_GetCuePointInfo, CriManaCuePointInfo + */ +typedef struct { + CriChar8 *cue_name; /*EN< Event point name. Character codes follow the Cuepoint information text. */ + CriUint32 size_name; /*EN< Event point name data size */ + CriUint64 time; /*EN< Timer count */ + CriUint64 tunit; /*EN< Timer count value per second. Time is in second units because count / unit. */ + CriSint32 type; /*EN< Event point type */ + CriChar8 *param_string; /*EN< User parameter string. Character codes follow the Cuepoint information text. */ + CriUint32 size_param; /*EN< User parameter string data size*/ + CriUint32 cnt_callback; /*EN< Cuepoint callback call counter */ +} CriManaEventPoint; + +/*EN + * \brief Cuepoint information + * \ingroup MDL_MANALIB_PLAYER + * \par Description: + * Cuepoint information is the number and list of event points. + * \sa criManaPlayer_GetCuePointInfo, CriManaCuePointInfo + */ +typedef struct { + CriUint32 num_eventpoint; /*EN< Number of event points */ + CriManaEventPoint *eventtable; /*EN< List of event points */ +} CriManaCuePointInfo; + +/*========================================================================== + * CRI Mana Player API + *=========================================================================*/ +/*EN + * \brief Configuration structure for player creation + * \ingroup MDL_MANALIB_PLAYER + * \par Description: + * This is a data type for specifying operation specifications when the Mana player is used for movie playback.
+ * Specifies the ::criManaPlayer_CreateWithConfig function argument.
+ *
+* The player that was created will allocate only as many internal resources as are necessary according to the settings + * specified by the structure during handle creation.
+ *
+* When the config structure is not used in handle creation, internal resources are allocated + * as playback work after playback begins. Only use this structure when the specs of the + * movie to be played back have been determined beforehand. + * \sa criManaPlayer_CreateWithConfig + */ +typedef struct { + /*EN + \brief Input buffer size (unit: byte) + \par Description: + You can specify the size of the input buffer allocated internally by the Mana player for playback.
+
+ Specifying anything but zero will create an input buffer with a size specified during handle creation.
+ If you specify zero, an input buffer will not be created during handle creation but rather allocated when playback work is allocated.
+ \par Calculation method: + - Input buffer size = Max bit rate (bps) of the movie to be played back / 8 * buffering time (secs)
+ Ex.) When playing a movie with a max 2Mbps: 2*1000*1000 / 8 * 1.0f = 250000
+ \par Caution: + Making the input buffer size too small may delay playback. Allocate more than one second, + even if the buffering time is small.
+ We recommend making the size a little larger to match this number during multi-streaming playback. + */ + CriUint32 readbuf_size_byte; + /*EN + \brief Flag to use ::criAtomExPlayer for sound playback + \par Description: + By specifying CRI_TRUE for this flag, ::criAtomExPlayer is used for player's sound playback. + It is possible to obtain this criAtomExPlayer handle with ::criManaPlayer_GetAtomExPlayer function. + */ + CriBool use_atomex_player; +} CriManaPlayerConfig; + +struct CriManaPlayerTag; +typedef struct CriManaPlayerTag CriManaPlayerObj; +/*EN + * \brief Player handle + * \ingroup MDL_MANALIB_PLAYER + * \par Description: + * CriManaPlayerHn is a handle to operate the player that was created for video playback.
+ * When you create a player for video playback using the ::criManaPlayer_Create function + * the function will return this "Mana player handle" for player operation. + *
+ * Operations for the player, such as setting data, start playback, and getting the status + * are all executed through the Mana player handle.
+ * \sa criManaPlayer_Create + */ +typedef CriManaPlayerObj *CriManaPlayerHn; + +/*========================================================================== + * Structure for playback work size adjustment + *=========================================================================*/ + +/*EN + * \brief Basic parameters for playback work + * \ingroup MDL_MANALIB_GLOBAL + * \par Description: + * These are reference parameters when allocating the basic playback work area necessary for movie playback. + * + * \sa CriManaPlaybackBasicWorkConfig, criManaPlayer_GetPlaybackWorkParam, + * criManaPlayer_CalculatePlaybackWorkSize, criManaPlayer_SetPlaybackWork + */ +typedef struct { + CriSint32 readbuf_size_byte; /*EN< Input buffer size (unit: byte) */ + CriUint32 max_audio_tracks; /*EN< Number of audio tracks that can be contained in the movie */ +} CriManaPlaybackCommonParams; + +/*EN + * \brief Video-related playback parameters + * \ingroup MDL_MANALIB_PLAYER + * \par Description: + * Displays the parameters necessary for video playback. + * The work area necessary for video playback is calculated based on these parameters, and added to the + * final work size. + * + * \sa CriManaPlaybackBasicWorkConfig, criManaPlayer_GetPlaybackWorkParam, + * criManaPlayer_CalculatePlaybackWorkSize, criManaPlayer_SetPlaybackWork + */ +typedef struct { + CriBool video_flag; /*EN< [Not used] Flags used by videos */ + CriSint32 max_width; /*EN< Max movie width (multiple of 8) */ + CriSint32 max_height; /*EN< Max movie height (multiple of 8) */ + CriSint32 num_frame_pools; /*EN< Number of frame pools */ + CriManaVideoCodecType codec_type; /*EN< Type of codec (Assumed to be Sofdec.Prime when CRIMANA_VIDEO_CODEC_UNKNOWN is specified) */ + CriSint32 capacity_of_picsize; /*EN< Upper picture size limit */ + CriSint32 framerate_n; /*EN< Frame rate (numerator) in rational number format framerate [x1000] = framerate_n / framerate_d */ + CriSint32 framerate_d; /*EN< Frame rate (denominator) in rational number format framerate [x1000] = framerate_n / framerate_d */ + // CriManaVideoLevel level; /* Not used */ +} CriManaPlaybackVideoParams; + +/*EN + * \brief Audio-related playback parameters + * \ingroup MDL_MANALIB_PLAYER + * \par Description: + * Displays the parameters necessary for audio playback. + * The work area necessary for audio playback is calculated based on these parameters, and added to the + * final work size. + * + * \sa CriManaPlaybackBasicWorkConfig, criManaPlayer_GetPlaybackWorkParam, + * criManaPlayer_CalculatePlaybackWorkSize, criManaPlayer_SetPlaybackWork + */ +typedef struct { + CriBool audio_flag; /*EN< Flags used by audio */ + CriUint32 sampling_rate; /*EN< Sampling frequency (unit: Hz)*/ + CriUint32 num_channels; /*EN< Number of channels */ + CriSint32 output_buffer_samples; /*EN< Specify output buffer size (unit: number of samples) */ + CriManaAudioCodecType codec_type; /*EN< Codec type (Assumed to be ADX when CRIMANA_AUDIO_CODEC_UNKNOWN is specified) */ +} CriManaPlaybackAudioParams; + +/*EN + * \brief Subtitle-related playback parameters + * \ingroup MDL_MANALIB_PLAYER + * \par Description: + * Displays the parameters necessary for subtitle playback. + * The work area necessary for subtitle playback is calculated based on these parameters, and added to the + * final work size. + * + * \sa CriManaPlaybackBasicWorkConfig, criManaPlayer_GetPlaybackWorkParam, + * criManaPlayer_CalculatePlaybackWorkSize, criManaPlayer_SetPlaybackWork + */ +typedef struct { + CriBool subtitle_flag; /*EN< Flags used by subtitles */ + CriSint32 max_datasize; /*EN< Max subtitle data size */ +} CriManaPlaybackSubtitleParams; + +/*EN + * \brief Alpha channel parameters + * \ingroup MDL_MANALIB_PLAYER + * \par Description: + * Displays the parameters necessary for decoding alpha channels. + * The work area necessary for alpha channel decoding is calculated based on these parameters, and added to the + * final work size. + * + * \sa CriManaPlaybackBasicWorkConfig, criManaPlayer_GetPlaybackWorkParam, + * criManaPlayer_CalculatePlaybackWorkSize, criManaPlayer_SetPlaybackWork + */ +typedef struct { + CriBool alpha_flag; /*EN< Flags used by alpha channels */ + CriManaAlphaType alpha_type; /*EN< Alpha movie composition mode */ + CriSint32 max_width; /*EN< Max movie width (multiple of 8) */ + CriSint32 max_height; /*EN< Max movie height (multiple of 8) */ + CriManaVideoCodecType codec_type; /*EN Audio and video total. */ + /* Video */ + CriUint32 num_video_streams; /*EN< Number of video streams. Currently fixed to 1.*/ + CriManaVideoInfo video_prm[CRIMANA_MAX_VIDEO_NUM]; /*EN< Video parameters */ + /* Audio */ + CriUint32 num_audio_streams; /*EN< Number of audio streams */ + CriManaAudioInfo audio_prm[CRIMANA_MAX_AUDIO_NUM]; /*EN< Audio parameters */ + /* Subtitle */ + CriUint32 num_subtitle_channels; /*EN< Number of subtitle channels */ + CriUint32 max_subtitle_size; /*EN< Maximum subtitle data size*/ + /* Composite mode */ + CriUint32 num_alpha_streams; /*EN< Number of alpha streams. Currently fixed to 1. */ + CriManaAlphaInfo alpha_prm[CRIMANA_MAX_ALPHA_NUM]; /*EN< Alpha parameters */ + /* Seek */ + CriBool seekinfo_flag; /*EN< Seek information flags */ + /* Others */ + CriUint32 format_ver; /*EN< Format version */ +} CriManaMovieInfo; + +/*========================================================================== + * Video frame information structure + *=========================================================================*/ +/*EN + * \brief Image information + * \ingroup MDL_MANALIB_PLAYER + * \par Description: + * Image information (plane information) of which video frame is referenced by frame retrieval API
+ * Composed of a combination of Y, U, V, and A as a member array of the CriManaFrameInfo structure.
+ * This image information is used by the CPU with criManaPlayer_CopyFrameToBufferARGB32 or the like
+ * for frame conversion (color conversion). Depending on the platform, this image information will
+ * be handled directly and the frames will be converted efficiently by hardware, pixel shaders,
+ * or the like. + * + * \sa CriManaFrameInfo, criManaPlayer_CopyFrameToBufferARGB32 + */ +typedef struct { + CriUint8 *imageptr; /*EN< Image information buffer pointer */ + CriUint32 bufsize; /*EN< Image information buffer size [Byte] */ + CriUint32 line_pitch; /*EN< Image information line pitch [Byte] */ + CriUint32 line_size; /*EN< Image information line size [Byte] */ + CriUint32 num_lines; /*EN< Image information number of lines */ +} CriManaImageBufferInfo; + +/*EN + * \brief Video frame information + * \ingroup MDL_MANALIB_PLAYER + * \par Description: + * Video frame information referenced by API that get frames. + * -1 is entered in frame_no when it fails to get the frame information. + * + * \sa criManaPlayer_IsFrameOnTime, criManaPlayer_ReferFrame, criManaPlayer_DiscardFrame, + * criManaPlayer_CopyFrameToBufferARGB32, criManaPlayer_CopyFrameToBuffersYUV + */ +typedef struct { + CriSint32 frame_no; /*EN< Frame identification number (serial number starting from 0) */ + CriSint32 frame_no_per_file; /*EN< Frame identification number (specific identification number for the movie file) */ + CriUint32 width; /*EN< Movie width [pixel] (multiple of 8) */ + CriUint32 height; /*EN< Movie height [pixel] (multiple of 8) */ + CriUint32 disp_width; /*EN< Number of horizontal pixels (from the left side) in the image that you want to display */ + CriUint32 disp_height; /*EN< Number of vertical pixels (from the top) of the image that you want to display */ + CriUint32 framerate; /*EN< Value 1000 times the frame rate */ + CriUint32 framerate_n; /*EN< Frame rate (numerator) in a rational number format framerate [x1000] = framerate_n / framerate_d */ + CriUint32 framerate_d; /*EN< Frame rate (denominator) in a rational number format framerate [x1000] = framerate_n / framerate_d */ + CriUint32 total_frames_per_file; /*EN< Total number of frames per file */ + CriUint64 time; /*EN< Time. Displays seconds in time / tunit. Continually adds during loop playback and concatenated playback. */ + CriUint64 time_per_file; /*EN< [Unsupported] Playback time in file */ + CriUint64 tunit; /*EN