Mercurial > audlegacy-plugins
comparison src/flac/plugin.c @ 1190:ed2d7787779e trunk
more warning elimination.
| author | Yoshiki Yazawa <yaz@cc.rim.or.jp> |
|---|---|
| date | Thu, 21 Jun 2007 17:33:00 +0900 |
| parents | cb1502e462f9 |
| children |
comparison
equal
deleted
inserted
replaced
| 1189:af5bd4592100 | 1190:ed2d7787779e |
|---|---|
| 143 #define SAMPLES_PER_WRITE 512 | 143 #define SAMPLES_PER_WRITE 512 |
| 144 #define SAMPLE_BUFFER_SIZE ((FLAC__MAX_BLOCK_SIZE + SAMPLES_PER_WRITE) * FLAC_PLUGIN__MAX_SUPPORTED_CHANNELS * (24/8)) | 144 #define SAMPLE_BUFFER_SIZE ((FLAC__MAX_BLOCK_SIZE + SAMPLES_PER_WRITE) * FLAC_PLUGIN__MAX_SUPPORTED_CHANNELS * (24/8)) |
| 145 static FLAC__byte sample_buffer_[SAMPLE_BUFFER_SIZE]; | 145 static FLAC__byte sample_buffer_[SAMPLE_BUFFER_SIZE]; |
| 146 static unsigned sample_buffer_first_, sample_buffer_last_; | 146 static unsigned sample_buffer_first_, sample_buffer_last_; |
| 147 | 147 |
| 148 static FLAC__StreamDecoder *decoder_ = 0, *decoder2 = 0; | 148 static FLAC__StreamDecoder *decoder_ = 0; |
| 149 static stream_data_struct stream_data_; | 149 static stream_data_struct stream_data_; |
| 150 static GThread *decode_thread_; | 150 static GThread *decode_thread_; |
| 151 static FLAC__bool audio_error_ = false; | 151 static FLAC__bool audio_error_ = false; |
| 152 static FLAC__bool is_big_endian_host_; | 152 static FLAC__bool is_big_endian_host_; |
| 153 | 153 |
| 164 else | 164 else |
| 165 flac_ip. set_info((char*) title, length_in_msec, -1, stream_data_.sample_rate, stream_data_.channels); | 165 flac_ip. set_info((char*) title, length_in_msec, -1, stream_data_.sample_rate, stream_data_.channels); |
| 166 } | 166 } |
| 167 } | 167 } |
| 168 | 168 |
| 169 #if 0 | |
| 169 static gchar* homedir() | 170 static gchar* homedir() |
| 170 { | 171 { |
| 171 gchar *result; | 172 gchar *result; |
| 172 char *env_home = getenv("HOME"); | 173 char *env_home = getenv("HOME"); |
| 173 if (env_home) { | 174 if (env_home) { |
| 181 result = pwent ? g_strdup (pwent->pw_dir) : NULL; | 182 result = pwent ? g_strdup (pwent->pw_dir) : NULL; |
| 182 endpwent(); | 183 endpwent(); |
| 183 } | 184 } |
| 184 return result; | 185 return result; |
| 185 } | 186 } |
| 187 #endif | |
| 186 | 188 |
| 187 void FLAC_XMMS__init() | 189 void FLAC_XMMS__init() |
| 188 { | 190 { |
| 189 ConfigDb *db; | 191 ConfigDb *db; |
| 190 FLAC__uint32 test = 1; | 192 FLAC__uint32 test = 1; |
| 191 gchar *tmp = NULL; | |
| 192 | 193 |
| 193 is_big_endian_host_ = (*((FLAC__byte*)(&test)))? false : true; | 194 is_big_endian_host_ = (*((FLAC__byte*)(&test)))? false : true; |
| 194 | 195 |
| 195 flac_cfg.title.tag_override = FALSE; | 196 flac_cfg.title.tag_override = FALSE; |
| 196 if (flac_cfg.title.tag_format) | 197 if (flac_cfg.title.tag_format) |
