Jump to content


Problem with tutorial lesson2


5 replies to this topic

#1 AnUnknown

    New Member

  • Members
  • Pip
  • 2 posts

Posted 10 May 2010 - 12:38 PM

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...als/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

#2 fireside

    Senior Member

  • Members
  • PipPipPipPip
  • 1616 posts

Posted 10 May 2010 - 01:56 PM

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.
Currently using Blender and Unity.

#3 Kenneth Gorking

    Senior Member

  • Members
  • PipPipPipPip
  • 939 posts

Posted 10 May 2010 - 04:45 PM

For large soundfiles, you should use streaming, to keep memory use down. Lesson 8 explains how to do this.
"Stupid bug! You go squish now!!" - Homer Simpson

#4 AnUnknown

    New Member

  • Members
  • Pip
  • 2 posts

Posted 11 May 2010 - 11:19 AM

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

#5 rouncer

    Senior Member

  • Members
  • PipPipPipPip
  • 2758 posts

Posted 11 May 2010 - 12:09 PM

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. :)
you used to be able to fit a game on a disk, then you used to be able to fit a game on a cd, then you used to be able to fit a game on a dvd, now you can barely fit one on your harddrive.

#6 fireside

    Senior Member

  • Members
  • PipPipPipPip
  • 1616 posts

Posted 11 May 2010 - 04:12 PM

Quote

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.
Currently using Blender and Unity.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users