libgig  4.3.0
DiskImage Class Reference

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.
 
 DiskImage (int disk)
 Open an image from a device number (0='a:', 1='b:', etc...).
 
bool WriteImage (const char *path)
 Extract Akai data track and write it into a regular file.
 
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.
 
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.
 
int ReadInt16 (uint16_t *pData)
 Returns number of successfully read 16 Bit words.
 
int ReadInt32 (uint32_t *pData)
 Returns number of successfully read 32 Bit words.
 
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
 

Detailed Description

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.

Definition at line 109 of file Akai.h.


The documentation for this class was generated from the following files: