/ src / bitmessageqt / sound.py
sound.py
 1  # -*- coding: utf-8 -*-
 2  """Sound Module"""
 3  
 4  # sound type constants
 5  SOUND_NONE = 0
 6  SOUND_KNOWN = 1
 7  SOUND_UNKNOWN = 2
 8  SOUND_CONNECTED = 3
 9  SOUND_DISCONNECTED = 4
10  SOUND_CONNECTION_GREEN = 5
11  
12  
13  # returns true if the given sound category is a connection sound
14  # rather than a received message sound
15  def is_connection_sound(category):
16      """Check if sound type is related to connectivity"""
17      return category in (
18          SOUND_CONNECTED,
19          SOUND_DISCONNECTED,
20          SOUND_CONNECTION_GREEN
21      )
22  
23  
24  extensions = ('wav', 'mp3', 'oga')