Page 1 of 1
Posted: Tue Aug 06, 2002 7:08 pm
by BackupUser
Restored from previous forum. Originally posted by Bonus.
Hi guys (and maybe even girls)
I am new to Pure basic, but not to basic. I have a small problem
with SoundInit. It keeps says Incorrect number of parameters.
But I us it as writen in the helpfile !!!
Do I really have to have Directx 7 installed or is a later version
also good. Because I used to work under 8.0 and my programs worked.
But lately nothing seems to work anymore.
Whats wrong...
.oO BoNuS Oo.
Posted: Tue Aug 06, 2002 7:10 pm
by BackupUser
Restored from previous forum. Originally posted by Bonus.
Oops something went wrong, sorry for that !!!!
.oO BoNuS Oo.
Posted: Tue Aug 06, 2002 7:21 pm
by BackupUser
Restored from previous forum. Originally posted by Danilo.
InitSound(), not SoundInit().
Use it without parameter.
Use DX7+ -> so DX8 is fine...
cya,
...Danilo
(registered PureBasic user)
Edited by - Danilo on 06 August 2002 20:23:03
Posted: Tue Aug 06, 2002 8:07 pm
by BackupUser
Restored from previous forum. Originally posted by Bonus.
That's what I wanted to say, InitSound().
I use then InitSound(6) because I have 6 samples i want to
play. But it wouldn't even get to the loading of the samples.
see code
; Init sprites
If InitSprite() = 0
MessageRequester("Error", "Can't open DirectX 7 Or later", 0)
End
EndIf
; Init Keyboard
If InitKeyboard() = 0
MessageRequester("Error", "Can't open DirectX 7 Or later", 0)
End
EndIf
InitSound(6)
LoadSound(1,"data\open.wav")
LoadSound(2,"data\exo1.wav")
LoadSound(3,"data\logoff.wav")
LoadSound(4,"data\menuclick.wav")
LoadSound(5,"data\m_funk.wav")
PlaySound(5,1)
.oO BoNuS Oo.
Posted: Tue Aug 06, 2002 8:08 pm
by BackupUser
Restored from previous forum. Originally posted by Bonus.
o and after playsound(5,1) the rest of the code ofcourse..
.oO BoNuS Oo.
Posted: Wed Aug 07, 2002 4:12 am
by BackupUser
Restored from previous forum. Originally posted by Danilo.
> InitSound(6)
Code: Select all
If InitSound() = 0
MessageRequester("Error", "Can't initialize sound", 0): End
EndIf
tried this, like i said before ??
cya,
...Danilo
(registered PureBasic user)
Posted: Wed Aug 07, 2002 7:46 pm
by BackupUser
Restored from previous forum. Originally posted by Bonus.
Okay build that in my source file but now I get "Can't create the 'PureBasic.exe' file (already running ?) in an Alert box...
So what wrong now ??? I tried another program called "animballz" ccomplied it and run and that works okay. But there is NO sound in it...
.oO BoNuS Oo.
Posted: Wed Aug 07, 2002 8:03 pm
by BackupUser
Restored from previous forum. Originally posted by Bonus.
I also tried the source below, a standard demo listing but that one
gives me the same error as above.
; ------------------------------------------------------------
; PureBasic - Sound example file
; (c) 2001 - Fantaisie Software
;------------------------------------------------------------
If InitSound() = 0
MessageRequester("Error", "Can't open DirectX 7 or no sound card is available", 0)
End
EndIf
SoundFileName$ = OpenFileRequester("Choose a .wav file", "", "Wave files|*.wav",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
.oO BoNuS Oo.
Posted: Thu Aug 08, 2002 4:17 am
by BackupUser
Restored from previous forum. Originally posted by Danilo.
> ;------------------------------------------------------------
> ; PureBasic - Sound example file
> ; (c) 2001 - Fantaisie Software
> ;------------------------------------------------------------
Works fine for me like it is.
Do you use the Demo 3.00 or Registered 3.20 ??
Maybe a problem with your sound driver ??
cya,
...Danilo
(registered PureBasic user)
Posted: Sun Aug 18, 2002 4:44 pm
by BackupUser
Restored from previous forum. Originally posted by Bonus.
I have the 3.00 demo version, I just want to try this basic out...
I also tried it on the machine at work but the same problem over there so it isn't my machine...
.oO BoNuS Oo.
Posted: Sun Aug 18, 2002 6:22 pm
by BackupUser
Restored from previous forum. Originally posted by Andre.
Bonus, try out the new PB 3.30 demo. Should be released until tomorrow...
Regards
André
*** German PureBasic Support ***
Posted: Sun Aug 18, 2002 10:40 pm
by BackupUser
Restored from previous forum. Originally posted by fred.
RELEASED .
Fred - AlphaSND