decoder/wildmidi: support version 0.2.3
In libwildmidi 0.2.3, the function WildMidi_SampledSeek() was removed, without changing the SO name. This patch adds an autoconf check for that function. Fall back to WildMidi_FastSeek() if WildMidi_SampledSeek() is not available anymore.
This commit is contained in:
		
							
								
								
									
										2
									
								
								NEWS
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								NEWS
									
									
									
									
									
								
							@@ -1,4 +1,6 @@
 | 
				
			|||||||
ver 0.15.12 (2010/??/??)
 | 
					ver 0.15.12 (2010/??/??)
 | 
				
			||||||
 | 
					* decoders:
 | 
				
			||||||
 | 
					  - wildmidi: support version 0.2.3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ver 0.15.11 (2010/06/14)
 | 
					ver 0.15.11 (2010/06/14)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -950,6 +950,10 @@ if test x$enable_wildmidi = xyes; then
 | 
				
			|||||||
	AC_CHECK_LIB(WildMidi, WildMidi_Init,,
 | 
						AC_CHECK_LIB(WildMidi, WildMidi_Init,,
 | 
				
			||||||
		AC_MSG_ERROR([libwildmidi not found]))
 | 
							AC_MSG_ERROR([libwildmidi not found]))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						AC_CHECK_LIB(WildMidi, WildMidi_SampledSeek,
 | 
				
			||||||
 | 
							[AC_DEFINE(HAVE_WILDMIDI_SAMPLED_SEEK, 1,
 | 
				
			||||||
 | 
								[Defined if WildMidi_SampledSeek() is available (libwildmidi <= 0.2.2)])])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	CFLAGS=$oldcflags
 | 
						CFLAGS=$oldcflags
 | 
				
			||||||
	LIBS=$oldlibs
 | 
						LIBS=$oldlibs
 | 
				
			||||||
	CPPFLAGS=$oldcppflags
 | 
						CPPFLAGS=$oldcppflags
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -99,7 +99,11 @@ wildmidi_file_decode(struct decoder *decoder, const char *path_fs)
 | 
				
			|||||||
			unsigned long seek_where = WILDMIDI_SAMPLE_RATE *
 | 
								unsigned long seek_where = WILDMIDI_SAMPLE_RATE *
 | 
				
			||||||
				decoder_seek_where(decoder);
 | 
									decoder_seek_where(decoder);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef HAVE_WILDMIDI_SAMPLED_SEEK
 | 
				
			||||||
			WildMidi_SampledSeek(wm, &seek_where);
 | 
								WildMidi_SampledSeek(wm, &seek_where);
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
								WildMidi_FastSeek(wm, &seek_where);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
			decoder_command_finished(decoder);
 | 
								decoder_command_finished(decoder);
 | 
				
			||||||
			cmd = DECODE_COMMAND_NONE;
 | 
								cmd = DECODE_COMMAND_NONE;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user