Peculiar API Return from WaveInAddBuffer

mikepayne

Member
Joined
Dec 22, 2005
Messages
6
Programming Experience
5-10
Hello all. Hope you're all having good holidays.

I'm writing a guitar tuner in VB.NET. It's coming along well, the program will tell you what note/octave you are playing and how much the note deviates from the frequency of the in-tune note.

Once i get this working I plan to release it on Planet Source Code, because I feel there isn't enough code like this around.

Anyway, long story short, the API waveInAddBuffer() is returning 33 sometimes. Can anybody tell me what this means?

The constants that microsoft defines as the return values, as far as i can tell, do not include this value.

Any help would be excellent.

Thanks all

Mike
 
Very strange, you are right this is not defined as a possible return value.
Taking it from listed returns WAVERR_UNPREPARED is 34, could there be some 'addin' to your code?
In this context we got WAVERR_STILLPLAYING which is 33 and won't be coming from waveInAddBuffer, but it will from waveInClose if:
"If there are input buffers that have been sent with the waveInAddBuffer function and that haven't been returned to the application, the close operation will fail. Call the waveInReset function to mark all pending buffers as done."
 
Back
Top