• Advertisement
Sign in to follow this  

[.net] Cacophony when buffer.Play() [this problem had been fixed.Notic this minutia]

This topic is 4472 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

private Device snd = null; private Buffer buf = null; private Buffer3D buf3d = null; private BufferDescription desc = new BufferDescription(); public void initDS(System.Windows.Forms.Control it) { snd = new Device(); snd.SetCooperativeLevel(it,CooperativeLevel.Priorityl); } public void play(string name) { desc.Control3D = true; buf = new Buffer(name,desc,snd); buf3d = new Buffer3D(buf); buf3d.Mode = Mode3D.Normal; buf3d.Position = new Microsoft.DirectX.Vector3(0,0,20); buf.Play(0,BufferPlayFlags.Default); } /* wave file played with a big cacophony.The cacophony like the noise of modem or systemspeaker.How to fix it? BTW:these files sound good in AudioVideoPlayback and WindowsMediaPlayer. [Edited by - CLOUDAGE on October 21, 2005 7:26:11 AM]

Share this post


Link to post
Share on other sites
Advertisement
if buffer is created by a object form another class,the problem happen.

I moved all the codes above to the Form class and it works well.

is this means the buffer can not created in the stack?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement