Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Sound in remote desktop does not work after a disconnect/reconnect


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 trinith_006   Members   -  Reputation: 102

Like
0Likes
Like

Posted 21 August 2012 - 04:35 PM

Hi all,

This is more of a feedback/general question than any kind of specific problem... kind of. A while ago I wrote a sound engine with SlimDX. While writing it, it was pointed out to me that I was creating a new XAudio2 device and mastering voice for each sound I was creating and that this probably wasn't the best approach. It was fine to use a single static instance of these and I created a static manager class to initialize and shut down the sound engine, that is, to create and destroy my XAudio2 device and mastering voice. Everything worked great and no problems!

Until now that is... through a rather random incident during testing, it turns out that when a remote desktop session is disconnected, after reconnecting sound won't work. I did some digging around and my guess is that the Windows playback device, Remote Audio, goes away when the session closes and a new one is created when the new session connects. I would then have to guess that the XAudio2 device that was created is no longer valid. Unfortunately there appears to be no exception or error to indicate this... as far as SlimDX/XAudio2 is concerned, there are no problems at all. It continues to play sounds, it's just that nothing happens.

I created a test application and modified my code so that each sound would create/destroy it's own device and mastering voice. Doing this, sounds created before the session disconnect no longer work; however, sounds created after reconnecting do play correctly.

So I have two questions:

1. Is it reasonable to have each sound create/maintain it's own XAudio2 device and mastering voice? The advice I was given, which makes a lot of sense, was that this is wasteful; however, being unable to create sounds after losing the remote session is a bit of a problem for us.

2. Is this something anybody else has encountered? Does anyone have any thoughts on how to overcome this problem?

I appreciate any help anyone can give. Thank you! :)

Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS