diff options
author | Greg Ward <gward@python.net> | 2003-05-29 21:55:41 (GMT) |
---|---|---|
committer | Greg Ward <gward@python.net> | 2003-05-29 21:55:41 (GMT) |
commit | 38c9266f4203d5d01a0c76f649ff5ba7840afbe1 (patch) | |
tree | a306768f3e1d1cc35f5f01a8655ef5814453b8ab /Modules | |
parent | d676906ab7e0bda29da776a7ef384e1f751c3f27 (diff) | |
download | cpython-38c9266f4203d5d01a0c76f649ff5ba7840afbe1.zip cpython-38c9266f4203d5d01a0c76f649ff5ba7840afbe1.tar.gz cpython-38c9266f4203d5d01a0c76f649ff5ba7840afbe1.tar.bz2 |
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!)
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/ossaudiodev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/ossaudiodev.c b/Modules/ossaudiodev.c index 7b9feae..5df1d1a 100644 --- a/Modules/ossaudiodev.c +++ b/Modules/ossaudiodev.c @@ -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: |