waveOutOpen() problems

This is a discussion on waveOutOpen() problems within the Windows Programming forums, part of the Platform Specific Boards category; Hey Everyone, I was just wondering if you could help me out. I am working with the Waveform Audio Interface, ...

  1. #1
    Registered User
    Join Date
    Dec 2004
    Posts
    3

    waveOutOpen() problems

    Hey Everyone,

    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!

  2. #2
    Registered /usr
    Join Date
    Aug 2001
    Location
    Newport, South Wales, UK
    Posts
    1,255
    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:-
    Code:
    MMRESULT waveOutOpen(
    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
    );
    Perhaps you have a different problem? Could you post some code?

  3. #3
    Registered User
    Join Date
    Dec 2004
    Posts
    3
    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.

    Thankyou!

  4. #4
    Registered User
    Join Date
    Dec 2004
    Posts
    3
    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!!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. No clue how to make a code to solve problems!
    By ctnzn in forum C Programming
    Replies: 8
    Last Post: 10-16-2008, 02:59 AM
  2. C Pointers Problems
    By mhelal in forum C Programming
    Replies: 8
    Last Post: 01-10-2007, 05:35 AM
  3. Rendering problems (DirectX?)
    By OnionKnight in forum Tech Board
    Replies: 0
    Last Post: 08-17-2006, 12:17 PM
  4. contest problems on my site
    By DavidP in forum Contests Board
    Replies: 4
    Last Post: 01-10-2004, 08:19 PM
  5. DJGPP problems
    By stormswift in forum C Programming
    Replies: 2
    Last Post: 02-26-2002, 03:35 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21