def __init__(self, file): Object.__init__(self) self.file = file self.init() self.read(file)
def __init__(self, resources): Object.__init__(self) # Obtain the keys and values to be used to create the symbols # dictionary from the application's resources. symbols = resources.getStringArray(R.array.symbols) resourceIDs = resources.getIntArray(R.array.resourceIDs) self.symbols = dict(symbols, resourceIDs)
def __init__(self): Object.__init__(self) # Define low and high tone waveforms. self.low_tone = [] self.high_tone = [] self.gap = [] i = 0 dx = 2 * Math.PI / self.SAMPLES_PER_BIT while i < self.SAMPLES_PER_BIT: low = Math.sin(i * dx) if low >= 0: self.low_tone.add(short(16384)) else: self.low_tone.add(short(-16384)) high = Math.sin(2 * i * dx) if high >= 0: self.high_tone.add(short(16384)) else: self.high_tone.add(short(-16384)) self.gap.add(short(0)) i += 1 # Define a track with a capacity large enough to fit five bytes of # encoded data. # data (bits) bytes per short capacity = 60 * self.SAMPLES_PER_BIT * 2 self.track = AudioTrack(AudioManager.STREAM_MUSIC, self.SAMPLE_RATE, AudioFormat.CHANNEL_OUT_MONO, AudioFormat.ENCODING_PCM_16BIT, capacity, AudioTrack.MODE_STREAM) self.track.play()
def __init__(self, name, bitmap): Object.__init__(self) self.name = name self.bitmap = bitmap
def __init__(self, position, view): Object.__init__(self) self.position = position self.view = view
def __init__(self, time, forecasts): Object.__init__(self) self.time = time self.forecasts = forecasts
def __init__(self): Object.__init__(self) self.entries = []
def __init__(self): Object.__init__(self) self.decoded = False
def __init__(self): Object.__init__(self) self.file = None self.init()
def __init__(self, primary, secondary): Object.__init__(self) self.primary = primary self.secondary = secondary
def __init__(self): Object.__init__(self)