~ubuntu-branches/ubuntu/lucid/cdrdao/lucid

« back to all changes in this revision

Viewing changes to dao/CDD2600.h

  • Committer: Bazaar Package Importer
  • Author(s): Andrew Suffield
  • Date: 2004-06-24 22:33:16 UTC
  • Revision ID: james.westby@ubuntu.com-20040624223316-534onzugaeeyq61j
Tags: upstream-1.1.9
ImportĀ upstreamĀ versionĀ 1.1.9

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*  cdrdao - write audio CD-Rs in disc-at-once mode
 
2
 *
 
3
 *  Copyright (C) 1998-2001  Andreas Mueller <mueller@daneb.ping.de>
 
4
 *
 
5
 *  This program is free software; you can redistribute it and/or modify
 
6
 *  it under the terms of the GNU General Public License as published by
 
7
 *  the Free Software Foundation; either version 2 of the License, or
 
8
 *  (at your option) any later version.
 
9
 *
 
10
 *  This program is distributed in the hope that it will be useful,
 
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
 *  GNU General Public License for more details.
 
14
 *
 
15
 *  You should have received a copy of the GNU General Public License
 
16
 *  along with this program; if not, write to the Free Software
 
17
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
18
 */
 
19
 
 
20
#ifndef __CDD2600_H__
 
21
#define __CDD2600_H__
 
22
 
 
23
#include "CdrDriver.h"
 
24
#include "CDD2600Base.h"
 
25
class Toc;
 
26
class Track;
 
27
 
 
28
class CDD2600 : public CdrDriver, private CDD2600Base {
 
29
public:
 
30
 
 
31
  CDD2600(ScsiIf *scsiIf, unsigned long options);
 
32
  ~CDD2600();
 
33
 
 
34
  static CdrDriver *instance(ScsiIf *scsiIf, unsigned long options);
 
35
 
 
36
  unsigned long getReadCapabilities(const CdToc *, int) const { return 0; }
 
37
 
 
38
  // CDD2600 takes big endian samples
 
39
  int bigEndianSamples() const { return 1; }
 
40
 
 
41
  int speed(int);
 
42
 
 
43
  DiskInfo *diskInfo();
 
44
 
 
45
  int loadUnload(int) const;
 
46
  
 
47
  int initDao(const Toc *);
 
48
  int startDao();
 
49
  int finishDao();
 
50
  void abortDao();
 
51
 
 
52
  int writeData(TrackData::Mode, TrackData::SubChannelMode, long &lba,
 
53
                const char *buf, long len);
 
54
 
 
55
  Toc *readDiskToc(int, const char *);
 
56
  Toc *readDisk(int, const char *);
 
57
 
 
58
protected:
 
59
  DiskInfo diskInfo_;
 
60
 
 
61
  CdRawToc *getRawToc(int sessionNr, int *len);
 
62
  int readCatalog(Toc *, long startLba, long endLba);
 
63
  int readIsrc(int, char *);
 
64
  int getTrackIndex(long lba, int *trackNr, int *indexNr, unsigned char *ctl);
 
65
  int analyzeTrack(TrackData::Mode, int trackNr, long startLba, long endLba,
 
66
                   Msf *index,
 
67
                   int *indexCnt, long *pregap, char *isrcCode,
 
68
                   unsigned char *ctl);
 
69
  int readSubChannels(TrackData::SubChannelMode, long lba, long len,
 
70
                      SubChannel ***, Sample *);
 
71
 
 
72
 
 
73
private:
 
74
  long leadInLength_;
 
75
  long leadOutLength_;
 
76
 
 
77
  int modeSelectPlay(int immediate, int sotc, unsigned char volume);
 
78
 
 
79
  int readSubChannelData(int *trackNr, int *indexNr, long *,
 
80
                         unsigned char *ctl);
 
81
 
 
82
  void readBlock(unsigned long sector);
 
83
 
 
84
  long readTrackData(TrackData::Mode, TrackData::SubChannelMode, long lba,
 
85
                     long len, unsigned char *buf);
 
86
 
 
87
  int readAudioRange(ReadDiskInfo *, int fd, long start, long end,
 
88
                     int startTrack, int endTrack, TrackInfo *);
 
89
 
 
90
  int nextWritableAddress(long *lba, int showError);
 
91
 
 
92
 
 
93
};
 
94
 
 
95
#endif