Click here to Skip to main content
15,918,193 members
Home / Discussions / C#
   

C#

 
AnswerRe: Help Pin
Christian Graus27-Oct-09 19:42
protectorChristian Graus27-Oct-09 19:42 
GeneralRe: Help Pin
amaankhan27-Oct-09 20:11
amaankhan27-Oct-09 20:11 
GeneralRe: Help Pin
amaankhan27-Oct-09 20:15
amaankhan27-Oct-09 20:15 
GeneralRe: Help Pin
Christian Graus27-Oct-09 21:27
protectorChristian Graus27-Oct-09 21:27 
GeneralRe: Help Pin
amaankhan27-Oct-09 21:41
amaankhan27-Oct-09 21:41 
QuestionWhy is the size fixed to 16384? Pin
ralphigo27-Oct-09 19:14
ralphigo27-Oct-09 19:14 
AnswerRe: Why is the size fixed to 16384? Pin
Christian Graus27-Oct-09 19:43
protectorChristian Graus27-Oct-09 19:43 
AnswerRe: Why is the size fixed to 16384? Pin
Keith Barrow28-Oct-09 3:18
professionalKeith Barrow28-Oct-09 3:18 
As Christian Graus says, without knowing what WaveLib is, we really can't help.

This is just a hunch, but the magic number 16384 is repeated in you code,

have you tried something like this
const int Size = 16384; // I think this might be a read or write buffer size of some sort and might be better called "BufferSize"
private void Start()
{
  Stop();
  try
  {
    //I'd also consider abtracting out the bit rate(44100) and whatever the value 16, 2, 3 and -1 represent out as constants.
    WaveLib.WaveFormat fmt = new WaveLib.WaveFormat(44100, 16, 2);
    m_Player = new WaveLib.WaveOutPlayer(-1, fmt, Size , 3,
    new WaveLib.BufferFillEventHandler(Filler));
    m_Recorder = new WaveLib.WaveInRecorder(-1, fmt, Size , 3,
    new WaveLib.BufferDoneEventHandler(DataArrived));
  }
  catch
  {
    Stop();
    throw;
  }
}


private void Voice_In()
{
  byte[] br;
  r.Bind(new IPEndPoint(IPAddress.Any, int.Parse(this.textBox2.Text)));
  while (true)
  {
    br = new byte[Size];
    r.Receive(br);
    m_Fifo.Write(br, 0, br.Length);
    //This loop is infinite unless something throws.
  }
}


Assuming this works you can then try changing the value of size to suit.

CCC solved so far: 2 (including a Hard One!)

QuestionIs there a difference between connect PPC to WS through ActiveSync and IP cradle ? Pin
E_Gold27-Oct-09 12:43
E_Gold27-Oct-09 12:43 
QuestionHow do i make custom control update display at design-time ? Pin
idan_bismut27-Oct-09 11:00
idan_bismut27-Oct-09 11:00 
AnswerRe: How do i make custom control update display at design-time ? Pin
Not Active27-Oct-09 11:08
mentorNot Active27-Oct-09 11:08 
GeneralRe: How do i make custom control update display at design-time ? Pin
idan_bismut27-Oct-09 11:24
idan_bismut27-Oct-09 11:24 
AnswerRe: How do i make custom control update display at design-time ? Pin
DaveyM6927-Oct-09 11:46
professionalDaveyM6927-Oct-09 11:46 
GeneralRe: How do i make custom control update display at design-time ? Pin
idan_bismut27-Oct-09 20:14
idan_bismut27-Oct-09 20:14 
QuestionHow do I pass images to and from the WebBrowser control??? Pin
DelphiCoder27-Oct-09 9:54
DelphiCoder27-Oct-09 9:54 
AnswerRe: How do I pass images to and from the WebBrowser control??? Pin
Henry Minute27-Oct-09 10:15
Henry Minute27-Oct-09 10:15 
GeneralRe: How do I pass images to and from the WebBrowser control??? Pin
Luc Pattyn27-Oct-09 10:20
sitebuilderLuc Pattyn27-Oct-09 10:20 
GeneralRe: How do I pass images to and from the WebBrowser control??? Pin
Henry Minute27-Oct-09 10:27
Henry Minute27-Oct-09 10:27 
GeneralRe: How do I pass images to and from the WebBrowser control??? Pin
Luc Pattyn27-Oct-09 10:33
sitebuilderLuc Pattyn27-Oct-09 10:33 
GeneralRe: How do I pass images to and from the WebBrowser control??? Pin
Henry Minute27-Oct-09 10:38
Henry Minute27-Oct-09 10:38 
GeneralRe: How do I pass images to and from the WebBrowser control??? Pin
0x3c027-Oct-09 11:00
0x3c027-Oct-09 11:00 
GeneralRe: How do I pass images to and from the WebBrowser control??? Pin
Not Active27-Oct-09 11:06
mentorNot Active27-Oct-09 11:06 
GeneralRe: How do I pass images to and from the WebBrowser control??? Pin
Henry Minute27-Oct-09 11:19
Henry Minute27-Oct-09 11:19 
AnswerRe: How do I pass images to and from the WebBrowser control??? Pin
Abhishek Sur27-Oct-09 10:23
professionalAbhishek Sur27-Oct-09 10:23 
GeneralRe: How do I pass images to and from the WebBrowser control??? Pin
DelphiCoder27-Oct-09 10:52
DelphiCoder27-Oct-09 10:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.