lggdfkkhfhf.rar

  • munis
    了解作者
  • C/C++
    开发工具
  • 68KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 4
    下载次数
  • 2011-06-02 14:23
    上传日期
dsp kit voice recogization process
lggdfkkhfhf.rar
  • lggdfkkhfhf
  • FIR_filters.c
    6KB
  • stereo.c
    2.8KB
  • Blackman_Low_Pass_Filter_1600Hz.h
    3.3KB
  • Blackman_Low_Pass_Filter_1200Hz.h
    3.3KB
  • FIR_filters_asm.h
    1.3KB
  • Blackman_Low_Pass_Filter_300Hz.h
    3.2KB
  • Blackman_Low_Pass_Filter_800Hz.h
    3.3KB
  • Blackman_Low_Pass_Filter_4800Hz.h
    3.4KB
  • lghlfdjgfdjh.c
    13.1KB
  • switches.c
    8.8KB
  • Blackman_Low_Pass_Filter_6400Hz.h
    3.3KB
  • Blackman_Low_Pass_Filter_3200Hz.h
    3.3KB
  • Blackman_Low_Pass_Filter_2400Hz.h
    3.3KB
  • bargraph.h
    2.2KB
  • Blackman_Low_Pass_Filter_2000Hz.h
    3.3KB
  • Blackman_Low_Pass_Filter_600Hz.h
    3.3KB
  • Blackman_Low_Pass_Filter_8000Hz.h
    3.3KB
  • bargraph.c
    12.1KB
  • electronic_crossover.cdb
    519KB
  • stereo.h
    1.9KB
  • FIR_filters_asm.asm
    16.3KB
  • switches.h
    1.8KB
  • Blackman_Low_Pass_Filter_9600Hz.h
    3.3KB
  • FIR_filters.h
    1.1KB
  • electronic_crossover.cmd
    3KB
  • Blackman_Low_Pass_Filter_4000Hz.h
    3.3KB
  • Blackman_Low_Pass_Filter_12800Hz.h
    3.3KB
  • Blackman_Low_Pass_Filter_400Hz.h
    3.9KB
内容介绍
/*****************************************************************************/ /* */ /* FILENAME */ /* electronic_crossover.c */ /* */ /* DESCRIPTION */ /* TMS320C5416 DSK. */ /* Divides an audio signal into bass and treble components using FIR */ /* filters. */ /* */ /* Takes an input from a microphone or from a CD player and feeds the */ /* treble through one loudspeaker and the bass through the other. */ /* The user switches to select the frequency at which the input signal */ /* is divided between 300 Hz and 12800 Hz. */ /* */ /* REVISION */ /* Revision: 1.00 */ /* Author : Richard Sikora */ /*---------------------------------------------------------------------------*/ /* */ /* HISTORY */ /* Revision 1.10 */ /* 26th November 2002. Modified for use with codec sampling frequency */ /* of 48 kHz. */ /* */ /* Revision 1.00 */ /* 31st October 2002. Created by Richard Sikora. */ /* */ /*****************************************************************************/ #include <stdio.h> /* Required for functions printf() and puts() */ /*****************************************************************************/ /* */ /* The following line takes the name of the module, here template.c and adds */ /* the letters cfg.h */ /* */ /*****************************************************************************/ #include "electronic_crossovercfg.h" #include "dsk5416.h" #include "dsk5416_pcm3002.h" #include "bargraph.h" #include "blackman_low_pass_filter_300Hz.h" #include "blackman_low_pass_filter_400Hz.h" #include "blackman_low_pass_filter_600Hz.h" #include "blackman_low_pass_filter_800Hz.h" #include "blackman_low_pass_filter_1200Hz.h" #include "blackman_low_pass_filter_1600Hz.h" #include "blackman_low_pass_filter_2000Hz.h" #include "blackman_low_pass_filter_2400Hz.h" #include "blackman_low_pass_filter_3200Hz.h" #include "blackman_low_pass_filter_4000Hz.h" #include "blackman_low_pass_filter_4800Hz.h" #include "blackman_low_pass_filter_6400Hz.h" #include "blackman_low_pass_filter_8000Hz.h" #include "blackman_low_pass_filter_9600Hz.h" #include "blackman_low_pass_filter_12800Hz.h" #include "FIR_filters_asm.h" #include "switches.h" #include "stereo.h" /*****************************************************************************/ /* Configuration setup of registers of PCM3002 Codec */ /*****************************************************************************/ DSK5416_PCM3002_Config setup = { 0x1FF, // Set-Up Reg 0 - Left channel DAC attenuation 0x1FF, // Set-Up Reg 1 - Right channel DAC attenuation 0x0, // Set-Up Reg 2 - Various ctl e.g. power-down modes 0x0 // Set-Up Reg 3 - Codec data format control }; /*****************************************************************************/ /* */ /* For compatibility with pcm3002 read / write, these variables must */ /* be declared as Int16 or short int, rather than int. */ /* */ /*****************************************************************************/ Int16 left_input; Int16 left_output; Int16 right_input; Int16 right_output; /*****************************************************************************/ /* UserTask() */ /*---------------------------------------------------------------------------*/ /* */ /* The main user task. */ /* */ /* Note that this task is not called by main(). It is scheduled by DSP/BIOS */ /* */ /*****************************************************************************/ void UserTask() { DSK5416_PCM3002_CodecHandle hCodec; long i; unsigned int switch_value; signed int mono_input; signed long output; /* Start the codec */ hCodec = DSK5416_PCM3002_openCodec(0, &setup); /* Display project details on StdOut. \n is important. */ puts("TMS320C5416 DSK: Electronic Crossover. Bargraph display at 6 dB intervals\n"); for (i = 0; i < 12000000; i++) { /* Read left input channel */ while (!DSK5416_PCM3002_read16(hCodec, &left_input)); /* Write to left output channel */ while (!DSK5416_PCM3002_write16(hCodec, left_output)); /* Read right input channel */ while (!DSK5416_PCM3002_read16(hCodec, &right_input)); /* Write to right output channel */ while (!DSK5416_PCM3002_write16(hCodec, right_output)); /* Read user switches on DSK and display their meaning on Stdout. */ switch_value = switch_status_display(); /* Merge two inputs from CD player into one */ mono_input = stereo_to_mono( left_input, right_input ); if ( 0 == switch_value) { /* Straight through stereo. No electronic crossover */ left_output = left_input ; right_output = right_input ; left_output >>= 1; right_output >>= 1; /* Attenuate slightly */ } else if ( 1 == switch_value) { /* Crossover at 300 Hz */ output = FIR_dual_filter_asm( &blackman_low_pass_filter_300Hz[0], mono_input); left_output = (signed int) (output & 0xFFFF ); /* Treble channel */ right_output = (signed int) (output >> 16 ); /* Bass channel */ } else if ( 2 == switch_value) { /* Crossover at 400 Hz */ output = FIR_dual_filter_asm( &blackman_low_pass_filter_400Hz[0], mono_input); left_output = (signed int) (output & 0xFFFF ); /* Treble channel */ right_output = (signed int) (output >> 16 ); /* Bass channel */ } else if ( 3 == switch_value) { /* Crossover at 600 Hz */ output = FIR_dual_filter_asm( &blackman_low_pass_filter_600Hz[0], mono_input);
评论
    相关推荐