Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Updated in_mad Winamp MAD MP3 input plugin (Read 303839 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Updated in_mad Winamp MAD MP3 input plugin

Reply #150
oh goddamn..... russian letters are not seen in both id3v2 tag editor and media library, i see dots instead of letters

Updated in_mad Winamp MAD MP3 input plugin

Reply #151
The plugin has no international support at the moment, but it is on the to-do list. At the moment the EQ editor is taking a lot of work. I've also made some changes to the decoding loop in an attempt to improve buffering.

Updated in_mad Winamp MAD MP3 input plugin

Reply #152
I have finally uploaded a new update to the usual location!

The EQ on this update is now completely functional, with the 32 bit support, and EQU2 tag reading and writing. The EQ editor still needs a little more work, but I thought I'd put this up for those that are testing the plugin. At the moment, it writes one EQU2 tag with a maximum of 128 points to be applied to both channels. The ability to write a separate EQ for each channel is possible, I just need to finish it.

Probably the easiest way to apply a curve, is to link with the Winamp EQ (in configuration), create your setting, then save the active EQ data to some files, and when finished - remove the link with the Winamp EQ.

I've made some more minor changes, the most significant would be the buffer->decode loop no longer waiting around unnecessarily.

I'm going to make some more changes to the EQ editor, and as always your comments and suggestions are welcome.

Thanks 

Updated in_mad Winamp MAD MP3 input plugin

Reply #153
Well i download your new update, but it hangs my pc, winamp takes 99% of cpu in task manager. All older updates have worked well.

Updated in_mad Winamp MAD MP3 input plugin

Reply #154
hellgate, does it lock on loading Winamp, or on trying to play a file? In either case, try entering the registry and deleting "HKEY_CURRENT_USER\Software\Winamp\MAD Plug-in" to reset the plugins defaults, and also disable any DSP plugin you might use. What output plugin are you using as well?

Thanks in advance

I have just noticed that its causing things to take a long long time accessing files......

Updated in_mad Winamp MAD MP3 input plugin

Reply #155
OK, I've uploaded another update to the usual place.

I've added a sleep in, as the decode loop thread was hogging processor time.
@hellgate, does this update fix your problem?

Updated in_mad Winamp MAD MP3 input plugin

Reply #156
I have finally uploaded a new update to the usual location!

The EQ on this update is now completely functional, with the 32 bit support, and EQU2 tag reading and writing. The EQ editor still needs a little more work, but I thought I'd put this up for those that are testing the plugin. At the moment, it writes one EQU2 tag with a maximum of 128 points to be applied to both channels. The ability to write a separate EQ for each channel is possible, I just need to finish it.

Probably the easiest way to apply a curve, is to link with the Winamp EQ (in configuration), create your setting, then save the active EQ data to some files, and when finished - remove the link with the Winamp EQ.

I've made some more minor changes, the most significant would be the buffer->decode loop no longer waiting around unnecessarily.

I'm going to make some more changes to the EQ editor, and as always your comments and suggestions are welcome.

Thanks 

This is SO cool. I only see one possible problem with this in the future: When lowering mid-bands the overall gain will be lower than a calculated replaygain value. But if the thought was to make a more interative EQ, a slider for gain-tag could proberbly be implemented?

Edit: Well actually now I only need a preset function to remember used EQ's     

Another edit: Okay it's actually quite a hassle to edit EQ without ability to hear the real results (Or maybe i'm just not best friends with Winamp EQ!)
Can't wait for a HD-AAC encoder :P

Updated in_mad Winamp MAD MP3 input plugin

Reply #157
If you enable the Winamp EQ link, and turn the Winamp EQ on, then check the store active EQ box - as you edit the Winamp EQ you should be able to hear the changes (after a buffer time lag) and these will be stored to the file when you save. You have to remember to change/disable the Winamp EQ after otherwise it'll apply them twice (the file EQ, then the Winamp EQ).

Was thinking of making the EQ display larger and/or easier to use - so can click to create a point for adding to the EQ, along with a Preview option.

Updated in_mad Winamp MAD MP3 input plugin

Reply #158
If you enable the Winamp EQ link, and turn the Winamp EQ on, then check the store active EQ box - as you edit the Winamp EQ you should be able to hear the changes (after a buffer time lag) and these will be stored to the file when you save. You have to remember to change/disable the Winamp EQ after otherwise it'll apply them twice (the file EQ, then the Winamp EQ).

Was thinking of making the EQ display larger and/or easier to use - so can click to create a point for adding to the EQ, along with a Preview option.


In your Init() function, set mod->UsesOutputPlug |= 2  to disable Winamp's EQ  (or any time, just be aware that winamp clears all but the first bit when it forst gets your In_Module from winampGetInModule2)

Updated in_mad Winamp MAD MP3 input plugin

Reply #159
I've already included that, along with module.UsesOutputPlug |= 8 to disable the upcoming RG support I had read about on the Winamp forum. The double EQ is applied by in_mad as it takes both the file and the Winamp EQ specified settings.

@benski, Talking of this international support, how do I go about it with the Winamp DLL interfaces? I thought Unicode, but I think I read on the winamp forum that winampGetExtendedFileInfoW etc. was unsupported and not really to be used. Any pointers would be of great help!

Updated in_mad Winamp MAD MP3 input plugin

Reply #160
I've already included that, along with module.UsesOutputPlug |= 8 to disable the upcoming RG support I had read about on the Winamp forum. The double EQ is applied by in_mad as it takes both the file and the Winamp EQ specified settings.

@benski, Talking of this international support, how do I go about it with the Winamp DLL interfaces? I thought Unicode, but I think I read on the winamp forum that winampGetExtendedFileInfoW etc. was unsupported and not really to be used. Any pointers would be of great help!


You can implement winampGetExtendedFileInfoW in addition to the existing winampGetExtendedFileInfo.  It is supported from 5.22 onward, but is safe to declare even with old Winamp versions.

Declaration:
Code: [Select]
extern "C" __declspec(dllexport) int winampGetExtendedFileInfoW(const wchar_t *fn, const char *data, wchar_t *dest, int destlen); 
/* return 0 to indicate 'tag name not understood', 1 to indicate success (set dest[0]=0 to indicate empty tag) */


Implementing the rest of the unicode plugin stuff isn't absolutely necessary, Winamp does a decent job of giving you a "fake" filename if the real filename has foreign characters.  Especially since the majority of in_mad users are probably using older Winamp versions.

Updated in_mad Winamp MAD MP3 input plugin

Reply #161
Ah right, thanks! Your probably right about everyone using older Winamp versions. I'll get round to adding it eventually.    Cheers benski!

Updated in_mad Winamp MAD MP3 input plugin

Reply #162
 you broke it

New one is CPU hungry. 100% during playback. (maybe do to the quicker playback thing?)

Why is the 'buffer' tab present when a file isn't playing? Not present in previous version. (found out the hard way when clicking on it froze my whole system  )

I'll stick with the previous version till those problems are fixed.  Good luck
Vorbis-q0-lowpass99
lame3.93.1-q5-V9-k-nspsytune

Updated in_mad Winamp MAD MP3 input plugin

Reply #163
I'm very interested in these CPU hogging problems, though I'd have thought the previous Sleep would have solved it, with the difference that it decodes some audio data in between.

I've uploaded another update, with the Sleep moved to a better position. If this fails to work, it looks like its back to the old way or maybe include an 'experimental' option to allow data to be decoded while waiting for the output plugin to make space.

@gameplaya15143 and hellgate, what CPU type and speed are you running?

EDIT: I've also fixed the buffer tab problem, bit of a copy n paste error when I added the EQ tab! sorry about that!

Updated in_mad Winamp MAD MP3 input plugin

Reply #164
I've also fixed the buffer tab problem, bit of a copy n paste error when I added the EQ tab! sorry about that!
lol, it happens 

The cpu issue is gone 

Running a P4 2.4GHz by the way.
Vorbis-q0-lowpass99
lame3.93.1-q5-V9-k-nspsytune

Updated in_mad Winamp MAD MP3 input plugin

Reply #165
I think I've figured where the CPU hogging came from, the last update should be OK for all. Under certain circumstances, there would be no situation where the output buffer was full, and the output plugin wasn't wanting data, causing it to forever decode and output, running the thread at full power.

I'm currently trying to add more functionality to the EQ editor.

Cheers for all help!

Updated in_mad Winamp MAD MP3 input plugin

Reply #166
Thank You, best "customer service" in world . Ur new update works

Updated in_mad Winamp MAD MP3 input plugin

Reply #167
I've uploaded a new update.

This now allows both left and right EQ to be defined and saved to a file. I've included a preview mode, so you can hear changes as they are made. You can also now add a point by double clicking the EQ window. Basic tooltips can also be found in the configuration dialog box.

I'm getting about ready to ask people to make some langauge translations.

Keep your comments and bug finding coming, and as always thanks for everyones help. 

Updated in_mad Winamp MAD MP3 input plugin

Reply #168
I doubt this has changed in the latest update...

Replay gain problem:
Lame encoded mp3s that don't store RG data should use the preamp for files with no RG.  It is not doing that.  Instead it pretends that the RG is 0dB.  This happens with older versions of lame (which don't calculate track gain) and with newer ones as well when RG calculation is disabled.

Lame tag problem:
Doesn't seem to read the lame tag for 24khz samplerates and below (at least I can't view the tag info).  Shows xing tag as being present (which is correct as it is there), but does not report the lame tag.

There was something else too.. but I can't seem to remember it 
Oh.. just remembered.

VBR seeking:
It's not accurate  in_mpg123 is.  It's not a big deal, just a bit of an annoyance 

About the advanced tagger... I was kind of hoping for a button right on the ID3v2 and ape tag tabs to 'go to advanced mode'.  It's a little bit of a pain to switch between the two as it is.  Problem is, there doesn't seem to be enough room for a 'go advanced' button on either tab.  Something to think about.
Vorbis-q0-lowpass99
lame3.93.1-q5-V9-k-nspsytune

Updated in_mad Winamp MAD MP3 input plugin

Reply #169
MoSPDude, good work with the plugin. It is very informative and seems to work well in general.

Yet, i would like to point out that the way you're doing buffering is probably not the best one.

I've got a 6M down/512Kbit up ADSL line, with relatively low ping times and was getting skips on some streams until i decided to change some settings, (i also have a low audio buffer ( 200ms ))

I changed the "Input" buffer to 24KB ( 16 was also good ), while leaving the Output at 128KB ( I used to have 96KB with in_mp3 anyway ), and that solved the problem.

Yet, with this setup, i still wasn't getting the results i was expecting... the network activity still showed chunks of data being downloaded non-constantly ( say.. 30KB/s during two seconds, then 0KB next second, or a peak of 60Kb/s and then two seconds of 0KB/s).

So what are you doing for buffering? I would say a good way to do so would be

1) keep connection open (i assume you do so, but just in case)
2) download in chunks of "Input buffer" size until you've filled the output buffer.
3) when the output buffer has played at least a size as big as "input buffer", try to fill the input buffer again, and keep until output buffer is full again.

Good defaults for these would depend on stream line, of course, but Input buffer has to be clearly smaller than the output buffer.

You might want to check the network usage with the in_mp3 plugin. you'll see that the download rate keeps much around the stream bitrate, while with in_mad, it's always peaks and valleys.  (check with the task manager)

Also, not sure if it will keep happening, but right now, playing this link hangs in_mad  (no CPU usage, just hung): http://www.m1live.com/listen/musicone_hi.pls

Updated in_mad Winamp MAD MP3 input plugin

Reply #170
@[JAZ], OK, I've just tried http://www.m1live.com/listen/musicone_hi.pls and in_mp3 can't connect to it either. At the moment in_mad is missing connection timeouts etc and this is why it hangs.

The buffering does need to be re-written - its been inherited from the MAD 0.14.1b plug-in. Its all included in the decoding thread loop. Basically, it does what you suggest anyway, but where and when the decoding occurs is an issue. Basically, 3 main things need to happen and they can't be done simultaneously, that is fill input buffer, decode, and maintain a full output buffer. The current decode loop goes basically like this,
1. Enter input section.
2. If file, read in to fill input buffer. If stream, read in 'metaint' bytes, process shoutcast metadata if needed, output some audio, loop to fill input buffer.
3. Enter decoding section.
4. Check if able to decode a single frame, if not enough data in input buffer goto step 1 or other problem then handle it or abort.
5. Decode a single frame.
6. Output audio data if output buffer full, until one frame has been sent or output plugin signals its full.
7. If not told to stop, loop to 4

One of the previous major problems with streaming was that when it was trying to get data from the stream, as no audio data was being sent, the output plugin would buffer underrun. This was helped by placing audio output with the data reading, though the main reason for a larger output buffer initially was gapless output (on detect of EOF, it hacks off the end of the buffer accordingly for gapless).

The reason for it downloading a chunk suddenly, then none for a while, is the process of input section downloading to fill input buffer, then the decoding and output section afterwards decoding it.

I could try to make it download continuously to re-fill the input buffer on every loop, but for file usage when I made it decode and output continuously, some people reported 99-100% CPU usage as was non-stop decoding and outputing a single audio frame. Streaming, decoding and outputing continuously might do the same thing.

I'll get round to having a proper look at it eventually.

@gameplaya15143, The LAME tag RG problem is partially to do with lame, it always marks the file as having that information - even though it hasn't (well its set to 0dB). I can make it ignore it if its 0dB, but some files could really have RG set with 0dB. I'll have a look into the LAME tag less that 24kHz samplerate issue. VBR seeking needs to be implemented, it ignores the tables in the XING tag (and the VBRI tag too).

I've been thinking of making the dialog boxes bigger, then can have more room to do the EQ editor. 

Will hopefully get another update done soon addressing some of the above. 

Updated in_mad Winamp MAD MP3 input plugin

Reply #171
I've made that change I thought of while writing the above, and it seems ok on my system. Internet streaming is now continuous in small blocks. I'll upload it later, for people to test and see if it bring 99% CPU issues back.

Updated in_mad Winamp MAD MP3 input plugin

Reply #172
I've uploaded another update to the usual location.

This has continuous internet streaming, internet connection timeouts, it ignores LAME replaygain if set to 0dB, has XING VBR seeking using table implemented, and now shows LAME tag when used with MPEG-2 encoded files (24khz rate and less).

Thanks for all bug reports and suggestions. I'm going to resize the dialogs to allow for a "Basic to advanced button" at gameplaya15143 request, and add more touches to the EQ editor.

Updated in_mad Winamp MAD MP3 input plugin

Reply #173
I've uploaded another minor update.

This has the Basic <-> Advanced editor mode buttons, and now runs the id3v2 text fields through the Windows code page conversion to ANSI strings. I'm interested if this will allow more foreign characters to be displayed that the libid3tag straight conversion does (obviously depending on the users ANSI code page settings).

Updated in_mad Winamp MAD MP3 input plugin

Reply #174
i wonder, what's the problem is it : i see dots instead of names of SOME russian song(mp3) in winamp's ML and PL, but all of them are god with tag editor. also i see russian words in other songs in ML but i see abracadabras in id3v2 and normal names in id3v1,.... i may send you problem files, but you cant see russian symbols i think