|
i m new to the this type of programming. can u suggest me by giving some code snippet to do this...
|
|
|
|
|
Seems you are lazy, even article example code ammost shows it.
/// <summary>
/// This method is called when recording buffer is full
/// and we need to process it.
/// </summary>
/// <param name="buffer">Recorded data.</param>
private void m_pSoundReceiver_BufferFull(byte[] buffer)
{
// Write audio data to file
}
|
|
|
|
|
HI Ivar Lumi
thanks for giving me your valuable time. Actually i am working on a project in that i have to receive the mobile phone call by PC, and record the voice conversation also. So for that i m using data cable to connect phone and PC. In that by sending AT commands(for Nokia) i m able to receive all the information i need and also control the phone calls also. But for the recording of voice call i m connecting another wire from PC mic/Line in Input to Phone headphone socket, But this make a jubmled structure. So for that i wanna to record the voice from that datacable itself(Becaouse already i am connecting that one). For that i first use the phone as a modem and try with ur code but i m not getting the audio buffers any how.
Is this possible to do that what i m doing or i have to connect it via bluetooth or do the same thing because i have a bluetooth earset(Zabra) for receiving calls.
Kindly help me out in this .
i m using Nokia N 91 Mobile Phone and Vaio PC.
Thanks again for ur valuable suggestions.
|
|
|
|
|
Code works only if mic port connected via audio cable.
Also if you have multiple wave in devices, be ensure that you pass right one to new WavIn(WavIn.Devices ...
|
|
|
|
|
I have tried with ur code in my Sony Vaio(NR series) With MS Windows Vista it is not showing the input device(MIC), i have tested the same code in sony vaio but in different model(CR series) with MS windows XP, there it is working fine.
Then i have search for winmm.dll in both the OS's. I found that dll but both are having different version, so the problem is because of that or windows vista is having some security constraints on accessing devices.
i tried to get some other code also using same dll then i found the same problem. Is there any other way to do this in vista.
*********
As u said that this code works only for wave in devices so i tried to make my pc as mobile headset. in that i m able to do voice chat by using the mic as a input and laptop speaker as a headphone but still in the list it is not showing any item as a audio input.
Kindly help me out in this...
|
|
|
|
|
I have vista x64 and all works, though my user has admin rights.
|
|
|
|
|
Thanks lumi
and sorry for late reply actually that sound card is detected in my system also, the problem is when i put the mic pin in that then only it will show the sound card properties may be some switch is in that which enable ans disable the sound card..
Now i m trying to take the voice data from my mobile conected via USB cable if you have any idea on that kindly reply me..
Again a lot of thanks for your code and time.
|
|
|
|
|
Hi,
I doubt you get easely voice data from pone through usb ... . Also it heavely depends on phone.
|
|
|
|
|
Hi,
I am doing a king of VoIp application and I noticed that a delay is occuring. In the end I find that just by playing back the received input buffer from the microphone the delay was generated (so the problem isn't from network or network code implementation). Do you have any ideea how can I fix this??
Thx. a bunch
asdasdadasd
|
|
|
|
|
Hi,
Firewall may cause that, like in vista firewall on, the voice quality is bad for some reason. I debug it if get more free time.
|
|
|
|
|
Hi again,
The voice quality isn't bad but a delay is consistently building between what I say and what I hear. I tested it and didn;t even care about the other pc who received the voice packets, I just played what I got from WaveIn and noticed the delay.
asdasdadasd
|
|
|
|
|
How about group connection (multiple IP)
unleash the possibilities
|
|
|
|
|
You can use multicast IP then.
|
|
|
|
|
Hello Ivar,
I have been testing your program and i have had problems sending the data over the network. In contrast i've received data from the other end point (not very clear audio, but understandable). Is there some part wrong or is this the behaviour of the program? Maybe i should wait for RTP audio? or you could give me some notes to this problem and go on in this way??
Thank you in advance
Sergio
|
|
|
|
|
Hi,
If network speed is ok and latency not bigger than 50 ms, the voice quality should be as phone quality.
|
|
|
|
|
Hi again,
Thank you for the quickly reply, but i think that this is not my problem because i've tested in my local network, also my internet connection is good. I've been watching the transmited packets between the two points and i don't send anything good. I think that i take always the same number of bytes, but not real bytes i should take from the microphone. Regards as the packet i send, it is not RTP? How is the structure the sended packet?
Sergio Garcia
|
|
|
|
|
It's just raw wav data, encoded/decoded before sending/receiving.
You try to turn off your firewall.
|
|
|
|
|
Hi Ivar,
Ok, i will try with this. I'll tell you the results.
Thanks
Sergio Garcia
|
|
|
|
|
hi Ivar,
as per above subject, i am offered to develop an application whicch is able to send/receive audi video data over LAN.
A kind of Video chat. a person cud able to watch and hear another person sitting in the same network.
while goggling for this... i got ur this article. Can u guide me pls...
Thanx
IPS
|
|
|
|
|
Hi,
The most wisest approach is to use RTP. You just do 1 RTP stream for video, another for audio.
Tough i havent completed RTP yet ... .
You off course you can reuse my code, you can do 2 streams too 1 for video another for audio.
Capturing video and playing it, i havne't looked how to do it, so far i don't have needed it.
|
|
|
|
|
Hi, how if I want to combine that 2 streams into only 1 stream which contains both audio and video ? I'm afraid if I use 2 streams then if the audio packet arrives late then the audio will also play late and vice versa.
|
|
|
|
|
Hi,
You need RTP for that.
You must create 2 rtp sessions, 1 for audio, other for video.
(Because RTP specification allows 1 session to exhange only 1 type of data at time)
RTP has "timestamp" for synchronizing streams like you need.
Though RTP just provides all info you need for sync stream, but streams sync must be done RTP consumer app.
Normally timestamp is NTP clock time.
|
|
|
|
|
Hi, does your library include classes or functions which I can use to transmit video ? I see there is only audio for codec and there is no video codec. And is there any complete documentation of your library ? I may need it. Thanks.
|
|
|
|
|
Currently no video support and also i'm currently rewriting RTP. RTP finished probably during week.
|
|
|
|
|
its great i like it i was looking for something like this cooooooooooooool
|
|
|
|