From: John F. <jo...@us...> - 2012-12-20 10:21:01
|
Update of /cvsroot/ingex/ingex/common/tools In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv713 Modified Files: Makefile Added Files: create_audio_data.cpp Log Message: Additional prog for generating hard-coded audio data Index: Makefile =================================================================== RCS file: /cvsroot/ingex/ingex/common/tools/Makefile,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Makefile 22 Jun 2012 13:24:56 -0000 1.14 --- Makefile 20 Dec 2012 10:20:58 -0000 1.15 *************** *** 36,40 **** PROGS = convert_audio convert_10bit_video create_video_test_signal detect_digibeta_dropouts \ compare_archive_mxf clapperboard_avsync disk_rw_benchmark send_video receive_video \ ! create_audio_test_signal dump_vc3 simple_mxf_demux add_bitc .PHONY: all --- 36,40 ---- PROGS = convert_audio convert_10bit_video create_video_test_signal detect_digibeta_dropouts \ compare_archive_mxf clapperboard_avsync disk_rw_benchmark send_video receive_video \ ! create_audio_test_signal dump_vc3 simple_mxf_demux add_bitc create_audio_data .PHONY: all *************** *** 57,60 **** --- 57,63 ---- $(CC) $(CXXFLAGS) $(TARGET_ARCH) -o $@ $< -lm + create_audio_data: create_audio_data.o + $(LINK.o) -lstdc++ -lm $< -o $@ + detect_digibeta_dropouts: detect_digibeta_dropouts.o $(LIB_COMMON) $(CXX) $(CXXFLAGS) $(TARGET_ARCH) -o $@ $< $(LIB_COMMON) $(YUV_LIB) --- NEW FILE: create_audio_data.cpp --- #include <cmath> #include <cstdio> #define __STDC_LIMIT_MACROS #include <inttypes.h> int main (int argc, char * argv[]) { #if 1 const int SF = 4096; // -18.06 dBFS for 16-bit const int FREQ = 1000; const unsigned int SAMPLES = 48; #else const int SF = 2048; // -24.08 dBFS for 16-bit const int FREQ = 500; const unsigned int SAMPLES = 96; #endif for (unsigned int i = 0; i < SAMPLES;) { for (unsigned int j = 0; j < 8; ++i, ++j) { int y = SF * sin(i * 2 * M_PI / (48000 / FREQ)); printf("%7d,", y); } printf("\n"); } return 0; } |