Hi, @KeyC0de ComPtr will automatically call the Release function after the pointer's life cycle ends:
~ComPtr() throw()
{
InternalRelease();
}
unsigned long InternalRelease() throw()
{
unsigned long ref = 0;
T* temp = ptr_;
if (temp != nullptr)
{
ptr_ = nullptr;
ref = temp->Release();
}
return ref;
}
IXAudio2MasteringVoice inherits from IXAudio2Voice, neither of which has a release method. So you got that error. The same as IXAudio2SourceVoice and IXAudio2SubmixVoice. Use them as @Castorix31 said:
IXAudio2Voice* pVoice;
IXAudio2MasteringVoice* pMasterVoice;
IXAudio2SourceVoice* pSourceVoice;
IXAudio2SubmixVoice* pSubmixVoice;
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.