Big update! Updating all "long int" frame number types to int64_t, so all 3 OSes will produce the same depth and precision on frame numbers. Also removing variable bitrate support temporarily, since it causes more problems than it solves.

This commit is contained in:
Jonathan Thomas
2017-09-28 16:03:01 -05:00
parent db740765a1
commit c95db460d6
82 changed files with 479 additions and 471 deletions

View File

@@ -37,16 +37,16 @@ CacheBase::CacheBase() : max_bytes(0) {
};
// Constructor that sets the max frames to cache
CacheBase::CacheBase(long long int max_bytes) : max_bytes(max_bytes) {
CacheBase::CacheBase(int64_t max_bytes) : max_bytes(max_bytes) {
// Init the critical section
cacheCriticalSection = new CriticalSection();
};
// Set maximum bytes to a different amount based on a ReaderInfo struct
void CacheBase::SetMaxBytesFromInfo(long int number_of_frames, int width, int height, int sample_rate, int channels)
void CacheBase::SetMaxBytesFromInfo(int64_t number_of_frames, int width, int height, int sample_rate, int channels)
{
// n frames X height X width X 4 colors of chars X audio channels X 4 byte floats
long long int bytes = number_of_frames * (height * width * 4 + (sample_rate * channels * 4));
int64_t bytes = number_of_frames * (height * width * 4 + (sample_rate * channels * 4));
SetMaxBytes(bytes);
}