I was just wondering if you could help me out. I am working with the Waveform Audio Interface, waveOutOpen() keeps returning the value 32 "the process cannot access the file because it is being used by another process".
The file is a .wav file that I have downloaded for specific use with this code, and so I can't understand how another process could be using it (yes I have read the old post from Incognito in March).
I was wondering if anybody else had experienced any similar difficulties? Any suggestions would be greatly appreciated :)
Thankyou and happy new year!
I'm reasonably certain that your error message with that function doesn't make sense. waveOutOpen(...) doesn't take a file handle or name at any point, given that it provides a "simple" interface to a sound card. Its parameters are:-
Perhaps you have a different problem? Could you post some code?
LPHWAVEOUT phwo, //Pointer to where the device handle is returned
UINT_PTR uDeviceID, // ID of the device to open (WAVE_MAPPER unless you have a reason for being specific)
LPWAVEFORMATEX pwfx, // Pointer to WAVEFORMATEX structure describing the output buffer format
DWORD_PTR dwCallback, // Pointer to callback function or window handle
DWORD_PTR dwCallbackInstance, // User-defined data to pass to callback
DWORD fdwOpen // Flags
I don't have access to my code just now... I gave up and left uni an hour ago :(
My code is a slimmed down version of the stuff microsoft have available for download in their tutorial .
The same error gets raised when I substitute my "wav of choice" for their test.wav in the Wave.cs. I have got a feeling that the error has got something to do with the different properties of the two wav files. test.wav being stereo and mine being mono etc, but I don't know how I would go about checking that. My wav is hrtbeat1.wav.
If you don't fancy trawling through all of that I will post my code up tomorrow when I get back into uni.
Just to let you know I worked out the problem eventually... my wav file was in an unsupported format. Thanks for the suggestion.
Happy New Year!!