문제

I am using DirectSound to record voice and save in binary code.

var problem = _dwCapBuffer.Read(offset, typeof(byte), LockFlag.None, _dwOutputBufferSize);
#"problem" is byte array arrcording to http://msdn.microsoft.com/en-us/library/windows/desktop/bb280844.aspx

but when I use "problem" in function like private string ByteArray_to_Hex(byte[] data) ByteArray_to_Hex(problem), it show the error

the best overload method....has some valid argument

How can I solve this problem ( use the return value of CaptureBuffer.Read as byte[] ) ?

도움이 되었습니까?

해결책

According to the documentation, it's not returning a byte array but an Array.

Just type ByteArray_to_Hex(problem) and let Visual Studio generate the method. Then you'll see what type it returns. Perhaps you can call ByteArray_to_Hex((byte[])problem) to explicitly cast it.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top