1

是否有 BackgroundAudioPlayer 错误代码的资源?

调用 Play() 时收到错误代码 0x803a000a。知道这个错误代码是什么吗?

我找不到错误代码及其含义的良好列表。

4

1 回答 1

1
protected override void OnError(BackgroundAudioPlayer player, AudioTrack track, Exception error, bool isFatal)
{
    if (isFatal)
    {
        player.Track = null;
        switch (error.Message)
        {
            case "-2147012889":
                //MessageBox.Show("Cannot connect to streaming server.");
                break;
            case "-2147012696":
                MessageBox.Show("No available network connection.");
                break;
            case "-1072889830":
                MessageBox.Show("Cannot find stream.");
                break;
            case "-2147467259":
                //MessageBox.Show("Error. Try again later.");
                break;
        }
        Abort();
    }
    else
    {
        player.Track = null;
        switch (error.Message)
        {
            case "-2147012889":
                //MessageBox.Show("Cannot connect to streaming server.");
                break;
            case "-2147012696":
                //MessageBox.Show("No available network connection.");
                break;
            case "-1072889830":
                //MessageBox.Show("Cannot find stream.");
                break;
            case "-2147467259":
                //MessageBox.Show("Error. Try again later.");
                break;
        }
        NotifyComplete();
    }

}
  • “-2147012889” 80072EE7 找不到服务器(例如手机处于飞行模式)
  • “-2147012696” 80072FA8 没有可用的网络连接
  • "-1072889830" C00D001A 找不到媒体文件(例如您指向的 MP3 文件不再在服务器上)
  • “-2147467259” 80004005 非特定错误代码

希望有帮助。

于 2013-02-14T00:46:16.773 回答