Fixed a rounding error on mapping audio samples to frames. Also adjusted the sample rate on the frame.Play() method to 48khz.

This commit is contained in:
Jonathan Thomas
2011-10-26 14:34:14 -05:00
parent e4f95d8a99
commit 26083f27b7
4 changed files with 9 additions and 10 deletions

View File

@@ -705,7 +705,7 @@ audio_packet_location FFmpegReader::GetAudioPTSLocation(int pts)
// Get Samples per frame
int samples_per_frame = GetSamplesPerFrame();
int sample_start = double(samples_per_frame) * sample_start_percentage;
int sample_start = round(double(samples_per_frame) * sample_start_percentage);
// Prepare final audio packet location
audio_packet_location location = {whole_frame, sample_start};