⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 audio_structs_i.h

📁 是一个手机功能的模拟程序
💻 H
📖 第 1 页 / 共 2 页
字号:
/********************************************************************************/
/*                                                                              */
/*    File Name:   audio_structs_i.h                                            */
/*                                                                              */
/*    Purpose:     This file contains constants, data type, and data            */
/*                 structures that are used by the AUDIO's task.                */
/*                                                                              */
/*    Note:                                                                     */
/*        None.                                                                 */
/*                                                                              */
/*    Revision History:                                                         */
/*      11 May 01     Francois Mazard - Stephanie Gerthoux        Create        */
/*                                                                              */
/* (C) Copyright 2001 by Texas Instruments Incorporated, All Rights Reserved.   */
/*                                                                              */
/********************************************************************************/
#include "rv_defined_swe.h"
#ifdef RVM_AUDIO_SWE
  #ifndef  _AUDIO_STRUCTS_I_
    #define  _AUDIO_STRUCTS_I_

    #ifndef _WINDOWS
      #include "sys.cfg"
      #include "chipset.cfg"
    #endif
    #include "l1_confg.h"
    #include "rvm_gen.h"
    #include "audio_features_i.h"
    #include "audio_ffs_i.h"
    #include "audio_const_i.h"

    #include "ffs_api.h"

    #ifdef __cplusplus
      extern "C"
        {
    #endif

    /****************************** AUDIO'S ENVIRONMENT *****************************/
    /* Define a structure used to store all information related to the AUDIO's task */
    /* & memory bank identifiers.                                                   */

    #if (KEYBEEP)
      typedef struct
      {
        UINT8         state;              /* keybeep state */
        T_RVF_ADDR_ID task_id;            /* keybeep task_id */
        T_RV_RETURN   return_path;        /* return path of the function that previously start the keybeep */
      } T_AUDIO_KEYBEEP_VAR;
    #endif /* #if (KEYBEEP) */

    #if (TONE)
      typedef struct
      {
        UINT8         state;              /* tones state */
        T_RVF_ADDR_ID task_id;            /* tones task_id */
        T_RV_RETURN   return_path;        /* return path of the function that previously start the tones */
      } T_AUDIO_TONES_VAR;
    #endif

    #if (MELODY_E1)
      typedef struct
      {
        UINT8           state;             /* melody state */
        T_RVF_ADDR_ID   task_id;           /* melody task_id */
        char            melody_name[AUDIO_PATH_NAME_MAX_SIZE];  /* name and path of the word to enroll */
        BOOLEAN         loopback;
        T_RV_RETURN     return_path;       /* return path of the function that previously start the melody */
      } T_AUDIO_MELODY_E1_VAR;
    #endif

    #if (MELODY_E2)
      typedef struct
      {
        UINT8           state;             /* melody state */
        T_RVF_ADDR_ID   task_id;           /* melody task_id */
        char            melody_name[AUDIO_PATH_NAME_MAX_SIZE];  /* name of the melody E2 */
        BOOLEAN         loopback;
        T_RV_RETURN     return_path;       /* return path of the function that previously start the melody */
      } T_AUDIO_MELODY_E2_VAR;

      typedef struct
      {
        BOOLEAN       file_downloaded;
        UINT8         nb_of_instruments;
        char          instrument_file_name[AUDIO_PATH_NAME_MAX_SIZE];
      } T_AUDIO_MELODY_E2_LOAD_FILE_VAR;

      typedef struct
      {
        INT8            id;             /* id of the melody in the .lsi file*/
        char            melody_name[AUDIO_PATH_NAME_MAX_SIZE];  /* name of the melody E2 */

      } T_AUDIO_MELODY_E2_ID_NAME;


    #endif


    #if (VOICE_MEMO)
      typedef struct
      {
        UINT8         state;                /* voice memo state */
        T_RVF_ADDR_ID task_id;              /* voice memo task_id */
        UINT32        recorded_size;        /* voice memo recorded size */
        T_RV_RETURN   return_path;          /* return path of the function that previously start the voice memo  */
        void          *p_l1_send_message;   /* address to the message to send to the L1 */
      } T_AUDIO_VOICE_MEMO_RECORD_VAR;

      typedef struct
      {
        UINT8         state;                /* voice memo state */
        T_RVF_ADDR_ID task_id;              /* voice memo task_id */
        T_RV_RETURN   return_path;          /* return path of the function that previously start the voice memo  */
      } T_AUDIO_VOICE_MEMO_PLAY_VAR;

    #endif

    #if (L1_VOICE_MEMO_AMR)
      typedef struct
      {
        UINT8         state;                /* voice memo state */
        T_RV_RETURN   return_path;          /* return path of the function that previously start the voice memo  */
        UINT8         channel_id;
      #if (AUDIO_NEW_FFS_MANAGER)
        T_FFS_FD      ffs_fd;
      #endif
      #if (AUDIO_RAM_MANAGER)
        UINT8         *audio_ram_fd;
      #endif
      } T_AUDIO_VOICE_MEMO_AMR_RECORD_TO_MEM_VAR;

      typedef struct
      {
        UINT8         state;                /* voice memo state */
        T_RV_RETURN   return_path;          /* return path of the function that previously start the voice memo  */
        UINT8         channel_id;
      #if (AUDIO_NEW_FFS_MANAGER)
        T_FFS_FD      ffs_fd;
      #endif
      #if (AUDIO_RAM_MANAGER)
        UINT8         *audio_ram_fd;
        UINT16        audio_ram_size;
      #endif
      } T_AUDIO_VOICE_MEMO_AMR_PLAY_FROM_MEM_VAR;
    #endif

    #if (MELODY_E1) || (MELODY_E2) || (VOICE_MEMO)

      typedef struct
      {
        UINT8  *p_start_pointer;
        UINT8  *p_stop_pointer;
        UINT16  size;
      } T_AUDIO_FFS_BUFFER_INFO;

      typedef struct
      {
        /* validity of the session: */
        /* 0: this session isn't started */
        /* 1: this session is running */
        BOOLEAN   valid_channel;
        /* file descriptor */
        T_FFS_FD  audio_ffs_fd;
        /*initial size requested before to start the L1 */
        UINT16    size;
        /* loop mode is used or not during this session */
        BOOLEAN   loop_mode;
        /* mode of the session: */
        /* 0: FLASH to RAM download */
        /* 1: RAM to FLASH download */
        BOOLEAN   session_mode;
        UINT8     session_id;
      } T_AUDIO_FFS_SESSION_REQ;

      typedef struct
      {
        /* index of the next buffer will be used by the L1 */
        UINT8                   index_l1;
        /* index of the current buffer used by the FFS */
        UINT8                   index_ffs;
        T_AUDIO_FFS_BUFFER_INFO buffer[AUDIO_MAX_FFS_BUFFER_PER_SESSION];
        /* state of the cust_get_pointer function */
        UINT8                  cust_get_pointer_state;
      } T_AUDIO_FFS_SESSION_INFO;

      typedef struct
      {
        /* Request of the current session */
        T_AUDIO_FFS_SESSION_REQ   session_req;
        /* information of the current session */
        T_AUDIO_FFS_SESSION_INFO  session_info;
      } T_AUDIO_FFS_SESSION;
    #endif

    #if (AUDIO_MEM_MANAGER)
      typedef struct
      {
        // file or RAM buffer descriptor
      #if (AUDIO_NEW_FFS_MANAGER)
        T_FFS_FD  audio_ffs_fd;
      #endif
      #if (AUDIO_RAM_MANAGER)
        UINT8     *audio_ram_fd;
        UINT16    audio_ram_size;
      #endif

        // size of temporary RAM buffers (8-bit unit)
        UINT16    size;

        // session_id and channel_id to identify feature
        UINT8     session_id;
        UINT8     channel_id;
      } T_AUDIO_MEM_SESSION_REQ;

      typedef struct
      {
        UINT8                   state; // state machine
        UINT8                   size_left; // sample split between 2 RAM buffers
        UINT8                   previous_type; // last sample type processed
        UINT32                  recorded_size; /* voice memo recorded size */
        BOOL                    stop_req_allowed;// TRUE first then FALSE
      } T_AUDIO_MEM_SESSION_INFO;

      typedef struct

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -