Skip to content

get second play of the time buffer #2

@azegami

Description

@azegami

Excuse me
I want get second play of the time buffer
I wrote this code.

float offset;
alGetSourcef(source, AL_SEC_OFFSET, &offset);
return offset;

But, I was not able to do so.
I was able to get in this code.

float offset;
alGetSourcef(source, AL_BYTE_OFFSET, &offset);

ALint bufferID, frequency, bitsPerSample, channels;
alGetSourcei(source, AL_BUFFER, &bufferID);
alGetBufferi(bufferID, AL_FREQUENCY, &frequency);
alGetBufferi(bufferID, AL_CHANNELS, &channels);
alGetBufferi(bufferID, AL_BITS, &bitsPerSample);

return ((double)offset)/(frequency_channels_(bitsPerSample/8));
Why do could not be?
I would appreciate your favor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions