« Return to Thread: Buffer size problem

Re: Buffer size problem

by Jimmy Gervais :: Rate this Message:

Reply to Author | View in Thread

>Instead of using dynamic allocation, have you tried fixed buffer? Also, you can create white noise with the >alutCreateBufferWaveform().

>I'm a new user of OpenAL myself, so I'm sorry I can't provide you with more help.

Well, the size is predefined so I don't see what difference it would make. Do you?

Thanks I'll see about alutCreateBufferWaveform(). Right now I just have al, alc and alext (they came with SFML libraries). I'm going to look for alut.

>Actually, it makes difference the way the computer allocates the memory, but this is out of scope here. Try with defines, >something like this
>#define MAX_SIZE 250000
>int main(int argc, char *argv[])
>{
> ALuint buffer[MAX_SIZE];
>}
>This way you don't allocate the memory using new, and on the heap, which may lead to memory leak.



Thanks, it went up to 550000 with #define, better but doesn't really solve the prob ... ;)



_______________________________________________
Openal mailing list
Openal@...
http://opensource.creative.com/mailman/listinfo/openal

 « Return to Thread: Buffer size problem