I work in Visual C++ ,Win32 aplication and I want to play more sounds together and I don't know how. I used PlaySound() but this function play only one sound at a time.
If you have some solutions post them here please.
Thank you!!

The wavemix DLL is a utility that allows multiple wav files to be played simultaneously. It is designed to be as simple to use as possilbe but still have the power to do what is required by games. The DLL supports 8 channels of simultaneous wave play, the ability to queue up waves along the same channel and wave completion notification.

http://www.programmersheaven.com/download/6794/download.aspx

Hope I Helped :)
~ mike

Thank for this application,but I don't understand what is writen in WAVEMIX.h. I tryed to make a project with this files. When I compiled it, I met problems with some functions from WAVEMIX.h, especialy WaveMixOpenWave. I don't understand what does this function.
If you can make a Win32 project whit this aplication,or to explain them will be great. (I need this aplication for a game to combine background, movement, actions sounds)
Thank again.

http://www.compuphase.com/wavemix.htm

^^^look at that page, scroll down to the section "Using WaveMix", they have information on setting it up and a little API reference

Hope i helped :)

I don't know why when I use this functions from WAVEMIX.h,in my program I meet some errors:

 error LNK2019: unresolved external symbol "unsigned short __stdcall WaveMixGetInfo(struct WAVEMIXINFO *)" (?WaveMixGetInfo@@YGGPAUWAVEMIXINFO@@@Z) referenced in function "int __cdecl MixTest_OnCreate(struct HWND__ *,struct tagCREATESTRUCTA *)" (?MixTest_OnCreate@@YAHPAUHWND__@@PAUtagCREATESTRUCTA@@@Z)

main.obj : error LNK2019: unresolved external symbol "void * __stdcall WaveMixConfigureInit(struct MIXCONFIG *)" (?WaveMixConfigureInit@@YGPAXPAUMIXCONFIG@@@Z) referenced in function "int __cdecl MixTest_OnCreate(struct HWND__ *,struct tagCREATESTRUCTA *)" (?MixTest_OnCreate@@YAHPAUHWND__@@PAUtagCREATESTRUCTA@@@Z)

All I did,was to copy

#include "WAVEMIX.h"
HANDLE ghMixSession;
LPMIXWAVE glpMix1;
BOOL gfDebug=FALSE;
.........

BOOL MixTest_OnCreate(HWND hWnd, CREATESTRUCT FAR* lpCreateStruct)
{
    BOOL fErr=FALSE;
    WAVEMIXINFO Info;
    MIXCONFIG config;

    srand(gfDebug ? 1 : LOWORD(GetTickCount()));    // 1 reintializes, Any other number sets random

    Info.wSize=sizeof(WAVEMIXINFO);
    if (WaveMixGetInfo(&Info))
        return FALSE;

    config.wSize = sizeof(MIXCONFIG);
    config.dwFlags = WMIX_CONFIG_CHANNELS;
    config.wChannels = 2;  // give us stereo!
    if (!(ghMixSession = WaveMixConfigureInit(&config)))
        return FALSE;

    glpMix1=WaveMixOpenWave(ghMixSession,"1.wav",NULL,0);

    fErr=WaveMixOpenChannel(ghMixSession,8,WMIX_OPENCOUNT);

    if (fErr || !(glpMix1))
    {
        //CloseWaveStuff();
        return FALSE;
    }

    return TRUE;
}

in my program. Why I have those erors???

I don't know why when I use this functions from WAVEMIX.h,in my program I meet some errors:

error LNK2019: unresolved external symbol "unsigned short __stdcall WaveMixGetInfo(struct WAVEMIXINFO *)" (?WaveMixGetInfo@@YGGPAUWAVEMIXINFO@@@Z) referenced in function "int __cdecl MixTest_OnCreate(struct HWND__ *,struct tagCREATESTRUCTA *)" (?MixTest_OnCreate@@YAHPAUHWND__@@PAUtagCREATESTRUCTA@@@Z)

main.obj : error LNK2019: unresolved external symbol "void * __stdcall WaveMixConfigureInit(struct MIXCONFIG *)" (?WaveMixConfigureInit@@YGPAXPAUMIXCONFIG@@@Z) referenced in function "int __cdecl MixTest_OnCreate(struct HWND__ *,struct tagCREATESTRUCTA *)" (?MixTest_OnCreate@@YAHPAUHWND__@@PAUtagCREATESTRUCTA@@@Z)

I've never used this library, so I don't know anything about it. But the error messages you're getting are saying that the linker is unable to find the wavemix library...You most likely just need to update your project settings/compiler options to include paths to the wavemix libraries and headers.

From the looks of your error message it looks like one of the MS VC++ compilers, so the way to register the wavemix libraries and headers with the compiler will depend on the version of Visual Studio that you are using.

For VC++6 (and earlier), you'd need select 'tools->options' in the top menu. Then in the popup dialog, select the 'Directories' tab.
Select 'Include files' in the 'Show directories for' dropdown and add the path to wavemix.h to the list of paths.

Then select 'Library files' in the 'Show directories for' dropdown and add the path to wavemix.lib to the list of paths. Then hit OK to accept the changes.

For VC++2003 (and later) the best bet would probably be to right click on your project (in the solution explorer in the IDE) and select properties. In the popup dialog open up 'C/C++' in the treeview and select the 'general' sub-item.
In the "Additional Include Directories" box you need to add the path to wavemix.h

Then back in the tree-view, select 'Linker' and the 'general' sub-item and add the path to wavemix.lib to the 'Additional Library Directories' box. Finally hit OK in the dialog to accept the changes.

Once you've registered the relevant headers and libraries with the compiler, your project should compile and link properly (as long as you're using the library correctly in your code!!)

Cheers for now,
Jas.

P.S. The instructions posted for VC2003 onwards may differ slightly for newer versions of VC (i.e. 2005 & 2008)...But the steps should be more or less the same!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.