Page 1 of 1

StockAudioPlayer sometimes loses audio during an RDP session

PostPosted: August 24th, 2012, 10:53 pm
by abh
I don’t think this is a problem specifically with the TStockAudioPlayer component, but I’m hoping someone here might have an idea to help me solve this. Sometimes my program simply stops playing the audio at the local computer when running as an RDP client on a Windows terminal server. It’s not a question of having the RDP enabled for remote audio, because most of the time it works, and I don’t think the connection from the client to the server is the problem either, because the program works fine in every respect except for the audio. It never loses audio while it's playing a file, only when a new file is selected to play. And I've never observed the problem running it locally (not as an RDP session). The terminal servers are all Windows 2008 boxes, the clients are XP SP3.

Any ideas?

Re: StockAudioPlayer sometimes loses audio during an RDP ses

PostPosted: August 26th, 2012, 9:23 am
by Kambiz
Apparently the problem is within that part of the code that receives the audio format of the remote file. I remember that I had the same issue while writing the receiver demo.

Make sure your code reads the entire audio header from the remote machine, otherwise you setup StockAudioPlayer improperly. In a local connection there is no problem because by one read from the socket you receive the audio header completely. However, in case of a remote connection you may need to read from the socket several times until you receive all the bytes of the audio header.

Re: StockAudioPlayer sometimes loses audio during an RDP ses

PostPosted: August 27th, 2012, 8:17 pm
by abh
Thanks Kambiz, but I don't understand your suggestion. This is all my code does:
Code: Select all
           StockAudioPlayer.PlayFile (FFileName);

There is exception processing surrounding this statement, and it's not catching any errors.

What would I have to do to insure the header was completely read? Just to clarify, this is being run under Microsoft's "MSTSC" remote desktop client program, connecting to a terminal server - so the file is actually local to the program. What's remote is the screen, keyboard, and in this case most importantly -- the speakers.

Re: StockAudioPlayer sometimes loses audio during an RDP ses

PostPosted: August 28th, 2012, 10:48 am
by Kambiz
Oops! Sorry my mistake!
I didn't pay enough attention and thought you are using TLiveAudioPlayer.
I hove no idea what may caused the problem in this case.

Re: StockAudioPlayer sometimes loses audio during an RDP ses

PostPosted: August 28th, 2012, 11:44 am
by abh
Thanks for trying! I'm probably going to open a support ticket with Microsoft.

Re: StockAudioPlayer sometimes loses audio during an RDP ses

PostPosted: August 28th, 2012, 6:23 pm
by abh
No solution here, but sometimes it's nice knowing you're not the only one having a problem. :D

http://social.technet.microsoft.com/Forums/zh/winserverTS/thread/958fd891-6f55-432b-8268-a326ac6b2b2e

And this seems to prove that the StockAudioPlayer is not where the problem is.

Re: StockAudioPlayer sometimes loses audio during an RDP ses

PostPosted: August 29th, 2012, 1:14 pm
by Kambiz
Thanks for the update.
This is a relief! :)