Click to See Complete Forum and Search --> : error i cant fix


KB1IBH
August 22nd, 2007, 10:58 PM
hello everybody... im having some problems fixing two errors i get after following someones instructions given on how to save recorded audio as a WAV file... im curious to see if someone can help me...

this project is a combination of two different projects
this one: http://www.codeproject.com/cs/media/cswavrec.asp?msg=1743046 (you can see the message regarding combining the two projects at the bottom)
and this one: http://www.codeproject.com/csharp/CSharpRipper.asp

ive put everything into a solution, zipped it, and threw it on my server here:
http://mike-soft.com/code/cswavrec.zip

i compiled it using microsoft visual c# 2005 express edition... where i get 11 warnings and 2 errors... the errors are as follows:

The best overloaded method match for 'Yeti.MMedia.WaveWriter.WaveWriter(System.IO.Stream, WaveLib.WaveFormat)' has some invalid arguments

and

Error 12 Argument '2': cannot convert from 'WaveLib.WaveFormat [C:\cswavrec\WaveNative.cs(25)]' to 'WaveLib.WaveFormat [c:\cswavrec\yeti.mmedia\bin\Release\yeti.mmedia.dll]'

any help is GREATLY appreciated, as this will be used in a small educational radio station

JonnyPoet
August 24th, 2007, 09:10 AM
...ive put everything into a solution, zipped it, and threw it on my server here:
http://mike-soft.com/code/cswavrec.zip
I tried to download to have a look on it but couldn't get a connection. ?
... where i get 11 warnings and 2 errors... the errors are as follows:

The best overloaded method match for 'Yeti.MMedia.WaveWriter.WaveWriter(System.IO.Stream, WaveLib.WaveFormat)' has some invalid arguments
It clearly says what going on with it The argumants doesn't fit. So look into the materialy you have or in intellisense which arguents are needed and which you have and do the needed corrections.
Maybe a matter of some changes done to the projects by the author in between, or it is in .net 2003 any you are using .net2005 something like that.

Error 12 Argument '2': cannot convert from 'WaveLib.WaveFormat [C:\cswavrec\WaveNative.cs(25)]' to 'WaveLib.WaveFormat [c:\cswavrec\yeti.mmedia\bin\Release\yeti.mmedia.dll]'
So look at the given and the needed format and find a way to get it adapted to each other [/QUOTE]Or put the code into a zip and post it here ( without any compiled code all just as source code. )

------edited ----------
I have looked into your recorder project on your server and this is maybe that you wanted to get repaird.
You need to add a reference to your ClassLibrary1 into each of the three parts instead the broken link to the namespace formatlib

Where needed add then the namespace formatlib (everywhere you get a message from compiler that maybe a namespace is missing

Then everywhere there only is written WaveFormat instead of it write

using formatlib
....
formatclass.WaveFormat

it should look just that blue, because the namespace must be declared on top of the page.
and in project Ripper as well as in project CDCopier as well as in yeti.mmedia the reference to ClassLibrary1 is needed. ( remove the broken reference to formatlib in yeti.mmedia.

After this you are able to compile the CDCopier project. Set the Startproject to CDCopie and this should run. ( with a terrible handling but it works, I have tested it.
What do I mean with terrible handling. The open , close load has worked in an unusual manner. Normally what is meanng with open /close when you have an eject button too ? and sometimes it wasn't able to select the record which I wanted to copy. But that could all be repaired by your needs and as you want. You simple need to debug it now. I think you have only copied the projects from elsewhere. So you will need to do some extra work. But the copyfunction works I tested it.

Then when this is done your other project also loads and compiles.
Nothing to say about that code as I think it isn't ready.

But there are amusing things in it like
[code]
else{
Stop();
throw;
}
[(code]
S I think even you have got it by the web, you will have some fun with it :D