StockAudioPlayer sometimes loses audio during an RDP session

Please post bug reports, feature requests, or any question regarding the DELPHI AREA projects here.

StockAudioPlayer sometimes loses audio during an RDP session

Postby abh » August 24th, 2012, 10:53 pm

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?
abh
Active Member
Active Member
 
Posts: 12
Joined: August 24th, 2012, 10:49 pm

Re: StockAudioPlayer sometimes loses audio during an RDP ses

Postby Kambiz » August 26th, 2012, 9:23 am

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.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Re: StockAudioPlayer sometimes loses audio during an RDP ses

Postby abh » August 27th, 2012, 8:17 pm

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.
abh
Active Member
Active Member
 
Posts: 12
Joined: August 24th, 2012, 10:49 pm

Re: StockAudioPlayer sometimes loses audio during an RDP ses

Postby Kambiz » August 28th, 2012, 10:48 am

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.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Re: StockAudioPlayer sometimes loses audio during an RDP ses

Postby abh » August 28th, 2012, 11:44 am

Thanks for trying! I'm probably going to open a support ticket with Microsoft.
abh
Active Member
Active Member
 
Posts: 12
Joined: August 24th, 2012, 10:49 pm

Re: StockAudioPlayer sometimes loses audio during an RDP ses

Postby abh » August 28th, 2012, 6:23 pm

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.
abh
Active Member
Active Member
 
Posts: 12
Joined: August 24th, 2012, 10:49 pm

Re: StockAudioPlayer sometimes loses audio during an RDP ses

Postby Kambiz » August 29th, 2012, 1:14 pm

Thanks for the update.
This is a relief! :)
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm


Return to DELPHI AREA Projects

Who is online

Users browsing this forum: No registered users and 2 guests

cron