[Live-devel] Capturing audio from microphone
Lancerica Laurent-llan1c
llan1c at motorola.com
Mon Oct 11 11:31:37 PDT 2004
Thanks for answer,
but I still have problem.
Using the Lib (mixer) I've got this error
audioSource nullFailed to set audio input port number to 0: Bad input port index
I've seen in the mailing list some modification to do in the code, but it still won't work.
So I try to use the lib noMixer. The test program seems to work, but with the following code, the execution run create various object exits (go to afterplaying play and that's all). No data are send on the network, it seems that no data are captured.
Could you help me to try capturing and sending voice capture packets ?
Best Regards
Laurent Lancerica
RTPSink* audioSink;
WindowsAudioInputDevice* audioSource;
int inputPortNumber = 0;
unsigned char bitsPerSample = 16000;
unsigned char numChannels = 1;
unsigned samplingFrequency = 8000;
unsigned granularityInMS=20;
sessionStateS.audioSource = (WindowsAudioInputDevice*)AudioInputDevice::createNew(*env,inputPortNumber,bitsPerSample,numChannels, samplingFrequency, granularityInMS);
if (sessionStateS.audioSource == NULL)
{
*env << "audioSource null"
<< env->getResultMsg() << "\n";
exit(1);
}
sessionStateS.audioSink->startPlaying(*sessionStateS.audioSource, RTPSender::afterPlaying, sessionStateS.audioSink);
-----Original Message-----
From: live-devel-bounces at ns.live.com
[mailto:live-devel-bounces at ns.live.com]On Behalf Of Ross Finlayson
Sent: Friday, October 08, 2004 7:00 PM
To: LIVE.COM Streaming Media - development & use
Subject: Re: [Live-devel] Capturing audio from microphone
>I a m trying to capture live audio from microphone and try to send on the
>network using live.
>
>I still have linking problem using WindowsAudioInputDevice.
What specific "linking problems" did you encounter?
If you build "WindowsAudioInputDevice" correctly (from the ".mak" file -
the same way you build the libraries in the other directories), you should
end up with two libraries:
libWindowsAudioInputDevice_noMixer.lib
libWindowsAudioInputDevice_mixer.lib
You then choose one (not both!) of these libraries to link with. Then, in
your application, call
AudioInputDevice::createNew()
to create an audio input device. (Setting the "inputPortNumber" parameter
to 0 will usually get you the microphone; you can also run the
"showAudioInputPorts_mixer" or "showAudioInputPort_nomixer" applications to
confirm this.)
Ross Finlayson
LIVE.COM
<http://www.live.com/>
_______________________________________________
live-devel mailing list
live-devel at lists.live.com
http://lists.live.com/mailman/listinfo/live-devel
More information about the live-devel
mailing list