[nas] Re: BUG: client sound played at wrong frequency

Tobias Diedrich td at informatik.uni-hannover.de
Tue Dec 4 17:29:58 MST 2001


Tobias Diedrich wrote:
> I just noticed a bug:
> 
> If I start a video which is using 44100Hz, then start another one which
> uses 48000Hz, the first one is played at the wrong frequency, after the
> second one starts and even when the second one is finished.
> If I do it the other way around both are played right until I stop the
> 48000Hz video, after which the 44100Hz video is played too fast again.
> 
> (Installed debian package version is 1.4.2-5)

OK, dirty hack:
Always set samplerate to Max.
This probably means nasd will use rate conversion for most flows.
The correct fix could be to register an auSetSampleRateCB for each
flow, which will adjust the flows data to the new rate and could
probably also increase the rate (rate should always be min(Maxrate,max(all flow
rates)) IMHO).

--- auprocess.c.orig	Wed Dec  5 01:23:12 2001
+++ auprocess.c	Wed Dec  5 01:23:42 2001
@@ -1272,11 +1272,12 @@
 
     if (rate)
     {
-	if (rate > auSetup.maxSampleRate)
+	rate = auSetup.maxSampleRate;
+/*	if (rate > auSetup.maxSampleRate)
 	    rate = auSetup.maxSampleRate;
 
 	if (rate < auSetup.minSampleRate)
-	    rate = auSetup.minSampleRate;
+	    rate = auSetup.minSampleRate; */
 
 	if (auCurrentSampleRate != rate)
 	    if (CallbackExists(AuSetSampleRateCB))

-- 
Tobias								PGP: 0x9AC7E0BC
Hannover Fantreffen ML: mailto:fantreffen-request at mantrha.de?subject=subscribe
Manga & Anime Treff Hannover: http://www.mantrha.de/



More information about the Nas mailing list