Jump to content


Pausing In OpenAL


6 replies to this topic

#1 SpreeTree

    Valued Member

  • Members
  • PipPipPip
  • 265 posts

Posted 26 January 2004 - 08:34 PM

Hi all

This seemed like the best plave to put a question about OpenAL, if not, let me know, or just move it ;)

According to the OpenAL docs, when you pause a source, the stste changes to Paused, and then you call alSourcePlay(_sourceID) to resume the source. Well, I cant get this to work. If I write:

alSourcePause(soundSource[_sourceID].source);
CCOPENAL_ERROR_CHECK_NO_RETURN("Pausing source :");
alSourcePlay(soundSource[_sourceID].source);

(where soundSource[_sourceID].source is the ID generated by OpenAL), the sample stops as it should, no errors are generated, and the state gets set to Paused. But then when I call the alSourcePlay function, the source plays, but from the start of the sample, not from where I paused it.

These two lines are called one after the other, so nothing else if resenting the buffer, just wondered if anyone had any ideas?

Cheers

Spree

#2 anubis

    Senior Member

  • Members
  • PipPipPipPip
  • 2225 posts

Posted 26 January 2004 - 10:14 PM

i have no experience with openal so i can only direct you to the wonderful openal tuts here on devmaster. as there really is no place for sound related questions i will leave the post here :D
If Prolog is the answer, what is the question ?

#3 SpreeTree

    Valued Member

  • Members
  • PipPipPip
  • 265 posts

Posted 26 January 2004 - 11:34 PM

Yeah I've looked at the tutorials, but they dont really go into the problem. But thanks anyway :)

Spree

#4 anubis

    Senior Member

  • Members
  • PipPipPipPip
  • 2225 posts

Posted 27 January 2004 - 09:10 AM

np, i hope somebody else around here can help you
If Prolog is the answer, what is the question ?

#5 Dia

    DevMaster Staff

  • Administrators
  • 1120 posts

Posted 27 January 2004 - 09:33 PM

That's a good question. Unfortunately, I'm not knowledgable with OpenAL either. The main guy is Jesse, the author of the tutorials. I hope he reads your post and answers your question.

#6 SpreeTree

    Valued Member

  • Members
  • PipPipPip
  • 265 posts

Posted 27 January 2004 - 10:07 PM

Ah well, problem solved. Seems its a bug within the new openAL dll's. alSourcePlay doesnt actually work in the way its meant too. Ive flagged it up on the dev mailing lists, just have to wait now... and I hate waiting ;)

Spree

#7 Dia

    DevMaster Staff

  • Administrators
  • 1120 posts

Posted 28 January 2004 - 06:17 AM

Since a "Sound and Music Programming" forum has been created, I've moved all related questions to the new forum.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users