/*---------------------------------------------------------------------------* Copyright (C) Nintendo. 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. *---------------------------------------------------------------------------*/ #ifndef __DEMOAVX_H_ #define __DEMOAVX_H_ /*---------------------------------------------------------------------------* * Includes *---------------------------------------------------------------------------*/ #ifdef __cplusplus extern "C" { #endif #define AVX_FRAME_SIZE_SAMPLES 160 // 160 stereo samples @ 32KHz. #define AVX_FRAME_SIZE_WORDS (160*2) // 2 words per stereo sample. #define AVX_FRAME_SIZE_BYTES (160*2*2) // 2 bytes per sample, 2 channels. /// \brief Initializes AVX. /// /// \param left AVX left buffer. /// \param right AVX right buffer. /// \param size AVX buffer size. /// void DEMOAVXInit (s16 *left, s16 *right, u32 size); /// \brief Refreshes the AVX buffer. /// /// \param start_index Pointer to save the starting position in the final sample buffer. /// \param end_index Pointer to save the ending position in the final sample buffer. /// /// \retval Number of frames filled * AVX_FRAME_SIZE_SAMPLES. u32 DEMOAVXRefreshBuffer (u32 *start_index, u32 *end_index); /// \brief Clears the buffer and attaches the AVX interrupt handler. /// /// \param buffer Buffer to clear and use. /// \param num_frames Number of frames in the buffer. /// void DEMOAVXAttach (void *buffer, u32 num_frames); /// \brief Gets the current audio frame index. /// /// \retval Current frame index. u32 DEMOAVXGetFrameCounter (void); /// \brief Gets the number of frames filled since the last user refresh. /// /// \retval Number of frames filled. u32 DEMOAVXGetNumFilled (void); #ifdef __cplusplus } #endif #endif // _DEMOAVX_H_