locked
How to do streaming with the mciSendString function? RRS feed

  • Question

  • hi,

     mciSendString('close all', nil, 0, 0);
     mciSendString('open new type waveaudio alias capture', nil, 0, 0);
     mciSendString('seek capture to start', nil, 0, 0); 
     mciSendString('set capture samplespersec 22050', nil, 0, 0);
     mciSendString(PChar('set capture bitspersample 8') , nil, 0, 0);
     mciSendString('set capture channels 1', nil, 0, 0);
     mciSendString('record capture', nil, 0, 0);
     ...
     mciSendString(PChar('save capture "C:\wav1.wav"'), nil, 0, 0);
     mciSendString('stop capture', nil, 0, 0);
     mciSendString('close capture', nil, 0, 0);


    This is how I used the mciSendString function (that I found here) to get sound from the sound card. But now I want to do streaming whith this function, I've yet saw the "audio stream" parameter of the "record" command but I don't know how to use it. I tried this but it don't work (don't know how to get the stream id (here MyStream)):

     mciSendString('record capture audio stream MyStream', nil, 0, 0);

    Need a help please, if it is necessary, I'm developping with Pascal.

    (I don't speak english verywell and surely I'm not on the right forum but I found any appropriate forum, sorry.)

    On waiting to your soonest reply,
    Marc;

    Wednesday, February 13, 2008 1:07 PM

Answers

  • First, this has nothing to do with Media Foundation - not even close.  Neither do most of the posts in the group so I understand the confusion.

     

    You can't do streaming with MCI.  You need to use either DirectSound, waveIn, DirectShow or WASAPI.

     

    Wednesday, February 20, 2008 8:41 PM

All replies

  • First, this has nothing to do with Media Foundation - not even close.  Neither do most of the posts in the group so I understand the confusion.

     

    You can't do streaming with MCI.  You need to use either DirectSound, waveIn, DirectShow or WASAPI.

     

    Wednesday, February 20, 2008 8:41 PM
  • Not using mciSendString but u can actualy send buffer to audio device and when it is filled, application is notified.

    it is waveInAddBuffer method here is link

    http://msdn.microsoft.com/en-us/library/ms713725(VS.85).aspx



    Friday, May 16, 2008 8:40 PM