Pergunta

I'm attempting to run Kivy's audio example found here. The specific example is this:

sound = SoundLoader.load(filename='test.wav')
if not sound:
    # unable to load this sound ?
    pass
else:
    # sound loaded, let's play!
    sound.play()

When attempting to play any .wav file in my directory however, I just hear a click or pop noise. I've tried with different .wav files and am experiencing the same problem. I've also attempted to print out the length of the sound by using the length function, but it returns 0 for some reason. Any feedback or input from you guys? Thanks again.

Foi útil?

Solução

Can't say just looking at the snippet above how you've implemented it in your Application or what's wrong.

There is a more elaborate example should be in the examples directory under your Kivy install directory that should clear up how to use SoundLoader.

Hope that helps.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top