Problems with SoundInterval

I’m having a problem replaying a SoundInterval. I cut the Interval off early by calling Interval.finish(). When I opt to replay the sound, I have tried to call either Interval. start() or Interval.resume(). Now, when I try and play the sound again, Panda crashes in both instances. Do I have to do anything special to set up the Sound Interval again for replay?
The code is for a Dialogue tree system. Once I exit the dialogue, and go back to speaking back to the NPC again, it crashes on replaying the sound.

Here’s my code for the tree traversal and SoundInterval.

def dialogueTraversal(self,TraversalList,node):
elif(len(node[2]) > 0):

        #NPCspeech has a string for NPC dialogue
        NPCspeech = node[0]
        print "NPC" , NPCspeech
        NPCspeech = NPCspeech.encode('ascii')
        self.talkTextNPC['text'] = NPCspeech

        #PClist will have a list of all the PC dialogue strings to display
        print "PC",self.PClist
        PCspeech = '\n'.join(self.PClist)
        PCspeech = PCspeech.encode('ascii')
        self.talkTextPC['text'] = PCspeech
        self.NPCVoiceInt = SoundInterval(node[3], volume=1)
        self.PClistLength = len(self.PClist)
        #select which dialogue
        self.choiceIndex = 0;
        self.selectedString = self.PClist[self.choiceIndex]
        self.TraversalList = TraversalList
        parent = TraversalList.pop()

def dialogueChoice(self):
self.selectedNode = self.currentNode[2][self.selectedString]
del self.currentNode[2][self.selectedString]

I suspect there’s a bug in the fmod glue code. That’s one of the less reliable modules, at present. We’ve had problems with it before.

I’m afraid that the guy who’s familiar with that module won’t be in the office until Monday, but I can have him analyze the problem then. My suggestion would be to suppress the sound until we have time to figure out the problem on Monday. My apologies for the delay.

By the way - even if there is some sort of mistake in your code, panda shouldn’t crash. It should print out an informative error message and continue. So this definitely is a bug in panda.

  • Josh

It would be awesome if you could email me a small program that triggers the bug.

Problem fixed. Sounds don’t like to be copied in Panda.