INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: "Wave Out" vs. "Direct Sound"  (Read 45926 times)

lalittle

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3964
"Wave Out" vs. "Direct Sound"
« on: April 13, 2004, 06:45:26 am »

I'm curious to hear opinions on the "Wave Out" vs the "Direct Sound" settings for playback.  I seem to get slightly different results on different systems even with the same sound card and drivers (Audigy 2) so I'm wondering what the general advantages and disadvantages are for using one over the other.  On my slower system, it seems like Direct Sound gets fewer glitches (short pauses), but I'd like to know what others have to say on this, and if there are any specific differences in sound quality between the two settings.

I also find it odd that even with a 1 second buffer, I still get some pauses on a dual 1Gig P3 system.  Is this normal?  Between Wave Out and Direct Sound, which one is less CPU intensive?

Thanks,

Larry
Logged

xen-uno

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 2489
  • Checking your hard disk for errors...
Re:"Wave Out" vs. "Direct Sound"
« Reply #1 on: April 13, 2004, 08:23:51 am »

http://home.revealed.net/xen/WOvsDS.txt

...Save to disk and Notepad it (wordwrap on)

lalittle

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3964
Re:"Wave Out" vs. "Direct Sound"
« Reply #2 on: April 13, 2004, 04:52:19 pm »

Thanks -- that is a really helpful document.  There is too much useful information to paste it all here, but I though I'd quote the most relavent part to the original post just in case that document ever goes offline:

---------------------------------------------------------------
"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, available as redistributable for all versions of 32bit Windows OS's (though nt4 directsound is terribly 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)."
-----------------------------------------------------------------

It's important to note that MC still defaults to Wave Out even though this clearly says you should use Direct Sound with XP.

Thanks again for the link,

Larry
Logged

Omni

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 827
Re:"Wave Out" vs. "Direct Sound"
« Reply #3 on: April 13, 2004, 05:33:54 pm »

Only one word of warning:  There seems a bug in DirectX in regard to long, continuous, uninterrupted playback.  (I'm talking like 4-5 hours.)

For Waveout and ASIO, I can play a playlist (in repeat mode) for 24 hours straight without a problem, but with DirectX, the output will halt and begin stuttering after 4 to 5 hours.  This has been the case for all versions of DirectX v.8 or above, and I have tested this on two separate soundcards.  :(  (Actually, four separate soundcards, but three of them were Creative's, so I'll group them altogether as one. :))
Logged

xen-uno

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 2489
  • Checking your hard disk for errors...
Re:"Wave Out" vs. "Direct Sound"
« Reply #4 on: April 13, 2004, 06:03:14 pm »

Omni,

That explains why the long version of In A Godda Da Vida (Iron Butterfly) starts having trouble in about the same time frame that you mentioned...guess I'll have to get the radio version (or be content with the Simpsons version...which is very good).

10-27

lalittle

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3964
Re:"Wave Out" vs. "Direct Sound"
« Reply #5 on: April 13, 2004, 06:15:02 pm »

Only one word of warning:  There seems a bug in DirectX in regard to long, continuous, uninterrupted playback.  (I'm talking like 4-5 hours.)

Is this an issue that others have noticed as well?  Has this been reported to the MC people?  I guess I'll have to set up a 5 hour playlist and see what happens.

Larry
Logged

Omni

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 827
Re:"Wave Out" vs. "Direct Sound"
« Reply #6 on: April 13, 2004, 06:24:03 pm »

It doesn't have to be a five hour playlist.   ;)   Just playback a single song in repeat mode overnight (while you sleep).  When you wake up in the morning (assuming you got your eight hours of beauty sleep ;)), see if it is still playing.

Again, this would only fail for DirectX.  I tried it with two different sound drivers (i.e., soundcards), and on three different machines.  (Yes, I spent many, many hours trying to track this down.)

Anyway, even with my diverse test equipment, there is still always the possiblity it is related to my specific setup. <shrug>
Logged

Omni

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 827
Re:"Wave Out" vs. "Direct Sound"
« Reply #7 on: April 13, 2004, 06:26:49 pm »

Oh, and to perfectly duplicate my test, play only APE files (not mp3's, etc.)  and turn off all DSP Studio plug-ins.  (I don't recall what gap and fade effects I had going--I don't change those settings, so I imagine it was just whatever MC's default values were.)
Logged

lalittle

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3964
Re:"Wave Out" vs. "Direct Sound"
« Reply #8 on: April 13, 2004, 06:48:39 pm »

I don't have any APE files (I use all mp3 -- and aa -- since I need to use the files with an iPod) but I'll let you know what happens with the test on mp3s.

Larry
Logged

Richard Berg

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 50
  • .sigs are lame
Re:"Wave Out" vs. "Direct Sound"
« Reply #9 on: April 14, 2004, 02:46:44 am »

What operating system and soundcard?  A 24/96 card will reach 2^31 samples in 6 hours.  I've never had DirectSound fail on that number as I've never programmed with it, but exceeding that many samples through the old AVIFile interface sometimes caused problems.
Logged

lalittle

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3964
Re:"Wave Out" vs. "Direct Sound"
« Reply #10 on: April 14, 2004, 03:19:49 am »

I just tried a test and Omni was right -- somewhere between 3 and 6.5 hours it simply froze in the middle of a track.  Hitting pause and then play again would play a little tiny piece of audio, but then it would stop again.  When I actually hit "stop" and then play, it started up playing normally once again.  I'll probably try the test again just to see if I get the same results, and then I'll try it with Wave Out to compare.

This was with the latest build of MC using "Direct Sound," WindowsXP Pro, and an Audigy2 with latest drivers playing a group of mp3s on repeat.

Larry
Logged

GHammer

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1930
  • Stereotypes are a real timesaver!
Re:"Wave Out" vs. "Direct Sound"
« Reply #11 on: April 14, 2004, 04:39:16 am »

I just tried a test and Omni was right -- somewhere between 3 and 6.5 hours it simply froze in the middle of a track.  Hitting pause and then play again would play a little tiny piece of audio, but then it would stop again.  When I actually hit "stop" and then play, it started up playing normally once again.  I'll probably try the test again just to see if I get the same results, and then I'll try it with Wave Out to compare.

This was with the latest build of MC using "Direct Sound," WindowsXP Pro, and an Audigy2 with latest drivers.

Larry

Hmmmm, something is odd with this then. I normally leave MC running for hours minimized to the system tray. I have an Audigy 2 also, but I use the KX drivers instead of the Creative ones. That is the only difference I see in out setup and I do not get the audio freeze you get.

Maybe you could try with the KX drivers and see if it still happens.
Logged

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re:"Wave Out" vs. "Direct Sound"
« Reply #12 on: April 14, 2004, 05:48:25 am »

My tests on my machine (w2K, 700Mhz Celery) would indicate the opposite is true. With Direct sound i see the CPU pegged at 80% and MC is sluggish, with Wave out however CPU usuage hovers around 30% and MC is more responsive.

Using MC 10.0.90.
Logged

lalittle

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3964
Re:"Wave Out" vs. "Direct Sound"
« Reply #13 on: April 14, 2004, 06:40:57 am »

Quote
With Direct sound i see the CPU pegged at 80% and MC is sluggish, with Wave out however CPU usuage hovers around 30% and MC is more responsive.

Those numbers sound way too high.  On a Dual P3 1 Gig I'm getting 0% to 4% with Direct Sound, and 0% to 6% with Wave Out.  This system is faster than yours, but that shouldn't make so much difference.  Take a look at the Task Manager and look for another app that's taking all that CPU time.  80% is way too much just to play an mp3.

Larry
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 71340
  • Where did I put my teeth?
Re:"Wave Out" vs. "Direct Sound"
« Reply #14 on: April 14, 2004, 07:01:21 am »

My tests on my machine (w2K, 700Mhz Celery) would indicate the opposite is true. With Direct sound i see the CPU pegged at 80% and MC is sluggish, with Wave out however CPU usuage hovers around 30% and MC is more responsive.

Using MC 10.0.90.

Update MC.  It's old.  

Are you using any third party plug-ins?
Logged

Uwe

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 321
Re:"Wave Out" vs. "Direct Sound"
« Reply #15 on: April 14, 2004, 08:55:05 am »


Using MC 10.0.90.

Update MC.  It's old.  

old = 4 weeks

Jim, what's your age ?  ;)

Uwe
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 71340
  • Where did I put my teeth?
Re:"Wave Out" vs. "Direct Sound"
« Reply #16 on: April 14, 2004, 09:12:11 am »

137
Logged

Uwe

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 321
Re:"Wave Out" vs. "Direct Sound"
« Reply #17 on: April 14, 2004, 10:02:59 am »

 :o ... ;D
Logged

JustinChase

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3273
  • Getting older every day
Re:"Wave Out" vs. "Direct Sound"
« Reply #18 on: April 14, 2004, 10:49:36 am »

137

Jim lives in Dog years, just last month he was only 135.

Happy birthdays Jim 8)
Logged
pretend this is something funny

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re:"Wave Out" vs. "Direct Sound"
« Reply #19 on: April 14, 2004, 02:12:50 pm »

Quote
With Direct sound i see the CPU pegged at 80% and MC is sluggish, with Wave out however CPU usuage hovers around 30% and MC is more responsive.

Those numbers sound way too high.  On a Dual P3 1 Gig I'm getting 0% to 4% with Direct Sound, and 0% to 6% with Wave Out.  This system is faster than yours, but that shouldn't make so much difference.  Take a look at the Task Manager and look for another app that's taking all that CPU time.  80% is way too much just to play an mp3.

Larry

Exactly why i use Wave out instead of Direct Sound.

When you look in Task Manager how much memory do you see MC taking up ?

Only plugin i'm running is the DirectxHost and the Freq stimulator. I have the MCXMLexport & King's dupe finder plugin installed but those dont run during normal play.

Logged

lalittle

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3964
Re:"Wave Out" vs. "Direct Sound"
« Reply #20 on: April 14, 2004, 04:09:06 pm »

Quote
Exactly why i use Wave out instead of Direct Sound.

The point is that if it's taking 80% of the CPU, something is wrong.

Larry
Logged

xen-uno

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 2489
  • Checking your hard disk for errors...
Re:"Wave Out" vs. "Direct Sound"
« Reply #21 on: April 14, 2004, 04:53:36 pm »

Agreed...

I don't see any real difference in CPU usage between DS and WO on a 700 MHz PIII running W2k with a Turtle Beach soundcard.

MC closed or min'd => 2-3%
MC open/visible/idle => 10% (it issues wm_paint messages to the system constantly...even if it's not doing anything)
MC (visible) playing ogg/flac/mp3...no viz's => 15-20%

10-27

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re:"Wave Out" vs. "Direct Sound"
« Reply #22 on: April 15, 2004, 06:34:49 am »

Quote
MC closed or min'd => 2-3%
MC open/visible/idle => 10% (it issues wm_paint messages to the system constantly...even if it's not doing anything)

I have the same as you here.


Quote
MC (visible) playing ogg/flac/mp3...no viz's => 15-20%

mine tends to be 20-40%, reaching 50% sometimes

using only cover-art, no viz's

Quote
The point is that if it's taking 80% of the CPU, something is wrong.

Seems so... can't figure out why direct sound is such a hog on my machine.

Given the age of the machine, i think im using the latest dirvers for the soundcard. DirectX seems to be current, unless there were any bigfixes since.

i have yet to replace the slower memory on it, though so that may be it.
Logged
Pages: [1]   Go Up