18

I read about.wav file format by googling,all I could figure was that Frames are made of samples(of some defined bit depth) and a wav stereo file has a multiple of something called channels.... The confusion is whether a channel is made up of frames? Do all channels play along when I play some audio file? If a channel is made up of frames,are all channels equal in length(bit wise)? Please answer if someone can,I have to display each channel separately when playing a wav file in waveform

Soul Enrapturer
  • 367
  • 2
  • 3
  • 14

1 Answers1

19

In each frame in wav there are channels. If you have stereo sound, then each frame contains two samples (left and right).

  • Do all channels play along when I play some audio file?

Yes, unless you chose to play only one channel. Then samples for second channel are ignored.

  • If a channel is made up of frames,are all channels equal in length(bit wise)?

Yes.

yetihehe
  • 620
  • 8
  • 11
  • So you mean that for a two channel wav file,first both channels of frame 1 will be played simultaneously and then for the frame 2 and so on....and that the wav. file is played frame by frame in this way? – Soul Enrapturer Dec 21 '12 at 20:07
  • 4
    Yes. But remember that each frame is just two values of sound amplitude. One value for each channel. If you describe left channel value as L and right as R, in wav it will be written like LR|LR|LR|LR|LR|LR where each LR is one frame and for 44khz wav file there are 44 thousand LR frames played each second. – yetihehe Dec 21 '12 at 20:14
  • So the amplitude is same as bit-depth(Sample value)? – Soul Enrapturer Dec 21 '12 at 20:17
  • 2
    Amplitude is sample value. Bit-depth is "how many bits do you use to describe value". – yetihehe Dec 21 '12 at 20:18