[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: bug in arts
From:       Matthias Welwarsky <matze () stud ! fbi ! fh-darmstadt ! de>
Date:       2002-07-22 11:00:52
[Download RAW message or body]

On Monday 22 July 2002 09:39, Dan Stone wrote:

> Oh, I realize it wasn't the *proper* solution, nor have I tested actually
> running the built aRts package -- the fact that it had compiled properly
> was just an offhand comment.  Well, what would you suggest for a value,
> then?  In the way it's implemented in gsldatahandle-vorbis.c, this is the
> relevant code...

> ~~~~~~~~~~~~~~
> static void
> read_packet (VorbisHandle *vhandle)
> gfloat **pcm = NULL;
> gint stream_id, i;
>
> vhandle->pcm_pos = ov_pcm_tell ( &vhandle->ofile) - vhandle->soffset;
> vhandle->pcm_length = ov_read_float (&vhandle->ofile, &pcm, &stream_id);
> ~~~~~~~~~~~~~~~
>
> So, you can't know the size of the buffer (pcm here) at the time of the
> function call, unless there's something I'm missing...

Hm, seems I missed something here. I automatically assumed that the pcm buffer 
had to be allocated outside the ogg library and of course then the length is 
known. I still assume this, so the code in gsldatahandle-vorbis.c would 
probably need to be changed to allocate a buffer for pcm first, and pass a 
pointer/length to ov_read_float.

regards,
	matze

-- 
Matthias Welwarsky
Fachschaft Informatik FH Darmstadt
Email: matze@stud.fbi.fh-darmstadt.de

"all software sucks equally, but some software is more equal"

[Attachment #3 (application/pgp-signature)]
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic