/*---------------------------------------------------------------------------* Project: Horizon File: hio_Api.h Copyright (C)2009 Nintendo Co., Ltd. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo of America Inc. and/or Nintendo Company Ltd., and are protected by Federal copyright law. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. $Rev: 15915 $ *---------------------------------------------------------------------------*/ #ifndef NN_MIDI_CTR_MIDI_API_H_ #define NN_MIDI_CTR_MIDI_API_H_ /*! @file @brief MIDI ライブラリの初期化、終了、バージョン取得、ファイル操作を行う API です。 */ #include #include #include namespace nn { namespace midi { namespace CTR { /*! @name Initialize/Finalize @{ */ /*! @brief MIDI ライブラリの初期化処理を行います。ライブラリ利用前に一度呼び出す必要があります。 @return なし。 */ void Initialize(); /*! @brief MIDI ライブラリの終了処理を行います。ライブラリ利用後に一度呼び出す必要があります。 @return なし。 */ void Finalize(); /*! @} */ /*! @brief MIDI デバイスを開き、利用可能な状態にします。 @return 処理の結果を返します。 */ Result Open(); /*! @brief MIDI デバイスを閉じます。 @return 処理の結果を返します。 */ Result Close(); /*! @brief MIDI デバイスを Open 直後の状態にします。 別スレッドで Read を呼び出している場合は、Read がエラーを返します。 @return 処理の結果を返します。 */ Result Reset(); /*! @brief デバイス情報を取得します。 @param[out] pInfo デバイス情報の格納先。 @return 処理の結果を返します。 */ Result GetDeviceInfo(DeviceInfo* pInfo); /*! @brief デバイス内のバッファに蓄積しているデータサイズを取得します。 @param[out] pSize データサイズの格納先。 @return 処理の結果を返します。 */ Result GetReadableLength(s32* pSize); /*! @brief データを読み取ります。 @param[out] pBuf データの格納先。 @param[out] pReadSize 読み込んだデータサイズ。 @param[in] bufferSize バッファサイズ。 @return 処理の結果を返します。 */ Result Read(void* pBuf, s32* pReadSize, s32 bufferSize); } } } #endif // ifndef NN_MIDI_CTR_MIDI_API_H_