music_mad.c
changeset 407 73a92ea2c061
parent 386 695494546b3c
child 473 60b7e1c4f6b2
     1.1 --- a/music_mad.c	Fri Oct 02 13:50:36 2009 +0000
     1.2 +++ b/music_mad.c	Fri Oct 02 14:16:12 2009 +0000
     1.3 @@ -233,7 +233,7 @@
     1.4    /*assert(mp3_mad->output_end <= MAD_OUTPUT_BUFFER_SIZE);*/
     1.5  }
     1.6  
     1.7 -void
     1.8 +int
     1.9  mad_getSamples(mad_data *mp3_mad, Uint8 *stream, int len) {
    1.10    int bytes_remaining;
    1.11    int num_bytes;
    1.12 @@ -258,7 +258,7 @@
    1.13  			 end-of-file.  Stop. */
    1.14  		  memset(out, 0, bytes_remaining);
    1.15  		  mp3_mad->status &= ~MS_playing;
    1.16 -		  return;
    1.17 +		  return bytes_remaining;
    1.18  		}
    1.19  	  } else {
    1.20  		decode_frame(mp3_mad);
    1.21 @@ -289,6 +289,7 @@
    1.22  	mp3_mad->output_begin += num_bytes;
    1.23  	bytes_remaining -= num_bytes;
    1.24    }
    1.25 +  return 0;
    1.26  }
    1.27  
    1.28  void