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!)
This commit is contained in:
parent
d676906ab7
commit
38c9266f42
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue