forked from len0rd/rockbox
Fix by Jvo Studer for bugreport #4799. Recorded bytes counter wasn't updated with pre-recording bytes, causing an issue when file-splitting because of maximum filesize limit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8979 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
40c917132c
commit
5ecac908a2
1 changed files with 7 additions and 3 deletions
|
@ -420,6 +420,7 @@ static void pcmrec_callback(bool flush)
|
||||||
ptr++;
|
ptr++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(is_recording && !is_paused)
|
||||||
num_rec_bytes += CHUNK_SIZE;
|
num_rec_bytes += CHUNK_SIZE;
|
||||||
|
|
||||||
read2_index++;
|
read2_index++;
|
||||||
|
@ -461,6 +462,9 @@ static void pcmrec_callback(bool flush)
|
||||||
yield();
|
yield();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* sync file */
|
||||||
|
fsync(wav_file);
|
||||||
|
|
||||||
logf("done");
|
logf("done");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -641,7 +645,7 @@ static void pcmrec_start(void)
|
||||||
peak_left = 0;
|
peak_left = 0;
|
||||||
peak_right = 0;
|
peak_right = 0;
|
||||||
|
|
||||||
num_rec_bytes = 0;
|
num_rec_bytes = pre_chunks * CHUNK_SIZE;
|
||||||
num_file_bytes = 0;
|
num_file_bytes = 0;
|
||||||
pause_start_time = 0;
|
pause_start_time = 0;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue