English 中文(简体)
Can t Set MediaPlayer. Volume
原标题:Can t Set MediaPlayer.Volume

I m 调查控制卷量的不同方法,我似乎没有设置媒体宣传员。 载于我的Windows Telephone 7.1应用程序。 基本上,呼吁

MediaPlayer.Volume = value;

无效果,叫媒体宣传员。 IsMuted = TRUE没有效果。

例:

public MainPage()
{
    InitializeComponent();
    //Play a song from the collection
    FrameworkDispatcher.Update(); 
    MediaPlayer.Play(ml.Artists[0].Songs[0]);
}

private void Button_Click(object sender, RoutedEventArgs e)
{
    //Reduce volume to 0
    FrameworkDispatcher.Update(); 
    MediaPlayer.Volume = 0.0f;
    //If I set a breakpoint here, MediaPlayer.Volume is 1.0
}

private void Button_Click_1(object sender, RoutedEventArgs e)
{
    //This also has no effect...
    FrameworkDispatcher.Update(); 
    MediaPlayer.IsMuted = !MediaPlayer.IsMuted;
}

是否有任何人知道我误解这一简单的事实?

最佳回答

I m不熟悉媒体Player, 但它认为,不再允许你在从祖恩图书馆玩 playing时确定卷和定型财产。 三、XNA 4.0 的改动

我假定,你的<代码>ml变量指的是祖恩媒体图书馆,因此,你存在这一问题。 如果你停止玩唱歌,然后调整该卷,或事先调整该卷,那么这个问题就应该消失了。

您还可以看<条码>MediaElement,看看它是否适合您的设想。

问题回答

或者说,你的装置只是支持媒体人物的节目。

http://geekswithblogs.net/mikebmcl/archive/201103/10/tips-for-xna-wp7-developers.aspx”rel=“nofollow”

· 永远不会依赖声音作为你向角色发出的唯一信号,即游戏中正在发生的事情。 他们可能会有声望。 他们可能会在某个地方玩.。 Ec.

· 你们必须提供控制,以防听力和音乐。 这些建议应当分开。

∗∗∗∗ 至少有一种电话模式,因此,电传控制器目前没有任何效果。 运动员可以调整其硬件量子,但在游戏中,选择者只是赢得了自己的工作。 因此,不值得努力为音响和音乐提供超出转口的任何东西。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签