Re: Looking for sound testers

2007-01-11 Thread Sebastien Fievet
On Thu, 28 Dec 2006 16:04:25 +0100
"Maarten Lankhorst" <[EMAIL PROTECTED]> wrote:

> Hi all,
> 
> I've forward ported the old patches of Davin McCall (dsound.patch).
> With them I have no more sound underruns etc, I'm therefore looking
> for other people to test them as well. I'm welcoming comments on how
> it works and possible issues with it.
> 
> I also attached my patch to alsa, I'm aware of the things I need to
> fix for that, but I thought it might be good to test dsound with
> winealsa, to see if other things still need to be fixed.
> 
> Cheers,
> 
> Maarten
> 

Hello Maarten,

I have installed your patchs on wine-0.9.29. I tested it with Warblade 
(www.warblade.as),
an old fashioned shoot'em up, with which sound was very choppy.
Your patches remove all buffer under run errors... but sound is still as choppy 
as it
was. I tried both hardware acceleration and emulation but none work.
i have alsa 1.0.14rc1 installed.

Please let me know if you some more detailed informations.

Thanks for your efforts anyways!

Séb.




Re: [SPAM] Re: Looking for sound testers

2007-01-02 Thread * *

On 1/2/07, SorinN <[EMAIL PROTECTED]> wrote:

Hi all

I dont know what you do there guys but ..BEFORE last ALSA related upgrade (
ubuntu feisty ) foobar2000 under  wine cannot play mp3 files - AFTER the
upgrade ( 2 files I think ) foobar2000 play my files and work EXACT like
foobar2000 under XP.

I use right now wine 0.9.27

Good job.

Sorin

2007/1/2, Alex Villací­s Lasso <[EMAIL PROTECTED]>:
> Neil Skrypuch escribió:
> > On Thursday, December 28, 2006 10:04, Maarten Lankhorst wrote:
> >
> >> Hi all,
> >>
> >> I've forward ported the old patches of Davin McCall (dsound.patch).
> >> With them I have no more sound underruns etc, I'm therefore looking
> >> for other people to test them as well. I'm welcoming comments on how
> >> it works and possible issues with it.
> >>
> >> I also attached my patch to alsa, I'm aware of the things I need to
> >> fix for that, but I thought it might be good to test dsound with
> >> winealsa, to see if other things still need to be fixed.
> >>
> >> Cheers,
> >>
> >> Maarten
> >>
> >


With Galactic Civilizations 2 Dark Avatar (just posted three patches
that make it run mostly ok), everything sounds great.  Only glitching
I have is when I break into the debugger, even with a ton of trace
output the sound is still smooth.

This is using the git version, but it's been nice and smooth in
several different versions I've pulled in the last two weeks.




Re: [SPAM] Re: Looking for sound testers

2007-01-02 Thread SorinN

Hi all

I dont know what you do there guys but ..BEFORE last ALSA related upgrade (
ubuntu feisty ) foobar2000 under  wine cannot play mp3 files - AFTER the
upgrade ( 2 files I think ) foobar2000 play my files and work EXACT like
foobar2000 under XP.

I use right now wine 0.9.27

Good job.

Sorin

2007/1/2, Alex Villací­s Lasso <[EMAIL PROTECTED]>:


Neil Skrypuch escribió:
> On Thursday, December 28, 2006 10:04, Maarten Lankhorst wrote:
>
>> Hi all,
>>
>> I've forward ported the old patches of Davin McCall (dsound.patch).
>> With them I have no more sound underruns etc, I'm therefore looking
>> for other people to test them as well. I'm welcoming comments on how
>> it works and possible issues with it.
>>
>> I also attached my patch to alsa, I'm aware of the things I need to
>> fix for that, but I thought it might be good to test dsound with
>> winealsa, to see if other things still need to be fixed.
>>
>> Cheers,
>>
>> Maarten
>>
>
> I've given this a spin with Icewind Dale, and while it does seem to
remove the
> underrun issues (at least I don't see them spit out anymore), the sound
still
> stutters and crackles just as much as before.
>
> - Neil
>
>
With both ALSA and dsound patches applied, the tests hang when trying to
play from a 96000Hz buffer. Enabling direct access for the winealsa
driver works around this.

--
perl -e '$x = 2.4; print sprintf("%.0f + %.0f = %.0f\n", $x, $x, $x +
$x);'







--
Nemes Ioan Sorin



Re: [SPAM] Re: Looking for sound testers

2007-01-02 Thread Alex Villací­s Lasso

Neil Skrypuch escribió:

On Thursday, December 28, 2006 10:04, Maarten Lankhorst wrote:
  

Hi all,

I've forward ported the old patches of Davin McCall (dsound.patch).
With them I have no more sound underruns etc, I'm therefore looking
for other people to test them as well. I'm welcoming comments on how
it works and possible issues with it.

I also attached my patch to alsa, I'm aware of the things I need to
fix for that, but I thought it might be good to test dsound with
winealsa, to see if other things still need to be fixed.

Cheers,

Maarten



I've given this a spin with Icewind Dale, and while it does seem to remove the 
underrun issues (at least I don't see them spit out anymore), the sound still 
stutters and crackles just as much as before.


- Neil

  
With both ALSA and dsound patches applied, the tests hang when trying to 
play from a 96000Hz buffer. Enabling direct access for the winealsa 
driver works around this.


--
perl -e '$x = 2.4; print sprintf("%.0f + %.0f = %.0f\n", $x, $x, $x + $x);'





Re: Looking for sound testers

2006-12-31 Thread Neil Skrypuch
On Thursday, December 28, 2006 10:04, Maarten Lankhorst wrote:
> Hi all,
>
> I've forward ported the old patches of Davin McCall (dsound.patch).
> With them I have no more sound underruns etc, I'm therefore looking
> for other people to test them as well. I'm welcoming comments on how
> it works and possible issues with it.
>
> I also attached my patch to alsa, I'm aware of the things I need to
> fix for that, but I thought it might be good to test dsound with
> winealsa, to see if other things still need to be fixed.
>
> Cheers,
>
> Maarten

I've given this a spin with Icewind Dale, and while it does seem to remove the 
underrun issues (at least I don't see them spit out anymore), the sound still 
stutters and crackles just as much as before.

- Neil




Looking for sound testers

2006-12-28 Thread Maarten Lankhorst

Hi all,

I've forward ported the old patches of Davin McCall (dsound.patch).
With them I have no more sound underruns etc, I'm therefore looking
for other people to test them as well. I'm welcoming comments on how
it works and possible issues with it.

I also attached my patch to alsa, I'm aware of the things I need to
fix for that, but I thought it might be good to test dsound with
winealsa, to see if other things still need to be fixed.

Cheers,

Maarten
diff --git a/dlls/winmm/winealsa/audio.c b/dlls/winmm/winealsa/audio.c
index 6043680..e1676ed 100644
--- a/dlls/winmm/winealsa/audio.c
+++ b/dlls/winmm/winealsa/audio.c
@@ -6,6 +6,7 @@
  * Copyright2002 Eric Pouech
  *  2002 Marco Pietrobono
  *  2003 Christian Costa : WaveIn support
+ *  2006 Maarten Lankhorst
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -70,11 +71,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(wave);
 
 #ifdef HAVE_ALSA
 
-/* internal ALSALIB functions */
-/* FIXME:  we shouldn't be using internal functions... */
-snd_pcm_uframes_t _snd_pcm_mmap_hw_ptr(snd_pcm_t *pcm);
-
-
 /* state diagram for waveOut writing:
  *
  * +-+-+---+-+
@@ -2627,7 +2623,6 @@ #undef EXIT_ON_ERROR
 	snd_pcm_hw_params_free(wwo->hw_params);
 wwo->hw_params = hw_params;
 
-
 return wodNotifyClient(wwo, WOM_OPEN, 0L, 0L);
 
 errexit:
@@ -3045,11 +3040,8 @@ struct IDsDriverBufferImpl
 DWORD mmap_buflen_bytes;
 snd_pcm_uframes_t mmap_buflen_frames;
 snd_pcm_channel_area_t *  mmap_areas;
-snd_async_handler_t * mmap_async_handler;
 snd_pcm_uframes_t	  mmap_ppos; /* play position */
-
-/* Do we have a direct hardware buffer - SND_PCM_TYPE_HW? */
-int   mmap_mode;
+HANDLEmmap_thread;
 };
 
 static void DSDB_CheckXRUN(IDsDriverBufferImpl* pdbi)
@@ -3076,71 +3068,66 @@ static void DSDB_CheckXRUN(IDsDriverBuff
 }
 }
 
-static void DSDB_MMAPCopy(IDsDriverBufferImpl* pdbi, int mul)
+/**
+ * The helper thread for DirectSound
+ *
+ * Basically it does an infinite loop until it is told to die
+ * 
+ * snd_pcm_wait() is a call that polls the sound buffer and waits
+ * until there is at least 1 period free before it returns.
+ *
+ * We then commit the buffer filled by the owner of this
+ * IDSDriverBuffer */
+static DWORD CALLBACK DBSB_MMAPStart(LPVOID data)
 {
+IDsDriverBufferImpl* pdbi = (IDsDriverBufferImpl*)data;
 WINE_WAVEDEV * wwo = &(WOutDev[pdbi->drv->wDevID]);
-snd_pcm_uframes_t  period_size;
-snd_pcm_sframes_t  avail;
-int err;
-int dir=0;
-
+snd_pcm_uframes_t  frames, wanted, ofs;
 const snd_pcm_channel_area_t *areas;
-snd_pcm_uframes_t ofs;
-snd_pcm_uframes_t frames;
-snd_pcm_uframes_t wanted;
 
-if ( !pdbi->mmap_buffer || !wwo->hw_params || !wwo->pcm)
-	return;
-
-err = snd_pcm_hw_params_get_period_size(wwo->hw_params, &period_size, &dir);
-avail = snd_pcm_avail_update(wwo->pcm);
+TRACE("\n");
 
-DSDB_CheckXRUN(pdbi);
-
-TRACE("avail=%d, mul=%d\n", (int)avail, mul);
-
-frames = pdbi->mmap_buflen_frames;
-	
-EnterCriticalSection(&pdbi->mmap_crst);
+if (areas != pdbi->mmap_areas || areas->addr != pdbi->mmap_areas->addr)
+FIXME("Can't access sound driver's buffer directly.\n");
 
-/* we want to commit the given number of periods, or the whole lot */
-wanted = mul == 0 ? frames : period_size * 2;
+while (pdbi->mmap_thread)
+{
+snd_pcm_wait(wwo->pcm, -1);
+wanted = frames = pdbi->mmap_buflen_frames;
+DSDB_CheckXRUN(pdbi);
 
-snd_pcm_mmap_begin(wwo->pcm, &areas, &ofs, &frames);
-if (areas != pdbi->mmap_areas || areas->addr != pdbi->mmap_areas->addr)
-FIXME("Can't access sound driver's buffer directly.\n");	
-
-/* mark our current play position */
-pdbi->mmap_ppos = ofs;
-
-if (frames > wanted)
-frames = wanted;
-
-err = snd_pcm_mmap_commit(wwo->pcm, ofs, frames);
-	
-/* Check to make sure we committed all we want to commit. ALSA
- * only gives a contiguous linear region, so we need to check this
- * in case we've reached the end of the buffer, in which case we
- * can wrap around back to the beginning. */
-if (frames < wanted) {
-frames = wanted -= frames;
+EnterCriticalSection(&pdbi->mmap_crst);
 snd_pcm_mmap_begin(wwo->pcm, &areas, &ofs, &frames);
 snd_pcm_mmap_commit(wwo->pcm, ofs, frames);
-}
 
-LeaveCriticalSection(&pdbi->mmap_crst);
+/* mark our current play position */
+pdbi->mmap_ppos = ofs;
+
+/* Check to make sure we committed all we want to commit. ALSA
+ * only gives a contiguous linear region, so we need to check this
+ * in case we've reached the end of the