+static void writeSound_44100(int len)
+{
+ writeSound(len);
+ PicoIn.sndOut = sndBuffer_ptr;
+}
+
+static void writeSound_22050_stereo(int len)
+{
+ short *p = sndBuffer_ptr;
+ int i;
+
+ for (i = 0; i < len / 2; i+=2, p+=4) {
+ p[0] = p[2] = PicoIn.sndOut[i];
+ p[1] = p[3] = PicoIn.sndOut[i+1];
+ }
+ writeSound(2*len);
+}
+
+static void writeSound_22050_mono(int len)
+{
+ short *p = sndBuffer_ptr;
+ int i;
+
+ for (i = 0; i < len / 2; i++, p+=2) {
+ p[0] = p[1] = PicoIn.sndOut[i];
+ }
+ writeSound(2*len);
+}
+
+static void writeSound_11025_stereo(int len)
+{
+ short *p = sndBuffer_ptr;
+ int i;
+
+ for (i = 0; i < len / 2; i+=2, p+=8) {
+ p[0] = p[2] = p[4] = p[6] = PicoIn.sndOut[i];
+ p[1] = p[3] = p[5] = p[7] = PicoIn.sndOut[i+1];
+ }
+ writeSound(4*len);
+}
+
+static void writeSound_11025_mono(int len)
+{
+ short *p = sndBuffer_ptr;
+ int i;
+
+ for (i = 0; i < len / 2; i++, p+=4) {
+ p[0] = p[1] = p[2] = p[3] = PicoIn.sndOut[i];
+ }
+ writeSound(4*len);
+}
+
+#define PS2_RATE 44100 // PicoIn.sndRate
+