libgig
3.3.0.svn21
|
Accessing AKAI image either from file or a drive (i.e. More...
#include <Akai.h>
Public Member Functions | |
DiskImage (const char *path) | |
Open an image from a file. More... | |
DiskImage (int disk) | |
Open an image from a device number (0='a:', 1='b:', etc...). More... | |
bool | WriteImage (const char *path) |
Extract Akai data track and write it into a regular file. More... | |
virtual | ~DiskImage () |
virtual akai_stream_state_t | GetState () const |
virtual int | GetPos () const |
virtual int | SetPos (int Where, akai_stream_whence_t Whence=akai_stream_start) |
virtual int | Available (uint WordSize=1) |
virtual int | Read (void *pData, uint WordCount, uint WordSize) |
Returns number of successfully read words. More... | |
void | ReadInt8 (uint8_t *pData, uint WordCount) |
void | ReadInt16 (uint16_t *pData, uint WordCount) |
void | ReadInt32 (uint32_t *pData, uint WordCount) |
int | ReadInt8 (uint8_t *pData) |
Returns number of successfully read 8 Bit words. More... | |
int | ReadInt16 (uint16_t *pData) |
Returns number of successfully read 16 Bit words. More... | |
int | ReadInt32 (uint32_t *pData) |
Returns number of successfully read 32 Bit words. More... | |
uint8_t | ReadInt8 () |
uint16_t | ReadInt16 () |
uint32_t | ReadInt32 () |
virtual uint | GetError () const |
Protected Member Functions | |
void | OpenStream (const char *path) |
void | swapBytes_16 (void *Word) |
void | swapBytes_32 (void *Word) |
Protected Attributes | |
int | mFile |
bool | mRegularFile |
int | mPos |
int | mCluster |
int | mClusterSize |
int | mSize |
int | mStartFrame |
int | mEndFrame |
char * | mpCache |
Accessing AKAI image either from file or a drive (i.e.
CDROM).
This class implements a hardware abstraction layer, providing an abstract streaming API to read from AKAI data images, no matter if the AKAI image is already available as image file or whether the respective hardware drive needs to be accessed directly (i.e. CDROM drive, ZIP drive). So the main task of this class is isolating operating system dependent file/hardware access.
DiskImage::DiskImage | ( | const char * | path | ) |
DiskImage::DiskImage | ( | int | disk | ) |
|
inlinevirtual |
|
virtual |
Definition at line 1623 of file Akai.cpp.
Referenced by AkaiProgram::Load(), and AkaiSample::LoadHeader().
|
virtual |
Definition at line 1616 of file Akai.cpp.
References akai_stream_closed, akai_stream_end_reached, and akai_stream_ready.
|
protected |
Definition at line 1786 of file Akai.cpp.
References CD_FRAMESIZE, and DISK_CLUSTER_SIZE.
|
virtual |
Returns number of successfully read words.
Definition at line 1658 of file Akai.cpp.
Referenced by AkaiProgram::GetSample(), AkaiProgram::Load(), AkaiSample::LoadHeader(), AkaiDiskElement::ReadDirEntry(), and AkaiDiskElement::ReadFAT().
void DiskImage::ReadInt16 | ( | uint16_t * | pData, |
uint | WordCount | ||
) |
Definition at line 1725 of file Akai.cpp.
Referenced by AkaiDisk::GetPartitionCount(), AkaiProgram::GetSample(), AkaiProgram::Load(), AkaiSample::LoadHeader(), AkaiSample::LoadSampleData(), AkaiSample::Read(), and AkaiDiskElement::ReadDirEntry().
int DiskImage::ReadInt16 | ( | uint16_t * | pData | ) |
Returns number of successfully read 16 Bit words.
Definition at line 1743 of file Akai.cpp.
References AkaiSample::Read().
uint16_t DiskImage::ReadInt16 | ( | ) |
Definition at line 1766 of file Akai.cpp.
References AkaiSample::Read().
void DiskImage::ReadInt32 | ( | uint32_t * | pData, |
uint | WordCount | ||
) |
Definition at line 1732 of file Akai.cpp.
Referenced by AkaiSample::LoadHeader().
int DiskImage::ReadInt32 | ( | uint32_t * | pData | ) |
Returns number of successfully read 32 Bit words.
Definition at line 1751 of file Akai.cpp.
References AkaiSample::Read().
uint32_t DiskImage::ReadInt32 | ( | ) |
Definition at line 1776 of file Akai.cpp.
References AkaiSample::Read().
void DiskImage::ReadInt8 | ( | uint8_t * | pData, |
uint | WordCount | ||
) |
Definition at line 1721 of file Akai.cpp.
References AkaiSample::Read().
Referenced by AkaiProgram::GetSample(), AkaiProgram::Load(), and AkaiSample::LoadHeader().
int DiskImage::ReadInt8 | ( | uint8_t * | pData | ) |
Returns number of successfully read 8 Bit words.
Definition at line 1739 of file Akai.cpp.
References AkaiSample::Read().
uint8_t DiskImage::ReadInt8 | ( | ) |
Definition at line 1759 of file Akai.cpp.
References AkaiSample::Read().
|
virtual |
Definition at line 1628 of file Akai.cpp.
References akai_stream_curpos, akai_stream_end, and akai_stream_start.
Referenced by AkaiDisk::GetPartitionCount(), AkaiProgram::Load(), AkaiSample::LoadHeader(), AkaiSample::LoadSampleData(), AkaiSample::Read(), AkaiDiskElement::ReadDirEntry(), and AkaiDiskElement::ReadFAT().
|
inlineprotected |
|
inlineprotected |
bool DiskImage::WriteImage | ( | const char * | path | ) |
Extract Akai data track and write it into a regular file.
Definition at line 1876 of file Akai.cpp.
References AkaiSample::Read(), and AkaiSample::SetPos().
|
protected |
Definition at line 150 of file Akai.h.
Referenced by GetError().