Changeset 204 for libmpc/branches/r2d/mpc2sv8/mpc2sv8.c
- Timestamp:
- 02/08/07 21:36:52 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libmpc/branches/r2d/mpc2sv8/mpc2sv8.c
r203 r204 80 80 mpc_status err; 81 81 mpc_encoder_t e; 82 mpc_uint_t si_size; 82 83 83 84 printf("mpc2sv8 - musepack (mpc) sv7 to sv8 converter\n"); … … 105 106 writeStreamInfo( &e, si.max_band, si.ms > 0, si.samples, si.sample_freq, 106 107 si.channels); // FIXME : convert replay gain info 107 writeBlock(&e, "SI", MPC_TRUE);108 si_size = writeBlock(&e, "SI", MPC_TRUE, 0); 108 109 writeEncoderInfo(&e, si.profile, si.pns, 0, 0, 0, 0); // FIXME : convert encoder information 109 writeBlock(&e, "EI", MPC_FALSE );110 writeBlock(&e, "EI", MPC_FALSE, 0); 110 111 e.seek_ptr = ftell(e.outputFile); 111 112 writeBits (&e, 0, 8); 112 113 writeBits (&e, 0, 32); // jump 40 bits for seek table pointer 113 writeBlock(&e, "SP", MPC_FALSE ); // reserve space for seek pointer114 writeBlock(&e, "SP", MPC_FALSE, 0); // reserve space for seek pointer 114 115 while(MPC_TRUE) 115 116 { … … 130 131 e.seek_pos++; 131 132 } 132 writeBlock(&e, "AD", MPC_FALSE );133 writeBlock(&e, "AD", MPC_FALSE, 0); 133 134 writeSeekTable(&e); 134 writeBlock(&e, "ST", MPC_FALSE); // write seek table block 135 writeBlock(&e, "SE", MPC_FALSE); // write end of stream block 136 // FIXME : put correct stream length in SI block 135 writeBlock(&e, "ST", MPC_FALSE, 0); // write seek table block 136 writeBlock(&e, "SE", MPC_FALSE, 0); // write end of stream block 137 if (demux->d->samples != si.samples) { 138 fseek(e.outputFile, e.seek_ref + 4, SEEK_SET); 139 writeStreamInfo( &e, si.max_band, si.ms > 0, demux->d->samples, 140 si.sample_freq, si.channels); 141 writeBlock(&e, "SI", MPC_TRUE, si_size); 142 fseek(e.outputFile, 0, SEEK_END); 143 } 137 144 138 145 // copie fin fichier
Note: See TracChangeset
for help on using the changeset viewer.