Changeset 191 for winamp-musepack/trunk/winamp-musepack/mpc_player.cpp
- Timestamp:
- 12/25/06 03:15:19 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
winamp-musepack/trunk/winamp-musepack/mpc_player.cpp
r190 r191 19 19 20 20 #include <windows.h> 21 #include <math.h> 21 22 22 23 #include "in2.h" 23 24 #include "mpc_player.h" 24 25 #include <mpc/minimax.h> 26 #include "mpc_info.h" 25 27 26 28 #include <tag.h> 29 30 using namespace winamp_musepack; 27 31 28 32 mpc_player::mpc_player(In_Module * in_mod) … … 209 213 if (wait_event) SetEvent(wait_event); 210 214 if (WaitForSingleObject(thread_handle,10000) == WAIT_TIMEOUT) { 211 MessageBox (mod->hMainWindow,"error asking thread to die!\n",215 MessageBoxA(mod->hMainWindow,"error asking thread to die!\n", 212 216 "error killing decode thread", 0); 213 217 TerminateThread(thread_handle, 0); … … 266 270 return 0; 267 271 } 272 273 int mpc_player::infoDlg(HWND hwnd) 274 { 275 mpc_info infoBox; 276 System::String ^ tmp; 277 278 tmp = "Streamversion "; 279 tmp += si.stream_version; 280 tmp += "\nEncoder : "; 281 tmp += gcnew String(si.encoder); 282 tmp += "\nProfile : "; 283 tmp += gcnew String(si.profile_name); 284 tmp += "\nPNS : "; 285 tmp += si.pns ? "on" : "off"; 286 tmp += "\nGapless : "; 287 tmp += si.is_true_gapless ? "on" : "off"; 288 tmp += "\nAverage bitrate : "; 289 tmp += floor(si.average_bitrate * 1.e-3 + .5); 290 tmp += " Kbps \nSamplerate : "; 291 tmp += si.sample_freq; 292 tmp += "\nChannels : "; 293 tmp += si.channels; 294 tmp += "\nFile size : "; 295 tmp += si.total_file_length; 296 tmp += " Bytes"; 297 // FIXME : add replay gain info 298 299 infoBox.lblStreamInfo->Text = tmp; 300 301 302 if(tag_file == 0) 303 tag_file = new TagLib::FileRef(lastfn, false); 304 305 if (!tag_file->isNull() && tag_file->tag()) { 306 TagLib::Tag *tag = tag_file->tag(); 307 infoBox.txtTitle->Text = gcnew String(tag->title().toCString(true)); 308 infoBox.txtArtist->Text = gcnew String(tag->artist().toCString(true)); 309 infoBox.txtAlbum->Text = gcnew String(tag->album().toCString(true)); 310 infoBox.txtYear->Text += tag->year(); 311 infoBox.txtTrack->Text += tag->track(); 312 infoBox.comboGenre->Text = gcnew String(tag->genre().toCString(true)); 313 infoBox.txtComment->Text = gcnew String(tag->comment().toCString(true)); 314 } 315 316 infoBox.ShowDialog(); 317 return 0; 318 }
Note: See TracChangeset
for help on using the changeset viewer.