Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Exchange / OpenAL procesor intensive when not playing audio
- - By Jamer Date 2012-01-04 04:44 Edited 2012-01-04 21:24
If a song or sample has played for any amount of time, the OpenAL thread starts eating my CPU whenever audio is not playing.

It uses an order of magnitude more CPU when idling than when playing. One would expect it instead to idle instead.

Gosu version: 0.7.40
OpenAL version: openal-soft 1.13
OS: Debian testing (haven't tested other systems)

Reproduce using:

#include <Gosu/Gosu.hpp>

class Win : public Gosu::Window
{
public:
  Win()
    : Gosu::Window(320, 240, false),
      song(L"foo.ogg"),
      frames(0)
  {
    song.play();
  }

  void draw() {}
  void update()
  {
    if (frames++ == 60 * 2) // 2 seconds
      song.stop();
  }

private:
  Gosu::Song song;
  int frames;
};

int main()
{
  Win w;
  w.show();
  return 0;
}
Parent - By jlnr (dev) Date 2012-01-09 06:25
Interesting, I will investigate.
Up Topic Gosu / Gosu Exchange / OpenAL procesor intensive when not playing audio

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill