现在看了一些资料,自己想作一个声音采集 ,但是不知道怎么作 ,那位好心点的给点资料或例子,谢谢
   [email protected] 

解决方案 »

  1.   

    VDream 的 TVDAudioIn可以的
      

  2.   

    使用TMediaPlayer即可
    开始录音:
    CreateWav(2,16,48000, ChangeFileExt(FRecordFile,'.wav'));
    mpMusic.DeviceType := dtAutoSelect;
    mpMusic.FileName := ChangeFileExt(FRecordFile,'.wav');
    mpMusic.Open;
    mpMusic.StartRecording;停止录音:
    mpMusic.Stop;
    mpMusic.Save;
    mpMusic.Close;procedure CreateWav(channels, resolution: word; rate: Integer;fn: string);
     var
       wf : file of TWavHeader;
       wh : TWavHeader;
    begin
      wh.rId := $46464952;
      wh.rLen := 36;
      wh.wId := $45564157;
      wh.fId := $20746d66;
      wh.fLen := 16;
      wh.wFormatTag := 1;
      wh.nChannels := channels;
      wh.nSamplesPerSec := rate;
      wh.nAvgBytesPerSec := channels*rate*(resolution div 8);
      wh.nBlockAlign := channels*(resolution div 8);
      wh.wBitsPerSample := resolution;
      wh.dId := $61746164;
      wh.wSampleLength := 0;
      system.assignfile(wf,fn); 
      rewrite(wf);
      write(wf,wh); 
      closefile(wf);
    end;