Sounds are recorded at a certain sample rate, which simply says how fast to play each sample, and is measured in number of samples per second. Each sample represents a value of the audio waveform. Digital audio consists of a long stream of samples. It takes as arguments an SDL_AudioSpec struct, which contains all the information about the audio we are going to output.īefore we show how you set this up, let's explain first about how audio is handled by computers. The SDL_OpenAudio() function is used to open the audio device itself. SDL also gives us methods for outputting sound. Text version Tutorial 03: Playing Sound Code: tutorial03.c Audio
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |