• Status Closed
  • Percent Complete
  • Task Type Patches
  • Category User Interface
  • Assigned To No-one
  • Operating System All players
  • Severity High
  • Priority Very Low
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by pondlife - 2006-07-21

FS#5690 - Fix for memory corruption when using .talk clips

The memory allocation for the thumbnail buffer (used for .talk clips) previously assumed that the start of the audio buffer would not move, but if used with other features (notably dircache) this is not true. This resolves bug #5662.

This patch updates talk.c to properly allocate a fixed thumbnail buffer (up to 32K, should be plenty). It also updates audiobuf properly when a voice file is loaded.

Closed by  linusnielsen
2006-08-01 22:05
Reason for closing:  Accepted
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

Tested on Archos Recorder without problems.

Note, I have tested this on H300 device and simulator. I have not tested it on a HWCODEC device, but the bug should still be fixed on such devices. It would be good if someone with a working Archos could give this a test though.

Here’s an updated version that only implements this change on SWCODEC configurations. Other (i.e. Archos) devices regularly switch between mp3 and .talk clip playback, calling reset_state() and so keeping pointers in sync, so no crash will occur. This version works the same but will not use up 32K on Archoses; only downside is it uses #if statements.

OK, here’s take 3 - this one still only affects SWCODEC. It uses buffer_alloc to allocate memory and allocates the thumbnail buffer up-front (no dynamic cleverness that could cause a crash). This is in talkbufferfix3.patch. Once this is applied, the application of allowtalkduringplay.patch will enable voicing via .talk clips during playback (on SWCODEC). This last part in particular needs testing on Archos - somebody - please…!

Updated version of tree patch to save Archos units from spinning up to check if a .talk file exists when the audio is playing and they won’t be used anyway.


Available keyboard shortcuts


Task Details

Task Editing