資源簡介
按照一定的信噪比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
/*----------------------------------------------------
評論
共有 條評論