Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
block_dc.c
Package: speaker_recognition.rar [view]
Upload User: bossps2lzz
Upload Date: 2022-07-07
Package Size: 522k
Code Size: 1k
Category:
DSP program
Development Platform:
C/C++
- /* Written by Sowmya Narayanan and Vasanthan Rangan
- *
- * block_dc.c
- *
- * This program will block DC of input speech signal
- *
- *
- * The input will be the speech sample
- *
- *
- *
- *
- *
- *
- *
- */
- #define dc_coeff 10 /* coefficient for the DC blocking filter */
- int dc = 0; /* current DC estimate (32-bit: SS30-bit) */
- short block_dc(short sample)
- {
- short word1,word2;
- if (dc < 0) {
- word1 = -((-dc) >> 15); /* retain the sign when DC < 0 */
- word2 = -((-dc) & 0x00007fff);
- }
- else {
- word1 = dc >> 15; /* word1 = high-order 15-bit word of dc */
- word2 = dc & 0x00007fff; /* word2 = low-order 15-bit word of dc */
- }
- dc = word1 * (32768 - dc_coeff) +
- ((word2 * (32768 - dc_coeff)) >> 15) +
- sample * dc_coeff; /* dc = dc*(1-coeff) + sample*coeff */
- return sample - (dc >> 15); /* return sample - dc */
- }