Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Load sounds problem.

Author
Message
Yitzu
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location:
Posted: 26th Feb 2009 01:48
Hi, Yitzu here!
Ummmm, im having a problem loading the sounds to my project.

First ill show u the code and then ill tell u wats my problem.


rem Cambiear resolucion
SET DISPLAY MODE 960, 600, 32

rem Esconder mouse
Hide mouse

rem Subir y empezar musica
Load Music "C:\Markus\Wilson_Island_Music\Wilson_Island_Title_Screen_Music.Mid",1
Loop Music 1

rem Subit "DB" Logo
Load Bitmap "C:\Markus\Wilson_Island_Images\Dark_Basic_Logo.bmp"

rem Esperar 5 segundos
wait (5*1000)

rem Subir "WW" logo
Load bitmap "C:\Markus\Wilson_Island_Images\Wilson_Works_Logo.bmp"

rem Esperar 5 segundos
wait (5*1000)

rem Subir title screen
Load Bitmap "C:\Markus\Wilson_Island_Images\Wilson_Island_Title_screen(Start).bmp"

rem Teclas y acciones
Upkey1:
DO
If upkey()=1
Load Bitmap "C:\Markus\Wilson_Island_Images\Wilson_Island_Title_Screen(Load).bmp"
Load sound "C:\Markus\Wilson_Island_Sounds\Wilson_Island_Title_Screen_Sound.wav" ,1
Play sound 1
Wait (1*150)
Gosub Upkey2
Endif
Loop

DO
Upkey2:
If upkey()=1
Load Bitmap "C:\Markus\Wilson_Island_Images\Wilson_Island_Title_Screen(Options).bmp"
Gosub Downkey1
ENDIF
If downkey()=1
Gosub downkey2
ENDIF
Loop

Do
Downkey1:
If downkey()=1
Load Bitmap "C:\Markus\Wilson_Island_Images\Wilson_Island_Title_Screen(Load).bmp"
Wait (1*150)
GoTo Upkey2
ENDIF
Loop

Do
Downkey2:
If downkey()=1
Load bitmap "C:\Markus\Wilson_Island_Images\Wilson_Island_Title_screen(Start).bmp"
Wait (1*150)
GoTo Upkey1
ENDIF
Loop


The action of the sound is where I putted the penguin.
The problem is that it wont load the sound, i dont know y, maybe its a format problem, or a program porblem, well i dont know, so, if someone knows about this problem, plz post wat u know. lol ty.

REMEMBER ME, IM YITZU!
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 26th Feb 2009 02:58 Edited at: 26th Feb 2009 03:05
are you by chance getting error 3003, sound already exists?

the coding "style" employed here is gonna cause you a lot of headaches as you're (potentially) re-loading resources/media. once you load image/sound/music, there's no need to load it again... and all the load bitmaps... ah, not gonna get into all of it. heh.

anyway, if you wish to continue as you are, try changing it to:



that will see if the sound is already loaded and skip the load procedure if it is...

ALSO:
when you're gonna show a lot of code like that, please put it in code tags like this:

[ code ]

blah
blah
blah

[ /code ]

make sure you remove the spaces around the words " code " and " /code "

Virtual Nomad @ California, USA
AMD Phenomâ„¢ X4 9750 Quad-Core @ 2.4 GHz . 8 GB PC2-6400 RAM
ATI Radeon HD 3650 @ 512 MB . Vista Home Premium 64 Bit
Yitzu
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location:
Posted: 26th Feb 2009 04:23
hey, ty for posting, but the code u putted there didn't work, lol, i don't know wats the problem with my sound. Well, gotta investigate to find it out, well, anyway ty. And also ty for the code thing, im like a nooby so i didn't know how to do that, so ill try to do it next time. If someone know about the problem im having, well try posting something, lol, thx.

REMEMBER ME, IM YITZU!
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 26th Feb 2009 04:28
ah, the forum took the back-slashes out of the Load Sound line... how nice.

Virtual Nomad @ California, USA
AMD Phenomâ„¢ X4 9750 Quad-Core @ 2.4 GHz . 8 GB PC2-6400 RAM
ATI Radeon HD 3650 @ 512 MB . Vista Home Premium 64 Bit
Yitzu
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location:
Posted: 26th Feb 2009 04:32
lol, yes, i noticed, but i wrote them, so, no problem
Yitzu
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location:
Posted: 27th Feb 2009 00:12
Hey guys, i really need help with this, someone know how to solve my problem?
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 27th Feb 2009 01:50
Maybe if you told us what error you are getting it would be easier to help.
Is the sound simply not being loaded, do you get an error message (what does it say in that case) or do the program outright crash?

Yitzu
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location:
Posted: 28th Feb 2009 00:32
ok, i load the program, everything goes well, and when i come to the part of loading the sounds it says, "Runetime error 3002 - Could not load sound at line 27
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 28th Feb 2009 11:25
Well, I can't really say what's wrong with that.
Maybe, just maybe, the sound's file name is too long, but I doubt that unless you're running Windows 95 or something.

Could you upload the sound here for us to see whether it will work for us, or if it is in fact the sound file that is corrupted (which seems the likeliest in this case)?

HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 28th Feb 2009 13:32
what type of sound file is it, wav, mid, or mp3?

Dark Physics makes any hot drink go cold.
Veron
17
Years of Service
User Offline
Joined: 22nd Nov 2006
Location:
Posted: 28th Feb 2009 16:14
Change the path to the sound to just the filename, and have the sound file in the same folder as your .DBA/.EXE files for the project.

Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 28th Feb 2009 17:14
@HowDo: Looking at his code, it seems to be a wave file.

Yitzu
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location:
Posted: 28th Feb 2009 23:47
"When the impossible is eliminated, the probable is the solution"
Serlock Holmes words.

FINALLY, I FINALLY GET WHAT WAS THE PROBLEM, IT WAS SOMETHING SOOOOO OBVIOUS AND STUPID, LOL.
The problem was that when i saved the sound, i saved it like this
"Wilson_Island_Title_Screen_Sound.wav" and i had to save it like THIS "Wilson_Island_Title_Screen_Sound". DO U SEE IT, IT WAS THE ******* WAV!!!
DBP WAS FEELING THAT THE WAV WAS PART OF THE NAME, SO IT DIDN'T FIND THE FILE. OMG!!!
IT WAS SO OBVIOUS, GUYS, TY SOOOOO MUCH FOR ALL UR HELP, REALLY.

and...

REMEMBER ME, IM YITZU!
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 1st Mar 2009 11:21
How could I ever forget ...

(Joking )

Mulderman
20
Years of Service
User Offline
Joined: 8th Jan 2004
Location: C:\\
Posted: 1st Mar 2009 16:11
Why are you using so long filenames and paths?
Yitzu
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location:
Posted: 2nd Mar 2009 03:40
lol, just trying to be more exactly, ty guys

Login to post a reply

Server time is: 2024-09-28 02:26:20
Your offset time is: 2024-09-28 02:26:20