Technical Q&As


SND 05 - Static Sound on PCI Macs (1-June-96)


Q My application records the user's voice and then plays it back. It works without a problem on every Mac except the new PCI Macs, where the sound plays back as loud static. What's wrong?


A The new Macintoshes default to recording 16-bit stereo sound instead of the 8-bit mono sound that older Macintoshes defaulted to. 16-bit sounds are stored in two's complement format and 8-bit sounds are usually stored in offset binary, or one's complement. Trying to play a two's complement formatted sound as if it were an offset binary formatted sound causes the static-like sound you are hearing.

The solution is to use SPBGetDeviceInfo with the siNumberChannels and siSampleSize selectors to find out with what format you will be recording. If you don't like the format, use SPBSetDeviceInfo call to change it to what you want, but make sure you check the error code to verify that the setting has changed.



Technical Q&As |
Previous Question | Contents | Next Question