Click here to Skip to main content
15,867,756 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
I am trying to play audio (.wav) file which should play samples per video frames.
For two track audio, it is working fine using DirectSound class's CreateSoundBuffer(). but for Multitrack audio I am not getting bufferObject.

Please help me for playing multitrack audio (wav) file using any Microsoft API or some API which will to seek back and forth audio file.
Posted
Comments
Sergey Alexandrovich Kryukov 15-Sep-14 10:39am    
This question really needs detail explanation, with some code sample...
—SA
ali khanna 26-Sep-14 9:19am    
I am using the same kind of code from the below link
http://msdn.microsoft.com/en-us/library/windows/desktop/ee416361%28v=vs.85%29.aspx

hr = lpDirectSound->CreateSoundBuffer(&dsbdesc, &pDsb, NULL);
here I am expecting that pDsb should not be null for multitrack audio file.

I have set the properties of dsbdesc correctly as per the Audio File information.
Rob Grainger 17-Oct-14 14:30pm    
DirectSound isn't the way to go here - it's deprecated.

Microsoft Media Foundation is the preferred technology for digital media nowadays. However describing this in details is a tall order. Check the following: http://msdn.microsoft.com/en-us/library/ms694197(v=vs.85).aspx

If a lower-level of control is required, then the Core Audio APIs can be used (http://msdn.microsoft.com/en-us/library/dd370802(v=vs.85).aspx). Using DirectSound will route through this layer anyway. Particularly the info on Audio Sessions may prove relevant: http://msdn.microsoft.com/en-us/library/dd370796(v=vs.85).aspx

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900