Thread: Winamp Encoders
View Single Post
Old 3rd April 2013, 17:39   #3
thinktink
Forum King
 
thinktink's Avatar
 
Join Date: May 2009
Location: On the streets of Kings County, CA.
Posts: 3,030
Send a message via Skype™ to thinktink
Just now saw your reply.

Quote:
Originally Posted by Benski View Post
Don't get me started on the encoder API. It's a leftover from NSV development that got re-used. It's been haphazardly developed and in general, the "push data in, get data out" model leaves a lot to be desired. It was built for real-time encoding of streamable codecs like Layer 3 or ADTS AAC.
It's really not THAT bad since I have been able to develop a compliant and working encoder plugin (for Opus encoding.)

Quote:
Originally Posted by Benski View Post
The MP4/AAC encoder plugin just sends back dummy data, secretly writes to a temp file, and then swaps it over at the end (during FinishAudio). It's horribly inefficient (since winamp.exe is also writing to disk), but I don't think disk I/O is the bottleneck.
Heh, I never woulda' figured.

Quote:
Originally Posted by Benski View Post
The delete issue is a known issue. No guarantee that they were allocated from the same memory heap as winamp.exe I should just add a DeleteAudio and call it a day. Of course it'd only be compatible with newer versions of Winamp.
I like that actually and you can even still do the old delete behavior for encoders that don't export it.

Quote:
Originally Posted by Benski View Post
I've been contemplating a new interface to replace it, but have been so busy with the Android app and the Cloud project for that.
If it were me, I'd just interface it the same way the other plugins do it, a single exported function that returns a plugin struct that contains interface functions. But as I said before the current model is not THAT bad as I have been able to manage it, could just use a bit of tweaking.
thinktink is offline   Reply With Quote