91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 7KB
    文件類型: .c
    金幣: 1
    下載: 0 次
    發布日期: 2021-01-06
  • 語言: C/C++
  • 標簽: C語言??wav??

資源簡介

利用C語言生成wave音頻文件,內容為簡單的正弦波函數。

資源截圖

代碼片段和文件信息

//?sin.cpp?:?Defines?the?entry?point?for?the?console?application.
#include?
#include?
#include?
#include?
#include?

#define?PI?3.1425926

int?main()
{
????char?*sine_buf??=(char?*)?malloc(100000?*?sizeof(char));
????int?i;
????struct?bb
????{
????????char RiffID[4]; //?‘R‘‘I‘‘F‘‘F‘ “RIFF“標志
????????int RiffSize; //?文件長度(WAVE文件的大小?不含前8個字節)
????????char RiffFormat[4]; //?‘W‘‘A‘‘V‘‘E‘ “WAVE“標志
????????char FmtID[4]; //?‘f‘‘m‘‘t‘‘?‘?“fmt?“標志
????????int FmtSize; //過渡字節(不定)16?for?PCM.?This?is?the?size?of?the?rest?of?the?Subchunk?which?follows?this?number.
????????unsigned?short FormatTag; //格式類別?當FormatTag=1,用的就是非壓縮格式。
????????unsigned?short Channels; //通道數(單聲道為1?雙聲道為2)
????????int SamplesPerS

評論

共有 條評論