Index: src/io/source.c
===================================================================
--- src/io/source.c	(revision 2d3212aaa3cd67f59b3454c6263cf685a35e3d23)
+++ src/io/source.c	(revision 79822038bcad765c48f6004c428d65dd3c483f2e)
@@ -82,2 +82,11 @@
 }
 
+uint_t aubio_source_seek (aubio_source_t * s, uint_t seek ) {
+#ifdef __APPLE__
+  return aubio_source_apple_audio_seek ((aubio_source_apple_audio_t *)s->source, seek);
+#else /* __APPLE__ */
+#if HAVE_SNDFILE
+  return aubio_source_sndfile_seek ((aubio_source_sndfile_t *)s->source, seek);
+#endif /* HAVE_SNDFILE */
+#endif /* __APPLE__ */
+}
Index: src/io/source.h
===================================================================
--- src/io/source.h	(revision 2d3212aaa3cd67f59b3454c6263cf685a35e3d23)
+++ src/io/source.h	(revision 79822038bcad765c48f6004c428d65dd3c483f2e)
@@ -80,4 +80,16 @@
 /**
 
+  seek source object
+
+  \param s source object, created with ::new_aubio_source
+  \param pos position to seek to, in frames
+
+  \return 0 if sucessful, non-zero on failure
+
+*/
+uint_t aubio_source_seek (aubio_source_t * s, uint_t pos);
+
+/**
+
   close source and cleanup memory
 
Index: src/io/source_apple_audio.c
===================================================================
--- src/io/source_apple_audio.c	(revision 2d3212aaa3cd67f59b3454c6263cf685a35e3d23)
+++ src/io/source_apple_audio.c	(revision 79822038bcad765c48f6004c428d65dd3c483f2e)
@@ -37,5 +37,6 @@
 struct _aubio_source_apple_audio_t {
   uint_t channels;
-  uint_t samplerate;
+  uint_t samplerate;          //< requested samplerate
+  uint_t source_samplerate;   //< actual source samplerate
   uint_t block_size;
 
@@ -81,4 +82,5 @@
   }
   s->samplerate = samplerate;
+  s->source_samplerate = fileFormat.mSampleRate;
 
   AudioStreamBasicDescription clientFormat;
@@ -144,5 +146,5 @@
   UInt32 c, v, loadedPackets = s->block_size;
   OSStatus err = ExtAudioFileRead(s->audioFile, &loadedPackets, &s->bufferList);
-  if (err) { AUBIO_ERROR("error in ExtAudioFileRead, %d\n", (int)err); goto beach;}
+  if (err) { AUBIO_ERROR("error in ExtAudioFileRead %s %d\n", s->path, (int)err); goto beach;}
 
   short *data = (short*)s->bufferList.mBuffers[0].mData;
@@ -182,4 +184,11 @@
 }
 
+uint_t aubio_source_apple_audio_seek (aubio_source_apple_audio_t * s, uint_t pos) {
+  Float64 ratio = (Float64)(s->source_samplerate) / (Float64)(s->samplerate);
+  OSStatus err = ExtAudioFileSeek(s->audioFile, pos);
+  if (err) AUBIO_ERROR("source_apple_audio: error in ExtAudioFileSeek (%d)\n", (int)err);
+  return err;
+}
+
 uint_t aubio_source_apple_audio_get_samplerate(aubio_source_apple_audio_t * s) {
   return s->samplerate;
Index: src/io/source_apple_audio.h
===================================================================
--- src/io/source_apple_audio.h	(revision 2d3212aaa3cd67f59b3454c6263cf685a35e3d23)
+++ src/io/source_apple_audio.h	(revision 79822038bcad765c48f6004c428d65dd3c483f2e)
@@ -86,4 +86,16 @@
 /**
 
+  seek source object
+
+  \param s source object, created with ::new_aubio_source
+  \param pos position to seek to, in frames
+
+  \return 0 if sucessful, non-zero on failure
+
+*/
+uint_t aubio_source_apple_audio_seek (aubio_source_apple_audio_t * s, uint_t pos);
+
+/**
+
   close source and cleanup memory
 
Index: src/io/source_sndfile.c
===================================================================
--- src/io/source_sndfile.c	(revision 2d3212aaa3cd67f59b3454c6263cf685a35e3d23)
+++ src/io/source_sndfile.c	(revision 79822038bcad765c48f6004c428d65dd3c483f2e)
@@ -177,4 +177,9 @@
 }
 
+uint_t aubio_source_sndfile_seek (aubio_source_sndfile_t * s, uint_t pos) {
+  uint_t resampled_pos = (uint_t)ROUND(pos * s->input_samplerate * 1. / s->samplerate);
+  return sf_seek (s->handle, resampled_pos, SEEK_SET);
+}
+
 void del_aubio_source_sndfile(aubio_source_sndfile_t * s){
   if (!s) return;
Index: src/io/source_sndfile.h
===================================================================
--- src/io/source_sndfile.h	(revision 2d3212aaa3cd67f59b3454c6263cf685a35e3d23)
+++ src/io/source_sndfile.h	(revision 79822038bcad765c48f6004c428d65dd3c483f2e)
@@ -85,4 +85,16 @@
 /**
 
+  seek source object
+
+  \param s source object, created with ::new_aubio_source_sndfile
+  \param pos position to seek to, in frames
+
+  \return 0 if sucessful, non-zero on failure
+
+*/
+uint_t aubio_source_sndfile_seek (aubio_source_sndfile_t *s, uint_t pos);
+
+/**
+
   close source and cleanup memory
 
