twilly / odvr

Olympus Digital Voice Recorder Driver
GNU General Public License v3.0
28 stars 12 forks source link

Proposed patch for cli.c #26

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In some cases, DVR would report same file IDs within one folder, as shown:

Inspiron olympus # odvr -l
Model: VN-480PC
Folder A (4 files):
Slot File     Length       Date          Quality
1    65     00:32:03  2/09/2009 11:00:17 HQ
2    65     00:19:19  2/09/2009  7:21:02 HQ
3    66     00:00:02  2/09/2009  7:41:34 HQ
4    71     00:38:01  2/16/2009  7:52:19 HQ
Folder B (4 files):
Slot File     Length       Date          Quality
1    67     00:00:01  2/09/2009  7:42:01 HQ
2    68     00:21:01  2/09/2009  7:42:11 HQ
3    69     00:26:29  2/09/2009  8:01:06 HQ
4    70     00:40:20  2/09/2009  8:41:18 HQ
Folder C (0 files):
Slot File     Length       Date          Quality
Folder S (0 files):
Slot File     Length       Date          Quality

Note FolderA has two 65s, naturally ODVR skips the second one.
I propose the following patch in cli.c. Somewhere around line number 203,
instead of this

sprintf(fn, "D%c_%04d.wav", odvr_foldername(dev, folder), instat.id);

place this

sprintf(fn, "D%c_%04d_%02d.wav", odvr_foldername(dev, folder), instat.id,
slot);

And everything will work :)

Original issue reported on code.google.com by veca...@gmail.com on 19 Apr 2009 at 5:47

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for the report and the fix! Fixed in SVN r11.

Original comment by tristan....@gmail.com on 27 Sep 2009 at 4:58