Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
OpenGL Game Development By Example

You're reading from   OpenGL Game Development By Example Design and code your own 2D and 3D games efficiently using OpenGL and C++

Arrow left icon
Product type Paperback
Published in Mar 2016
Publisher
ISBN-13 9781783288199
Length 340 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Robert Madsen Robert Madsen
Author Profile Icon Robert Madsen
Robert Madsen
Stephen Madsen Stephen Madsen
Author Profile Icon Stephen Madsen
Stephen Madsen
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Bits and bytes


Audio is inherently an analog experience. Sound is created as compressed waves travel through the air and interact with our ear drums. Until recently, the techniques used to reproduce audio were also strictly audio as well. For example, a microphone records sound similarly to how our ears do by capturing changes in air pressure and converting them to electrical impulses. Speakers do the reverse by converting the electrical signals back into waves of air pressure.

Computers, on the other hand, are digital. Computers convert audio samples into bits and bytes by taking samples of the audio. To keep it simple, let's consider a system where the current frequency of the sound wave (that is, how fast the wave is moving) is captured as a 16 bit (2 byte) number. It turns out that a 16 bit number can capture numbers in a range from 0 to 65,536. Each sample of the sound wave must be encoded as a number in this range. Also, as we actually capture two samples each time (for stereo sound...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime