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: Winamp Crossfading DirectSound Output Gapless Mode (Read 12409 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Winamp Crossfading DirectSound Output Gapless Mode

Reply #25
Quote
I challenge you or anyone else to post a vorbis file that out performs mpc at bitrates higher then 128kB/s.

Interesting! I remembered when doing some experiments a while ago that MPC < q5 had problems on a trumpet sample. (I think that's the one... Maybe that's one candidate for your challenge? I'm at work right now so I can't try for myself first but I will tonight when I'm home. (I really should bring headphones here...  )

Winamp Crossfading DirectSound Output Gapless Mode

Reply #26
Quote
Musepack below q5 is a bit too tough with the lowpassing IMO. This you can see easily from computer generated graphs. If you manually set the lowpass a bit higher and compensate with a little higher pns to reach the same bitrate it will not only look better in the frequency analysis but also sound better in most cases.

Why mess with the pns? You're going to degrade the transparency, and perhaps cause some transparent samples to become non-transparent. If you desire less lowpass, go for q6. It's better tested than some command-line hodge-podge and does not mess with the psymodel so you can be confident it will be as close to transparent as MPC gets.

Can you ABX the lowpass MPC uses? The context implies that you want less lowpass because it looks better under frequency analysis. But if that's the only reason, it's not a very valid one unless you're Roel.

Winamp Crossfading DirectSound Output Gapless Mode

Reply #27
This topic seems like turning into another codec fight 

Back to the subject, crossfading in winamp

1) Biont is right when he says the DirectSound plugin included in the latest versions of winamp works differently as in the previous versions. I remember using winamp 2.78, and i only had to check a "skip gap" box to have perfect gapless listening (and yes i did so with mp3: for skepticals, mp3 can be gapless, that's no mpc's creation).  This box has disapparead in the latest versions of DirectSound. And when you use the DirectSound plugin as now provided, you'll hear gaps between tracks, even with mpc files. That's very annoying for those who think winamp is still the best audio player at the time being.

2) But AstralStorm is right too when he says they's now a third slider in Crossfader that's here to do the job of the old 'skip gaps' box. What he didn't say is that you'll still hear gaps if you enable fading at the beginning of tracks or at winamp's first start. May sound obvious but why not mention it?

3) The 'Remove silence at beginning of track' feature has absolutely nothing to do with Biont's question.  On this point he's right too. So don't look down on him so eagerly (the 'use your brains' thing...  ).

Winamp Crossfading DirectSound Output Gapless Mode

Reply #28
@AstralStorm
This are some issues I found by SEARCHING the forum, last time I do this for other persons.

Which -q for archiving

guruboolez - ogg vorbis 1.0 & GT3b1 problem samples

New in Ogg

Vorbis absolute killer, ...at low bitrate in VBR mode

Bad sample for Vorbis?, Something *I* can tell the difference on

Testing AAC for my own portable use, comparisons with other codecs @ 128

Try brahms sample for GT3 b1.

Keep in mind, --alt-preset standard (3.90.3) = ABR 192KBPS

Winamp Crossfading DirectSound Output Gapless Mode

Reply #29
Quote
Why mess with the pns? You're going to degrade the transparency, and perhaps cause some transparent samples to become non-transparent. If you desire less lowpass, go for q6. It's better tested than some command-line hodge-podge and does not mess with the psymodel so you can be confident it will be as close to transparent as MPC gets.

Can you ABX the lowpass MPC uses? The context implies that you want less lowpass because it looks better under frequency analysis. But if that's the only reason, it's not a very valid one unless you're Roel.

I messed with the pns to see if I could achieve better quality at low bitrates. There is no progress without experimentation you know  On most samples it provided a mean to raise the lowpass threshold without increasing the bitrate. And yes a lowpass of 15 kHz as used by q4 is quite easily detected. I don't even have the programs to do spectrum analysis, so it is to please the ear and not the eye I wanted the higher lowpass filter. On q < 5 I think there is a too steep jump from 20 kHz at q5 down to 15 kHz at q4. Why don't you try it yourself? Maybe you will be surprised by the results...

A small warning though. On a few cases (like for instance that trumpet sample) pns exploded and gave quite ugly artifacts. And I guess that's why the presets are not changed any more in that direction...

(Hmm.. This should really be split off to another thread, but I don't have the energy to do that right now. Too early in the morning...)

 

Winamp Crossfading DirectSound Output Gapless Mode

Reply #30
Quote
and beware of stating: vorbis -q6 is better than lame --aps, because --aps is considered to be transparent for many audiophile people in these forums. noone can outperform transparency, not even vorbis. There isn't any "more transparent".

EDIT: grammar

Sorry, but APS fails at few samples...  check ha.org sample database.
APE shouldn't be any better, but there are always exceptions.

Reread the end of the thread, I've posted my ABX test results.

It isn't transparent with the music I have tried
(electronic, problems with resonance similar to fatboy sample).
But mine is a rare sample which gets transparent with APE.
It is music from the game Fire Fight, track 1, CD Audio.
/EDIT\ It contains lots of sawtooth waves, some background and syntethic percussion. (my ears tell me that)
There are probably many samples like this. \EDIT/

More transparent? I didn't write anything like that!

As to the MusePack, it really isn't designed for low bitrates.
(but that doesn't need to make it worse than MP3 or Vorbis at them, of course)
/EDIT\ A proper listening test would be required. \EDIT/
ruxvilti'a

Winamp Crossfading DirectSound Output Gapless Mode

Reply #31
Quote
Why don't you try it yourself? Maybe you will be surprised by the results...

A small warning though. On a few cases (like for instance that trumpet sample) pns exploded and gave quite ugly artifacts. And I guess that's why the presets are not changed any more in that direction...

Bah. I interpreted "below" in the comment I responded to first as "setting <= q5". Don't know why. Probably because it's late here. Sorry for any unnecessary heat that may have radiated from my comment.

I know for certain, though, that I'd decrease bandwidth for a decrease in artifacting any day of the week. And I like nice reliable codecs that don't require tweaking for special-cases and the like. To me, that seems to be one of Musepack's aims. FWIW, I remember in my toying with q4 is that it sounds transparent given the bandpass it allows.

Winamp Crossfading DirectSound Output Gapless Mode

Reply #32
Quote
Bah. I interpreted "below" in the comment I responded to first as "setting <= q5". Don't know why. Probably because it's late here. Sorry for any unnecessary heat that may have radiated from my comment.

I know for certain, though, that I'd decrease bandwidth for a decrease in artifacting any day of the week. And I like nice reliable codecs that don't require tweaking for special-cases and the like. To me, that seems to be one of Musepack's aims. FWIW, I remember in my toying with q4 is that it sounds transparent given the bandpass it allows.

Don't worry - I assumed there was some sort of misunderstanding when you recommended me to use q6 instead - q4 and q6 play in very different ballparks.

It's just a matter of personal preferences. I prefer to have full bandwidth (up to what I can hear ~17 kHz) and an occasional hickup over a more narrow passband.

Winamp Crossfading DirectSound Output Gapless Mode

Reply #33
It would be nice if mp3splice was a DSP/Effect plugin instead of an Output plugin.  This way, we could still choose DirectSound or WaveOut, along with the SSRC versions.  Mp3splice limits you to itself in output quality, and also has been iffy before for me with off the norm audio formats.  I still use mp3splice of course, but it would be nice to see some more modularity added to it.
WARNING:  Changing of advanced parameters might degrade sound quality.  Modify them only if you are expirienced in audio compression!

Winamp Crossfading DirectSound Output Gapless Mode

Reply #34
Quote
You should put values as on your current DirectSound output and it should be OK (at least 200ms for waveOut and 333ms for DirectSound work for me - default values).

The default buffer length for gapless playback is 200 ms in WaveOut. The default for gapless playback in DirectSound is 0 ms (That is, off). And I'm also using Winamp 2.91.
I think you were referring to the default crossfade values for the DirectSound output plugin when you mentioned 333 ms.

Careful. Read the in-built DS plugin notes carefully, as some crossfading modes disable gapless playback. In any case, this version of DS (2.2.6) should be better than the one (1.37) on your website, as Peter has done a lot for it before he moved on to Foobar2000.

Winamp Crossfading DirectSound Output Gapless Mode

Reply #35
@panzemeyer: gapless output is possible with latest output plugins. period.
and I told him to check "remove Silence" too, because then he can't confuse the silence at the beginning with a gap.

[sarcasm]
/me can't ABX a gap vs silence at the beginning/end
[/Sarcasm]

Edit: and panzemeyer, mp3 is NOT gapless due to limitations in the frame design. only softwareplayers like winamp can trick it to sound gapless by buffering the music (I don't know if hardware players can do so as well).

for all those panzemeyers and bionts who can't cope with peter's output plugins, here are peter's FAQ from winamp.com:

Quote
Q: What does setting <...> do ?
A: Rule #1: if built-in help doesn't seem clear enough, you shouldn't touch those settings you don't understand, you will probably only break things if you change them.

Q: What's the difference between DirectSound and waveOut ?
A: Short version: you should use waveOut on win95/98/me/nt4 and DirectSound on win2k/xp/<insert name of future windows OS here>.
Long version:
waveOut is old, outdated API (Application Programming Interface) for playing digital sounds in 32bit Windows OS's. Old OS's (all win9x and nt4) have good waveOut implementation; you should use waveOut output on those for best performance. waveOut features are limited; it doesn't even natively support mixing multiple streams. It appears that waveOut is provided in win2k/xp only for compatibility with old software - win2k/xp waveOut implementation is rather bad, it doesn't use any kind of hardware acceleration; all mixing is performed by software (may interrupt sound when CPU usage is high).
DirectSound is the new "modern" sound playback API, built into all recent versions of 32bit Windows OS's, available as redistributable for older ones (though nt4 directsound is badly broken from my experience). DirectSound natively supports mixing multiple streams, independent volume control, hardware acceleration layer & hardware emulation layer (features which aren't supported by hardware are emulated by software, so the programmer doesn't have to worry if his new l33t code will work right on old sb16). DirectSound should be generally fine to use everywhere except for nt4, as long as you have latest DirectX version for your OS and proper soundcard drivers installed. DirectSound is preferred over waveOut on win2k/xp, because their DirectSound implementation is relatively good (eats less CPU than waveOut and is free of win2k/xp waveOut implementation glitches). DirectSound was originally designed to let games utilize hardware acceleration available on your system without having to touch low-level hardware functions directly (like any other component of DirectX).

Q: What do all those device info numbers mean ?
A: Quick explaination:
"Certified" - shows if the driver is certified by Microsoft or not (doesn't imply that the driver is bug-free, it just means that MS people have been testing the code you are running)
"Emulated" - if you don't have proper DirectSound drivers installed for your soundcard, your device will show as "emulated" and DirectSound functionality will be emulated using waveOut functions (happens only with old OS's). If your device shows as "emulated", you should use waveOut output instead for better performance.
"Supports sample rates from %A Hz to %B Hz" - what range of sample rates can be mixed by hardware (sample rates outside this range will be resampled by software to specs accepted by hardware). This DOES NOT indicate output specs of your soundcard. Note that DirectSound itself supports up to 100000Hz, you can't use higher sample rates with DirectSound no matter what you do.
"Supports continuous sample rates" - all sample rates between min and max (see above) are supported.
"Hardware memory" - onboard memory of the device, usually not available for PCI soundcards (they use system memory instead).
"Hardware mixing" - shows how many simultaneous sound streams can be mixed by hardware. Note that they don't limit total amount of simultaneously played sounds because newly created streams are mixed in software when there are no hardware resources available.
"Speaker setup" - your speaker setup according to what you have set in windows control panel.

Q: How do i get rid of gaps between tracks ?
A: Increase "buffer-ahead on track change" value in config.

Q: Are there any differences in audio quality between DirectSound and waveOut ?
A1: In win2k/xp (WDM), waveOut and DirectSound are just 2 different pathes of passing PCM data to windows kernel mixer. WaveOut uses software mixing only, which makes it less prone to system-specific probmlems (see below), while DirectSound can use hardware mixing if available, which is known to cause sound qualtiy issues with certain configs (since out_ds v2.2.4 hardware mixing is disabled by default so this is not a problem with out_ds).
A2. In win9x OS line, DirectSound driver system is completely separated from waveOut, and does low-level hw access on its own, so it's like you are using two different drivers for waveOut and for DirectSound. There are known "problems" with DirectSound downsampling to 22khz 8bit (or something similar) to save ISA bandwidth on old cards, you can workaround that by enabling "create primary buffer" option (which is enabled by default on win9x).

Q: What's the difference between software and hardware mixing ?
A: As for DirectX 8.1 and Windows XP SP1, hardware mixing is highly buggy in both Microsoft's DirectSound core and per-driver implementations. There are confirmed "problem samples" where using hardware mixing in Windows XP causes pops at the beginning of stream, tested on different soudncards. Particular drivers have far worse problems (famous "Audigy skipping", static noise with some Audigy configs, crippled sound quality with certain other setups, God knows what else). For stable operation, it is strongly recommended that you leave hardware acceleration disabled; it's disabled by default starting from v2.2.4.
Hardware mixing can be toggled by changing "allow hardware acceleration" on device tab. Enabling that option doesn't mean that you are actually using it (DirectSound will fallback to software mixing when out of resources); see status display for exact info about currently used mixing type.

Q: What do all those weird numbers in status display mean ?
A: Here's a quick explaination of some of them:
"amount of data buffered" - shows how long we can play after decoding gets nuked by high cpu usage / slow file access, how long fadeout we can perform, or how much silence at the end of track we can remove at given point.
"buffer locks done" - how many times we've been modifying contents of the buffer.
"underruns" - how many times the playback got stopped because there was not enough data to play (also affected by "skipping" syndrome, see above). Note that with out_ds v2.2.0+ you might get holes in sound without triggering an underrun (new way of handling underruns).

Q: Why there's no thread priority setting in out_ds config ?
A: Thread priority is hardcoded to max. AFAIK it doesn't cause any problems, changing it would only degrade performance when running other CPU-intensive stuff. Nothing to configure here. If you think you are having problems with thread priority, change settings in your input plugins instead. Might also help to change Winamp process priority class, but that setting is kind of dangerous, don't touch it unless you really have to (may lead to OS instability).

Q: Is out_ds/cnv_pcmdsound sourcecode available ?
A: No, out_ds sourcecode belongs to AOL/Nullsoft, i can't give it away.

Q: But SSRC is LGPL...
A: SSRC library used by out_ds_ssrc is an exact copy (literally) of the one used by out_wave, which is opensource.

Q: How do I get status display to show in Winamp3 ?
A: This is somewhat tricky in current builds. Left click on "DirectSound" in preferences, then press right cursor key to make additional items show (also applies to some other components, eg. diskwriter).


2. Troubleshooting.

Q: I get really bad sound quality with my <insert ISA soundcard name here>.
A: Short explaination: device tab, "create primary buffer".
Long explaination: DirectSound tends to perform argessive downsampling to save ISA bandwidth when using old ISA soundcards. Enabling "Create primary buffer" will force sound format played by hardware to be the same as format of played stream. This affects only really old devices.

Q: I get only static noise with new audigy drivers...
A: Disable hardware acceleration (device tab).

Q: Why is DirectSound always quieter than waveOut ?
A: On win2k/xp, changing waveOut volume seems to change global wave volume setting, while DirectSound has independent volume control; in other words - you play with waveOut, set volume to 50%, you get 50%, then you switch to DirectSound, set volume to 50%, and get 25% of your max volume. Solution: don't use waveOut and set wave volume to max in windows volume control.

Q: I get weird hiss with DirectSound...
A: Uninstall TotalRecorder shit, it breaks a lot of things. (thanks to Thor for researching this one)

Q: What's the deal with "skipping" / "stuttering" / other playback glitches ?
A: Playback glitches divide into following types:
1. Pausing and/or repeating the buffer a few times - something else takes CPU from us (repeating) or file access is too slow (pausing). Try increasing buffer size. If other cpu-hogging programs are causing trouble, it might help to increase Winamp's process priority class in Winamp's preferences (WARNING: do this on your own risk, if Winamp freezes/crashes for some reason, it may freeze your entire OS).
2. "skipping" - $#!@ broken playback position reporting function (huge kudos to JSheridan for helping me to research this one). Affects audigy and possibly some others. Basically it's caused by the function which is supposed to retrieve current playback position randomly returning garbage instead, making output code think that the buffer has wrapped and writing data ahead. Disabling hardware acceleration fixes it.
3. "popping"/"crackling" - hardware conflict, something interrupts the data stream being sent to your audio device.
4. static noise, hiss - severe problems on driver side. It sometimes helps to disable hardware acceleration.

Q: But some earlier out_ds versions (2.0.x/2.1.x in particular) didn't skip on my audigy so there must a bug in 2.2.x...
A: Wrong. 2.0.x/2.1.x had hacks to avoid "audigy skipping", but these hacks were breaking a lot of other configs just to fix problems with audigy. Just don't enable hardware acceleration and you will be fine.

Q: Blah blah i still keep getting underruns whenever i use other resource-hogging software blergh....
A: Set buffer to 20 seconds. Enable "CPU usage control" on buffering tab to prevent insane Winamp's CPU usage when starting/seeking/etc. Increase buffer-ahead on track change to reduce underrun possibility when changing tracks.

Q: Is there a setting that mutes all system sounds when playing ?
A: No, it's simply not possible in win2k/xp and newer or on win9x if your soundcard is capable of mixing multiple streams.

Q: I keep getting error messages when trying to play any file...
A: Update soundcard drivers and DirectX.

Winamp Crossfading DirectSound Output Gapless Mode

Reply #36
@Biont:
I'm not sure if you are allowed to host any software.
out_ds.dll belongs to AOL/Nullsoft and you may host their software only if they agree. Not that you run into serious legal problems.

Winamp Crossfading DirectSound Output Gapless Mode

Reply #37
Quote
@panzemeyer: gapless output is possible with latest output plugins. period.
and I told him to check "remove Silence" too, because then he can't confuse the silence at the beginning with a gap.

[sarcasm]
/me can't ABX a gap vs silence at the beginning/end
[/Sarcasm]

Edit: and panzemeyer, mp3 is NOT gapless due to limitations in the frame design. only softwareplayers like winamp can trick it to sound gapless by buffering the music (I don't know if hardware players can do so as well).

for all those panzemeyers and bionts who can't cope with peter's output plugins, here are peter's FAQ from winamp.com:

Quote

.....
.....

Read my post again, i never said anything else . That mp3 can become gapless only through the player goes without saying: we're talking about a winamp output plugin aren't we? Does it make any difference when at the end of the day both mp3 or mpc can be listened to without any gaps? 

And thank you very much, my DirectSound plugin is well configured, as AstralStorm and then me described above. So i wonder what your copy-paste is for...