静态缓冲区:
a envent
1 try 2 { 3 Device appDevice = new Device();//得到声音设备 4 appDevice.SetCooperativeLevel(this, CooperativeLevel.Priority); 5 BufferDescription desc = new BufferDescription(); 6 desc.ControlVolume = true;//设置内在中的声音的属性(这是让声音大小可控) 7 SecondaryBuffer secondBuffer = new SecondaryBuffer("C:\\Documents and Settings\\Administrator\\桌面\\1792638871.wav",desc,appDevice); 8 BufferPlayFlags flags = BufferPlayFlags.Looping; 9 secondBuffer.Play(0, flags);10 }11 catch (Exception ex)12 {13 throw ex;14 }
流式的:
http://www.microsoft.com/china/MSDN/library/enterprisedevelopment/softwaredev/code4fun02032004.mspx?mfr=true
微软的例子.还在学习.做个标记.
转载于:https://www.cnblogs.com/nanshouyong326/archive/2007/04/12/710077.html