0

I'm creating an application with background audio player. According to MS requirements, the player is implemented as a separate DLL and lives in another process.

I'm able to pass track name back to my UI process by updating a BackgroundAudioPlayer.Instance.Track object.

However I'd like my UI to also report state of my download buffer.

What IPC method can I use on WP7 to notify my GUI process?

Update: I considered using 4 named manual reset events to pass 4 bits of the data - fail, WP7 only supports unnamed events that are only suitable for thread synchronization within the same process.

I considered System.Windows.Messaging - fail, SendCompletedCallback raises "LocalMessage_CouldNotDeliverMessage", and the documentation says local messaging is not supported on WP7.

So far, I know only one way - write files to isolated storage, and guard them with named mutex. I don't really want to wear out the NAND flash by doing that. Are there better methods? WP7 has WinCE kernel underneath, which has plenty methods available - mailslots, LPC, RPC, COM, pipes, shared memory, and many others - I can't believe none of them is exposed to Silverlight…

Soonts
  • 20,079
  • 9
  • 57
  • 130
  • Perhaps you can use a background worker as suggested in this [other question](http://stackoverflow.com/questions/9426110/how-to-use-backgroundworker-class-wp7) - The ReportProgress method is one way of communicating back to the calling (UI) thread – mhoff Jan 04 '13 at 16:42
  • @mhoff, WP7's background audio player has nothing to do with .NET's background worker. They are completely different.. – Soonts Jan 04 '13 at 17:45
  • sorry, I don't have specific knowledge on WP7 or the BackgroundAudioPlayer architecture, I'll admit, but the idea was to run the BackgroundAudioPlayer through a BackgroundWorker, thereby enabling the player features and at the same time reporting back state info to the UI thread. However, having looked into the matter, how about using the [BufferingProgress](http://msdn.microsoft.com/en-US/library/windowsphone/develop/microsoft.phone.backgroundaudio.backgroundaudioplayer.bufferingprogress(v=vs.105).aspx) property? – mhoff Jan 04 '13 at 19:00
  • @mhoff, I want to display buffer level while playing, not just while buffering. – Soonts Jan 04 '13 at 19:22

0 Answers0