<commit_before>"""SoundInterval module: contains the SoundInterval class"""

__all__ = ['SoundInterval']

from pandac.PandaModules import *
from direct.directnotify.DirectNotifyGlobal import *
import Interval
import random

class SoundInterval(Interval.Interval):
    # Name counter
    soundNum = 1
    # create SoundInterval DirectNotify category
    notify = directNotify.newCategory('SoundInterval')
    # Class methods
    # Create a sound interval
    # If loop = 0, sound will play once, duration of the interval
    # equals the duration of the sound
    # If loop = 1, the sound will loop for the specified duration
    # If no duration is specified, sound will loop for the duration
    # of the sound, i.e. it will only play once.....usually, there
    # seems to be some timing in the audio such that the stop doesn't
    # kill the looping sound until the next time around if duration
    # of the interval equals duration of the sound
    # seamlessloop will let the audio system loop the sound rather
    # than explicitly restarting the sound every time around. This
    # prevents a skip in the sound at every repetition (the gap in
    # the sound is caused by the delay between the end of the sound
    # and the next taskMgr cycle)
    def __init__(self, sound, loop = 0, duration = 0.0, name = None,
                 volume = 1.0, startTime = 0.0, node=None,
                 seamlessLoop=True):
        """__init__(sound, loop, name)
        """
        # Generate unique name
        id = 'Sound-%d' % SoundInterval.soundNum
        SoundInterval.soundNum += 1
        # Record instance variables
        self.sound = sound<commit_msg>added warning about looping MP3s in Miles<commit_after>"""SoundInterval module: contains the SoundInterval class"""

__all__ = ['SoundInterval']

from pandac.PandaModules import *
from direct.directnotify.DirectNotifyGlobal import *
import Interval
import random

class SoundInterval(Interval.Interval):
    # Name counter
    soundNum = 1
    # create SoundInterval DirectNotify category
    notify = directNotify.newCategory('SoundInterval')
    # Class methods
    # Create a sound interval
    # If loop = 0, sound will play once, duration of the interval
    # equals the duration of the sound
    # If loop = 1, the sound will loop for the specified duration
    # If no duration is specified, sound will loop for the duration
    # of the sound, i.e. it will only play once.....usually, there
    # seems to be some timing in the audio such that the stop doesn't
    # kill the looping sound until the next time around if duration
    # of the interval equals duration of the sound
    # seamlessloop will let the audio system loop the sound rather
    # than explicitly restarting the sound every time around. This
    # prevents a skip in the sound at every repetition (the gap in
    # the sound is caused by the delay between the end of the sound
    # and the next taskMgr cycle). There still seems to be a skip
    # in Miles when looping MP3s. =(
    def __init__(self, sound, loop = 0, duration = 0.0, name = None,
                 volume = 1.0, startTime = 0.0, node=None,
                 seamlessLoop=True):
        """__init__(sound, loop, name)
        """
        # Generate unique name
        id = 'Sound-%d' % SoundInterval.soundNum
        SoundInterval.soundNum += 1
        # Record instance variables
        self.sound = sound
{'fraction_non_alphanumeric': 0.0670963961324348, 'fraction_numerical': 0.007031936712569587, 'mean_word_length': 2.8928164196123145, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3501593', 'n_tokens_mistral': 881, 'n_tokens_neox': 862, 'n_words': 411}