|
|||||||
![]() |
|
|
Thread Tools |
|
|
|
|
|
DriverHeaven Lover
Join Date: Mar 2003
Location: Trondheim, Norway
Posts: 146
Rep Power: 0 ![]() |
Quote:
If you in Winamp 3 disable the "Enable DirectSound output" switch you are less likely to experience this bug during skips within a song because Winamp now does not re/aquire the interface to the soundcard. (But it may happen between songs etc...) Last: you don't need to close/open winamp to "fix" the bug, just click a lot of times on a song in the playlist or if you have enabled direct sound output, just click a lot of times on the search bar. |
|
|
|
|
|
#32 |
|
kX Project Lead Programmer and Coordinator
Join Date: Dec 2002
Posts: 3,106
Rep Power: 73 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
btw, does installing '3528' solve your problem?
and, anyway, what is your winamp version and how much time (minutes/hours?) does it take before the bug appears? /Eugene Last edited by Eugene Gavrilov; Apr 24, 2003 at 03:50 AM. |
|
|
|
|
#33 | |
|
DriverHeaven Newbie
Join Date: Mar 2003
Posts: 7
Rep Power: 0 ![]() |
Quote:
Winamp version is 3.0d build 488 - Feb 25th 2003 The bug seems fairly random (can't tell if the frequency of occurrence is related to the 16x thing). With DirectSound output enabled it will usually happen pretty quickly, within the first 10 tracks played or the first few seeks within a track. Again, it only happens when starting or seeking in a track. With DirectSound disabled it seems less frequent, but still occurs. With ASIO in Cubase SX it even less frequent, but still occurs. |
|
|
|
|
|
|
|
|
DriverHeaven Lover
Join Date: Mar 2003
Location: Trondheim, Norway
Posts: 146
Rep Power: 0 ![]() |
Quote:
My only point with my last post was to tell that I initially thought that time had something to do with the problem, but I am pretty sure that is not the case. Mainly because the error allways with no exception appears between sounds - that is if the software causes a release+reaquire of the sound interface between sounds. Sorry to have caused confusions! ![]() To the question on version 3528 I have used that version for a while and had the exact same problem. BUT: (As I have said earlier) Version 3518-19 or something had the same error in another kind of way. In the later versions this error is rather stable once it has appeared and same for the working periods. On the old versions it is kind of random if the error is pronounced or if there is sound. And once again: WinAmp really is not the clue. I only use Winamp as a tool to get rid of the bug temporarily. It is the fastest tool I have to stop/start a sound to enable the sound card to work again. Other apps I experience this error: (WinAmp) MediaPlayer Internet Explorer (flash etc..) All my games if I am unlucky Cubase SX with ASIO Trillian Chat client QuickTime (iow all apps that is installed on my computer and that can generate sounds...) |
|
|
|
|
|
|
|
DriverHeaven Lover
Join Date: Mar 2003
Location: Trondheim, Norway
Posts: 146
Rep Power: 0 ![]() |
I have now degraded to build 3514. The bug still appears often, but i need only one or two restarts of sound (music) to get rid of the bug. (Temporarily.)
Now the pattern is more like (b=beep, s=sound): sssbssbsbbssssss bssbsssssbssssss bssssssssbsssss sssssbbsssssbs ssbsssssssbssss ............... rather than: ssssssssssssssssb bbbbbbbbbbbbbb bbbbbbbbbbsssss ssssssssssssss sssssssbbbbbbb bbbbbbbbbbbbbbbbb bbbbbbbssssssss If you want, I can test all versions to see between which versions the change happened in case that can give a hint... |
|
|
|
|
#36 |
|
kX Project Lead Programmer and Coordinator
Join Date: Dec 2002
Posts: 3,106
Rep Power: 73 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
well, I was playing with winamp for more than two hours
(seek/start/stop/fw/rw/pause/...)I was unable to reproduce the bug... ![]() Winamp: 2.8 + CrossFading DirectX Output (fade=off) mp3: 44100/16bit/stereo wave volume = 50% (just to be sure this is not related to the volume setting )kx version: 3532b card: e-mu aps -=-=-=- btw, winamp 2.8 doesn't re-allocate the voices on seeking, but only on start/stop it seems that the bug is related to voice management so, it is necessary to understand when exactly does it happen and when exactly is it solved so, watch the analyzer window: any directx application should allocate 4 separate voices: two stereo are used for actual playback and two others are 'reserved' for winmm playback. when you start/stop directsound playback (but don't quit the application), only two of 4 voices are shifted... note the voices that cause 'beep'. start/stop playback the necessary number of time (16?) -- does the voice allocation return to the 'original' position?.. under certain circumstances directsound applications re-allocate all the 4 voices each start/stop - let me know if this happens so, pls, describe the problem in terms of the number of voices displayed in the analyzer window and their pattern as detailed as possible... use 3532b release ooops: almost forgot: what are the files you usually listen to? 16/8 bit? 48000/44100 Hz? /Eugene |
|
|
|
|
|
|
|
DriverHeaven Lover
Join Date: Mar 2003
Location: Trondheim, Norway
Posts: 146
Rep Power: 0 ![]() |
Quote:
Same in winamp 3 as long as you disable direct sound. If you enable direct sound, WA will re-allocate when seeking.
|
|
|
|
|
|
|
|
|
DriverHeaven Lover
Join Date: Mar 2003
Location: Trondheim, Norway
Posts: 146
Rep Power: 0 ![]() |
Quote:
![]() It happens exactly during (re)allocation of voices. Randomly and with different behaviour on old drivers versus newer ones as stated earlier. |
|
|
|
|
|
|
|
|
DriverHeaven Lover
Join Date: Mar 2003
Location: Trondheim, Norway
Posts: 146
Rep Power: 0 ![]() |
Quote:
|
|
|
|
|
|
|
|
|
DriverHeaven Lover
Join Date: Mar 2003
Location: Trondheim, Norway
Posts: 146
Rep Power: 0 ![]() |
Quote:
---- What's below is probably normal behaviour ---- Worth noting (and I have never mentioned this before) is that in some circumstances when several applications share audio resources, there is no shifting on the different allocated voices in the analyzer. Example: If I am running mediaplayer and then starts a song in winamp 3 (WA3 not using direct sound). Then all 4 channels allocated by mediaplayer is in use rather than the usual two of four. In this case it is IMPOSSIBLE to reproduce the error. (Since no reallocation occur.) Another (and not mentioned) situation is when several applications share audio resources and there is some channels shifting in the analyzer, the error may be produced, and if it is, it affects all audio (sounds). Example: If I am running mediaplayer and then starts a song in winamp 3 (WA3 USING direct sound). Last edited by XDread; Apr 25, 2003 at 04:48 AM. |
|
|
|
|
|
|
|
|
DriverHeaven Lover
Join Date: Mar 2003
Location: Trondheim, Norway
Posts: 146
Rep Power: 0 ![]() |
Quote:
|
|
|
|
|
|
|
|
DriverHeaven Lover
Join Date: Mar 2003
Location: Trondheim, Norway
Posts: 146
Rep Power: 0 ![]() |
Hey! There is actually a change! I don't know which version it got better in, but:
- reallocate a lot of time produces the bug. (As usual.) - after 16 clicks the bug is fixed (temporarily). (This was not necessarily the case before.) I'm going to test some more. After some more testing (this time with direct sound off and hence only two channels allocated each time) I have to click 32 times to get rid of the beeping sound. Repeating: - Direct Sound with winamp = 4 voices and 16 clicks to "fix" problem. - No Direct Sound with winamp = 2 voices and 32 clicks to "fix" problem. Alas a whole "round" on the analyzer. There is NO particular position or voice where the bug appears. It is completely random when the bug appears, it may be 18 clicks or 100+ or anything. Last edited by XDread; Apr 25, 2003 at 06:21 AM. |
|
|
|
|
#43 |
|
DriverHeaven Newbie
Join Date: Mar 2003
Posts: 7
Rep Power: 0 ![]() |
Some more testing:
I mentioned previously that the bug did not seem to happen in 3528, so I downgraded to make sure. I was only half right. It does occur in WinAmp exactly as with 3531 as long as DirectSound is ENABLED. With DirectSound DISABLED I was unable to reproduce the problem with 3528. In Cubase SX with ASIO the bug is much less frequent, so I can't say for sure if it happens in 3528 or not. The two main audio apps I use are Winamp and Cubase SX, so if I used to have DirectSound disabled I might not have noticed the bug. Next I upgraded to 3532rc1. Now the bug occurs in Winamp with or without DirectSound enabled. I can confirm the previously observed behavior of 16x to fix the problem if DirectSound is ENABLED, and 32x if DirectSound is DISABLED. I'm sure others have already realized the significance of 16x or 32x, but it didn't really hit me until I watched the analyzer. With DirectSound ENABLED in Winamp, I would repeatedly start and stop a track. Each time I restarted the track, the next 4 voices in the analyzer would get allocated. Once the error occurred, I would note which voices were allocated then proceed with 16x restart, which of course gets you back to the same 4 voices that were allocated when the bug occurred. With DirectSound DISABLED, the behavior is the same except only 2 voices are allocated each time, hence 32x. Basically, it seems like reallocating the same 4 (or 2) voices that were in use when the problem occurred will temporarily fix it. If it's significant, I was testing with the DJ Lama mp3 that comes with Winamp 3 (128kbit, 44.1KHz). |
|
|
|
|
#44 |
|
kX Project Lead Programmer and Coordinator
Join Date: Dec 2002
Posts: 3,106
Rep Power: 73 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
so, to summarize the present observations:
the bug happens randomly after some voice re-allocation occurs it is manifested as 'continuous beeps' instead of 'sound' the incorrect behaviour keeps on until the -same- voices are re-allocated (according to the analyzer window); that is, one need to start/stop x16x or x32 times (depending on the number of reallocated voices per start/stop action) if no voice re-allocation occurs (non-directsound applications) the problem is very rare or even doesn't happen /Eugene |
|
|
|
|
|
|
DriverHeaven Lover
Join Date: Mar 2003
Location: Trondheim, Norway
Posts: 146
Rep Power: 0 ![]() |
In short that sound like the problem!
But that is on the latest development version.3514 to around 3520+something the bug is random and the beep happens just one or two times after each other. on 3528+/-something the bug is not necessarily lasting for "just a round" on the analyzer. on the latest (few?) versions the bug lasts for a round only. If it hadn't been for that the bug is different on different releases of the kX drivers I would have thought the problem to be something with the soundcard since not everyone is experiencing this problem, but there are a few other people having this related problem. "if no voice re-allocation occurs (non-directsound applications) the problem is very rare or even doesn't happen" - If no voice re-allocation occurs I must say that the bug does not happen. It has never happened after a voice is allocated. (Only if another (re)allocation appears for another application, but that is a (re)allocation....) Last edited by XDread; Apr 27, 2003 at 02:55 AM. |
|
|
|
|
#46 |
|
kX Project Lead Programmer and Coordinator
Join Date: Dec 2002
Posts: 3,106
Rep Power: 73 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
>> 3514 to around 3520+something the bug is random and the beep happens just one or two times
>> after each other as far as I remember, 3514 et al simply had different voice allocation algorithm that is, the voices were not shifted on each alloc/free >> something with the soundcard well, at the moment I can be sure that the bug does NOT happen with E-mu APS + Via kT333 + XP SP1 + Athlon XP (with two more audio cards installed and ACPI enabled)>> (re)allocation appears for another application hmm. so, if you, say, close all the applications you might have (-all-, including kX Mixer, any system tray applications, CPU Coolers, Hardware monitoring utilities, mouse/keyboard drivers, proxy / firewall software, ....) -- and start WinAmp only -- will you be able to reproduce the bug? /Eugene |
|
|
|
|
|
|
DriverHeaven Lover
Join Date: Mar 2003
Location: Trondheim, Norway
Posts: 146
Rep Power: 0 ![]() |
Yes, fully reproducable... In given conditions...
Well in my opinion it is: I. My soundcard (Might just aswell be...) (Perhaps there is some faulty revision of a chip or other design...) II. A buffer error in the driver (or a buffer handlig/allocation error) (The error sounds as if a *tiny* buffer is looping (just a few bytes.) |
|
|
|
|
#48 |
|
DriverHeaven Junior Member
Join Date: Apr 2003
Posts: 37
Rep Power: 0 ![]() |
Hi XDread,
Did you try to adjust the Playback Buffer size ( i keep mine at 2048B and never had that beep sound) and see if the problem persists? |
|
|
|
|
|
|
DriverHeaven Lover
Join Date: Mar 2003
Location: Trondheim, Norway
Posts: 146
Rep Power: 0 ![]() |
I have tried with different buffersizes, but no difference. I usually run with a buffer size of 8352 (!) since I probably get more skipping than better latency using smaller buffer sizes. (I don't think my card is capable of doing much less than 10ms anyway.)
|
|
|
|
|
|
|
DriverHeaven Lover
Join Date: Mar 2003
Location: Trondheim, Norway
Posts: 146
Rep Power: 0 ![]() |
{Well... I have created a program that generates a wave file with EXACTLY the same beep I am experiencing with this bug...
Listen to the beep here: http://www.galaasen.com/beep.wav For you other people with this bug, it would be nice if you could listen to tell if your beep sound anything like this... I have found the sound to be exactly the size of 32 samples:} Just compile it with freepascal and run it... (The fastest way I know to make a program...) {=========== Program starts here ==========================} {Simple program to reconstruct the "beep" error with my soundcard and kX driver} program wavav; uses crt; type btfilet=file of byte; procedure writeb(var btfile:btfilet;bt:byte); begin write (btfile,bt); end; procedure writec(var btfile:btfilet;ch:char); var bt:byte; begin bt:=ord(ch); write (btfile,bt); end; var btfile:btfilet; lp, lp2:integer; samplecount:longint; buffer:array[1..256] of byte; begin {create a random buffer} randomize; for lp:=1 to 256 do begin buffer[lp]:=ord(random(256)); end; assign (btfile,'beep.wav'); rewrite (btfile); {Write word 'RIFF' to file} writec (btfile,'R'); writec (btfile,'I'); writec (btfile,'F'); writec (btfile,'F'); {write 4 bytes filesize 44100+44=$0000ac70} writeb (btfile,$70); writeb (btfile,$ac); writeb (btfile,$00); writeb (btfile,$00); {Write word 'WAVE' to file} writec (btfile,'W'); writec (btfile,'A'); writec (btfile,'V'); writec (btfile,'E'); {Write word 'fmt ' to file} writec (btfile,'f'); writec (btfile,'m'); writec (btfile,'t'); writec (btfile,' '); {Size of WAVE section: 16 bytes} writeb (btfile,$10); writeb (btfile,$00); writeb (btfile,$00); writeb (btfile,$00); {PCM =$01} writeb (btfile,$01); writeb (btfile,$00); {Stereo} writeb (btfile,$02); writeb (btfile,$00); {samples per second = 44100 =$ac44} writeb (btfile,$44); writeb (btfile,$ac); writeb (btfile,$00); writeb (btfile,$00); {bytes per second = 4*44100 (stereo 16 bit...) = $2b110} writeb (btfile,$10); writeb (btfile,$b1); writeb (btfile,$02); writeb (btfile,$00); {alignment} writeb (btfile,$08); writeb (btfile,$00); {bits per sample} writeb (btfile,$10); writeb (btfile,$00); {Write word 'data' to file} writec (btfile,'d'); writec (btfile,'a'); writec (btfile,'t'); writec (btfile,'a'); {44100 samples (1 second)} writeb (btfile,$44); writeb (btfile,$ac); writeb (btfile,$00); writeb (btfile,$00); {The data itself:} samplecount:=0; while (samplecount<44100) do begin {Repeat random buffer of 32 samples} for lp2:=1 to 32 do begin {left} writeb (btfile,buffer[lp2*4+0]); writeb (btfile,buffer[lp2*4+1]); {right} writeb (btfile,buffer[lp2*4+2]); writeb (btfile,buffer[lp2*4+3]); inc (samplecount); end; end; close (btfile); end. {=========== Program ends here ==========================} Last edited by XDread; Apr 28, 2003 at 07:29 AM. |
|
|
|
|
#51 |
|
kX Project Lead Programmer and Coordinator
Join Date: Dec 2002
Posts: 3,106
Rep Power: 73 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
8352 is the default value -- it should be ok
(btw, the buffer size doesn't directly affect the latency simply because DirectSound uses double buffering technique) concerning the issue: pls download and execute the "spy.exe" program from here (http://kx.maincore.nl/spy.exe) it should display you all the hardware registers and their values when an audio channel is active start audio playback now simply make a 'snapshot' (print screen) reproduce the bug make a snapshot restart the playback 8 times (you should be still experiencing 'beeping') make a snapshot restart the playback until the issue is 'solved' make a snapshot /Eugene p.s. set your console window size to 100x35! |
|
|
|
|
#52 |
|
DriverHeaven Newbie
Join Date: Mar 2003
Posts: 7
Rep Power: 0 ![]() |
When I try to run spy.exe, it gives the following message:
Couldn't access giveio device Any ideas? Is this a DirectX utility? Do I maybe need version 9 (still on 8.1)? Or am I just being stupid? Sorry to create additional support headaches for you. Just wanted to help out. ----Hardware / Software configuration--------------- Driver Name:kX Audio Driver (Debug) Driver Date: Apr 24 2003 02:46:30 Driver Version: 5.10.00.3532 - debug DB Name:LiveBay0 CT4760 10k1 [ece0] PCI Information: Device: 21102 Subsys: 80401102 ChipRev: 7 Card has MPU device Card HAS AC97 codec Codec name: SigmaTel STAC9721/23 3D Extension: SigmaTel 3D Enhancement Codec is 2.0 compliant Capabilities[6940] : DAC resolutions : -16-bit- -18-bit- ADC resolutions : -16-bit- -18-bit- Ext Capabilities [200]: -slot/DAC mappings- Port: ece0 Irq: 10 Playback buffer: 20a0 Record buffer: 4000 Number of AC3 buffers: 4 Tank memory: 256 kb OS version: [2 5 1 Service Pack 1; 2 5 1 Service Pack 1; 156 148] ---------------------------------------------------- |
|
|
|
|
#53 |
|
kX Project Lead Programmer and Coordinator
Join Date: Dec 2002
Posts: 3,106
Rep Power: 73 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
giveio is a special driver that enables direct I/O access
the 'spy.exe' is our own tool, while giveio is bundled with certain software (such as MBM5) in order to install the giveio driver, download giveio.sys from http://kx.maincore.nl/giveio.rar * copy giveio.sys to windows\system32\drivers folder * edit the included giveio.reg (fix the path to your windows\system32\drivers folder) (it should be something like: "\\??\\c:\\windows\\System32\\drivers\\giveio.sys" ; don't remove '??'!) * register the .reg file via regedit * reboot make sure you've done everything correctly -- install the driver on your own risk... in order to check if giveio was installed correctly execute 'spy.exe' (or open 'computer management'; select 'device manager'; choose 'View->Show hidden devices' - there should be 'giveio' entry under the 'Non-plug and play drivers') /Eugene |
|
|
|
|
|
|
DriverHeaven Lover
Join Date: Mar 2003
Location: Trondheim, Norway
Posts: 146
Rep Power: 0 ![]() |
I am sorry, but I can't get this to work.
The error is that "a service failed during startup". Eventviewer shows: The giveio service failed to start due to the following error: The service cannot be started, either because it is disabled or because it has no enabled devices associated with it. (What does the \??\ really do?) When trying other paths I get file not found error in eventviewer insted of this, so the path is correct. Last edited by XDread; May 1, 2003 at 06:34 AM. |
|
|
|
|
#55 | |
|
DriverHeaven Newbie
Join Date: Mar 2003
Posts: 7
Rep Power: 0 ![]() |
Quote:
Same problem here |
|
|
|
|
|
#56 |
|
kX Project Lead Programmer and Coordinator
Join Date: Dec 2002
Posts: 3,106
Rep Power: 73 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
\??\ is a prefix for system boot devices
anyway, I installed giveio a very long time ago, and, unfortunately, lost the original .inf file ![]() I updated giveio.rar's giveio.reg file - re-download it from kx.maincore.nl hope this helps... ![]() /Eugene |
|
|
|
|
|
|
DriverHeaven Lover
Join Date: Mar 2003
Location: Trondheim, Norway
Posts: 146
Rep Power: 0 ![]() |
It worked!
BUT:1. Administrator didnt have rights to merge the last part, so I had to enter the keys manually for those missing using regedit. 2. Regedit did not have the rights needed either, so I had to start regedit using a little trick: -- a: Start sceduler service -- b: type "at hh:mm /interactive regedit" where hh:mm is just a few minutes ahead. -- c: insert manually when sceduled task starts Remember to change "windows" path to "winnt". Now for the reproduce stuff... (next post, haven't tested yet.) Last edited by XDread; May 2, 2003 at 03:10 AM. |
|
|
|
|
|
|
DriverHeaven Lover
Join Date: Mar 2003
Location: Trondheim, Norway
Posts: 146
Rep Power: 0 ![]() |
Ahrg...
Seems like I can't reproduce the bug right now, but I notice something strange:Analyzer reports 4 successive allocated channels, but spy seems to report otherwise... Ref the following two links where the first is before I tried to reproduce the bug and the second is after a LOT of tries: http://www.galaasen.com/1_playing_just_fine.bmp http://www.galaasen.com/2_couldnt_re..._this_time.bmp It's rather late now, so I am going to bed now to try to morrow... The bug WILL come back... It allways does!
|
|
|
|
|
|
|
DriverHeaven Lover
Join Date: Mar 2003
Location: Trondheim, Norway
Posts: 146
Rep Power: 0 ![]() |
Between two game sessions playing Diablo II the bug suddenly appeared again. Since I wasn't provoking the bug, I have no initial screen-shot for this session.
NO SOUND: http://www.galaasen.com/n2_no_sound.bmp ONE CLICK AFTER, BEEPING: http://www.galaasen.com/n3_beep.bmp EIGHT CLICKS AFTER BEEP, STILL BEEPING: http://www.galaasen.com/n4_eight_clicks_after_beep.bmp PROBLEM RESOLVED (This time a few clicks was needed): http://www.galaasen.com/n5_problem_resolved.bmp I said earlier that 16 or 32 clicks would solve the problem, but later it showed that was wrong, sometimes I can click forever giving up, having to reboot, just as yesterday when I did not manage to provoke the bug. This time I only had to to click a few times. |
|
|
|
|
#60 |
|
kX Project Lead Programmer and Coordinator
Join Date: Dec 2002
Posts: 3,106
Rep Power: 73 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
the problem happens because audio data isn't correctly mapped into the audio card address space
it is unclear what is the reason: either Windows incorrectly allocates the buffers, or the hardware registers get re-written incorrectly... I'll prepare a special version of kx.sys that might facilitate the debugging... /Eugene |
|
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|