/*
* CINELERRA
* Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
+ *
*/
#include "errorbox.h"
{
BC_DisplayInfo info;
ErrorBox window(_(PROGRAM_NAME ": CD Ripper"),
- info.get_abs_cursor_x(),
+ info.get_abs_cursor_x(),
info.get_abs_cursor_y());
window.create_objects(_("Can't open cdrom drive."));
window.run_window();
struct cdrom_tochdr hdr;
struct cdrom_tocentry entry[100];
BC_DisplayInfo info;
-
+
result = open_drive();
-
+
if(ioctl(cdrom, CDROMREADTOCHDR, &hdr) < 0)
{
close(cdrom);
ErrorBox window(_(PROGRAM_NAME ": CD Ripper"),
- info.get_abs_cursor_x(),
+ info.get_abs_cursor_x(),
info.get_abs_cursor_y());
window.create_objects(_("Can't get total from table of contents."));
window.run_window();
ioctl(cdrom, CDROMSTOP);
close(cdrom);
ErrorBox window(_(PROGRAM_NAME ": CD Ripper"),
- info.get_abs_cursor_x(),
+ info.get_abs_cursor_x(),
info.get_abs_cursor_y());
window.create_objects(_("Can't get table of contents entry."));
window.run_window();
ioctl(cdrom, CDROMSTOP);
close(cdrom);
ErrorBox window(_(PROGRAM_NAME ": CD Ripper"),
- info.get_abs_cursor_x(),
+ info.get_abs_cursor_x(),
info.get_abs_cursor_y());
window.create_objects(_("Can't get table of contents leadout."));
window.run_window();
result = 1;
}
-
-
+
+
tracks = hdr.cdth_trk1+1;
if(track1 <= 0 || track1 > tracks)
ioctl(cdrom, CDROMSTOP);
close(cdrom);
ErrorBox window(_(PROGRAM_NAME ": CD Ripper"),
- info.get_abs_cursor_x(),
+ info.get_abs_cursor_x(),
info.get_abs_cursor_y());
window.create_objects(_("Start track is out of range."));
window.run_window();
{
track2 = tracks;
}
-
+
if(track2 < track1 || track2 <= 0)
{
ioctl(cdrom, CDROMSTOP);
close(cdrom);
ErrorBox window(_(PROGRAM_NAME ": CD Ripper"),
- info.get_abs_cursor_x(),
+ info.get_abs_cursor_x(),
info.get_abs_cursor_y());
window.create_objects(_("End track is out of range."));
window.run_window();
result = 1;
}
-
+
if(track1 == track2 && min2 == 0 && sec2 == 0)
{
ioctl(cdrom, CDROMSTOP);
close(cdrom);
ErrorBox window(_(PROGRAM_NAME ": CD Ripper"),
- info.get_abs_cursor_x(),
+ info.get_abs_cursor_x(),
info.get_abs_cursor_y());
window.create_objects(_("End position is out of range."));
window.run_window();
}
//printf("CDRipMain::process_loop 2 %d %jd\n", arg.addr.lba, endlba);
- for(i = 0; i < fragment_length;
+ for(i = 0; i < fragment_length;
i += NFRAMES * FRAMESIZE,
arg.addr.lba += NFRAMES)
{