Re: help

  • From: "RicksPlace" <ofbgmail@xxxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Tue, 26 Oct 2010 07:43:52 -0400

Follow up Marv: These tutorials are way, way beyond your skill level. You need 
to stay with basic programming techniques like working with subs and functions 
and basic arrays before you go beyond the most basic of applications. And, 
Bill's series is far from a beginners level tutorial. Also, stay with one OS, 
IDE and  Language until you master these basic programming constructs. Finally, 
you need to learn to use your Error Window so you can fix simple syntax errors, 
learn how variables are scoped which was detailed in my tutorials and elsewhere 
all over the net and then you might try doing a sample programming application. 
You never learned how to do the basics and so you can not understand nor code 
your own projects and flounder when anything you copy and paste, or just 
ReType, does not work. 
Later...
Rick USA.
  ----- Original Message ----- 
  From: Marvin Hunkin 
  To: programmingblind@xxxxxxxxxxxxx 
  Sent: Monday, October 25, 2010 10:53 PM
  Subject: help


  hi.
  doing a audio programming project using low level wav technology.
  getting errors.
  and looked at the tutorial.
  but cannot seem to see any thing wrong.
  can you help.
  not liking the size and saying it is not in the context.
  can you help.
  marvin from australia.
  ps: will paste the code and the error messages below.
  using c# express 2008.

  ate void FillWaveBuffer()

  {

  byte[] b = new byte[size];

  if (audioStream != null)

  {

  int pos = 0;

  while (pos < size)

  {

  int toget = size - pos;

  int got = audioStream.Read(b, pos, toget);

  if (got < toget)

  audioStream.Position = 0; // loop if the file ends

  pos += got;

  }

  }

  else

  {


  b[i] = 0;

  }

  System.Runtime.InteropServices.Marshal.Copy(b, 0, data, size);

  }

  private void btnLoad_Click(object sender, EventArgs e)

  {

  LoadSong();

  }

  private void FillWaveBuffer()

  {

  byte[] b = new byte[size];

  if (audioStream != null)

  {

  int pos = 0;

  while (pos < size)

  {

  int toget = size - pos;

  int got = audioStream.Read(b, pos, toget);

  if (got < toget)

  audioStream.Position = 0; // loop if the file ends

  pos += got;

  }

  }

  else

  {


  b[i] = 0;

  }

  System.Runtime.InteropServices.Marshal.Copy(b, 0, data, size);

  }



  Error 1 The name 'size' does not exist in the current context 
C:\Docs\Programming\BlindGeeks\BasicAudio\ChapterOne\BGLowLevelMCI\BGLowLevelMCI\Main.cs
 28 33 BGLowLevelMCI
  Error 2 The name 'size' does not exist in the current context 
C:\Docs\Programming\BlindGeeks\BasicAudio\ChapterOne\BGLowLevelMCI\BGLowLevelMCI\Main.cs
 32 30 BGLowLevelMCI
  Error 3 The name 'size' does not exist in the current context 
C:\Docs\Programming\BlindGeeks\BasicAudio\ChapterOne\BGLowLevelMCI\BGLowLevelMCI\Main.cs
 34 33 BGLowLevelMCI
  Error 4 The name 'i' does not exist in the current context 
C:\Docs\Programming\BlindGeeks\BasicAudio\ChapterOne\BGLowLevelMCI\BGLowLevelMCI\Main.cs
 46 23 BGLowLevelMCI
  Error 5 The name 'data' does not exist in the current context 
C:\Docs\Programming\BlindGeeks\BasicAudio\ChapterOne\BGLowLevelMCI\BGLowLevelMCI\Main.cs
 48 63 BGLowLevelMCI
  Error 6 The name 'size' does not exist in the current context 
C:\Docs\Programming\BlindGeeks\BasicAudio\ChapterOne\BGLowLevelMCI\BGLowLevelMCI\Main.cs
 48 69 BGLowLevelMCI
  ps: how to fix this.

  any help would be appreciative.

  tried rewriting this function three times.

  and it is to load the wav file.

  what the application is it opens a open dialog box, and then you open the wav 
and it plays.

  then you have a menu and buttons to control, stop. pause, and play.
  • References:
    • help
      • From: Marvin Hunkin

Other related posts: