Question

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.

EDIT: By the way, this is specifically for PC

EDIT2: Also, I'm on XNA 4.0

Was it helpful?

Solution

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-us/library/windows/desktop/ms902629.aspx

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top