[MPlayer-dev-eng] [PATCH] New audio filter: export

Gustavo Sverzut Barbieri gsbarbieri at yahoo.com.br
Sat Aug 30 07:26:01 CEST 2003


 --- Anders Johansson <ajh at watri.org.au> escreveu: 
> Hi,

Hi Anders!

 
> Ayone against applying this?
> 
> Gustavo, it looks good, I have a few comments though:

I have found one bug already too... see comment at the end.


> 1. In play why do you export the buffer even when it isn't full I
> have
> added a flag so that the function only writes to the shared memory
> when the buffer is filled.

Hum... that's right. Should only update when it's ready...
Do you have the code or I should submit it?

 
> 2. Is it necessary to use msync in play? If you use mmap in your app
> as well then it shouldn't be, cause msync only forces the buffer to 
> be written to disk.

Sure? I don't know mmap() very much, but if you are sure, so it's a
better solution!

> I have already made these two changes, so you don't have to send a
> new patch. I will not apply to CVS until you reply to this mail.

Ok, thanks!

> Also write some docs if you have time.

What kind of docs? manpage patch?


Also, I found a bug in my code. When I do (in play.c:252)

    memcpy( s->mmap_area + SIZE_HEADER, s->buf, nch * sz * c->bps );

I should do:

  for ( ch=0; ch < nch; ch++ )
    memcpy( s->mmap_area + SIZE_HEADER + ch * sz * c->bps, s->buf[ ch
], sz * c->bps );

because s->buff was allocated in a for(), so copying then together is
wrong.... doesn't export the wanted data.


Gustavo

_______________________________________________________________________
Desafio AntiZona: participe do jogo de perguntas e respostas que vai
dar um Renault Clio, computadores, câmeras digitais, videogames e muito
mais! www.cade.com.br/antizona



More information about the MPlayer-dev-eng mailing list