At some point in your app (i.e., after opening an audio source), you should set the value of the block alignment:
[code:3jlzvs17]m_blockAlign = nChannels * bitDepth / 8[/code:3jlzvs17]
The block alignment is typically 1, 2 or 4 bytes.
It is then a simple matter to determine how many bytes are comprised in a segment of audio:
[code:3jlzvs17]nBytes = nSamples * m_blockAlign[/code:3jlzvs17]
- stdev answered 12 years ago
- You must login to post comments
Please login first to submit.