MediaStreamSource for AAC in Windows Phone 7
I'm trying to create a custom MediaStreamSource
class for my Windows Phone 7
project that reads AAC streams from http.
ManagedMediaHelpers
provided by Microsoft, and the code seems to work, the only problem is that I can't get any sound... I've tested it on a real device, so it's not the emulator that is the problem.
I've also looked at this site to try to just get white noise sound, and my code is more or less the same as the audio part, but still no sound at all...开发者_如何学编程
Any idea on how to solve this?
The reason I choose to try the MediaStreamSource
is because when i just set my MediaElement
source to the http stream with
mediaElement.Source = new URI("http://....", UriKind.Absolute);
it lags a bit, and I cannot figure out why. I've also tried to use the XNA
MediaPlayer
but it has a lot of limitations, so I cannot use it for mye purpose...
All help is much appreciated, thanks!
If you like to use MediaStreamSource you have to write your own decoder and stuff, which is really time consuming, andmaybe not necessary. What you would like to use is the AudioPlaybackAgent. Check this link for info on how to implement.
This can then be provided with urls that contains the audio, and will then be streaming, also in the background(if you close your app etc).
精彩评论