Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/arch



At Mon, 16 Mar 2020 19:09:34 +0000,
Nia Alarie wrote:
> Module Name:	src
> Committed By:	nia
> Date:		Mon Mar 16 19:09:34 UTC 2020
> 
> Modified Files:
> 	src/sys/arch/i386/conf: GENERIC
> 	src/sys/arch/macppc/conf: GENERIC
> 	src/sys/arch/sparc64/conf: GENERIC
> 
> Log Message:
> Lower blk_ms on more ports that are even slightly likely to play video

As thorpej@ said before, I think this is not good way, too.

And also 4msec is too small and makes very bad sound on some emulator
(at least my VirtualBox6 on OSX).  Of course I know that it will be no
problem on the most modern real hardware.
I prefer 10 msec as their default value, and I don't think this is too
large as default value for the most users.

How about this patch?
(I don't like such platform dependent ifdef here though..)

--- a/sys/dev/audio/audiodef.h
+++ b/sys/dev/audio/audiodef.h
@@ -44,13 +44,21 @@
 
 /*
  * Hardware blocksize in msec.
- * We use 40 msec as default.  (1 / 40ms) = 25 = 5^2.
+ * We use 10 msec as default for most platforms.  But it's too severe for
+ * most m68k.
+ *
+ * 40 msec was initially choosen for the following reason:
+ * (1 / 40ms) = 25 = 5^2.  Thus, the frequency is factored by 5.
  * In this case, the number of frames in a block can be an integer
  * even if the frequency is a multiple of 100 (44100, 48000, etc),
  * or even if 15625Hz (vs(4)).
  */
 #if !defined(AUDIO_BLK_MS)
-#define AUDIO_BLK_MS 40
+# if defined(__m68k__)
+#  define AUDIO_BLK_MS 40
+# else
+#  define AUDIO_BLK_MS 10
+# endif
 #endif
 
 /*
---
Tetsuya Isaki <isaki%pastel-flower.jp@localhost / isaki%NetBSD.org@localhost>


Home | Main Index | Thread Index | Old Index