Esempio n. 1
0
    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)
Esempio n. 3
0
    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()
Esempio n. 4
0
    def __init__(self, name, bitmap):

        Object.__init__(self)
        self.name = name
        self.bitmap = bitmap
Esempio n. 5
0
    def __init__(self, position, view):

        Object.__init__(self)
        self.position = position
        self.view = view
Esempio n. 6
0
    def __init__(self, time, forecasts):

        Object.__init__(self)

        self.time = time
        self.forecasts = forecasts
Esempio n. 7
0
    def __init__(self):

        Object.__init__(self)
        self.entries = []
Esempio n. 8
0
    def __init__(self):

        Object.__init__(self)
        self.decoded = False
Esempio n. 9
0
    def __init__(self):

        Object.__init__(self)

        self.file = None
        self.init()
Esempio n. 10
0
    def __init__(self, primary, secondary):

        Object.__init__(self)
        self.primary = primary
        self.secondary = secondary
 def __init__(self):
     Object.__init__(self)