VERSION 1.0 CLASS BEGIN MultiUse = -1 'True Persistable = 0 'NotPersistable DataBindingBehavior = 0 'vbNone DataSourceBehavior = 0 'vbNone MTSTransactionMode = 0 'NotAnMTSObject END Attribute VB_Name = "clsRJPInstrument" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = True Attribute VB_PredeclaredId = False Attribute VB_Exposed = False Option Explicit Option Compare Binary Option Base 0 Public ptrSample As Long Public ptrUnknown As Long Public U1 As Long Public frequencyShift As Integer Public volume As Integer Private extraSize As Long Public sampleSize As Long Public loopStart As Long Public loopSize As Long Public U3 As Integer Public U4 As Integer Public U5 As Long Private sampleData() As Byte Public Function getSampleDataPtr() As Long getSampleDataPtr = VarPtr(sampleData(0)) End Function Public Sub putSampleData(ByVal ptrData As Long, ByVal Size As Long) ReDim sampleData(Size) CopyMemory VarPtr(sampleData(0)), ptrData, Size End Sub Public Sub loadFrom(ByRef Bits As clsBitStreamRead) ptrSample = Bits.getLong + 4 ptrUnknown = Bits.getLong U1 = Bits.getLong frequencyShift = Bits.getInteger volume = Bits.getInteger extraSize = Bits.getInteger * 2 sampleSize = Bits.getInteger * 2 loopStart = Bits.getInteger * 2 loopSize = Bits.getInteger * 2 U3 = Bits.getInteger U4 = Bits.getInteger U5 = Bits.getLong sampleSize = sampleSize + extraSize End Sub