Archived

This topic is now archived and is closed to further replies.

eAvatar

Problem with Direct Audio

Recommended Posts

I''m having a problem trying to get 3D audio up and working. I''m trying to obtain a Listener interface from a 3D Audio path, but so far no joy. Heres how I''m creating the path:
  
	// The 3D Audio Path

	IDirectMusicAudioPath8* m_p3DAudioPath;

	HRESULT r = S_OK;

	// Create the 3D Audio Path

	r = g_performance->CreateStandardAudioPath( 
		DMUS_APATH_DYNAMIC_3D,      // Path type.

		64,                         // Number of performance channels.

		TRUE,                       // Activate now.

		&m_p3DAudioPath             // Pointer that receives audiopath.

	);
  
Up to here it works but:
  

	// Listener interface

	IDirectSound3DListener8* m_pDSListener;

	r = m_p3DAudioPath->GetObjectInPath( DMUS_PCHANNEL_ALL, 
									 DMUS_PATH_PRIMARY_BUFFER, 
									 0,
									 GUID_NULL, 
									 0, 
									 IID_IDirectSound3DListener8, 
									 (LPVOID*) &m_pDSListener );
  
fails. I''m new to Direct Audio, so it could be something simple, but I''ve got ordinary audio segments playing so I dont know... Steve.

Share this post


Link to post
Share on other sites