Click here to Skip to main content
15,896,435 members
Home / Discussions / C#
   

C#

 
JokeRe: problem with move values between two running forms Pin
dan!sh 27-Oct-09 22:25
professional dan!sh 27-Oct-09 22:25 
GeneralRe: problem with move values between two running forms Pin
Christian Graus27-Oct-09 22:34
protectorChristian Graus27-Oct-09 22:34 
GeneralRe: problem with move values between two running forms Pin
Mr.Kode27-Oct-09 22:43
Mr.Kode27-Oct-09 22:43 
GeneralRe: problem with move values between two running forms Pin
Christian Graus27-Oct-09 22:50
protectorChristian Graus27-Oct-09 22:50 
GeneralRe: problem with move values between two running forms Pin
Mr.Kode27-Oct-09 23:01
Mr.Kode27-Oct-09 23:01 
GeneralRe: problem with move values between two running forms Pin
Christian Graus27-Oct-09 23:06
protectorChristian Graus27-Oct-09 23:06 
GeneralRe: problem with move values between two running forms Pin
Mr.Kode27-Oct-09 23:21
Mr.Kode27-Oct-09 23:21 
GeneralRe: problem with move values between two running forms Pin
Christian Graus27-Oct-09 23:33
protectorChristian Graus27-Oct-09 23:33 
AnswerRe: problem with move values between two running forms Pin
AhmedMasum28-Oct-09 0:06
AhmedMasum28-Oct-09 0:06 
AnswerRe: problem with move values between two running forms Pin
hosseinghazanfary14-Nov-09 19:50
hosseinghazanfary14-Nov-09 19:50 
QuestionHelp Pin
amaankhan27-Oct-09 19:22
amaankhan27-Oct-09 19:22 
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 

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.