problems with UseOGGSoundDecoder()

Just starting out? Need help? Post your questions and find answers here.
SirCus
User
User
Posts: 12
Joined: Sat May 10, 2003 7:29 pm
Location: Germany
Contact:

problems with UseOGGSoundDecoder()

Post 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?
GreenGiant
Enthusiast
Enthusiast
Posts: 252
Joined: Fri Feb 20, 2004 5:43 pm

Post 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)
SirCus
User
User
Posts: 12
Joined: Sat May 10, 2003 7:29 pm
Location: Germany
Contact:

Post 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
GreenGiant
Enthusiast
Enthusiast
Posts: 252
Joined: Fri Feb 20, 2004 5:43 pm

Post 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?
SirCus
User
User
Posts: 12
Joined: Sat May 10, 2003 7:29 pm
Location: Germany
Contact:

Post 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..)
GreenGiant
Enthusiast
Enthusiast
Posts: 252
Joined: Fri Feb 20, 2004 5:43 pm

Post 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.
Post Reply