Changeset 253
- Timestamp:
- 03/29/07 13:16:59 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
winamp-musepack/trunk/mpc_player.cpp
r251 r253 30 30 31 31 #include <taglib/tag.h> 32 #include <taglib/tfile.h> 32 33 33 34 … … 188 189 if (length_in_ms) *length_in_ms = getLength(); 189 190 if (title) { 190 if(tag_file == 0) 191 if(tag_file == 0) { 191 192 tag_file = new TagLib::FileRef(lastfn, false); 193 (tag_file->file())->useWinAnsiCP(true); 194 } 192 195 193 196 if (tag_file->isNull() || !tag_file->tag()) { … … 315 318 tmp << "\nSamples : " << si.samples; 316 319 tmp << "\nTrack Peak : " << si.peak_title / 256. << " dB"; 317 tmp << "\nTrack Gain: " << si.gain_title / 256. << " dB";320 tmp << "\nTrack Level : " << si.gain_title / 256. << " dB"; 318 321 tmp << "\nAlbum Peak : " << si.peak_album / 256. << " dB"; 319 tmp << "\nAlbum Gain: " << si.gain_album / 256. << " dB";322 tmp << "\nAlbum Level : " << si.gain_album / 256. << " dB"; 320 323 321 324 SetDlgItemText(hDlg, IDC_STREAM_INFO, tmp.str().c_str()); 322 325 323 if(tag_file == 0) 326 if(tag_file == 0) { 324 327 tag_file = new TagLib::FileRef(lastfn, false); 328 (tag_file->file())->useWinAnsiCP(true); 329 } 325 330 326 331 if (!tag_file->isNull() && tag_file->tag()) { 327 332 TagLib::Tag *tag = tag_file->tag(); 328 SetDlgItemText(hDlg, IDC_TITLE, tag->title().toCString(true)); 329 SetDlgItemText(hDlg, IDC_ARTIST, tag->artist().toCString(true)); 330 SetDlgItemText(hDlg, IDC_ALBUM, tag->album().toCString(true)); 333 WCHAR buf[2048]; 334 335 MultiByteToWideChar(CP_UTF8, 0, tag->title().toCString(true), -1, buf, 2048); 336 SetDlgItemTextW(hDlg, IDC_TITLE, buf); 337 MultiByteToWideChar(CP_UTF8, 0, tag->artist().toCString(true), -1, buf, 2048); 338 SetDlgItemTextW(hDlg, IDC_ARTIST, buf); 339 MultiByteToWideChar(CP_UTF8, 0, tag->album().toCString(true), -1, buf, 2048); 340 SetDlgItemTextW(hDlg, IDC_ALBUM, buf); 331 341 tmp.str(""); 332 342 tmp << tag->year(); … … 335 345 tmp << tag->track(); 336 346 SetDlgItemText(hDlg, IDC_TRACK, tmp.str().c_str()); 337 SetDlgItemText(hDlg, IDC_GENRE, tag->genre().toCString(true)); 338 SetDlgItemText(hDlg, IDC_COMMENT, tag->comment().toCString(true)); 347 MultiByteToWideChar(CP_UTF8, 0, tag->genre().toCString(true), -1, buf, 2048); 348 SetDlgItemTextW(hDlg, IDC_GENRE, buf); 349 MultiByteToWideChar(CP_UTF8, 0, tag->comment().toCString(true), -1, buf, 2048); 350 SetDlgItemTextW(hDlg, IDC_COMMENT, buf); 339 351 } 340 352 }
Note: See TracChangeset
for help on using the changeset viewer.