iDevGames Forums
openAL problems - Printable Version

+- iDevGames Forums (
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Designer's Studio (/forum-6.html)
+--- Thread: openAL problems (/thread-6186.html)

openAL problems - drzeip - Oct 12, 2004 02:48 PM

Hi I've been struggling to get any output from my computer using OpenAL. Granted I have a dodgy 24 bit soundcard but I can't even get output through my internal speaker. This is my source:

#define clickSound 1

    alutInit(&argc, argv);
    alGetError(); // clear any error messages
    // Generate buffers, or else no sound will happen!
    alGenBuffers(NUM_BUFFERS, buffer);
    if(alGetError() != AL_NO_ERROR)
        printf("- Error creating buffers !!\n");
        printf("init() - No errors yet.");

    alGetError(); /* clear error */
    alGenSources(NUM_SOURCES, source);
    if(alGetError() != AL_NO_ERROR)
        printf("- Error creating sources !!\n");
        printf("init - no errors after alGenSources\n");


I receive no error messages. Should i check for errors after i try to play the sound?

Thanks in advance


openAL problems - OneSadCookie - Oct 12, 2004 05:23 PM

My bet is that alutLoadWAVFile is failing, since you're not checking whether it's succeeded...

openAL problems - drzeip - Oct 13, 2004 07:22 AM

I dunno what was happening before but after a bit of fiddling and updating OpenAL along with getting the new CoreAudio SDK i have sound!!! Wow

I think it was the way i bundled the sounds.