是否有BackgroundAudioPlayer错误代码的资源?
调用Play()时收到错误代码0x803a000a。知道这个错误代码是什么吗?
我找不到错误代码及其含义的良好列表。
答案 0 :(得分: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();
}
}
希望有所帮助。