Commit b7de1547 authored by Greg Ward's avatar Greg Ward

Change _ssize() so it doesn't rely on sizeof(char) or sizeof(short):

8 bits is 1 byte, and that isn't about to change any time soon.  (I hope!)
parent e509fb8b
......@@ -554,13 +554,13 @@ _ssize(oss_audio_t *self, int *nchannels, int *ssize)
case AFMT_A_LAW:
case AFMT_U8:
case AFMT_S8:
*ssize = sizeof(char);
*ssize = 1; /* 8 bit formats: 1 byte */
break;
case AFMT_S16_LE:
case AFMT_S16_BE:
case AFMT_U16_LE:
case AFMT_U16_BE:
*ssize = sizeof(short);
*ssize = 2; /* 16 bit formats: 1 byte */
break;
case AFMT_MPEG:
case AFMT_IMA_ADPCM:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment