Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
J

Jasvinder Kumar Bali

@Jasvinder Kumar Bali
About
Posts
2
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Unable to play audio from client
    J Jasvinder Kumar Bali

    public class RecordUtil
    {

    public IntPtr _IntPtr;

    public RecordUtil(IntPtr iptr)
    {
    _IntPtr=iptr; //IntPtr.Zero
    }
    }

    in main window use this--

    {
    IntPtr source = new WindowInteropHelper(this).Handle;
    recorder = new RecordUtil(source); //RecordUtil constructor overloading

    }

    WPF help csharp wpf lounge

  • Help: Audio conferencing using WCF
    J Jasvinder Kumar Bali

    I ‘m working on audio conferencing in - WCF, WPF and Visual Studio 2008 using C#. I capture the sound from microphone using Windows API. Then I continuously capture the sound from microphone and send the Audio stream (byte[]) to the server and broadcast from there. Its working fine and I also get the response from the server as well. Then I play the Audio Stream(byte[]) coming from the server. I used this article in codeproject website to record and play audio stream. http://www.codeproject.com/KB/audio-video/cswavrec.aspx But when the incoming audio stream is playing, an unrecognizable sound is coming. This may be due to the difference between data consuming and receiving rates. I also used directsound to record and playing sound but the same problem arise. So please suggest me how to solve this problem( Better DierctSound suggestion – Streaming Buffer) . This code is fire when audio stream is received from the server.

    private void playAudio()
    {
    objAudioConferencingPlayer.StartAudioPlayer(IncommingAudioStream);
    }

    public void StartAudioPlayer(byte[] AudioStream)
    {
    if (!IsPlayerRunning)
    {
    StopPlaying();
    m_Player = new WaveOutPlayer(-1, fmt, 16384, 3, new
    BufferFillEventHandler(Filler));
    IsPlayerRunning = true;
    }
    m_Fifo.Write(AudioStream, 0, AudioStream.Length);
    }

    private void Filler(IntPtr data, int size)
    {
    if (m_PlayBuffer == null || m_PlayBuffer.Length < size)
    m_PlayBuffer = new byte[size];
    if (m_Fifo.Length >= size)
    m_Fifo.Read(m_PlayBuffer, 0, size);
    else
    for (int i = 0; i < m_PlayBuffer.Length; i++)
    m_PlayBuffer[i] = 0;

            System.Runtime.InteropServices.Marshal.Copy(m\_PlayBuffer, 0, data, size);
            // m\_Fifo ==> m\_PlayBuffer==> data ==> Speakers
    

    }

    Thanks in Advance.

    WPF csharp help visual-studio wpf wcf
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups