Sound glitch when using libvorbisfile and libao

Marshall Mason <[email protected]> Sat, 13 Jun 2015 22:10:57 -0700
Newsgroups gmane.comp.multimedia.ogg.vorbis.devel
Message-ID <CANMExBR_Nu2L4ni3e-pb82EQGJT3fSjXJ7XBJkgN5=fNDTNPTQ@mail.gmail.com>
--===============0302477592==
Content-Type: multipart/alternative; boundary=047d7b66f2f1cc66d40518735dd5

--047d7b66f2f1cc66d40518735dd5
Content-Type: text/plain; charset=UTF-8

Hi there,
I've been grappling with this for some time, so I'm finally breaking down
and trying this list.

I'm trying to integrate libvorbisfile and libao to create a simple sound
file player, a la ogg123. To do this, I borrowed heavily from ao_example.c
and vorbisfile_example.c. I feed the buffer from ov_read into ao_play in a
simple loop. It usually works, but occasionally all it does is make a
strange sound and quickly finishes. I cannot dependably reproduce it. The
same problem does not happen when I use ogg123, so I'm sure I'm doing
something wrong. I've combed through the ogg123 source code and couldn't
figure it out. I'm wondering if someone can look at my code and tell me if
there's something I overlooked.

http://pastie.org/10239629

(Debian Jessie, libvorbisfile 1.3.4, libao-1.1.0)

Thanks,
Marshall

--047d7b66f2f1cc66d40518735dd5
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi there,<div>I&#39;ve been grappling with this for some t=
ime, so I&#39;m finally breaking down and trying this list.</div><div><br><=
/div><div>I&#39;m trying to integrate libvorbisfile and libao to create a s=
imple sound file player, a la ogg123. To do this, I borrowed heavily from a=
o_example.c and vorbisfile_example.c. I feed the buffer from ov_read into a=
o_play in a simple loop. It usually works, but occasionally all it does is =
make a strange sound and quickly finishes. I cannot dependably reproduce it=
. The same problem does not happen when I use ogg123, so I&#39;m sure I&#39=
;m doing something wrong. I&#39;ve combed through the ogg123 source code an=
d couldn&#39;t figure it out. I&#39;m wondering if someone can look at my c=
ode and tell me if there&#39;s something I overlooked.</div><div><br></div>=
<div><a href=3D"http://pastie.org/10239629">http://pastie.org/10239629</a><=
br></div><div><br></div><div>(Debian Jessie, libvorbisfile 1.3.4, libao-1.1=
.0)</div><div><br></div><div>Thanks,</div><div>Marshall</div></div>

--047d7b66f2f1cc66d40518735dd5--

--===============0302477592==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Vorbis-dev mailing list
[email protected]
http://lists.xiph.org/mailman/listinfo/vorbis-dev

--===============0302477592==--