音频/视频播放与XNA求 [英] Audio/Video Playback with seeking in XNA
问题描述
我发展在C#中的XNA游戏节奏,并因为它是一个节奏游戏它会需要一首歌的编辑器,这将需要precise视频和放大器;寻求音频放大器及;恢复的歌曲。我试过的MediaPlayer和VideoPlayer类,但他们都不能寻求一个特定的位置,PlayPosition是只读的。
有谁知道一个很好的方法来实现这一目标?此外,它需要能够播放.mp3文件,所以我不能使用XACT。比赛节奏OSU!也是codeD在XNA,不管怎样它播放MP3文件,并允许寻求为好。
I'm developing an XNA rhythm game in C# and because it's a rhythm game it's gonna need a song editor, which is going to need precise video & audio seeking & resuming for the songs. I tried MediaPlayer and VideoPlayer classes but both of them cannot seek a specific position, as PlayPosition is read only. Does anyone know a good way to achieve this? Also, it needs to be able to play .mp3 files, so I can't use XACT. The rhythm game osu! is also coded in XNA and somehow it plays mp3 files and allows seeking as well.
编辑:顺便说一句,这是专门为PC
By the way, this is specifically for PC
EDIT2:另外,我在XNA 4.0
Also, I'm on XNA 4.0
推荐答案
既然你在PC上,你也许可以互操作进行交谈的核心DX功能。我不知道该怎么好,这将使用XNA玩,但如果有它的工作的希望,它很可能是与 Microsoft.DirectX.AudioVideoPlayback.Video
类:
Since you're on PC, you can probably interop out to talk to the core DX functionality. I don't know how well this will play with XNA, but if there's any hope of it working, it would probably be with the Microsoft.DirectX.AudioVideoPlayback.Video
class:
http://msdn.microsoft.com/en-美国/库/窗/台式机/ ms902629.aspx
这篇关于音频/视频播放与XNA求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!