Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6143333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:30:43+00:00 2026-05-23T18:30:43+00:00

at work, we’re unable to use alSourcePause() to pause sounds, and in any case

  • 0

at work, we’re unable to use alSourcePause() to pause sounds, and in any case we might want to start the sound with an offset.

We’re performing a “resume” by doing alSourcei(this->sourceId, AL_SAMPLE_OFFSET, this->sampleOffset); with a sample offset that we retrieved with alGetSourcei(). We tried using AL_SEC_OFFSET, AL_BYTE_OFFSET and AL_SAMPLE_OFFSET — to no avail. We have read that the sound source needs to be in the “initial” state; recreating the source and attaching the buffer, then attempting to skip also did not help.

Changing the buffer to skip AL_BYTE_OFFSET is not a solution, since it complicates looping.

Streaming sounds are skipping on slower machines; we’re having trouble implementing multithreaded playing.

Since we’re on a tight schedule, what is the best way to skip a portion of a simple sound source on OpenAL on OS X?

Source code is available at our Sourceforge repository.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T18:30:44+00:00Added an answer on May 23, 2026 at 6:30 pm

    I recently encountered the same problem in our game engine on OS X (10.6.8). We performed the following steps when resuming playback of a static buffer with a given sample offset, in this order:

    alSourceQueueBuffers(mSourceId, 1, mBufferId);
    alSourcei(mSourceId, AL_SAMPLE_OFFSET, mSampleOffset);
    alSourcePlay(mSourceId);
    

    The source was stopped before that, and all buffers were unqueued. According to the AL 1.1 specs, it should be possible to either

    1. specify the buffer offset when the source is in the stopped state; here, the offset is supposed to be applied upon the next alSourcePlay() call, or
    2. specify the offset on an already playing source, which should result in an immediate skip to the desired position.

    (See section 4.3.2 of the official specs at http://connect.creativelabs.com/openal/Documentation/OpenAL%201.1%20Specification.htm )

    Reversing the latter two calls in the above sequence (i.e. setting the buffer offset after issuing the alSourcePlay() call) did the trick in our case. Technically, this should be a perfectly valid way to go; however, if the audio thread gets interrupted right between these two calls for too long a time, this could possibly result in hearable glitches.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

work on SQL Server 2000. want to Automated Email Notifications using SQL Server Job
I work in VBA, and want to parse a string eg <PointN xsi:type='typens:PointN' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
I work on an ASP.Net project which we build with VS 2010. We use
I work directly on a remote (S)FTP Server some times. I use textmate as
work on asp.net vs05.i want to set mouse event on gridview Then based on
Work on C# .I want to inherit generic class for this purpose i write
Work on C# linq.I have a list to list .From this list I want
I work with ruby on rails and use lazy_high_charts_gem to create highstock chart. I
work on Sql server 2000. i want to get the current server date and
I work on writing the excel Add-In using Excel Interop. I want to get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.