[FFmpeg-soc] [soc] libavsequencer [PATCH 07/08] Sample synth sound public API header file.

Sebastian Vater cdgs.basty at googlemail.com
Thu Jul 15 14:45:03 CEST 2010


Michael Niedermayer a écrit :
> On Wed, Jul 07, 2010 at 10:49:34PM +0200, Sebastian Vater wrote:
>   
> [...]
>   
>> +    /** 0x01: KILL    vX+YYYY
>> +       Stops and frees current channel, most likely to be used in NNA
>> +       handling code. vX+YYYY is the number of ticks to wait before
>> +       the channel actually will be killed. Synth code instruction
>> +       processing continues as normally until the wait counter has
>> +       been reached. Please note that even with YYYY set to zero, all
>> +       instructions executing in the same tick as the KILL instruction
>> +       will continue do so. If you don't want this, just place a STOP
>> +       instruction straight afterwards.  */
>> +#define AVSEQ_SYNTH_CODE_INSTRUCTION_KILL    0x01
>> +
>> +    /** 0x02: WAIT    vX+YYYY
>> +       Waits the given amount in ticks specified by vX+YYYY before
>> +       continue processing of synth code instructions.  */
>> +#define AVSEQ_SYNTH_CODE_INSTRUCTION_WAIT    0x02
>> +
>> +    /** 0x03: WAITVOL vX+YYYY
>> +       Waits until the volume handling code has reached the line
>> +       specified by vX+YYYY. The delay can be until song end if
>> +       the volume code never reaches the specified line.  */
>> +#define AVSEQ_SYNTH_CODE_INSTRUCTION_WAITVOL 0x03
>> +
>> +    /** 0x04: WAITPAN vX+YYYY
>> +       Waits until the panning handling code has reached the line
>> +       specified by vX+YYYY. The delay can be until song end if
>> +       the panning code never reaches the specified line.  */
>> +#define AVSEQ_SYNTH_CODE_INSTRUCTION_WAITPAN 0x04
>> +
>> +    /** 0x05: WAITSLD vX+YYYY
>> +       Waits until the slide handling code has reached the line
>> +       specified by vX+YYYY. The delay can be until song end if
>> +       the slide code never reaches the specified line.  */
>> +#define AVSEQ_SYNTH_CODE_INSTRUCTION_WAITSLD 0x05
>> +
>> +    /** 0x06: WAITSPC vX+YYYY
>> +       Waits until the special handling code has reached the line
>> +       specified by vX+YYYY. The delay can be until song end if
>> +       the special code never reaches the specified line.  */
>> +#define AVSEQ_SYNTH_CODE_INSTRUCTION_WAITSPC 0x06
>> +
>> +    /** 0x07: JUMP    vX+YYYY
>> +       Jumps to the target line number within the same synth
>> +       code specified by vX+YYYY.  */
>> +#define AVSEQ_SYNTH_CODE_INSTRUCTION_JUMP    0x07
>> +
>> +    /** 0x08: JUMPEQ  vX+YYYY
>> +       Jumps to the target line number within the same synth
>> +       code specified by vX+YYYY if the zero flag of the
>> +       condition variable is set otherwise do nothing.  */
>> +#define AVSEQ_SYNTH_CODE_INSTRUCTION_JUMPEQ  0x08
>> +
>> +    /** 0x09: JUMPNE  vX+YYYY
>> +       Jumps to the target line number within the same synth
>> +       code specified by vX+YYYY if the zero flag of the
>> +       condition variable is cleared otherwise do nothing.  */
>> +#define AVSEQ_SYNTH_CODE_INSTRUCTION_JUMPNE  0x09
>> +
>> +    /** 0x0A: JUMPPL  vX+YYYY
>> +       Jumps to the target line number within the same synth
>> +       code specified by vX+YYYY if the negative flag of the
>> +       condition variable is cleared otherwise do nothing.  */
>> +#define AVSEQ_SYNTH_CODE_INSTRUCTION_JUMPPL  0x0A
>> +
>> +    /** 0x0B: JUMPMI  vX+YYYY
>> +       Jumps to the target line number within the same synth
>> +       code specified by vX+YYYY if the negative flag of the
>> +       condition variable is set otherwise do nothing.  */
>> +#define AVSEQ_SYNTH_CODE_INSTRUCTION_JUMPMI  0x0B
>> +
>> +    /** 0x0C: JUMPLT  vX+YYYY
>> +       Jumps to the target line number within the same synth
>> +       code specified by vX+YYYY if either the negative or
>> +       the overflow flag of the condition variable are set,
>> +       like a signed less than comparision, otherwise will
>> +       do nothing.  */
>> +#define AVSEQ_SYNTH_CODE_INSTRUCTION_JUMPLT  0x0C
>> +
>>     
>
> that all looks like it should use a enum
>   

Will be done tonight.

>
> [...]
>   
>> +    /** Initial status of volume variable condition status register.  */
>> +    uint16_t vol_cond_var;
>> +#define AVSEQ_SYNTH_VOL_COND_VAR_CARRY     0x01 ///< Carry (C) bit for volume condition variable
>> +#define AVSEQ_SYNTH_VOL_COND_VAR_OVERFLOW  0x02 ///< Overflow (V) bit for volume condition variable
>> +#define AVSEQ_SYNTH_VOL_COND_VAR_ZERO      0x04 ///< Zero (Z) bit for volume condition variable
>> +#define AVSEQ_SYNTH_VOL_COND_VAR_NEGATIVE  0x08 ///< Negative (N) bit for volume condition variable
>> +#define AVSEQ_SYNTH_VOL_COND_VAR_EXTEND    0x10 ///< Extend (X) bit for volume condition variable
>> +
>> +    /** Initial status of panning variable condition status register.  */
>> +    uint16_t pan_cond_var;
>> +#define AVSEQ_SYNTH_PAN_COND_VAR_CARRY     0x01 ///< Carry (C) bit for panning condition variable
>> +#define AVSEQ_SYNTH_PAN_COND_VAR_OVERFLOW  0x02 ///< Overflow (V) bit for panning condition variable
>> +#define AVSEQ_SYNTH_PAN_COND_VAR_ZERO      0x04 ///< Zero (Z) bit for panning condition variable
>> +#define AVSEQ_SYNTH_PAN_COND_VAR_NEGATIVE  0x08 ///< Negative (N) bit for panning condition variable
>> +#define AVSEQ_SYNTH_PAN_COND_VAR_EXTEND    0x10 ///< Extend (X) bit for panning condition variable
>> +
>> +    /** Initial status of slide variable condition status register.  */
>> +    uint16_t slide_cond_var;
>> +#define AVSEQ_SYNTH_SLD_COND_VAR_CARRY     0x01 ///< Carry (C) bit for slide condition variable
>> +#define AVSEQ_SYNTH_SLD_COND_VAR_OVERFLOW  0x02 ///< Overflow (V) bit for slide condition variable
>> +#define AVSEQ_SYNTH_SLD_COND_VAR_ZERO      0x04 ///< Zero (Z) bit for slide condition variable
>> +#define AVSEQ_SYNTH_SLD_COND_VAR_NEGATIVE  0x08 ///< Negative (N) bit for slide condition variable
>> +#define AVSEQ_SYNTH_SLD_COND_VAR_EXTEND    0x10 ///< Extend (X) bit for slide condition variable
>> +
>> +    /** Initial status of special variable condition status register.  */
>> +    uint16_t special_cond_var;
>> +#define AVSEQ_SYNTH_SPC_COND_VAR_CARRY     0x01 ///< Carry (C) bit for special condition variable
>> +#define AVSEQ_SYNTH_SPC_COND_VAR_OVERFLOW  0x02 ///< Overflow (V) bit for special condition variable
>> +#define AVSEQ_SYNTH_SPC_COND_VAR_ZERO      0x04 ///< Zero (Z) bit for special condition variable
>> +#define AVSEQ_SYNTH_SPC_COND_VAR_NEGATIVE  0x08 ///< Negative (N) bit for special condition variable
>> +#define AVSEQ_SYNTH_SPC_COND_VAR_EXTEND    0x10 ///< Extend (X) bit for special condition variable
>>     
>
> these defines are repeated, i guess that could be avoided
> the same seems true for other flags in this file
>   

Fixed.

> also there are a huge number of large headers, is all this needed as public
> interface between file reading - playing - editing - writing?
>   

Updated patch available.

-- 

Best regards,
                   :-) Basty/CDGS (-:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: synth.h_20100715.patch
Type: text/x-diff
Size: 66975 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/attachments/20100715/28ede2fc/attachment.patch>


More information about the FFmpeg-soc mailing list