Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » [Allegro 4.4] Choppy audio from play_ogg addon

This thread is locked; no one can reply to it. rss feed Print
[Allegro 4.4] Choppy audio from play_ogg addon
Boon928
Member #16,066
August 2015

Hello everyone,

I'm trying to use Allegro 4.4-HEAD on my Linux amd64 platform.
I'm having problems with the audio part, specifically decoding ogg vorbis files with the play_ogg program example from logg addon.

I cloned the git repo, and checked out the 4.4 branch.
I tweaked the CMakeLists.txt file (attached).
SHARED=off, WANT_MODULES=off, WANT_X11=off, WANT_LINUX_CONSOLE=on,
WANT_LINUX_VGA=off, WANT_LINUX_SVGALIB=off, WANT_LINUX_TSLIB=off,
and I tried OSS, then ALSA.

I ran cmake, then make play_ogg

When I run play_ogg on a ogg vorbis file, the audio is choppy and plays too fast.

I'm running Xubuntu 14.04 in a Virtualbox VM.
libogg-dev:amd64 1.3.1-1ubuntu1
libvorbis-dev:amd64 1.3.2-1.3ubuntu1
libasound2-dev:amd64 1.0.27.2-3ubuntu7

If I use gmusicbrowser to play the same ogg vorbis file, it works as expected.

Does someone know what I'm doing wrong?

[EDIT-1]

I wanted to check whether the problem came from the ALSA layer, or from the ogg vorbis decoding layer.

I compiled the "exsample" example, downloaded a random WAV file, and it plays correctly... Hmmm, looks like I have a problem with the logg add-on?

I suppose the 4.4-HEAD logg add-on works for others?

Maybe I have a library incompatibility?

[EDIT-2]

Could someone try these commands in Linux:

$ git clone https://github.com/liballeg/allegro5.git allegro
$ cd allegro && git checkout 4.4
$ cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS_DEBUG=-ggdb3 -DSHARED=off -DWANT_MODULES=off -DWANT_EXAMPLES=on -DWANT_X11=off -DWANT_LINUX_CONSOLE=on -DWANT_LINUX_VGA=off -DWANT_LINUX_SVGALIB=off -DWANT_LINUX_TSLIB=off -DWANT_OSS=off -DWANT_JACK=off -DWANT_SGIAUDIO=off .
$ make play_ogg
$ wget https://upload.wikimedia.org/wikipedia/commons/1/1d/Demo_chorus.ogg
$ addons/logg/play_ogg Demo_chorus.ogg

Does the sound play normally for you? ???

I just get garbled sound. :'(

[EDIT-3]

Apparently, running as root solves the problem.

Am I supposed to run play_ogg as root?
It does not work when run by a regular user?
Which part requires elevated privileges?

Regards

Go to: