资源简介
按照一定的信噪比dB加入随机噪声
编译:g++ -o addnoise main.cpp -lm
usage:./addnoise ori.wav noise.wav dB new.wav
for example :./addnoise hello.wav white_noise.wav 63 new.wav
代码片段和文件信息
#include
#include
#include
#include
#include
//#include
//#include “flib.h“
////////////////////////////////////////////////////////////////////////////////
// type definition
typedef char Int8;
typedef unsigned char UInt8;
typedef short Int16;
typedef unsigned short UInt16;
typedef int Int32;
typedef unsigned int UInt32;
typedef unsigned short WideChar;
typedef float Float32;
typedef double Float64;
#if defined _WIN32
typedef __int64 Int64;
typedef unsigned __int64 UInt64;
#elif defined __GNUC__
typedef long long Int64;
typedef unsigned long long UInt64;
#else
#error “Firstly please define the 64bit integer“
#endif
/*----------------------------------------------------
评论
共有 条评论