Page 1 of 1
problems with UseOGGSoundDecoder()
Posted: Fri Aug 27, 2004 11:15 am
by SirCus
hi everybody
Using UseOGGSoundDecoder() kills my application.
I justhave UseOGGSoundDecoder() and LoadSound(x,name)
as well as playsound.
If I click at "debug" the debugger starts and ends immidiately without an error msg.
If I remove "UseOggSoundDecoder()" and change the filename to an wav file, itworks fine.
Any suggestions?
Posted: Fri Aug 27, 2004 12:10 pm
by GreenGiant
Thats strange, I just tried to run the SoundPlugin.pb example and the program crashed right after the open file requester. I got one of those Send Error Report boxes. I'm sure it used to work on my system as well.
Edit: It is the LoadSound command causing the program to crash (found out by commenting out seperate parts)
Posted: Fri Aug 27, 2004 12:19 pm
by SirCus
I tryied the onErrorlib:
this is the output"
"Attempting Division by zero
Total number of errors:1"
and this happens at LoadSound
----
btw:
is it possible to play mp3 as playsound and not as playmovie?
and do I need to send the oggvorbis dll withmy program if the targetcomputer does not have oggvorbis installed?
... and: I tried KarlKox OggStream lib as well.. but I guess im too stupid for this lib. I get POLINK errors .. is anyone familar with that lib? I dont know how to load and play oggfiles withthat thing.
http://sbougribate.free.fr/Files/OggStream-0.1.rar
Posted: Fri Aug 27, 2004 12:56 pm
by GreenGiant
I've just a had a go with the OnError aswell. Here's my modified version of the SoundExample code.
Code: Select all
Procedure error()
Debug GetErrorDescription()
Debug GetErrorModuleName()
Debug GetErrorCounter()
Debug ""
ProcedureReturn 1
EndProcedure
OnErrorGosub(@error())
If InitSound() = 0
MessageRequester("Error", "Can't open DirectX 7 or no sound card is available", 0)
End
EndIf
UseOGGSoundDecoder()
SoundFileName$ = OpenFileRequester("Choose a sound file", "", "Wave or OGG files|*.wav;*.ogg",0)
If SoundFileName$
If LoadSound(0, SoundFileName$)
PlaySound(0,1)
MessageRequester("Sound", "Playing the sound (loop)..."+Chr(10)+"Click to quit..", 0)
Else
MessageRequester("Error", "Can't load the sound.", 0)
EndIf
EndIf
End
Using this I get a mixture of "Attempted division by zero" and "An attempted read or write to/from an address to which that process isn't allowed" All from the main module. Oh and I did find one ogg file that gave sixteen errors, but then played only completely garbled. None of the others played at all.
Maybe this should be moved to bug reports?
Posted: Fri Aug 27, 2004 1:15 pm
by SirCus
I can confirm that
using your code I get 395 Erros saing: Attemted divisipn by zero , Main Module
the sound plays now, but very very ugly. unusable.
Guess Fred should verify that..
(wondering why nobody else found out that before..)
Posted: Sun Aug 29, 2004 3:48 pm
by GreenGiant
I know I probably shouldnt just bump posts like this, but I think this should be moved to the bug section. I cant see that my code can be wrong as it is one of the provided examples.