From: Daniel B. <d_b...@us...> - 2002-02-05 06:18:22
|
Update of /cvsroot/emu10k1/emu10k1/utils/mixer/lib In directory usw-pr-cvs1:/tmp/cvs-serv12200/lib Modified Files: Tag: audigy file.c Log Message: Added file code translation for Audigy to emu-dspmgr Index: file.c =================================================================== RCS file: /cvsroot/emu10k1/emu10k1/utils/mixer/lib/file.c,v retrieving revision 1.3.2.2 retrieving revision 1.3.2.3 diff -C2 -d -r1.3.2.2 -r1.3.2.3 *** file.c 2002/02/04 08:52:58 1.3.2.2 --- file.c 2002/02/05 06:18:19 1.3.2.3 *************** *** 77,83 **** static int read_patch_code(struct dsp_patch_manager *mgr, struct dsp_patch *patch, FILE * fp) { ! int i, op; ! __u32 A, R, X, Y; ! patch->code = (__u32 *) malloc(patch->code_size * sizeof(__u32)); --- 77,83 ---- static int read_patch_code(struct dsp_patch_manager *mgr, struct dsp_patch *patch, FILE * fp) { ! int i; ! __u32 new_op, operand; ! patch->code = (__u32 *) malloc(patch->code_size * sizeof(__u32)); *************** *** 94,102 **** // for audigy cards we need to translate the instructions for(i=0;i<patch->code_size;i++){ ! patch->code[i] = (patch->code[i]&0x3ff) | ((patch->code[i]&0xFFC00<<2)) ! | ((patch->code[i]&0x00f00000)<<4); } - - return 0; } --- 94,101 ---- // for audigy cards we need to translate the instructions for(i=0;i<patch->code_size;i++){ ! new_op=(patch->code[i]&0x00f00000)<<4; ! new_op|=(operand=(patch->code[i]&0x3ff))&0x40?operand+0x80:operand; ! patch->code[i]=new_op|((operand=(patch->code[i]&0xffc00)<<2)&0x40000?operand+0x80000:operand); } return 0; } |