an error while trying to play an audio in Audio Playback Agent. System.SystemException: HRESULT = 0xC00D001A

1

I want to play an audio in background.

So I did this iniside my main project

BackgroundAudioPlayer.Instance.Track = audioTrack;
BackgroundAudioPlayer.Instance.Play();

and inside audio background agent:

protected override void OnUserAction(BackgroundAudioPlayer player, AudioTrack track, UserAction action, object param)
{
    switch (action)
    {
        case UserAction.Play:
            player.Play();
            break;
        case UserAction.Stop:
            player.Stop();
            break;
        case UserAction.Pause:
            player.Pause();
            break;
        case UserAction.FastForward:
            player.FastForward();
            break;
        case UserAction.Rewind:
            player.Rewind();
            break;
        default:
            break;
    }
    NotifyComplete();
}

but I get an error:

System.SystemException: HRESULT = 0xC00D001A

I have another question too: will this continue playing after I close the app?

c#
audio
windows-phone-8
windows-phone
asked on Stack Overflow Dec 13, 2013 by user2970840 • edited Dec 13, 2013 by Roman R.

1 Answer

2

The error code should say it all:

answered on Stack Overflow Dec 13, 2013 by Roman R.

User contributions licensed under CC BY-SA 3.0