[MPlayer-G2-dev] New libao2

Ivan Kalvachev ivan at cacad.com
Wed Jul 16 14:31:30 CEST 2003


Arpi said:
>
> we should define the metrics of in/out parameters, ie. byte vs. sample,
> and that stereo sample-pair does count one or two samples.
> and that bps is bits-per-second, bits-per-sample, bytes-per-second or
> what. it made the most confusion around mplayer-g1 audio layer causing
> various bugs.
>
Agree:))

Without seeing the actual code.
> /* Audio data chunk */
> typedef struct aio_data_s
> {
>   void* audio;  // data buffer
>   int size;     // size of bffer
>   int len;      // bytes in buffer
> }aio_data_t;
hmm
size is the size in samples?
I have though that if could be good to have something like
....
void * audio;
int number_of_samples; //(44100 for one second)
int size_of_sample; //( 4 bytes for 16bit stereo)
int chanels; //(2 for stereo)
.... //? mabe format here too?

this way an compressed data could be hanled the same way as non compressed
with only limitation that if the compressed data is variable size then it
it could be only one sample (number_of_samples=1)

This structure also makes it easier to add samples to the current buffer
and/or to extract them.

>
> Do you have plans to replace libaf, or it's "good as-is" ?
> For audio in/out it's ok to use packets, but i like fifo-type buffers
> better for filters (esp. that you cannot give exact in/out rate for some
> filters, see buffer size over/underflow problems in libaf when using
> resample). (i don't like its "packetized buffer" design but i have no
> time in the near future to implement my idea)
>
>
> A'rpi / Astral & ESP-team
>
> --

Best Regards
   Ivan Kalvachev
  iive





More information about the MPlayer-G2-dev mailing list