Problem with tutorial lesson2

C7f11532b81e886316e927d884a73849
0
AnUnknown 101 May 10, 2010 at 12:38

Hi Guys

At first I have to say hello to all of you ..i’m very new in here. I’ve just startet with a little project in open al and devC++.

Now i’ve got a little problem with lesson2 of the tutorial on this page (http://www.devmaster.net/articles/openal-tutorials/lesson2.php)

I want to replay an other file instead of these footsteps. I just changend the path but my wav-files are probably too big.

….

alGenBuffers(1, &Buffer);

if(alGetError() != AL_NO_ERROR)
return AL_FALSE;

alutLoadWAVFile(“wavdata/sound.wav”, &format, &data, &size, &freq, &loop);
alBufferData(Buffer, format, data, size, freq);
alutUnloadWAV(format, data, size, freq);

So how will I be able to put some bigger files in these example?

PS: Sorry for my bad english ;-)

Greetings

5 Replies

Please log in or register to post a reply.

A638aa42130293f319eda7fa4ba121f4
0
fireside 141 May 10, 2010 at 13:56

Haven’t used Openal, except briefly, but if you want help you need to describe your problem a little better. Are there any error messages when you compile? That’s number one. What exactly is the problem? Saying the files are too big doesn’t really help. Are they not playing properly or not at all? In other words, rather than expressing what you think might be wrong, explain the behavior that is happening, and what error messages are being displayed.

46407cc1bdfbd2db4f6e8876d74f990a
0
Kenneth_Gorking 101 May 10, 2010 at 16:45

For large soundfiles, you should use streaming, to keep memory use down. Lesson 8 explains how to do this.

C7f11532b81e886316e927d884a73849
0
AnUnknown 101 May 11, 2010 at 11:19

OK sorry for that.

There is no error message when I compile. But if i start the programm nothing happens. Theres just a black window for a second and then it disappears. No sound, no error just nothing.

When I take a small file (about 50kB) everything works but with bigger files there is a probem

I will take a look at lesson 8. maybe this will help me

thank you so far

Fd80f81596aa1cf809ceb1c2077e190b
0
rouncer 103 May 11, 2010 at 12:09

Cant help sorry, all I can say is youll be kicking but as soon as you get your speaker to make any sound at all, then youll be off and running.
Same problem with your eyes, If you start your program and all you get is a blank screen, youve got nothing to go off, so you at least have to
see something. :)

A638aa42130293f319eda7fa4ba121f4
0
fireside 141 May 11, 2010 at 16:12

There is no error message when I compile. But if i start the programm nothing happens. Theres just a black window for a second and then it disappears. No sound, no error just nothing.

When that happens for me, I go into command prompt and run the exe with dos commands. You may be getting a system error but the window is closing before you can read it. Hopefully you know a few dos commands. Mainly you just need to get to the directory and then type the name of the program. It sounds like it is related to size of the file though, so streaming will probably take care of it.

You may be able to run it inside an IDE and view the runtime error, also. I haven’t used c++ in a while or one of the IDE’s of late.