[MPlayer-dev-eng] [PATCH] ao_dart

KO Myung-Hun komh at chollian.net
Mon Feb 16 14:17:01 CET 2009


Hi/2.

Diego Biurrun wrote:
> On Mon, Feb 16, 2009 at 06:13:29PM +0900, KO Myung-Hun wrote:
>   
>> [...]
>>
>> --- libao2/ao_dart.c    (revision 0)
>> +++ libao2/ao_dart.c    (revision 0)
>> @@ -0,0 +1,266 @@
>> +/*
>> + * OS/2 DART audio output driver for MPlayer
>>     
>
> Drop "for MPlayer", what else is this supposed to be for?
>
>   

Fixed. ^^

>> +#define INCL_DOS
>> +#include <os2.h>
>> +
>> +#include <stdio.h>
>> +#include <stdlib.h>
>> +#include <sys/time.h>
>> +#include <float.h>
>> +
>> +#include "config.h"
>> +#include "libaf/af_format.h"
>> +#include "audio_out.h"
>> +#include "audio_out_internal.h"
>> +#include "mp_msg.h"
>> +#include "libvo/fastmemcpy.h"
>> +#include "subopt-helper.h"
>> +
>> +#include "dart.h"
>>     
>
> dart.h must be a system header, use <> for it and place it above with
> the other system headers.
>
>   

Even though it's not a system header, Ok.

Fixed.

>> +static ULONG APIENTRY dart_audio_callback(PVOID pCBData, PVOID pBuffer, ULONG ulSize)
>>     
>
> Please try to keep lines below 80 characters where reasonably posible.
>
>   

Ok.

>> +static void print_help(void)
>> +{
>> +    mp_msg(MSGT_AO, MSGL_FATAL,
>> +            "\n-ao dart commandline help:\n"
>>     
>
> one space too much
>
>   

Fixed.

>> +// open & setup audio device
>>     
>
> set up
>
>   

Fixed.

>> +    switch(format) {
>>     
>
> switch (
>
>   

Fixed.

>> +    if (dartInit(0, af_fmt2bits(format), rate, MCI_WAVE_FORMAT_PCM, channels,
>> +                   2, n * nDartSamples, !fNoShare, dart_audio_callback, NULL))
>>     
>
> two spaces too much..
>
>   

Fixed.

>> +    ao_data.channels = channels;
>> +    ao_data.samplerate = rate;
>> +    ao_data.format = format;
>> +    ao_data.bps = channels * rate * (af_fmt2bits(format) >> 3);
>> +    ao_data.outburst = n * OUTBURST_SAMPLES;
>> +    ao_data.buffersize = m_nBufSize;
>>     
>
> This could be aligned.
>
>   

Ok.

>> +static int play(void *data, int len, int flags)
>> +{
>> +    int start_pos, end_pos;
>> +
>> +    if (!(flags & AOPLAY_FINAL_CHUNK))
>> +        len = (len / ao_data.outburst) * ao_data.outburst;
>> +
>> +    if (len == 0)
>>     
>
> !len
>
>   

Ok.

>> --- DOCS/man/en/mplayer.1   (revision 28593)
>> +++ DOCS/man/en/mplayer.1   (working copy)
>> @@ -2836,6 +2836,18 @@
>>  .TP
>> +.B dart (OS/2 only)
>> +OS/2 DART audio output driver
>> +.PD 0
>> +.RSs
>> +.IPs noshare
>> +Open DART as exclusive mode
>>     
>
> s/as/in/, end in a period.
>
>   

Fixed

>> +.IPs bufsize=<size>
>> +Set buffer size to <size> in samples, default 2048
>>     
>
> Set buffer size to <size> in samples (default: 2048).
>
>   

Fixed.

-- 
KO Myung-Hun

Using Mozilla SeaMonkey 1.1.14
Under OS/2 Warp 4 for Korean with FixPak #15
On AMD ThunderBird 1 GHz with 512 MB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dart.diff
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20090216/d79d67ff/attachment.asc>


More information about the MPlayer-dev-eng mailing list