First I prepare my sound cue and then set up the channel map like so
note: pSoundTask->m_pSoundCue is a valid cue
XACTCHANNELMAPENTRY ChannelMapEntries[] =
{
{ 0, 0, 0.0f },
{ 0, 1, 0.0f }
};
DWORD dwNumEntries = 2;
XACTCHANNELMAP ChannelMap =
{ (XACTCHANNEL)dwNumEntries, ChannelMapEntries };
hRVal = pSoundTask->m_pSoundCue->SetChannelMap( &ChannelMap );
ASSERT( SUCCEEDED( hRVal ) );
then per frame I do the following( I do it once before playing the cue and then once per frame until the cue has stopped)
XACTCHANNELVOLUMEENTRY ChannelVolumeEntries[2];
XACTCHANNELVOLUME ChannelVolume = { 2, ChannelVolumeEntries };
for( DWORD i = 0; i < ChannelVolume.EntryCount; i++ )
{
ChannelVolumeEntries
ChannelVolumeEntries
}
HRESULT hRVal;
hRVal = pSoundTask->m_pSoundCue->SetChannelVolume( &ChannelVolume );
ASSERT( SUCCEEDED( hRVal ) );
I would expect that I should hear nothing as I am setting the volumes to 0, but instead my cues always play a full volume. I just can't see what I am doing wrong Any ideas
Thanks
Stephen Orr

Unable to get SetChannelVolume to work
Shehzad Sheikh