You are on page 1of 4

Bi 1: Tm hiu v s dng th vin sndfile (http://www.mega-nerd.

com/libsndfile/) vit chng trnh: - c file m thanh nh dng wav signed 16 bit, mi ln c 1 giy m thanh cho ti ht file - ghi file m thanh nh dng wav signed 16bit, mi ln ghi t mt mng cha m thanh ca 1 giy m thanh cho ti khi ht thi gian t trc. - hin th cc thng tin (tn s ly mu, mono/stereo, ly mu bao nhiu bit, ) ca file wav ra mn hnh. Bi 2: Tm hiu v s dng th vin Audio File Library (http://www.68k.org/~michael/audiofile/ ) vit chng trnh vi cc yu cu nh bi 1. Bi 3: Tm hiu s dng th vin alsa (http://www.alsa-project.org/main/index.php/Main_Page ) vit chng trnh thc hin cc yu cu nh bi 1. Bi 4: S dng th vin FFTW (http://www.fftw.org/) vit Hm tnh Discrete Fourier Transform (DFT) ca mt dy s u vo signed 16 bit gm 1024/2048/4096 phn t, kim tra kt qu bng matlab (c np chng trnh matlab kim tra). Hm tnh Inverse DFT cc yu cu khc tng t nh trn Chng trnh th nghim s dng cc hm trn. c d liu vo t file, xut kt qu ra file

Bi 5:

S dng th vin boost/asio () vit chng trnh lm vic vi cng COM RS232 truyn nhn d liu theo nh dng 1 bit start, 1 bit stop, 8 bit d liu, 1 bit kim tra chn l (tng s s 1 l chn), truyn tc 9600 baud. Vit chng trnh truyn Vit chng trnh nhn Vit hm cu hnh cng khi nhn Vit hm nhn d liu Vit hm truyn d liu Vit hm cu hnh cng khi truyn

Bi 6: S dng th vi boost/CRC (http://www.boost.org/doc/libs/1_47_0/libs/crc/index.html) thc hin cc cng vic sau: Vit mt hm tr v m kim li checksum ca mt mng d liu gm 16 byte tr v checksum theo cc gii thut crc_16_type, crc_ccitt_type, crc_xmodem_type, crc_32_type Vit mt hm nhn 16 byte d liu, 1 checksum tng ng vi gii thut trn, vit mt hm kim tra xem c li hay khng

Bi 7: Tm hiu s dng boost.signals (http://www.boost.org/doc/libs/1_47_0/doc/html/signals.html) theo tutorial (http://www.boost.org/doc/libs/1_47_0/doc/html/signals/tutorial.html ). Vit chng trnh mu v gii thch. Bi 8: Tm hiu s dng boost.filesystem (http://www.boost.org/doc/libs/1_47_0/libs/filesystem/v3/doc/tutorial.html ) thao tc trn h thng file: Vit hm tm file (v d : abc.txt) ti mt ng dn xc nh (v d: c:\) Vit hm tr v tt c cc file (v d : *.wav) trong ng dn cho trc, kt qu lu trong mt mng ng cha tn file Vit hm tr v kch thc mt file, tn file l u vo ca hm Vit chng trnh test cc cng vic c trin khai trong cc hm trn.

Ph lc I.1 Cng c s dng

Th vin Boost -

Ci t boost cho Visual Studio (xem http://boostpro.com/download/) Trong khun kh ca ti hin ti chng ti s dng phin bn 1.47 Cc im cn ch khi ci t Boost:
o o

La chn version ng cho phin bn Visual Studio. Ti ca s chn variant, cn la chn cc option c th download c th vin tng ng vi phin bn Visual Studio s dng.

Cch s dng vi IDE ca Visual Studio: - Hng dn s dng chung http://www.boost.org/doc/libs/1_47_0/more/getting_started/windows.html#header-onlylibraries) - Cch s dng vi IDE ca Visual Studio

From Visual Studio's File menu, select New > Project In the left-hand pane of the resulting New Project dialog, select Visual C++ > Win32. In the right-hand pane, select Win32 Console Application (VS8.0) or Win32 Console Project (VS7.1). In the name field, enter example Right-click example in the Solution Explorer pane and select Properties from the resulting pop-up menu In Configuration Properties > C/C++ > General > Additional Include Directories, enter the path to the Boost root directory, for example C:\Program Files\boost\boost_1_47_0 In Configuration Properties > C/C++ > Precompiled Headers, change Use Precompiled Header (/Yu) to Not Using Precompiled Headers.3 Replace the contents of the example.cpp generated by the IDE with this code: #include <boost/lambda/lambda.hpp> #include <iostream> #include <iterator> #include <algorithm> int main() { using namespace boost::lambda;

typedef std::istream_iterator<int> in; std::for_each( in(std::cin), in(), std::cout << (_1 * 3) << " " ); }

From the Build menu, select Build Solution.

To test your application, hit the F5 key and type the following into the resulting window, followed by the Return key (Enter): 123 The return will be 3 6 9 Then hold down the control key and press "Z", followed by the Return key to close the windows.

Cc ch khc - S dng bn boost 1.47

You might also like