I have created an app that calculated audio file sizes. The formula for this calculation is size = sample rate * number of channels * (bits per sample /8) * time in seconds.
So i have implented this formula using
This forumla works for the most part but sometimes can give a negative answer. Any ideas why this is happening?
So i have implented this formula using
Code:
int bSize = [channelNumber.text intValue] * [bitDepth.text intValue] / 8 *
[sampleRate.text intValue] * [trackLength.text intValue];
This forumla works for the most part but sometimes can give a negative answer. Any ideas why this is happening?