comparison src/filewriter/flac.c @ 2950:dcd8d93ba781

- mp3: adapted to lame-3.98. now filewriter writes valid TLEN. - deleted unnecessary variable "written".
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Sat, 11 Oct 2008 02:02:41 +0900
parents 31d6c44ffef2
children
comparison
equal deleted inserted replaced
2949:0f0227b29f43 2950:dcd8d93ba781
52 static guint64 olen = 0; 52 static guint64 olen = 0;
53 53
54 static FLAC__StreamEncoderWriteStatus flac_write_cb(const FLAC__StreamEncoder *encoder, 54 static FLAC__StreamEncoderWriteStatus flac_write_cb(const FLAC__StreamEncoder *encoder,
55 const FLAC__byte buffer[], size_t bytes, unsigned samples, unsigned current_frame, gpointer data) 55 const FLAC__byte buffer[], size_t bytes, unsigned samples, unsigned current_frame, gpointer data)
56 { 56 {
57 written += aud_vfs_fwrite(buffer, bytes, 1, (VFSFile *) data); 57 aud_vfs_fwrite(buffer, bytes, 1, (VFSFile *) data);
58 58
59 return FLAC__STREAM_ENCODER_WRITE_STATUS_OK; 59 return FLAC__STREAM_ENCODER_WRITE_STATUS_OK;
60 } 60 }
61 61
62 static FLAC__StreamEncoderSeekStatus flac_seek_cb(const FLAC__StreamEncoder *encoder, 62 static FLAC__StreamEncoderSeekStatus flac_seek_cb(const FLAC__StreamEncoder *encoder,
91 g_free(scratch); \ 91 g_free(scratch); \
92 } 92 }
93 93
94 static gint flac_open(void) 94 static gint flac_open(void)
95 { 95 {
96 written = 0;
97 olen = 0; 96 olen = 0;
98 97
99 flac_encoder = FLAC__stream_encoder_new(); 98 flac_encoder = FLAC__stream_encoder_new();
100 99
101 FLAC__stream_encoder_set_channels(flac_encoder, input.channels); 100 FLAC__stream_encoder_set_channels(flac_encoder, input.channels);