ref: bf9afd21c09953546a4f6b6e68b797fa7ffa6d80
parent: a5b327cd4e11cb97cd0d78763df2e56be3ec00d0
author: cbagwell <cbagwell>
date: Thu Oct 28 20:15:14 EDT 2004
Fix typos in alsa format checks.
--- a/src/alsa.c
+++ b/src/alsa.c
@@ -599,12 +599,6 @@
else
ft->info.size = ST_SIZE_WORD;
}
- if (ft->info.size != ST_SIZE_BYTE && ft->info.size != ST_SIZE_WORD)
- {- st_report("ALSA drive doesn't support %s. Changin to 16-bits.", - st_sizes_str[(unsigned char)ft->info.encoding]);
- ft->info.size = ST_SIZE_WORD;
- }
/* Some hardware only wants to work with 8-bit or 16-bit data */
if (ft->info.size == ST_SIZE_BYTE)
@@ -623,6 +617,13 @@
ft->info.size = ST_SIZE_BYTE;
}
}
+ else
+ {+ st_report("ALSA driver doesn't support %s. Changing to 16-bits.", + st_sizes_str[(unsigned char)ft->info.size]);
+ ft->info.size = ST_SIZE_WORD;
+ }
+
if (ft->info.size == ST_SIZE_BYTE) {switch (ft->info.encoding)
{@@ -630,7 +631,7 @@
if (!(formats & SND_PCM_FMT_S8))
{ st_report("ALSA driver doesn't supported signed byte samples. Changing to unsigned bytes.");- ft->info.encoding = ST_ENCODING_SIGN2;
+ ft->info.encoding = ST_ENCODING_UNSIGNED;
}
break;
case ST_ENCODING_UNSIGNED:
@@ -637,19 +638,19 @@
if (!(formats & SND_PCM_FMT_U8))
{ st_report("ALSA driver doesn't supported unsigned byte samples. Changing to signed bytes.");- ft->info.encoding = ST_ENCODING_UNSIGNED;
+ ft->info.encoding = ST_ENCODING_SIGN2;
}
break;
default:
if (formats & SND_PCM_FMT_S8)
{- st_report("ALSA drive doesn't support %s %s. Changing to signed bytes.", + st_report("ALSA driver doesn't support %s %s. Changing to signed bytes.", st_encodings_str[(unsigned char)ft->info.encoding], "byte");
ft->info.encoding = ST_ENCODING_SIGN2;
}
else
{- st_report("ALSA drive doesn't support %s %s. Changing to unsigned bytes.", + st_report("ALSA driver doesn't support %s %s. Changing to unsigned bytes.", st_encodings_str[(unsigned char)ft->info.encoding], "byte");
ft->info.encoding = ST_ENCODING_UNSIGNED;
}
@@ -688,8 +689,8 @@
}
break;
default:
- st_report("ALSA drive doesn't support %s %s. Changin to signed words.", - st_encodings_str[(unsigned char)ft->info.encoding], "byte");
+ st_report("ALSA driver doesn't support %s %s. Changing to signed words.", + st_encodings_str[(unsigned char)ft->info.encoding], "word");
ft->info.encoding = ST_ENCODING_SIGN2;
break;
}
--
⑨