netmd++  1.0.4
C++ API to access NetMD devices
netmd++.h File Reference
#include <cstdint>
#include <sstream>
#include <vector>
#include <ctime>
#include <functional>
#include <mutex>

Go to the source code of this file.

Classes

struct  netmd::TrackTime
 track times More...
 
struct  netmd::NetMdTime
 NetMD time. More...
 
struct  netmd::DiscCapacity
 Structure to hold the capacity information of a disc. More...
 
struct  netmd::Group
 track group More...
 
class  netmd::CNetMdApi
 This class describes a C++ NetMD access library. More...
 
class  netmd::CNetMdTOC
 This class describes a net md TOC. More...
 
struct  netmd::CNetMdTOC::DAOFragment
 a fragment used in DAO track More...
 

Typedefs

using netmd::Groups = std::vector< Group >
 netmd groups
 
using netmd::NetMDByteVector = std::vector< uint8_t >
 byte vector
 
using netmd::EvtCallback = std::function< void(bool)>
 hotplug callback function signature More...
 
using netmd::netmd_pp = CNetMdApi
 use netmd_pp instead of CNetMdApi
 

Enumerations

enum  netmd::DiskFormat : uint8_t {
  netmd::NETMD_DISKFORMAT_LP4 = 0, netmd::NETMD_DISKFORMAT_LP2 = 2, netmd::NETMD_DISKFORMAT_SP_MONO = 4, netmd::NETMD_DISKFORMAT_SP_STEREO = 6,
  netmd::NO_ONTHEFLY_CONVERSION = 0xf
}
 disk format More...
 
enum  netmd::NetMdErr : int {
  netmd::NETMDERR_NO_ERROR = 0, netmd::NETMDERR_USB = -1, netmd::NETMDERR_NOTREADY = -2, netmd::NETMDERR_TIMEOUT = -3,
  netmd::NETMDERR_CMD_FAILED = -4, netmd::NETMDERR_CMD_INVALID = -5, netmd::NETMDERR_PARAM = -6, netmd::NETMDERR_OTHER = -7,
  netmd::NETMDERR_NOT_SUPPORTED = -8, netmd::NETMDERR_INTERIM = -9, netmd::NETMDERR_AGAIN = -10
}
 NetMD errors. More...
 
enum  netmd::TrackProtection : uint8_t { netmd::TrackProtection::UNPROTECTED = 0x00, netmd::TrackProtection::PROTECTED = 0x03, netmd::TrackProtection::UNKNOWN = 0xFF }
 type safe protection flags
 
enum  netmd::AudioEncoding : uint8_t { netmd::AudioEncoding::SP = 0x90, netmd::AudioEncoding::LP2 = 0x92, netmd::AudioEncoding::LP4 = 0x93, netmd::AudioEncoding::UNKNOWN = 0xff }
 type safe encoding flags
 
enum  netmd::typelog {
  netmd::DEBUG, netmd::INFO, netmd::WARN, netmd::CRITICAL,
  netmd::CAPTURE
}
 log severity More...
 
enum  netmd::UTOCSector : uint16_t {
  netmd::POS_ADDR, netmd::HW_TITLES, netmd::TSTAMPS, netmd::FW_TITLES,
  netmd::UNKNWN_1, netmd::UNKNON_2
}
 TOC sector names. More...
 
enum  netmd::HomebrewFeatures : uint32_t {
  netmd::NOTHING = 0x00, netmd::SP_UPLOAD = 0x01, netmd::PCM_2_MONO = 0x02, netmd::PCM_SPEEDUP = 0x04,
  netmd::USB_EXEC = 0x08
}
 NetMD homebrew features. More...
 

Functions

std::ostream & netmd::operator<< (std::ostream &o, const TrackTime &tt)
 format helper for TrackTime More...
 
std::ostream & netmd::operator<< (std::ostream &o, const AudioEncoding &ae)
 format helper for AudioEncoding More...
 
std::ostream & netmd::operator<< (std::ostream &o, const TrackProtection &tp)
 format helper for TrackProtection More...
 
NetMDByteVector & netmd::operator+= (NetMDByteVector &a, const NetMDByteVector &b)
 Addition assignment operator for NetMDByteVector. More...
 

Typedef Documentation

◆ EvtCallback

using netmd::EvtCallback = typedef std::function<void(bool)>

hotplug callback function signature

Parameters
[in]trueif device is added; false if removed

Enumeration Type Documentation

◆ DiskFormat

enum netmd::DiskFormat : uint8_t

disk format

Enumerator
NETMD_DISKFORMAT_LP4 

LP4.

NETMD_DISKFORMAT_LP2 

LP2.

NETMD_DISKFORMAT_SP_MONO 

SP mono.

NETMD_DISKFORMAT_SP_STEREO 

SP stereo.

NO_ONTHEFLY_CONVERSION 

dont do on-the-fly encoding

◆ HomebrewFeatures

enum netmd::HomebrewFeatures : uint32_t

NetMD homebrew features.

Enumerator
NOTHING 

no features

SP_UPLOAD 

SP upload.

PCM_2_MONO 

PCM to mono.

PCM_SPEEDUP 

PCM speedup.

USB_EXEC 

USB execution.

◆ NetMdErr

enum netmd::NetMdErr : int

NetMD errors.

Enumerator
NETMDERR_NO_ERROR 

success

NETMDERR_USB 

general USB error

NETMDERR_NOTREADY 

player not ready for command

NETMDERR_TIMEOUT 

timeout while waiting for response

NETMDERR_CMD_FAILED 

minidisc responded with 08 response

NETMDERR_CMD_INVALID 

minidisc responded with 0A response

NETMDERR_PARAM 

parameter error

NETMDERR_OTHER 

any other error

NETMDERR_NOT_SUPPORTED 

not supported

NETMDERR_INTERIM 

interim

NETMDERR_AGAIN 

try again

◆ typelog

log severity

Enumerator
DEBUG 

debug information

INFO 

information

WARN 

more serious

CRITICAL 

critical information

CAPTURE 

needed for log parcing!

◆ UTOCSector

enum netmd::UTOCSector : uint16_t

TOC sector names.

Enumerator
POS_ADDR 

position and addresses of audio data

HW_TITLES 

half width titles

TSTAMPS 

time stamps

FW_TITLES 

full width titles

UNKNWN_1 

some unidentified TOC sector #1

UNKNON_2 

some unidentified TOC sector #2

Function Documentation

◆ operator+=()

NetMDByteVector& netmd::operator+= ( NetMDByteVector a,
const NetMDByteVector b 
)

Addition assignment operator for NetMDByteVector.

Parameters
abyte vector 1
[in]bbyte vector 2
Returns
The result of the addition assignment

◆ operator<<() [1/3]

std::ostream& netmd::operator<< ( std::ostream &  o,
const TrackTime tt 
)

format helper for TrackTime

Parameters
oref. to ostream
[in]ttTrackTime
Returns
formatted TrackTime stored in ostream

◆ operator<<() [2/3]

std::ostream& netmd::operator<< ( std::ostream &  o,
const AudioEncoding ae 
)

format helper for AudioEncoding

Parameters
oref. to ostream
[in]aeAudioEncoding
Returns
formatted AudioEncoding stored in ostream

◆ operator<<() [3/3]

std::ostream& netmd::operator<< ( std::ostream &  o,
const TrackProtection tp 
)

format helper for TrackProtection

Parameters
oref. to ostream
[in]tpTrackProtection
Returns
formatted TrackProtection stored in ostream