PDA

View Full Version : Output Plugin Development Problems


voodoopriestess
4th April 2002, 15:53
I'm halfway through development of a plugin that will encode the data coming out of WinAMP as a Dolby Digital AC-3 stream. I'm having a few problems with the WinAMP side of things...

1. GetOutputTime() and GetWrittenTime() -> are these meant to return the time from the start of the current song i.e. we are currently playing second 126 or timecode 00:02:06?

2. Write() is never called by WinAMP. Is this a problem from my understanding of how the GetxxxTime() functions work? From what I understand from the MiniSDK WinAMP issues an open command when a user hits the play button. WinAMP then checks the Setxxx(), CanWrite(), GetxxxTime() etc... Now my CanWrite () always returns 256 PCM samples space (calculated in bytes) as I want WinAMP to server the data as fast a possible. The real-time encoding of the buffer is _VERY_ CPU intensive.

Is all this mess caused by me not understand how the output SDK works? Incidently, the MiniSDK is very poor - a single disk writer example with no timing code or anything. Is there a bigger version of the output SDK or is that it?

BTW: Is a plugin that outputs Dolby Digital AC-3 5.1 via a SP/DIF is a good idea. Please tell me!

Iain

peter
10th April 2002, 01:00
out_wave source - the best sample code you can get (http://www.blorp.com/~peter/zips/out_wave.zip). if write() is never called, your canwrite() is probably broken (typical problem, if you diskwrite, just return a constant big number). getwrittentime() and getoutputtime() are intended for vis sync: getwrittentime()-getoutputtime()==your_current_latency; if you diskwrite, just return amount of written milliseconds in both of them. there's no special timing stuff in diskwriter sample just because diskwriters don't need any more timing code.