由于我是新手,所以暂没有悬赏分,很抱歉!希望大家能多多帮忙!谢谢!
參考答案:引用:
using namespace Microsoft;
using namespace Microsoft::DirectX;
using namespace Microsoft::DirectX::DirectSound;
using namespace Microsoft::DirectX::AudioVideoPlayback;
初始化:
Device 设备=new Device();设备.SetCooperativeLevel(this, CooperativeLevel.Normal);
SecondaryBuffer 缓冲 = gcnew SecondaryBuffer(文件路径,设备);
播放:
缓冲.Play(0,BufferPlayFlags.Looping);
停止:
缓冲.Stop();