Changes between Version 17 and Version 18 of AllOfCobraInOnePage
- Timestamp:
- 01/10/14 06:54:18 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
AllOfCobraInOnePage
v17 v18 52 52 53 53 class WavPacket implements IAudioPacket 54 cue init(bytes as uint8[]) 55 base.init 56 # ... create the wav packet format, using the bytes54 cue init(bytes as uint8[]) # cue init is the syntax for constructor (ctor) 55 base.init # it must call a base ctor. 56 # ... etc: create the wav packet format, using the bytes 57 57 58 58 def toWavPacket as WavPacket … … 62 62 var bytes as uint8[] 63 63 def toWavPacket as WavPacket 64 wavBytes = Mp3Utils.decode(.bytes) 65 wavpack = WavPacket(wavBytes) 64 wavBytes = Mp3Utils.decode(.bytes) 65 # methods without arguments, getters and some variables are accessed uniformly, with a '.' before their name. 66 #local variables don't have the dot. 67 wavpack = WavPacket(wavBytes) # instantiating a class. No need for the 'new' keyword in cobra. 66 68 return wavpack 67 69