Sign in to follow this  
CLOUDAGE

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

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this