Changeset 189
- Timestamp:
- 12/24/06 17:17:50 (18 years ago)
- Location:
- winamp-musepack/trunk/winamp-musepack
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
winamp-musepack/trunk/winamp-musepack/mpc_player.cpp
r188 r189 6 6 #include <mpc/minimax.h> 7 7 8 #include <tag.h> 8 9 9 10 mpc_player::mpc_player(In_Module * in_mod) … … 31 32 mod = in_mod; 32 33 wait_event = 0; 34 tag_file = 0; 33 35 } 34 36 … … 57 59 demux = 0; 58 60 mpc_reader_exit_stdio(&reader); 61 } 62 if (tag_file != 0) { 63 delete tag_file; 64 tag_file = 0; 59 65 } 60 66 } … … 158 164 if (length_in_ms) *length_in_ms = getLength(); 159 165 if (title) { 160 char *p = lastfn + strlen(lastfn); 161 while (*p != '\\' && p >= lastfn) p--; 162 strcpy(title,++p); 166 if(tag_file == 0) 167 tag_file = new TagLib::FileRef(lastfn, false); 168 169 if (tag_file->isNull() || !tag_file->tag()) { 170 char *p = lastfn + strlen(lastfn); 171 while (*p != '\\' && p >= lastfn) p--; 172 strcpy(title,++p); 173 } else { 174 TagLib::Tag *tag = tag_file->tag(); 175 sprintf(title, "%s - %s", tag->artist().toCString(), tag->title().toCString()); 176 //tag->artist() 177 //tag->album() 178 //tag->year() 179 //tag->comment() 180 //tag->track() 181 //tag->genre() 182 } 163 183 } 164 184 } -
winamp-musepack/trunk/winamp-musepack/mpc_player.h
r188 r189 2 2 3 3 #include <mpcdec/mpcdec.h> 4 #include <fileref.h> 4 5 5 6 // post this to the main window at end of file (after playback as stopped) … … 30 31 mpc_reader reader; 31 32 mpc_demux* demux; 33 TagLib::FileRef * tag_file; 34 32 35 MPC_SAMPLE_FORMAT sample_buffer[MPC_DECODER_BUFFER_LENGTH]; 33 36 -
winamp-musepack/trunk/winamp-musepack/winamp-musepack.vcproj
r188 r189 38 38 Name="VCCLCompilerTool" 39 39 Optimization="0" 40 AdditionalIncludeDirectories="..\..\libmpc\include "40 AdditionalIncludeDirectories="..\..\libmpc\include;C:\Program Files\taglib\include\taglib" 41 41 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE" 42 42 DebugInformationFormat="1" … … 53 53 <Tool 54 54 Name="VCLinkerTool" 55 AdditionalDependencies="User32.lib libmpcdec_d.lib libcommon_d.lib "55 AdditionalDependencies="User32.lib libmpcdec_d.lib libcommon_d.lib tag.lib" 56 56 OutputFile="E:\Program Files\Winamp\Plugins\in_mpc.dll" 57 AdditionalLibraryDirectories="..\..\libmpc\win32\Debug "57 AdditionalLibraryDirectories="..\..\libmpc\win32\Debug;C:\Program Files\taglib\lib" 58 58 IgnoreAllDefaultLibraries="false" 59 IgnoreDefaultLibraryNames="LIBCMTD "59 IgnoreDefaultLibraryNames="LIBCMTD;MSVCRT" 60 60 GenerateDebugInformation="true" 61 61 />
Note: See TracChangeset
for help on using the changeset viewer.