The built-in streaming and decoding system on the phone only supports playback of local audio files when they are located in isolated storage. This section looks at enabling the direct playback of audio files located within an app assembly.
The code for this section resides in the
AssemblyAudioStreamingAgent class of the WPUnleashed.BackgroundAudio project in the downloadable sample code.
AssemblyAudioStreamingAgent is a subclass of
AudioStreamingAgent and overrides the base type’s
OnBeginStreaming method (see Listing 34.2). The custom
IsolatedStorageUtility is used to retrieve the byte stream for an audio file, whose location is specified by the
AudioTrack.Tag property. An