| Copyright | (c) 2018-2021 Sam May |
|---|---|
| License | GPL-3.0-or-later |
| Maintainer | ag@eitilt.life |
| Stability | stable |
| Portability | non-portable (requires libcdio) |
| Safe Haskell | None |
| Language | Haskell2010 |
Foreign.Libcdio.Read
Description
After obtaining landmarks through Foreign.Libcdio.Disc (and likely
Foreign.Libcdio.Track), this module provides the functions required to
actually retrive the primary data from the disc. Some knowledge of its
physical layout is required, which may be determined through
trackFormat.
read.h
Types
cdio_read_mode_t->ReadModeCDIO_READ_MODE_M1F1->Mode1Form1CDIO_READ_MODE_M1F2->Mode1Form2CDIO_READ_MODE_M2F1->Mode2Form1CDIO_READ_MODE_M2F2->Mode2Form2
Symbols
cdio_lseek->seekcdio_read->readBytescdio_read_audio_sector->readAudioSectorcdio_read_audio_sectors->readAudioSectorscdio_read_data_sectors->readDataSectorscdio_read_mode1_sector->readDataModeSectorcdio_read_mode1_sectors->readDataModeSectorscdio_read_mode2_sector->readXaModeSectorcdio_read_mode2_sectors->readXaModeSectorscdio_read_sector->readSectorcdio_read_sectors->readSectors
Sound.Libcdio.Read.Data
Each of the single-sector read* aliases have been removed for consistency.
ReadMode(removed; unnecessary low-level detail)readAudioSectors->readAudioreadBytes->readRaw(note that the count is now the number of sectors rather than bytes)readDataModeSectors->readDatareadDataSectors(removed; unnecessary low-level detail)readXaModeSectors->readXa
Synopsis
- data ReadMode
- data Whence
- seek :: Cdio -> Int -> Whence -> IO (Either DriverReturnCode Word)
- readBytes :: Cdio -> Word -> IO (Maybe ByteString)
- readSector :: Cdio -> Lsn -> ReadMode -> IO (Either DriverReturnCode ByteString)
- readSectors :: Cdio -> Lsn -> ReadMode -> Word -> IO (Either DriverReturnCode ByteString)
- readAudioSector :: Cdio -> Lsn -> IO (Either DriverReturnCode ByteString)
- readAudioSectors :: Cdio -> Lsn -> Word -> IO (Either DriverReturnCode ByteString)
- readDataSectors :: Cdio -> Lsn -> Word -> Word -> IO (Either DriverReturnCode ByteString)
- readDataModeSector :: Cdio -> Lsn -> Bool -> IO (Either DriverReturnCode ByteString)
- readDataModeSectors :: Cdio -> Lsn -> Bool -> Word -> IO (Either DriverReturnCode ByteString)
- readXaModeSector :: Cdio -> Lsn -> Bool -> IO (Either DriverReturnCode ByteString)
- readXaModeSectors :: Cdio -> Lsn -> Bool -> Word -> IO (Either DriverReturnCode ByteString)
Types
How data is laid out on a disc.
Constructors
| AudioMode | |
| Mode1Form1 | |
| Mode1Form2 | |
| Mode2Form1 | |
| Mode2Form2 |
Instances
| Bounded ReadMode Source # | |
| Enum ReadMode Source # | |
Defined in Foreign.Libcdio.Types.Enums | |
| Eq ReadMode Source # | |
| Ord ReadMode Source # | |
Defined in Foreign.Libcdio.Types.Enums | |
| Read ReadMode Source # | |
| Show ReadMode Source # | |
Which location an offset passed to seek should be
based on.
Constructors
| SeekStart | |
| SeekCurrent | |
| SeekEnd |
Functions
Raw
readBytes :: Cdio -> Word -> IO (Maybe ByteString) Source #
Read a given number of bytes from the disc. With data of a known
structure, use readSectors or similar instead, which don't include the
headers and footers described in Foreign.Libcdio.Sector.
Sector
readSector :: Cdio -> Lsn -> ReadMode -> IO (Either DriverReturnCode ByteString) Source #
Read the data contained in a specific sector from the disc.
readSectors :: Cdio -> Lsn -> ReadMode -> Word -> IO (Either DriverReturnCode ByteString) Source #
Read the data contained in the given number of sectors from the disc, beginning with the specified sector.
readAudioSector :: Cdio -> Lsn -> IO (Either DriverReturnCode ByteString) Source #
Similar to calling readSector with AudioMode, depending on the driver
implementation.
readAudioSectors :: Cdio -> Lsn -> Word -> IO (Either DriverReturnCode ByteString) Source #
Similar to calling readSectors with AudioMode, depending on the driver
implementation.
Arguments
| :: Cdio | |
| -> Lsn | |
| -> Word | Sector size (e.g. |
| -> Word | Number of sectors to read. |
| -> IO (Either DriverReturnCode ByteString) |
Read the raw data from a given number of sectors on the disc, beginning with the specified sector.
Arguments
| :: Cdio | |
| -> Lsn | |
| -> Bool | If |
| -> IO (Either DriverReturnCode ByteString) |
Similar to calling readSector, depending on the driver implementation.
Arguments
| :: Cdio | |
| -> Lsn | |
| -> Bool | If |
| -> Word | |
| -> IO (Either DriverReturnCode ByteString) |
Similar to calling readSectors, depending on the driver implementation.
Arguments
| :: Cdio | |
| -> Lsn | |
| -> Bool | If |
| -> IO (Either DriverReturnCode ByteString) |
Similar to calling readSector, depending on the driver implementation.
Arguments
| :: Cdio | |
| -> Lsn | |
| -> Bool | If |
| -> Word | |
| -> IO (Either DriverReturnCode ByteString) |
Similar to calling readSectors, depending on the driver implementation.