how to loop in my wav file regarding the code below, only this step I need the wav file to be playing infinite
[color=#000080] //load a wave file
if( !buffer.load( "Audio\\mus0.wav" ) )
{
g_engine->Release();
CoUninitialize();
return -3;
}
//create the source voice, based on loaded wave format
if( FAILED( g_engine->CreateSourceVoice( &g_source, buffer.wf(),1 ) ) )
{
g_engine->Release();
CoUninitialize();
return -4;
}
//start consuming audio in the source voice
g_source->Start(1,0);
//play the sound
g_source->SubmitSourceBuffer( buffer.xaBuffer() );