May 27, 2016 Does this C callback call look correct? | ||||
---|---|---|---|---|
| ||||
// Specification from ALURE documentation ALURE_API ALboolean ALURE_APIENTRY alurePlaySourceStream( ALuint source, alureStream *stream, ALsizei numBufs, ALsizei loopcount, void (*eos_callback)(void *userdata, ALuint source), void *userdata ) // My D code, below compiles and links and when I execute it // I get a beep sound (which is as expected), but ALURE never // calls my eos_callback function no matter how long I wait. extern (C) void eos_callback(void *unused, ALuint unused2) { writeAndPause("End Of Streaming"); } if (alurePlaySourceStream( source, stream, numBuffs, loopStreamCount, &eos_callback, // end of stream callback cast (void *) 0) == AL_FALSE) Am I missing something? I'm using Derelict ALURE. I've looked on github but there seems to be no D code using this technique. |
May 28, 2016 Re: Does this C callback call look correct? | ||||
---|---|---|---|---|
| ||||
Posted in reply to WhatMeWorry | Never mind. D was fine. Needed an alureUpdate() to trigger the call back. |
Copyright © 1999-2021 by the D Language Foundation